Commit Graph

10165 Commits

Author SHA1 Message Date
skidau 86b6dfe4b3 Added a instant ARAM DMA mode which is enabled automatically when required.
Detects a situation where the game is writing to the dcache at the address being DMA'd. As we do not have dcache emulation, invalid data is being DMA'd causing audio glitches. The following code detects this and enables the DMA to complete instantly before the invalid data is written.
Added accurate ARAM DMA transfer timing.
Removed the addition of DSP exception checking.
2014-09-27 20:47:29 +10:00
skidau 4b37fdfa45 Added a CompileExceptionCheck function to the JitInterface and re-routed the existing code to utilise the interface. 2014-09-27 20:16:26 +10:00
skidau 945d431171 Added OPTYPE_LOADPS and OPTYPE_STOREPS instruction types to the PPC table.
Updated ARAM DMA and FIFO write exception checking to uses these types.

Conflicts:
	Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
	Source/Core/Core/PowerPC/PPCTables.h
2014-09-27 20:16:26 +10:00
skidau 0f256715e0 Re-added the ARAM DMA exception check. This fixes the audio cutting in and out of Resident Evil 2 and 3. Removed the special case for short transfers as it is no longer required. 2014-09-27 20:16:26 +10:00
skidau d09e2abb0d Compile the ARAM DMA exception checks into the JIT block in a similar style to FIFO writes. This ensures that the ARAM DMA is handled soon after the DMA completes. Fixes issue 7122 and issue 7342. 2014-09-27 20:16:25 +10:00
Fiora fbbe9605a9 Debug: fix display of instructions in virtual memory in MMU games 2014-09-27 01:07:37 -07:00
Fiora ac1fc9ad03 JIT+Emitter: support locking flags
This helps us avoid accidentally clobbering flags between two instructions
when the flags are expected to be maintained. Dolphin will of course crash
immediately, but at least it will crash loudly and alert us of the mistake,
instead of forcing hours of bisecting to find the subtle way in which the JIT
has managed to sneak a flag-modifying instruction where there shouldn't be one.
2014-09-26 20:47:06 -07:00
skidau 23e2301223 Merge pull request #1154 from skidau/undeclared-uv0-fix
Fixed the "Undeclared identifier: uv0" OpenGL shader compile error that appears in NBA2K11.
2014-09-27 13:25:16 +10:00
skidau f5bbfa139d Merge pull request #1146 from RachelBryk/netplay-input-display
Make input display work properly with netplay.
2014-09-27 13:25:01 +10:00
Fiora 39d4306a2e JIT: fix carry merging across breakpoints
More precisely, don't do it.
2014-09-26 13:21:01 -07:00
Fiora ba39c35f24 JIT: fix branch merging, take 2
NOT doesn't set flags.
2014-09-25 22:33:40 -07:00
skidau 30d77b38c5 Merge pull request #1127 from Sonicadvance1/QGR-BitField
Change the QGR union over to a BitField union.
2014-09-26 14:53:24 +10:00
skidau 9d746b89a2 Merge pull request #1162 from FioraAeterna/fixmerges
JIT: fix bugs with ComputeRC in branch merging patch
2014-09-26 14:46:53 +10:00
Fiora f9ab25152c JIT: fix bugs with ComputeRC in branch merging patch
We really, really need to be sure the input to ComputeRC is a register.
2014-09-25 21:45:25 -07:00
skidau 146725f64a Merge pull request #1125 from Sintendo/fresjumps
Change fres/frsqrte jumps
2014-09-26 14:45:19 +10:00
Rachel Bryk 4fe1119e52 Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via ini. 2014-09-25 19:50:25 -04:00
comex fb3d9c9d58 Fix warning in x64CPUDetect.cpp in generic build by not building it. 2014-09-25 18:48:00 -04:00
comex 9cdd842080 Add a fake SContext definition for _M_GENERIC. 2014-09-25 18:47:34 -04:00
Fiora 23fbcecf13 JIT: enable block linking and idle skipping in debug mode
They can still be turned off, just don't force them off.
Also remove some dated comments.
2014-09-25 07:12:10 -07:00
comex 8dccb0c743 Fix fastmem in JitIL after 755bd2c4.
That commit reorganized fastmem a bit; I wrote it before the patch to
support fastmem in JitIL landed, and forgot to edit it to account for
the fact.  Since JitILBase now derives from Jitx86Base, the HandleFault
override can just be removed.
2014-09-25 01:15:58 -04:00
skidau c41f76e774 Merge pull request #1148 from lioncash/typo
ISOProperties: Fix typo in the tooltip for manual config editing.
2014-09-25 13:49:39 +10:00
skidau 6d064b0406 Merge pull request #1126 from lioncash/delete
DolphinWX: Get rid of an explicit delete in OnExportSave
2014-09-25 13:44:21 +10:00
Sintendo 29cca5c84f Change fres/frsqrte jumps 2014-09-24 21:58:01 +02:00
Fiora bfab5f1e91 JIT: generic branch merging
Why merge just cmps and rlwinm when we can merge ALL the branches?
2014-09-24 12:34:18 -07:00
Ryan Houdek 76697922b4 Implement XER optimization on ARMv7 JIT core
Not completely optimized; there's room for improvement here.
2014-09-24 12:27:54 -07:00
Fiora 5fce109ce1 Reorganize carry to store flags separately instead of part of XER
Also correct behavior with regards to which bits in XER are treated as zero
based on a hwtest (probably doesn't affect any real games, but might as well
be correct).
2014-09-24 12:27:47 -07:00
skidau 788a719718 Merge pull request #1153 from skidau/twx-bindtoreg
Replaced KillImmediate with BindToRegister in the tw instruction.
2014-09-24 13:31:44 +10:00
skidau a83792e914 Merge pull request #1074 from FioraAeterna/earlyflush
JIT: flush a register if it won't be used for the rest of the block
2014-09-24 13:30:02 +10:00
skidau 539f270c67 Added a xf.numtexgen != bp.numtextgen error log if there is a mismatch detected. 2014-09-24 10:46:09 +10:00
booto 7f76ad3edb dsp int timing tweak
this fixes a bug in GE9E5D that caused hangs on boot
2014-09-24 00:50:46 +08:00
skidau b4399dbdf3 Fixed the "Undeclared identifier: uv0" OpenGL shader compile error that appears in NBA2K11. 2014-09-24 00:10:45 +10:00
Lioncash bdd1853586 Merge pull request #1149 from rohit-n/android-warnings
Android: Silence some more warnings.
2014-09-23 07:51:14 -04:00
skidau 65eb0ff2fe Replaced KillImmediate with BindToRegister in the tw instruction. Fixes the error "WriteNormalOp - a1 and a2 cannot both be memory" which appeared on starting Monopoly Streets. 2014-09-23 18:00:41 +10:00
skidau cbf102794e Merge pull request #1130 from Sonicadvance1/AArch64-jit-extXx
[AArch64] Implement instructions.
2014-09-23 13:52:30 +10:00
skidau fb18d5376f Merge pull request #1142 from lioncash/linucks
Fix some warnings on Linux
2014-09-23 13:43:18 +10:00
Fiora 88f2fbe1a4 JIT: fix merged bclr with comex's BLR optimizations 2014-09-22 18:22:31 -07:00
Fiora f103234e2b JIT: flush a register if it won't be used for the rest of the block
This should dramatically reduce code size in the case of blocks with
lots of branches, and certainly doesn't hurt elsewhere either.

