Commit Graph

14326 Commits

Author SHA1 Message Date
Lioncash 690ed8580c Common: Kill off duplicate log warning definitions
Also embed the log checks rather than using macros
2014-09-06 15:11:29 -04:00
shuffle2 85fd8c2bec Merge pull request #983 from lioncash/lol-str
Common: Fix a potential infinite loop in ReplaceAll
2014-09-06 12:00:23 -07:00
shuffle2 227b79bf84 Merge pull request #1004 from comex/warning-fixes-2
Two trivial warning fixes
2014-09-06 11:56:32 -07:00
shuffle2 1b23432d34 Merge pull request #990 from rohit-n/fix-formatting
Fix formatting
2014-09-06 11:54:17 -07:00
shuffle2 218adb5515 Merge pull request #1003 from lioncash/wii-save-import
DolphinWX: Fix Wii save importing
2014-09-06 11:52:33 -07:00
shuffle2 d0d6f70980 Merge pull request #996 from RachelBryk/clear-mc-bongos
Clear movie variables that might have been set from a previous run.
2014-09-06 11:46:21 -07:00
shuffle2 f2237ecd64 Merge pull request #985 from skidau/dsp-loop-hle
Moved the loop check back to a post-loop condition in DSP HLE AX ucode.
2014-09-06 11:44:27 -07:00
shuffle2 87b6c8d991 Merge pull request #988 from shuffle2/hide-menubar
Fix render to main crashing in fullscreen.
2014-09-06 11:43:50 -07:00
comex e8aa1fe052 Merge pull request #1005 from comex/revert-993
Revert "Merge pull request #993 from phire/fix_getOpInfo"
2014-09-06 14:02:40 -04:00
comex 30e577fda7 Revert "Merge pull request #993 from phire/fix_getOpInfo"
This reverts commit a8f724e7c2, reversing
changes made to 7a1eca149f.

For why I'm reverting this entirely, see pull request 997.
2014-09-06 13:46:17 -04:00
comex 48ef6fcad1 Fix signed/unsigned warning in GeckoCode.cpp.
No actual bug here.
2014-09-06 13:34:00 -04:00
comex 917c6d324a Remove unused functions in TextureDecoder. 2014-09-06 13:32:54 -04:00
comex 6c382f6627 Merge pull request #926 from comex/ppcstate-reg
PowerPCState register (and rationalize register usage, and add some registers to replace it)
2014-09-06 13:24:38 -04:00
comex 6fd0333c14 Symbolicize explicit uses of x86 registers where possible (GPRs only for now).
Uses are split into three categories:

- Arbitrary (except for size savings) - constants like RSCRATCH are
used.

- ABI (i.e. RAX as return value) - ABI_RETURN is used.

- Fixed by architecture (RCX shifts, RDX/RAX for some instructions) -
explicit register is kept.

In theory this allows the assignments to be modified easily.  I verified
that I was able to run Melee with all the registers changed, although
there may be issues if RSCRATCH[2] and ABI_PARAM{1,2} conflict.
2014-09-06 13:18:31 -04:00
comex 100a7ac97b Actually add RCX, plus RDI and RSI on Unix.
And switch to a register order that consistently prefers callee-save to
caller-save.  phire suggested putting rdi/rsi first, even though they're
caller-save, to save code space; this is more conservative and I can do
that later.
2014-09-06 13:16:21 -04:00
comex 8dea26762d Rationalize temporary register usage.
Rather than using a variety of registers including RSI, ABI_PARAM1
(either RCX or RDI), RCX, and RDX, the rule is:

- RDI and RSI are never used.  This allows them to be allocated on Unix,
bringing parity with Windows.

- RDX is a permanent temporary register along with RAX (and is thus not
FlushLocked).  It's used frequently enough that allocating it would
probably be a bad idea, as it would constantly get flushed.

- RCX is allocatable, but is flushed in two situations:
    - Non-immediate shifts (rlwnm), because x86 requires RCX to be used.
    - Paired single loads and stores, because they require three
    temporary registers: the helper functions take two integer
    arguments, and another register is used as an index to get the
    function address.
