80 Commits

Author SHA1 Message Date
Lioncash
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
comex
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
comex
ad95454d04 Merge pull request #2223 from phire/imm
Cleanup OpArg, make immediates more explicit.
2015-04-23 01:53:18 -04:00
Lioncash
2211aead7f DSPInterpreter: Remove unused volatile variable and related function 2015-04-03 22:46:30 -04:00
Sintendo
c19482c9a3 Add function to emit CMP, or TEST when possible
Also, a spelling mistake.
2015-03-22 17:22:27 +01:00
Sintendo
b35c34186c More minor DSP JIT optimizations 2015-03-22 17:14:38 +01:00
Scott Mansell
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
Tillmann Karras
f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
Sintendo
46df8a5358 Correct clobber comments 2015-02-04 22:26:40 +01:00
Sintendo
ca0790e9c9 Merge Update_SR_Register64_Carry functions 2015-02-04 22:26:40 +01:00
Sintendo
34afe08de9 Minor DSP JIT optimizations 2015-02-04 22:26:39 +01:00
Lioncash
e07679114b Use emplace_* functions where in-place construction is preferable 2015-02-04 11:39:08 -05:00
Stevoisiak
f31b688cf5 More minor consistency changes 2015-01-12 22:28:12 -05:00
Stevoisiak
cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
Pierre Bourdon
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
Lioncash
3eab75bc9c Core: Join some variable declarations and assignments 2014-11-15 20:21:35 -05:00
Stevoisiak
b25e1a2eb4 Various formatting and consistency fixes 2014-11-13 22:42:18 -05:00
Lioncash
b09ce72605 DSPAnalyzer: Use a std::array for the code flags 2014-10-30 12:45:27 -04:00
comex
eb7f4dac50 Convert registersInUse to BitSet. 2014-10-25 16:57:25 -04:00
comex
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
skidau
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
skidau
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
Lioncash
ab639b41ab DSPJitRegCache: Use std::array to represent the register arrays 2014-09-28 03:02:29 -04:00
Lioncash
8b578c7ba3 DSPJitRegCache: Merge two loops in popRegs. 2014-09-27 18:33:48 -04:00
Rohit Nirmal
fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
comex
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
skid
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
Lioncash
eb535be874 Core: Clean up brace placements 2014-08-30 18:06:49 -04:00
comex
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
Lioncash
a013830b4f Core: Fix vertical alignment of a table in DSPTables.cpp 2014-08-19 13:58:59 -04:00
Charles Rozhon
3baea48bba Removed warning caused by calling std::min<int> with size_t values 2014-08-15 13:23:19 -05:00
shuffle2
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
Lioncash
11f730fd1e Core: Get rid of C-style struct typedefs 2014-08-09 21:58:08 -04:00
Tillmann Karras
f927af20f2 Fix more warnings from #579 2014-08-07 03:24:42 +02:00
lioncash
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
Lioncash
42354035e2 Core: Remove unused file DSPJitUtil.h 2014-08-05 23:55:34 -04:00
Pierre Bourdon
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
Ryan Houdek
35bebe9ce0 Remove x86_32 from the DSP JIT. 2014-08-03 13:44:37 -05:00
Lioncash
10d3b7f8e9 Core: Fix formatting warnings in DSPJitRegCache 2014-08-02 18:48:10 -04:00
Lioncash
899bc84e98 Core: Remove now redundant assert conditions in some DSPJitRegCache functions 2014-08-01 20:49:48 -04:00
Lioncash
005004dfa5 Core: Fix cast warnings in DSPJitRegCache 2014-08-01 20:44:38 -04:00
Lioncash
5767691f4e Get rid of a few C-style struct declarations 2014-07-23 20:36:45 -04:00
Tillmann Karras
0ccee6c87b Fix warnings unearthed by #579 2014-07-13 02:16:51 +02:00
degasus
6d3f249dcc mark all local variables as static 2014-07-11 16:10:20 +02:00
degasus
22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +02:00
Lioncash
af7efaa461 [Core] Clean up the DSP disassembler
- Get rid of deletes.
- Clean out all of the sprintf calls. Now std::string based.
- Fully explicit function names, etc.
2014-07-02 20:19:39 -04:00
Pierre Bourdon
add090bde6 DSP: Add support for PCAP logging of CPU<->DSP communications 2014-06-22 20:04:46 +02:00
Pierre Bourdon
7889d90633 DSPLLE: Improve initialization by using an options structure instead of individual params 2014-06-22 20:04:46 +02:00
Tony Wasserka
489534bc7c Merge pull request #248 from RachelBryk/dsp-rom-hash
Add DSP rom hashes to movie header.
2014-06-08 11:27:55 +02:00
lioncash
4cb111e5db Clarify what FindBrackets does in the DSP assembler 2014-05-26 17:04:58 -04:00