This can probably be improved a good bit through smarter tracking of register
usage, e.g. discarding registers that are going to be overwritten, but this
is a good start and should help reduce code size and register pressure.
Unlike that sort of change, this is a "safe" patch; it only flushes registers,
which can't affect correctness, unlike actually discarding data.

As part of this, refactor PPCAnalyst to support distinguishing between
float and integer registers (to properly handle instructions that access
both, like floating-point loads and stores).

Also update every instruction in the interpreter flags table I could find
that didn't have all the correct flags.
2014-09-22 16:00:25 -07:00
Fiora de86d2003a JIT: merge lbz + extsb
PPC has no 8-bit sign-extended load, so this instruction pair is very common.
x86 can do it in one op (movsx), so merge them when possible.
2014-09-22 15:41:54 -07:00
Rohit Nirmal 3168361e32 Android: Silence some more warnings. 2014-09-22 17:45:42 -04:00
Ryan Houdek 7f1185b941 Merge pull request #1140 from lioncash/android
Android: Silence a few warnings
2014-09-22 16:20:53 -05:00
Lioncash 874f5eb1ad ISOProperties: Fix typo in the tooltip for manual config editing. 2014-09-22 13:45:28 -04:00
Rachel Bryk e4d71f36b1 Make input display work properly with netplay. 2014-09-22 12:56:35 -04:00
Rachel Bryk 4ed9b561bd Allow custom textures to load from unicode paths. 2014-09-22 12:51:30 -04:00
Rachel Bryk ad460a21d7 Change netplay buffer SpinCtrl to default to 5. 2014-09-22 08:40:13 -04:00
Lioncash dd6ebd2228 Merge pull request #1141 from lioncash/rasterogl
OGL: Get rid of explicit deletes in RasterFont
2014-09-22 03:20:32 -04:00
shuffle2 c617f324b2 Merge pull request #1143 from lioncash/exi
Core: Fix SIGABRT possibility in EXI_DeviceGecko
2014-09-22 00:16:34 -07:00
skidau 8c5e12cf02 Moved the linking of the FIFO CPWritePointer near where CPWritePointer gets updated. The CPWritePointer was getting updated while it was in-flight causing Pac-man Party to flicker. Fixes issue 5223. 2014-09-22 16:49:09 +10:00
skidau 6379d3983a Merge pull request #1137 from lioncash/debugger-crash
DolphinWX: Fix case where the debugger would crash on hiding a pane.
2014-09-22 14:48:29 +10:00
Lioncash 858d18a67e Core: Fix SIGABRT possibility in EXI_DeviceGecko
Fixes issue 7586
2014-09-21 21:50:30 -04:00
Lioncash 836ff6d506 Fix some warnings on Linux 2014-09-21 20:13:22 -04:00
Lioncash 23b82bbacd OGL: Get rid of explicit deletes in RasterFont 2014-09-21 20:06:13 -04:00
Lioncash ea40fdf21c Merge pull request #1132 from lioncash/osx
Fix building Dolphin on OSX without precompiled headers
2014-09-21 20:02:59 -04:00
Lioncash 3351e3f1c3 Merge pull request #1133 from RachelBryk/state
Remove an unused variable.
2014-09-21 19:52:13 -04:00
Lioncash dc79755303 Android: Silence a few warnings 2014-09-21 19:51:27 -04:00
Rachel Bryk d933247c50 Remove an unused variable. 2014-09-21 19:40:18 -04:00
Lioncash 76ad89ebb6 DolphinWX: Fix the video dialog crashing Dolphin on OSX
When a game was running and someone opened the video dialog, it would crash. This is because the preprocessor macro should have been __APPLE__ not _APPLE_