These should be relatively rare.

While we're at it, in stores, use the registers directly where possible
rather than always using temporaries (by making SafeWriteRegToReg
clobber less).  The address doesn't need to be clobbered in the usual
case, and on CPUs with MOVBE, neither does the value.

Oh, and get rid of a useless MEMCHECK.

This commit does not actually add new registers to the allocation order;
it is intended to test for any performance or correctness issues
separately.
2014-09-06 13:16:20 -04:00
comex 67cdb6e07a Factor code from ABI_CallFunctionRR and GetWriteTrampoline into a helper, and fix a special case.
The special case is where the registers are actually to be swapped (i.e.
func(ABI_PARAM2, ABI_PARAM1); this was previously impossible but would
be ugly not to handle anyway.
2014-09-06 13:16:20 -04:00
comex 487eb967eb Fix a bug with update loads in memcheck mode.
In two cases, my old code was using a temporary register but not saving
it properly; it basically worked by accident (an otherwise useless
FlushLock was causing CallerSavedRegistersInUse to think it was in use
by the GPR cache, even though it was actually a temporary).

I'm going to modify this in the next commit to use RDX, but I didn't
want to leave a broken revision in the middle.
2014-09-06 13:16:20 -04:00
comex 48891c6359 Reserve a register for ppcState.
The register is RBP, previously in the GPR allocation order.  The next
commit will investigate whether there are too few GPRs (now or before),
but for now there is no replacement.

Previously, it was accessed RIP relatively; using RBP, anything in the
first 0x100 bytes of ppcState (including all the GPRs) can be accessed
with three fewer bytes.  Code to access ppcState is generated constantly
(mostly by register save/load), so in principle, this should improve
instruction cache footprint significantly.  It seems that this makes a
significant performance difference in practice.

The vast majority of this commit is mechanically replacing
M(&PowerPC::ppcState.x) with a new macro PPCSTATE(x).

Version 2: gets most of the cases which were using the register access
macros.
2014-09-06 13:16:18 -04:00
Lioncash 5b837a11e4 DolphinWX: Fix Wii save importing
Calls to reserve don't resize the array to accomodate the given data size.
These vectors should be initialized with the size directly.
2014-09-06 12:44:11 -04:00
Pierre Bourdon d75bb614e7 Merge pull request #998 from waddlesplash/wx-fixup
Migrate PNGs from DolphinWX to the Data/Resources directory.
2014-09-06 18:07:20 +02:00
Pierre Bourdon 06bdc49957 Merge pull request #999 from lioncash/copy-assign
AudioCommon: Make WaveFileWriter inherit NonCopyable
2014-09-06 17:52:11 +02:00
Pierre Bourdon 2333532aab Merge pull request #1000 from lioncash/preproc
Common: Remove HAVE_CXX11_SYNTAX define from Common.h
2014-09-06 17:50:15 +02:00
Augustin Cavalier a15d9ed0b6 Migrate PNGs from DolphinWX to the Data/Sys/Resources directory.
* Aren't used by anything (yet) as DolphinWX compiles XPM versions into the build
 * Moved the .desktop file as well, adjusted INSTALL rule accordingly
2014-09-06 11:47:21 -04:00
Lioncash 1d66b1d3f4 Common: Remove HAVE_CXX11_SYNTAX define from Common.h
All the compilers we support have C++11 support now, so this isn't needed.
2014-09-06 11:32:19 -04:00
Lioncash 27cecf46a8 AudioCommon: Make WaveFileWriter inherit NonCopyable 2014-09-06 11:27:36 -04:00
Rohit Nirmal 629ceaf2b1 Split some parts of UpdateBoundingBox into multiple lines. Also,
fix issues causing failure on Lint.
2014-09-06 09:49:27 -05:00
Rachel Bryk 2a82b591e1 Clear movie variables that might have been set from a previous run. 2014-09-06 07:10:41 -04:00
skidau a8f724e7c2 Merge pull request #993 from phire/fix_getOpInfo
GetOpInfo: Assert on all invalid Ops.
2014-09-06 19:50:15 +10:00
Scott Mansell 23b54117cd GetOpInfo: Assert on all invalid Ops.
GetOpInfo was returning null pointers for invalid ops in subtables
instead of asserting an error. This was causing segfaults when the
jit tried to jit invalid code.
2014-09-06 20:09:30 +12:00
Ryan Houdek 7a1eca149f Merge pull request #841 from AMDmi3/bundled-smfl-include-order
Place bundled SFML include paths before others
2014-09-06 02:17:37 -05:00
Lioncash e035ac5591 Merge pull request #992 from phire/betterassert
Make Invalid instruction debug assert a non-debug assert.
2014-09-06 03:12:19 -04:00
Scott Mansell 50657548b1 Make Invalid instruction debug assert a non-debug assert.
Users need to be able to see this error message. Otherwise they can't
report bugs.
2014-09-06 19:04:34 +12:00
Rohit Nirmal 1ecb318bcc Fix some formatting (new lines on collapsed single-line conditionals,
new lines for opening braces).
2014-09-06 01:23:05 -05:00
Ryan Houdek b7f19ca740 Merge pull request #989 from lioncash/param
AudioCommon: Remove unused parameter from OpenSLESStream constructor
2014-09-06 01:15:59 -05:00
Ryan Houdek cc9e881844 Merge pull request #987 from rohit-n/more-dead-code
Remove more dead and redundant code.
2014-09-06 01:15:20 -05:00
Lioncash 019ef844d4 AudioCommon: Remove unused parameter from OpenSLESStream constructor 2014-09-06 01:42:56 -04:00
shuffle2 a831121683 Merge pull request #979 from shuffle2/fix-memcard-flush3
raw memcards: revert last change so flushes are still time-driven.
2014-09-05 22:27:12 -07:00
Shawn Hoffman 7308b809d8 Fix render to main crashing in fullscreen.
When hiding the menubar (for going fullscreen with render to main),
keep a functionally-duplicate menubar around for servicing menubar
actions.
2014-09-05 22:21:09 -07:00
Rohit Nirmal debe3999b5 Remove more dead and redundant code. 2014-09-05 23:22:48 -05:00
Shawn Hoffman 96d7b642f4 raw memcards: revert last change so flushes are still time-driven.
It turns out the actual slowdown was from memcpy'ing the entire
memcard buffer...not synchronization overhead or the flush itself.
2014-09-05 21:16:59 -07:00
skidau 9800252a28 Re-added the acc_end_reached logic for AXWii. 2014-09-06 11:57:37 +10:00
Dolphin Bot 387e1e3f21 Merge pull request #984 from FioraAeterna/fixmergedbclr
JIT: fix branch merging with bclr
2014-09-06 03:22:08 +02:00
skidau 0154b8edfd Moved the loop check back to a post-loop condition in DSP HLE AX ucode. This brings DSP HLE in line with DSP LLE and fixes issue 7627. This effectively reverts ef501137be which is not needed as the loop check is now corrected. 2014-09-06 11:02:32 +10:00
Fiora 4ec8f83a1a JIT: fix branch merging with bclr 2014-09-05 13:58:06 -07:00
lioncash 3e0c04a83e Common: Fix a potential infinite loop in ReplaceAll
Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing.

e.g.

std::string some_str = "test";
ReplaceAll(some_str, "test", "test");

This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
2014-09-05 15:12:17 -04:00
shuffle2 674494e472 Merge pull request #980 from rohit-n/remove-dead-code
Remove dead code.
2014-09-05 11:09:04 -07:00
shuffle2 0576046fdd Merge pull request #972 from Sonicadvance1/fix-intel-windows
Work around Intel's failings with buffer_storage
2014-09-05 11:06:49 -07:00
Pierre Bourdon bb60cafd40 Merge pull request #982 from FioraAeterna/removedebug
Remove debug printf from earlier commit
2014-09-05 19:36:14 +02:00
Fiora 801153301f Remove debug printf from earlier commit 2014-09-05 10:31:29 -07:00