Commit Graph

85 Commits

Author SHA1 Message Date
5db7d4d1d5 DSPCore: Make the mailbox registers atomic. 2015-05-27 00:58:52 -04:00
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
6d9986846c Simplify some more license headers 2015-05-25 13:11:41 +02:00
ac89d00718 DSPCaptureLogger: Add virtual destructor
Silences a warning.
2015-05-24 00:44:49 -04:00
76bbd46829 Core: Remove some header inclusions in header files
Replaces them with forward declarations of used types, or removes them entirely if they aren't used at all. This also replaces certain Common headers with less inclusive ones (in terms of definitions they pull in).
2015-05-08 22:38:59 -04:00
b3aaa46d42 Merge pull request #2088 from Sintendo/diecmp
Emit 'TEST reg, reg' for 'CMP reg, 0' automatically
2015-04-23 16:34:23 -04:00
ad95454d04 Merge pull request #2223 from phire/imm
Cleanup OpArg, make immediates more explicit.
2015-04-23 01:53:18 -04:00
2211aead7f DSPInterpreter: Remove unused volatile variable and related function 2015-04-03 22:46:30 -04:00
c19482c9a3 Add function to emit CMP, or TEST when possible
Also, a spelling mistake.
2015-03-22 17:22:27 +01:00
b35c34186c More minor DSP JIT optimizations 2015-03-22 17:14:38 +01:00
6262a9bcbe Make immediates more explicit
Instead of just casting OpArg::offset when needed, add some
accessor functions.

Also add some safety asserts to catch any mistakes.
2015-03-17 18:49:26 +13:00
f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
46df8a5358 Correct clobber comments 2015-02-04 22:26:40 +01:00
ca0790e9c9 Merge Update_SR_Register64_Carry functions 2015-02-04 22:26:40 +01:00
34afe08de9 Minor DSP JIT optimizations 2015-02-04 22:26:39 +01:00
e07679114b Use emplace_* functions where in-place construction is preferable 2015-02-04 11:39:08 -05:00
f31b688cf5 More minor consistency changes 2015-01-12 22:28:12 -05:00
cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
4747cc7a15 Fix DSP CMPAR disassembly
Previously the two operand register selection bits were inverted, causing "CMPAR AC1, AX0.H" to be disassembled as "CMPAR AC0, AX1.H".

DSP RE is always fun: on the one hand Nintendo does a lot of stupid shit, so anything weird could be a legitimate bug of the UCode that is not supposed to make any sense. On the other hand, Dolphin *also* does a lot of stupid shit, so there's always that doubt.

Note: completely untested change - done with the GH text editor, just to show you how much I care :) . These operand descriptions are only used for disassembly, so no real behavior change is expected.
2014-12-13 04:14:51 +01:00
3eab75bc9c Core: Join some variable declarations and assignments 2014-11-15 20:21:35 -05:00
b25e1a2eb4 Various formatting and consistency fixes 2014-11-13 22:42:18 -05:00
b09ce72605 DSPAnalyzer: Use a std::array for the code flags 2014-10-30 12:45:27 -04:00
eb7f4dac50 Convert registersInUse to BitSet. 2014-10-25 16:57:25 -04:00
6e774f1b64 Add missing includes where headers depend on other headers having been included first.
This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import.  Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up.  The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH.  Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)
2014-10-21 21:22:16 -04:00
32dbdbe92f Corrected the step size bytes for the start of the DSP accelerator chunk. Patch by hk.konpie 2014-10-13 22:10:37 +11:00
711a8aa6ad Fixed the step_size_bytes in the ADPCM Accelerator loop taking into account the varying number of bytes that ADPCM steps by. 2014-10-13 22:10:37 +11:00
ab639b41ab DSPJitRegCache: Use std::array to represent the register arrays 2014-09-28 03:02:29 -04:00
8b578c7ba3 DSPJitRegCache: Merge two loops in popRegs. 2014-09-27 18:33:48 -04:00
fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
c5c0b36046 Remove the inaccurately named ABI_PushAllCalleeSavedRegsAndAdjustStack (it didn't preserve FPRs!) and replace with ABI_PushRegistersAndAdjustStack.
To avoid FPRs being pushed unnecessarily, I checked the uses: DSPEmitter
doesn't use FPRs, and VertexLoader doesn't use anything but RAX, so I
specified the register list accordingly.  The regular JIT, however, does
use FPRs, and as far as I can tell, it was incorrect not to save them in
the outer routine.  Since the dispatcher loop is only exited when
pausing or stopping, this should have no noticeable performance impact.
2014-09-08 01:00:10 -04:00
91a6962565 Take the size of the audio data into account when checking for the loop address. Fixes the static audio in the FMV of Megaman X Collection, Pac Man World 2, off pitched instruments in Skies of Arcadia and audio desync in the Taiko no Tatsujin series.
Fixes:
issue 7154
issue 7222
issue 7280
issue 7457
2014-09-01 21:43:33 +10:00
eb535be874 Core: Clean up brace placements 2014-08-30 18:06:49 -04:00
cf01f47b52 Fix bloody printf specifiers.
In particular, even in code that only runs on x86-64, you can't use
PRIx64 for size_t because, on OS X, one is unsigned long and the other
is unsigned long long and clang whines about the difference.  I guess
you could make a size_t specifier macro, but those are horribly ugly, so
I just used casting.

Anyone want to make a nice (and slow) template-based printf?

Now without bare 'unsigned'.
2014-08-24 15:56:41 -04:00
a013830b4f Core: Fix vertical alignment of a table in DSPTables.cpp 2014-08-19 13:58:59 -04:00
3baea48bba Removed warning caused by calling std::min<int> with size_t values 2014-08-15 13:23:19 -05:00
fe2321e117 Merge pull request #748 from lioncash/null
Core: Default initialize a pointer to nullptr in gdsp_do_dma()
2014-08-12 13:56:54 -07:00
11f730fd1e Core: Get rid of C-style struct typedefs 2014-08-09 21:58:08 -04:00
f927af20f2 Fix more warnings from #579 2014-08-07 03:24:42 +02:00
3c5326fd38 Core: Default initialize a pointer to nullptr in gdsp_do_dma()
The if-statement implies that this could fail in the switch statement somehow. If it does fail, then we'd be comparing with an uninitialized pointer.
2014-08-06 12:10:09 -04:00
42354035e2 Core: Remove unused file DSPJitUtil.h 2014-08-05 23:55:34 -04:00
95a8c24841 Merge pull request #723 from lioncash/warnings
Core: Fix two sets of warnings when compiling on Linux.
2014-08-03 21:25:44 -07:00
35bebe9ce0 Remove x86_32 from the DSP JIT. 2014-08-03 13:44:37 -05:00
10d3b7f8e9 Core: Fix formatting warnings in DSPJitRegCache 2014-08-02 18:48:10 -04:00
899bc84e98 Core: Remove now redundant assert conditions in some DSPJitRegCache functions 2014-08-01 20:49:48 -04:00
005004dfa5 Core: Fix cast warnings in DSPJitRegCache 2014-08-01 20:44:38 -04:00
5767691f4e Get rid of a few C-style struct declarations 2014-07-23 20:36:45 -04:00
0ccee6c87b Fix warnings unearthed by #579 2014-07-13 02:16:51 +02:00
6d3f249dcc mark all local variables as static 2014-07-11 16:10:20 +02:00
22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +02:00