Fixes issue 7644.
2014-09-21 16:08:16 -04:00
Lioncash 770a9a42a5 Merge pull request #1136 from lioncash/memory-view
DolphinWX: Fix the memory view in the debugger
2014-09-21 15:35:26 -04:00
Ryan Houdek 9206dd016e Merge pull request #1135 from FioraAeterna/twidisasmfix
Disassembler: fix disassembly of some twi instructions
2014-09-21 14:19:05 -05:00
Ryan Houdek 1cb07ffc14 [AArch64] Implement twi and tw. 2014-09-21 14:17:04 -05:00
Fiora 505b1bd562 JIT: a small optimization for subfex and friends 2014-09-21 12:16:26 -07:00
Lioncash 95660a5563 DolphinWX: Fix case where the debugger would crash on hiding a pane.
These ID values would clash with the window parent IDs of all the actual debugger panes (they are in the 350 range as well).

For example, attempting to show and then close the memory window would cause an assertion, because it would attempt to destroy the text control for searching through memory, rather than destroying the actual parent window it's attached to.

These IDs are only used locally, so their value doesn't matter.
2014-09-21 14:06:27 -04:00
Lioncash dc65ef33ba DolphinWX: Fix the memory view in the debugger 2014-09-21 11:47:52 -04:00
Fiora 9c4407fb80 Disassembler: fix disassembly of some twi instructions 2014-09-21 08:17:41 -07:00
Ryan Houdek 078147d424 [AArch64] Implement mfmsr 2014-09-21 07:38:21 -05:00
Ryan Houdek 9530800fd0 [AArch64] Implement mtsprin and mfsprin 2014-09-21 07:38:16 -05:00
Ryan Houdek 2bcea19492 [AArch64] Implement mtsr and mfsr 2014-09-21 07:36:14 -05:00
Tony Wasserka 1d23c2ca8b GPU: Only load the relevant color components upon writes to the tev color registers.
The other two components need not be valid upon write, hence loading them results in glitches.

Fixes issue 6783.
2014-09-21 10:38:22 +02:00
Tony Wasserka 6d4fd54683 ChunkFile: Add a DoArray overload which takes an std::array.
This is inconsistent with how other containers are used (i.e. with Do()), but making std::array be used with Do() seems rather confusing when there's also a DoArray available.
2014-09-21 10:38:22 +02:00
skidau 536582b2eb Merge pull request #1129 from lioncash/casing
VideoCommon: Fix function casing in FrameBufferManagerBase
2014-09-21 15:56:17 +10:00
Lioncash a04a99251f Fix building Dolphin on OSX without precompiled headers 2014-09-21 00:37:47 -04:00
Ryan Houdek 0f8c5bda40 [AArch64] Implement mcrf. 2014-09-20 21:19:25 -05:00
Tony Wasserka a5f4e4ad25 Merge pull request #1128 from lioncash/bits
VideoCommon: Make zfreeze in GenMode 1 bit in size
2014-09-21 00:03:36 +02:00
Ryan Houdek e708e8d5a0 [AArch64] Implement negx. 2014-09-20 16:17:16 -05:00
Ryan Houdek 75590a99cb [AArch64] Implement cntlzwx. 2014-09-20 14:52:56 -05:00
Ryan Houdek 76d2f331f0 [AArch64] Implement extshx and extsbx. 2014-09-20 14:46:53 -05:00
Lioncash a6ffa55215 VideoCommon: Fix function casing in FrameBufferManagerBase 2014-09-20 14:54:59 -04:00
Lioncash 91438fa9e7 VideoCommon: Make zfreeze in GenMode 1 bit in size 2014-09-20 14:30:41 -04:00
Ryan Houdek 9d7598266f Change the QGR union over to a BitField union.
Makes it easier to generate a QGR in my unit test, cleaner overall of course.
2014-09-20 13:15:44 -05:00
Ryan Houdek a829e596c7 Merge pull request #1121 from FioraAeterna/fixfsel
JIT: fix fsel/ps_sel implementations for NaN input
2014-09-20 12:40:55 -05:00
Lioncash b92e0660ab DolphinWX: Get rid of an explicit delete in OnExportSave 2014-09-20 13:00:55 -04:00
Fiora 6043c790b6 JIT: fix indexed paired singles
I didn't realize the I and W fields were in a different place for these
variants.

