Commit Graph

4450 Commits

Author SHA1 Message Date
Brett Lawson
5bce83075b Updated OSWaitRendezvousWithTimeout to be more accurate. 2016-07-10 02:53:23 -07:00
Brett Lawson
0e74f00e74 Implement stub for AXSetAuxReturnVolume. 2016-07-10 02:52:20 -07:00
Brett Lawson
2f67ffb69d Properly set the core return value from JIT.
Added an assertion to validate that returning from JIT occurs
at the right time and that it properly keeps track of the
current core through a affinity change.
2016-07-09 22:30:24 -07:00
Brett Lawson
ea8ff75d2e Do not write evicted registers to memory unless modified. 2016-07-09 22:30:15 -07:00
James Benton
afcb4fa92f kernel: Handle cpuSegfault properly when debugger is disabled.
It prints a nice message now.
2016-07-10 02:25:31 +01:00
James Benton
b0cfc4ccf3 common: Always include assert expression in output. 2016-07-10 02:24:38 +01:00
James Benton
7ab80634f5 opengl: Remove some unnecessary usage of enum names. 2016-07-10 01:42:30 +01:00
James Benton
1041bf9066 Add missing include.
I can't believe you've done this.
2016-07-10 01:40:34 +01:00
James Benton
8514a99944 Improve error messages by introducing decaf_assert.h 2016-07-10 01:38:42 +01:00
James Benton
6690d7e988 cpu: Use atomic.load rather than atomic_load.
Also compare_exchange_strong is more appropriate for compareAndSwapBreakpoints.
2016-07-09 13:54:44 +01:00
James Benton
ae74598279 trace: Fix printing of CR to match its real ordering of cr0..cr7 2016-07-09 13:37:59 +01:00
James Benton
83dfc66bfc opengl: Try to cleanup getStorageFormat a bit... 2016-07-09 13:36:49 +01:00
James Benton
f7db271e3b coreinit: Add missing wfunc_call to coreinit_memheap 2016-07-09 13:36:36 +01:00
James Benton
d57db498e6 coreinit: Move HardwareVersion enum to coreinit_enum.h 2016-07-09 13:36:22 +01:00
Brett Lawson
1e136c7140 Implement FMT_10_11_11_FLOAT using GL_R11F_G11F_B10F.
See previous commit for reasoning.
2016-07-08 02:18:41 -07:00
Brett Lawson
992153b164 Implement FMT_2_10_10_10 using GL_RGB10_A2.
This is valid as both byte-orders have RGB being 10 bits
and A being 2.  The only place that these formats will
differ is when we are loading/saving from PPC memory.
Which is already handled by the opengl_texture.cpp's
StorageFormat behaviour.
2016-07-08 16:48:26 -07:00
Brett Lawson
34f834aa75 Major refactor of the JIT to support register cacheing.
This implements an entirely new way of managing registers within
our instruction generators.  It works well, though jit_internal.h
seriously needs some refactoring in the future...
2016-07-08 01:25:36 -07:00
Brett Lawson
fd73906bc7 Save NIA back to registers when calling C++ code. 2016-07-08 01:25:31 -07:00
Brett Lawson
11d2889f95 Allocate more registers for the JIT to use. 2016-07-08 01:25:26 -07:00
Brett Lawson
be72586917 Implemented bspGetHardwareVersion according to WiiUBrew. 2016-07-08 01:25:21 -07:00
Brett Lawson
81c33a79e3 Properly unregister the unwind data when the runtime is freed. 2016-07-08 01:25:05 -07:00
Brett Lawson
89dcf8e571 Fix fastregionmap to avoid leaking memory when it is cleared. 2016-07-08 01:25:00 -07:00
Brett Lawson
ebacaed1f5 Throw error instead of logging a warning for missing SPR's. 2016-07-08 02:43:51 -07:00
Brett Lawson
81332e0959 cpu: Add mfspr UPIR to JIT. 2016-07-08 02:43:51 -07:00
James Benton
1ad09a1d6e cpu: Add mfspr UPIR to interpreter.
Still needs to be added to jit.
2016-07-08 02:07:26 +01:00
James Benton
4572be7d27 coreinit: Add support for PowerPC TLS sections and relocations.
Closes #126.
2016-07-08 00:44:20 +01:00
James Benton
02c6539323 coreinit: Fix alignment of some 64 bit members in OSThread. 2016-07-08 00:42:28 +01:00
James Benton
a2fa820f1b coreinit: Fix usage of default heap alloc/free. 2016-07-08 00:41:59 +01:00
Brett Lawson
b2ba397638 Improve JIT generator to elide multiple calls to dispatcher.
The JIT dispatcher will now go back and overwrite the caller's
target when it gets a static call.  This allows us to elide
calls to the dispatcher once the block has already been
generated.
2016-07-07 01:37:02 -07:00
Brett Lawson
162e6c8e03 Update JIT to handle a KC updating the NIA data. 2016-07-07 01:37:02 -07:00
Brett Lawson
2517f6e821 Properly handle application calling exit(...); 2016-07-07 01:37:01 -07:00
Brett Lawson
fb47b6dc7c Do not race mRunning on short-lived programs. 2016-07-07 01:37:01 -07:00
Brett Lawson
882919612a Do not store interrupt in its own register.
When we did this, it meant that even if we updated Core* during
a core-switch, we still checked interrupts on the wrong core.
2016-07-07 01:37:01 -07:00
Brett Lawson
8a7b0ad5f4 Refactor JIT to store generation state in the builder. 2016-07-07 01:37:01 -07:00
James Benton
5bebe09c0a decaf-sdl: Enable console output when launched from a console.
We must attach to the parent console and reopen stdout, nice one Windows.
2016-07-06 21:48:08 +01:00
James Benton
d79f2d240b hle/tests: Use cygpath only on cygwin. 2016-07-06 20:27:09 +01:00
James Benton
7cd35ab3d3 coreinit: Fix IM function return codes.
Looks like it returns the error codes straight out of IOS_ functions.
Which means they should return 0 on success.
2016-07-06 18:39:41 +01:00
Andrew Church
2d6f6657e5 coreinit: Add OSGetSymbolName. 2016-07-06 18:22:13 +01:00
Andrew Church
5d4c7c65d0 coreinit: Raise the log level of console output to info.
Otherwise it can easily get hidden by debug spam.  Also make the
distinction between the output source and the actual message clearer.
2016-07-06 18:22:13 +01:00
Andrew Church
77b72cb2e2 coreinit: Add FSGetErrorCodeForViewer.
It appears to do exactly the same thing as FSGetLastErrorCodeForViewer.
2016-07-06 18:22:13 +01:00
Andrew Church
6d35da0d1b coreinit: Add IM* functions. 2016-07-06 18:22:13 +01:00
Andrew Church
e44cb3a9ea gx2: Fix logic bug in GX2GetSurfaceFormatBits. 2016-07-07 01:04:08 +09:00
James Benton
a15bd48ffa opengl: Fix decafClearDepthStencil possibly messing with color attachment. 2016-07-06 02:17:52 +01:00
James Benton
8178fde45c nn_act: Add missing Register for IsParentalControlCheckEnabled. 2016-07-06 01:31:41 +01:00
James Benton
3998d622dc common: Remove #pragma optimize. 2016-07-06 01:31:36 +01:00
James Benton
c8627e2df9 coreinit: Fix use of path and mode strings in filesystem.
We must store a copy of these strings because async is fun.
2016-07-06 01:31:31 +01:00
James Benton
9c66d12d8a coreinit: Fix 0 being a valid directory handle. 2016-07-06 01:31:26 +01:00
Brett Lawson
13a73047d2 Do not disable interrupts when calling cpp_exception_init. 2016-07-06 02:30:55 -07:00
Brett Lawson
e9c5e8e1f1 Assert if we reschedule with interrupts disabled. 2016-07-06 02:30:34 -07:00
Brett Lawson
47edacd9be Added some assertions for the queues to make sure they behave. 2016-07-06 02:30:06 -07:00