This should fix Paper Mario and probably lots of other things I accidentally
broke.
2014-09-20 00:20:49 -07:00
skidau ae17d91992 Merge pull request #1096 from RachelBryk/save-slots
Add hotkeys to select save state slots
2014-09-20 15:45:02 +10:00
Ryan Houdek 2db7413a19 Merge pull request #1118 from lioncash/lolwinapi
FrameTools: Set focus on Windows via CFrame::SetFocus
2014-09-19 20:48:27 -05:00
Ryan Houdek eb23882398 Merge pull request #1120 from rohit-n/muh-precompiled-headers
Fix build failing when disabling precompiled headers.
2014-09-19 17:43:42 -05:00
Rohit Nirmal 46057db37d Fix build failing when disabling precompiled headers. 2014-09-19 18:17:51 -04:00
Ryan Houdek d7b40fa94c Merge pull request #1119 from FioraAeterna/bytereverse
JIT: support byte-reversed stores/loads
2014-09-19 15:54:27 -05:00
Ryan Houdek 2e1377ab7e Merge pull request #1107 from FioraAeterna/opcodesearch
Debugger: make opcode search a bit better
2014-09-19 15:50:54 -05:00
Ryan Houdek bdca720e33 Fix some indention on AArch64 JIT. 2014-09-19 15:23:21 -05:00
Ryan Houdek 47e47891d4 [AArch64] Implement a bunch of integer instructions
16 new instructions for AArch64.
2014-09-19 15:23:21 -05:00
Ryan Houdek 5671530026 Merge pull request #1101 from FioraAeterna/fixfallbacks
JIT: simpler fallback conditions for load/store float
2014-09-19 15:23:01 -05:00
Ryan Houdek 5b4aa1d6d4 Merge pull request #1123 from FioraAeterna/eieio
JIT: change eieio and tlbsync to DoNothing
2014-09-19 15:19:41 -05:00
Ryan Houdek 7cc586d615 Merge pull request #1100 from FioraAeterna/psq_insts
JIT: implement remaining psq_l/st instruction variants
2014-09-19 15:16:44 -05:00
Fiora 0f53bba45a JIT: change eieio and tlbsync to DoNothing
The interpreter functions for these are no-ops anyways.
Also add some missing DoNothings to the ARM64 JIT.
2014-09-19 13:14:49 -07:00
Ryan Houdek 522d7eb275 Merge pull request #1109 from FioraAeterna/ps_cmp
JIT: add ps_cmp0/ps_cmp1/ps_res/ps_rsqrte
2014-09-19 14:41:05 -05:00
Ryan Houdek 526e92464b Merge pull request #1103 from FioraAeterna/floatconstnaming
JIT: rename a few constants to be more accurate
2014-09-19 13:21:06 -05:00
Ryan Houdek c5f9301e6e Add a comment to the software renderer that stride should be implemented 2014-09-19 12:33:15 -05:00
magumagu 32e5043b29 WIP XFB scaling.
Still an ugly mess.
2014-09-19 12:33:15 -05:00
Ryan Houdek d544c563ea Merge pull request #1112 from Sonicadvance1/AArch64-mov-aliases
Add AArch64 emitter aliases for MOV and MVN.
2014-09-19 09:19:33 -05:00
Ryan Houdek ec310811a8 Merge pull request #1114 from Sonicadvance1/AArch64-fix-build
Fix AArch64 JIT compiling.
2014-09-19 09:19:25 -05:00
Fiora c130a496f2 JIT: fix fsel/ps_sel implementations for NaN input
fselx was the main problem, but ps_sel was wrong too (even if there were no
known reported bugs with it).

This fixes Beyond Good and Evil (at the least).
2014-09-19 01:58:13 -07:00
Fiora d96016ed21 JIT: support byte-reversed stores/loads
4 more instructions down.

Store ones should be pretty well-tested; load ones seem to almost never be
used. I found them in Turok Evolution, so I was able to check code generation,
but the relevant code didn't seem to be called.
2014-09-18 20:38:44 -07:00
skidau bd740ae9c7 Merge pull request #1111 from Tilka/fix_gcpad_setmotor
Fix GCPad::SetMotor()
2014-09-19 13:26:05 +10:00
Fiora af8772700a JIT: add ps_res and ps_rsqrte using scalar implementations 2014-09-18 18:36:15 -07:00
Lioncash c33a9de6af FrameTools: Set focus on Windows via CFrame::SetFocus 2014-09-18 21:15:26 -04:00
Fiora 1b425dedd1 JIT: add ps_cmp0/ps_cmp1 implementations using current fcmp code 2014-09-18 17:57:28 -07:00
Fiora 3c49200b22 X64Emitter: add MOVHLPS/MOVLHPS 2014-09-18 17:57:27 -07:00
Ryan Houdek a8abbdae85 Merge pull request #1106 from FioraAeterna/fixdebug2
JIT: fix debug mode
2014-09-18 19:52:35 -05:00
Lioncash 68d62c3d32 Merge pull request #1110 from lioncash/apple-code
DolphinWX: Fix GC/Wiimote input windows randomly crashing on OSX
2014-09-18 20:17:16 -04:00
comex 3df935b98e Reset RSP after calling Jit in case it cleared the code cache. 2014-09-18 18:23:36 -04:00
Ryan Houdek f709dda6aa Fix AArch64 JIT compiling. 2014-09-18 16:50:49 -05:00
Ryan Houdek 7608e3f11e Add AArch64 emitter aliases for MOV and MVN. 2014-09-18 16:30:40 -05:00
Tillmann Karras e35db54454 Fix and simplify GCPad::SetMotor()
abs() takes an int argument. Casting -0.5..0.5 to int always resulted in
zero.
2014-09-18 21:34:07 +02:00
Lioncash 207d7787a4 DolphinWX: Fix GC/Wiimote input windows randomly crashing on OSX 2014-09-18 14:52:12 -04:00
Ryan Houdek e9164247d6 Merge pull request #1108 from FioraAeterna/fixdebugscroll
Debugger: scroll by multiples of 4 bytes
2014-09-18 06:52:44 -05:00
Ryan Houdek d54c8eb6bf Merge pull request #1098 from FioraAeterna/cvtsi2ss
JIT: use cvtsi2ss in paired singles
2014-09-18 06:51:37 -05:00
Ryan Houdek 0294b344e2 Merge pull request #1086 from FioraAeterna/fixsrawint
Interpreter: fix carry calculation in srawx
2014-09-18 06:41:37 -05:00
Fiora 20c3a0f2d8 Debugger: scroll by multiples of 4 bytes
Avoids that weird effect where scrolling offsets code from 4-byte boundaries,
showing nonsense 75% of the time.
2014-09-18 03:54:57 -07:00
Fiora 8ce4676605 Debugger: make opcode search a bit better
Search a wider range (not all games fit in the originally searched range).
Print a notice if the opcode isn't found, instead of silently failing.
2014-09-18 03:47:46 -07:00
Fiora cd7853bd50 JIT: fix debug mode 2014-09-18 03:14:04 -07:00
Fiora 9ab816e6e9 JIT: fix regression in ps_sel
My code didn't maintain correct semantics with floating-point NaNs (a < b is
not the same as "not a >= b" in float), which seems to have broken FIFA 12.
2014-09-17 21:43:44 -07:00
comex 217758b607 Correct inaccurate comment. 2014-09-17 22:30:33 -04:00
comex 6695b5acce Fix backwards #ifdef. 2014-09-17 22:30:20 -04:00
comex 97c9cb5882 Add missing push wrapper around UpdatePerformanceMonitor 2014-09-17 21:10:43 -04:00
Fiora 29fc151cc7 JIT: implement remaining psq_l/st instruction variants
These are used in at least a few popular games, including Super Smash Bros.
Brawl.
2014-09-17 17:10:27 -07:00
comex 7ad9027593 Be pedantic about stack overflow on Linux and OS X.
Add some magic to the fault handler to handle stack overflow due to BLR
optimization, and disable the optimization if fastmem is not enabled.
2014-09-17 20:08:09 -04:00
Fiora cfd65c2762 JIT: rename a few constants to be more accurate
Remove the '2'; it's not longer applicable.
2014-09-17 16:59:35 -07:00
comex 755bd2c445 Reorganize backpatching a bit. Untested on ARM.
Rather than *MemTools.cpp checking whether the address is in the
emulated range itself (which, as of the next commit, doesn't cover every
kind of access the JIT might want to intercept) and doing PC
replacement, they just pass the access address and context to
jit->HandleFault, which does the rest itself.

Because SContext is now in JitInterface, I wanted JitBackpatch.h (which
defines it) to be lightweight, so I moved TrampolineCache and associated
x64{Analyzer,Emitter} dependencies into its own file.  I hate adding new
files in three places, two of which are MSVC...

While I'm at it, edit a misleading comment.
2014-09-17 19:57:06 -04:00
comex 7b0fdb52cd Run exception handlers on an alternate stack on Linux.
*Completely untested.*  Someone please test.
2014-09-17 19:57:04 -04:00
comex bd4e75e69a Shorten the blr stub a bit. 2014-09-17 19:56:58 -04:00
comex b597ec3e08 Opportunistically predict BLR destinations using RET.
When executing a BL-type instruction, push the new LR onto the stack,
then CALL the dispatcher or linked block rather than JMPing to it.  When
executing BLR, compare [rsp+8] to LR, and RET if it's right, which it
usually will be unless the thread was switched out.  If it's not right,
reset RSP to avoid overflow.

This both saves a trip through the dispatcher and improves branch
prediction.

There is a small possibility of stack overflow anyway, which should
be handled... *yawn*
2014-09-17 19:56:09 -04:00
comex 558dee84ca Wrap some function calls in ABI_Push|PopRegistersAndAdjustStack(0, 0);
These calls are made outside of JIT blocks, and thus previously did not
read any protection - register use is taken into account and the outer
dispatcher stack frame is sufficient.  However, if data is to be stored
on the stack, these calls must reserve stack shadow space on Windows to
avoid clobbering it.
2014-09-17 19:56:09 -04:00
Fiora 2a0b06f08c JIT: simpler fallback conditions for load/store float
I wasn't really thinking when I wrote these; d/s are for float registers, not
gprs.
2014-09-17 10:27:33 -07:00
Fiora 76c8bb40e8 JIT: update some rather outdated comments 2014-09-16 23:42:22 -07:00
Fiora 2ae6f13d22 JIT: use cvtsi2ss in paired singles
One less instruction for a few of the loads.
2014-09-16 22:50:33 -07:00
shuffle2 978a855d3f Merge pull request #1090 from shuffle2/dolphin-qt
DolphinQt -- initial commit
2014-09-16 22:21:16 -07:00
skidau 2c233c4976 Merge pull request #686 from FioraAeterna/fiora
JIT: Optimize JitAsmCommon, Float, and PS implementations
2014-09-17 14:06:14 +10:00
Rachel Bryk 5dc88a2673 Add hotkeys to select save state slots and to save/load the currently selected slots. 2014-09-16 19:19:41 -04:00
Fiora d3dee1d7ed GekkoDisassembler: fix some float opcodes 2014-09-16 02:06:40 -07:00
comex 7eea7080d9 Fix missing "return" 2014-09-16 00:25:21 -04:00
skidau 8361d2b1da Merge pull request #805 from FioraAeterna/storerefactor
JIT: support immediate stores
2014-09-16 13:31:39 +10:00
Dolphin Bot bef2016909 Merge pull request #1091 from FioraAeterna/fixdisasm
GekkoDisassembler: fix/improve disassembly for a few instructions
2014-09-16 03:53:18 +02:00
Fiora 7368c2ee9e GekkoDisassembler: fix/improve disassembly for a few instructions 2014-09-15 18:48:54 -07:00
Shawn Hoffman ae3a5ce9e3 Qt: Add msvc support 2014-09-15 15:07:33 -07:00
Augustin Cavalier 16c6a19190 DolphinQt: initial commit.
This adds the beginning of the DolphinQt user interface. It doesn't
do anything useful yet and only builds via CMake.
2014-09-15 15:06:05 -07:00
comex 847f78e4cc Merge pull request #1089 from FioraAeterna/fixemittersilentfail
x64Emitter: fix silent failure if WriteNormalOp is passed two memory operands
2014-09-15 14:53:21 -04:00
Fiora 764ce4b513 JIT: add fselx implementation
Based on a patch by Tilka.
2014-09-15 08:33:41 -07:00
Fiora 7ab820c6f8 JIT: Various JitAsmCommon optimizations
Use some SSE4 instructions in on CPUs that support them.
Use float instructions instead of int where appropriate (it's a cycle faster
on CPUs with arithmetic unit forwarding penalties).
2014-09-15 08:33:40 -07:00
Fiora 7b0f559ae1 JIT: various float optimizations 2014-09-15 08:33:40 -07:00
Fiora 34287b8042 JIT: some paired singles optimizations 2014-09-15 08:33:39 -07:00
Fiora d02b7c7755 JIT: support immediate stores 2014-09-15 07:25:32 -07:00
Fiora 02dce5dbbf x64Emitter: fix silent failure if WriteNormalOp is passed two memory operands
Should now fail loudly and clearly instead.
2014-09-15 07:08:08 -07:00
Fiora a248e49c97 Revert "Two small JIT optimizations" 2014-09-15 07:01:51 -07:00
Ryan Houdek 20af50b1c4 Merge pull request #1077 from FioraAeterna/integeropts2
Two small JIT optimizations
2014-09-15 07:09:11 -05:00
skidau 1458b59156 Merge pull request #1065 from Sonicadvance1/AArch64-fix-regcache
Fix all the current issues with the AArch64 register cache.
2014-09-15 13:02:16 +10:00
Fiora 3845c27155 JIT: save an instruction in psq_l 2014-09-14 15:12:57 -07:00
Fiora af471d0a84 JIT: optimize andi(s)_rc
We usually don't need to do a sign-extend for the resulting flags.
2014-09-14 15:12:14 -07:00
Fiora 9b8cfcdc29 Interpreter: fix carry calculation in srawx
I don't know anything this affected, but it didn't match the manual (or JIT).
2014-09-14 15:08:57 -07:00
comex 74f8a48ee6 Merge pull request #1063 from FioraAeterna/fastermmufix
MMU: properly check MEM1 range on Gamecube games
2014-09-14 15:17:09 -04:00
comex db7617248f Merge pull request #1021 from FioraAeterna/optimizeca3
JIT: Carry optimizations!
2014-09-14 15:08:08 -04:00
Lioncash b307bb68d7 Merge pull request #1080 from lioncash/wx-crap
Kill off the wx casts within InputCommon and GLInterface.
2014-09-14 13:21:34 -04:00
Ryan Houdek 4e7f284a81 Merge pull request #1064 from Sonicadvance1/AArch64-Fix-MOVI2R
Fix AArch64 MOVI2R helper function.
2014-09-14 09:26:02 -05:00
Ryan Houdek 4e16abd742 Merge pull request #1083 from FioraAeterna/lzcnt
Add LZCNT support, use in cntlzw
2014-09-14 09:18:10 -05:00
Fiora 40b18f09b2 JIT: use LZCNT in cntlzw 2014-09-14 05:36:23 -07:00
Fiora 997c5c2d0e x64Emitter: add LZCNT/TZCNT support and detection
Also add a unit test.
2014-09-14 05:31:22 -07:00
Ryan Houdek 1f7871f9e2 Merge pull request #1082 from FioraAeterna/fixccagain
JIT: fix JIT with conditional continue off, again
2014-09-14 03:22:03 -05:00
Fiora 653140fcfa MMU: properly check MEM1 range on Gamecube games
Fixes at the very least Rogue Squadron II crashes.
2014-09-14 00:16:37 -07:00
Fiora 9d2b2cae4a JIT: fix JIT with conditional continue off, again 2014-09-14 00:12:27 -07:00
Lioncash 357c0adc3c Kill off the wx casts within InputCommon and GLInterface.
All because someone didn't actually return the wxWindow handle for the edge case.
2014-09-14 01:07:08 -04:00
Scott Mansell 6956df79b2 Fix Fastmem in JitIL for massive speed gains.
JitIL's fastmem was stubbed out when Sonicadvance1 merged JitARMIL
into the tree. Since JitARMIL has been deleted, I simply re-arrange
the inheritance to base JitIL on Jitx86Base, so it can inherit the
backpatch function.

Povray Benchmark: 1985 seconds to 1316 seconds.
2014-09-14 16:21:54 +12:00
Lioncash 6cfc5b9849 InputCommon: Initialize NSDictionaries using literal syntax. 2014-09-13 21:32:33 -04:00
Pierre Bourdon 84a564a304 Merge pull request #1060 from rohit-n/move-using
JitArm32: Minor cleanup.
2014-09-14 01:59:39 +02:00
Pierre Bourdon eee473ed5f Merge pull request #1066 from lioncash/breaks
DiscIO: Remove unnecessary break statements.
2014-09-14 01:58:44 +02:00
Pierre Bourdon 9607cc4159 Merge pull request #1071 from archshift/patch-1
ConfigManager.cpp: Removed three elements from platform-ifdef
2014-09-14 01:58:17 +02:00
Pierre Bourdon 439068acae Merge pull request #1055 from FioraAeterna/smallermov
X64Emitter: support shorter mov reg, imm opcodes
2014-09-14 01:57:36 +02:00
Pierre Bourdon cb2e53e7c6 Merge pull request #1068 from rohit-n/use-vector
CBoot: Use vectors instead of raw pointers in ELF functions.
2014-09-14 01:55:01 +02:00
Pierre Bourdon 2ab19c7cec Merge pull request #927 from FioraAeterna/fastermmu
Fiora's Faster MMU Project
2014-09-14 00:36:07 +02:00
Fiora 32a67ef264 JIT: fix memcheck on float load/store, plus some corner cases 2014-09-13 13:53:19 -07:00
Fiora b3c1cec197 JIT: fix memcheck with stXx 2014-09-13 13:53:18 -07:00
Fiora 9a19314969 JIT: make memcheck macro support an inverted mode 2014-09-13 13:53:13 -07:00
Fiora 54e26f64c6 JIT: use far code emitter in more places 2014-09-13 13:51:12 -07:00
Fiora 08ac10d00a PPCAnalyst/JIT: add ability to easily toggle branch and carry merging 2014-09-13 13:48:24 -07:00
Fiora 54129a8ca5 PPCAnalyst: refactor, add carry op reordering and non-cmp reordering
Tries as hard as possible to push carry-using operations (like addc and adde)
next to each other. Refactor the instruction reordering to be more flexible
and allow multiple passes.

353 -> 192 x86 instructions on a carry-heavy code block in Pokemon Puzzle.
12% faster overall in Pokemon Puzzle; probably less in typical games (Virtual
Console games seem to be carry-heavy for some reason; maybe a different
compiler?)
2014-09-13 13:48:23 -07:00
Fiora 45d84605a9 JIT64: optimize carry calculations further
Keep carry flags in the x86 flags register if used in the next instruction.
2014-09-13 13:48:20 -07:00
Fiora bea2504a51 JIT64: optimize carry calculations
Omit carry calculations that get overwritten later in the block before they're
used. Very common in the case of srawix and friends.
2014-09-13 13:47:43 -07:00
Dolphin Bot d72f61d62f Merge pull request #1073 from phire/save_jitil2
Fix Idle Skipping in JitIL.
2014-09-13 18:40:57 +02:00
Scott Mansell cf869fc24f Fix Idle Skipping in JitIL.
Has been broken since the flags-opt merge. The idle skipping code in
JitIL was very brittle and depended on the IL of it's inputs not
changing in any way.

flags-opt changed the IR generated by the cmp instruction, which is part
of the idle loop, causing JitIL to break in really weird ways, which
were almost impossible to track down.

This fixes various wii games crashing/not booting and the Regspill
error on (all?) gamecube mmu games.
2014-09-14 04:36:50 +12:00
Ryan Houdek a30b4f13a1 Merge pull request #1067 from lioncash/fallthrough
DolphinWX: Get rid of fallthrough in ScanForISOs
2014-09-13 04:52:30 -05:00
Fiora c5381bae66 JIT: add "far code emitter" to reduce L1I cache pressure 2014-09-13 02:31:31 -07:00
Fiora 09a62505c5 JIT: support paired load/store with MMU on
Also change the calling convention, to avoid RSCRATCH being clobbered by
memcheck'd loads.
2014-09-13 02:18:11 -07:00
Fiora 2661bc151a JIT memcheck: don't flush register state unless an exception occurs 2014-09-12 20:55:00 -07:00
Lioncash a92003c1ab ARM64: Make getters within ArithOption const. 2014-09-12 20:55:26 -04:00
archshift eae38fd339 ConfigManager.cpp: Removed three elements from platform-ifdef 2014-09-12 17:15:46 -07:00
Rohit Nirmal edd63c14a4 CBoot: Use vectors instead of raw pointers in ELF functions. 2014-09-12 12:03:06 -04:00
Lioncash 322f033c97 DolphinWX: Get rid of fallthrough in ScanForISOs 2014-09-12 11:52:36 -04:00
Lioncash 4db2af2d42 DiscIO: Remove unnecessary break statements. 2014-09-12 11:34:34 -04:00
Ryan Houdek e883a6fb2e Fix all the current issues with the AArch64 register cache.
Fixes all the current issues I've been experiencing.
Scaled back the register cache idea for now so I can actually work on some real instructions.

Tested this work with unit tests so I know it works.
Unit tests are pretty great things.
2014-09-12 06:39:15 -05:00
Ryan Houdek 17d31ecd6c Fix AArch64 MOVI2R helper function.
In the case of a zero immediate, it wouldn't generate code at all.
Also in the case of max u32/u64, use ORN to optimize it.
2014-09-12 05:45:10 -05:00
Fiora a6c9515b00 JIT: unify subfcx and addcx code
Again, shorter and should make future optimizations easier.
2014-09-12 00:04:42 -07:00
Fiora 5d80145dc0 JIT: unify subfe/submex/subfex/adde/addmex/addzex code
Shorter, plus should make future optimizations easier.
2014-09-12 00:04:42 -07:00
skidau 64b21a4812 Merge pull request #1054 from comex/i-hate-warnings
Fix warnings.
2014-09-12 12:35:47 +10:00