Commit Graph

12562 Commits

Author SHA1 Message Date
Lioncash 6cfc5b9849 InputCommon: Initialize NSDictionaries using literal syntax. 2014-09-13 21:32:33 -04:00
Lioncash 068799ff73 UnitTests: Fix misplaced braces in the x64Emitter tests 2014-09-13 20:45:17 -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
Fiora 1bd8d1ee98 Add immediate tests for WriteNormalOp
also fix a bug in Bochs that was preventing adc from passing.
2014-09-13 16:39:34 -07: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
Ryan Houdek d6ef8dc8c6 Merge pull request #1052 from Sonicadvance1/fix-ppcAnalyst-return
Fix the return value of PPCAnalyst.
2014-09-11 21:12:38 -05:00
Ryan Houdek 5061a33c29 Merge pull request #1051 from Sonicadvance1/ARM-Common
Include a missing include in the ARM emitter's common code.
2014-09-11 21:12:21 -05:00
skidau 4cb25633e1 Merge pull request #1048 from lioncash/discio
DiscIO: Minor changes to VolumeDirectory.
2014-09-12 11:31:29 +10:00
Lioncash 669a118063 Merge pull request #1058 from lioncash/semicolon
Remove some unnecessary semicolons
2014-09-11 19:56:08 -04:00
Pierre Bourdon a96618b2e6 Merge pull request #1036 from phire/save-jitil
Save JitIL! Fix bug so JitIL actually runs again.
2014-09-11 23:27:59 +02:00
Rohit Nirmal 428ee10463 include CommonTypes.h instead of Common.h, remove unused using. 2014-09-11 17:23:59 -04:00
Rohit Nirmal 9f82df0364 Move "using namespace ArmGen" from headers to sources. 2014-09-11 16:46:43 -04:00
Fiora 18d83a310e X64Emitter: support shorter mov reg, imm opcodes
Also refactor WriteNormalOp a little bit and add comments.
2014-09-11 11:40:30 -07:00
Lioncash b06ec302d1 Remove some unnecessary semicolons 2014-09-11 13:05:31 -04:00
Scott Mansell 784d3937dd Fix IsMMIOAddress Check. 2014-09-11 19:12:34 +12:00
comex 42acd61ccb Fix warnings. 2014-09-11 01:55:43 -04:00
Fiora 5726e0cdfb JIT: use XCHG in MOVTwo
Roughly the same speed or slightly faster depending on CPU; mostly just cleaner
since we don't have to pass in a temp.
2014-09-10 22:17:38 -07:00
Ryan Houdek b8d4834cb1 Fix the return value of PPCAnalyst.
In situations where conditional continue isn't supported + if a JIT doesn't implement a instruction that has the FL_ENDBLOCK flag. This would cause an
infinite loop.
In reality all the JITs should implement every FL_ENDBLOCK instruction regardless, but JITIL doesn't implement tw/twi which are FL_ENDBLOCK
instructions.
2014-09-10 21:33:17 -05:00
skidau 67f7e7e28b Merge pull request #1040 from RachelBryk/movie-cleanup
Movie cleanup
2014-09-11 11:47:55 +10:00
Ryan Houdek 44baab30cf Include a missing include in the ARM emitter's common code. 2014-09-10 20:39:19 -05:00
Ryan Houdek 581c81ce1c Merge pull request #1050 from Sonicadvance1/AArch64-sign-extend
Add sign extending aliases to the ARM64Emitter.
2014-09-10 20:17:50 -05:00
Ryan Houdek 24f6c98a55 Add sign extending aliases to the ARM64Emitter. 2014-09-10 17:52:54 -05:00
Rohit Nirmal c0f7cab3f5 Remove extra semicolons at the ends of some lines. 2014-09-10 12:17:38 -04:00
Ryan Houdek 71cb09f1ca Merge pull request #1027 from rohit-n/change-include
Include CommonTypes.h instead of Common.h.
2014-09-10 00:35:16 -05:00
Rachel Bryk 08db8c646b Cleanup Movie.h/cpp. 2014-09-09 21:23:54 -04:00
Rachel Bryk 571727a5ad Mass rename static variables to s_*. 2014-09-09 21:22:32 -04:00
Fiora b3a57ff396 JIT: remove op merging code that served no purpose
Dolphin already tracks propagation of immediates, so this code didn't really do
anything useful.
2014-09-09 18:09:23 -07:00
skidau d1439bc1db Merge pull request #1041 from RachelBryk/kill-g_CoreStartupParameter
Kill Core::g_CoreStartupParameter.
2014-09-10 11:00:42 +10:00
Ryan Houdek 16f054db47 Merge pull request #1033 from Sonicadvance1/fix-android-x86_64
Fix building x86_64 on Android.
2014-09-09 18:52:27 -05:00
Lioncash 9601f5ec5f DiscIO: Get rid of some casts and a c_str call in VolumeDirectory 2014-09-09 19:01:20 -04:00
Lioncash b34f2a78f5 DiscIO: Simplify GetUniqueID in VolumeDirectory 2014-09-09 18:57:45 -04:00
Ryan Houdek 09c1ad1631 Merge pull request #753 from FioraAeterna/integeropts
JIT64: various integer optimizations
2014-09-09 04:10:30 -05:00
Ryan Houdek 6a7e8899d3 Merge pull request #1035 from FioraAeterna/fixcrxxx
JIT: fix a corner case in crXXX
2014-09-09 00:58:53 -05:00
skidau e8d8713e03 Merge pull request #1017 from zhuowei/tw_fallback_if_constant_ra
Fix various issues with the twi/tw instructions
2014-09-09 15:16:25 +10:00
Ryan Houdek 3a205d663c Fix building x86_64 on Android.
Missed a define in x64MemTools for when the thought process was Android == ARM
Also changes the variable we use for choosing which folders to copy to and from our jni file.
This has changed since the x86_64 build target uses the library folder x86-64, which is stupid and annoying.
2014-09-09 00:11:08 -05:00
Ryan Houdek f09cb723c5 Merge pull request #1044 from lioncash/pedantry
Common: Fix code styling in Arm64Emitter
2014-09-08 23:29:19 -05:00
Rachel Bryk f93aa7087c Kill Core::g_CoreStartupParameter. 2014-09-09 00:24:49 -04:00
skidau 44c4bc134a Merge pull request #1046 from FioraAeterna/fixdebug
JIT: fix running in debug mode
2014-09-09 14:15:35 +10:00
Fiora 0af1352020 JIT: fix running in debug mode
Regression in 7fb6628.
2014-09-08 21:11:41 -07:00
Ryan Houdek d9ddc0d9ad Merge pull request #1042 from lioncash/unnecessary
InputCommon: Remove unnecessary breaks in XInput's GetName function
2014-09-08 22:46:58 -05:00
Ryan Houdek af732dea39 Merge pull request #1043 from lioncash/unused
Common: Remove unused variable in MemoryMap_Setup
2014-09-08 22:46:04 -05:00
Ryan Houdek cfb2c3db28 Merge pull request #1045 from Sonicadvance1/fix-generic
Fix Generic build from AArch64 merge.
2014-09-08 22:43:30 -05:00
Ryan Houdek d5da60619e Merge pull request #1034 from Sonicadvance1/fix-android-arm-ndk64bit
Fix building ARMv7 on the 64bit Android NDK.
2014-09-08 22:42:31 -05:00
Lioncash bc331ee809 Common: Fix code styling in Arm64Emitter 2014-09-08 23:39:20 -04:00
Ryan Houdek ed476c997c Fix Generic build from AArch64 merge.
I had missed this file and hadn't tested the branch on my new build system.
2014-09-08 22:24:23 -05:00
Fiora 8fc57d61ba JIT64: support merged branching for rlwinmx, too
Not quite as common a branch instruction as cmpwi, but close.
2014-09-08 20:16:41 -07:00
Fiora b56117de05 JIT64: optimize some special cases of srawix
Shift by 31 and 1, both of which are pretty common, can be done in a few less
instructions. Tested with a hwtest.
2014-09-08 20:15:49 -07:00
Fiora a95d8cbcb4 JIT64: optimize carry handling
Carries are rather common and unpredictable, so do them branchlessly wherever
we can.
2014-09-08 20:15:49 -07:00
Fiora a570c6b4a4 JIT64: tweak srwx/slwx BindToRegister arguments
Register B gets immediately moved into the shift register, so even if a == b
it doesn't need to be loaded.
2014-09-08 20:15:49 -07:00
Fiora 5b77617069 JIT64: use LEA for the "a = b + imm" case of addi 2014-09-08 20:15:48 -07:00
Fiora 9977da0550 JIT64: avoid using LEA for adds when not necessary 2014-09-08 20:15:48 -07:00
Fiora 298f85e152 JIT64: optimize sign-extend
Remove some code duplication.

Also remove some comments that no longer apply since x86_32 was dropped.
2014-09-08 20:15:47 -07:00
Fiora faf6bdfd96 JIT64: Optimize cmpXX
Use TEST instead of CMP if we're comparing against 0 (rather common), and
optimize the case of immediate compares further.
2014-09-08 20:15:47 -07:00
Fiora de662a79b7 JIT64: optimize rlwinmx/rlwinix and friends
Take advantage of movzx as a replacement for anding with 0xff or 0xffff, and
abuse loads from the register cache to save ops.
2014-09-08 20:15:46 -07:00
Fiora 858296e1c7 JIT64: optimize multiplication by immediate constants
Factor out common code and handle a few more common cases.
2014-09-08 20:15:46 -07:00
Fiora 94c20db369 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-08 20:15:45 -07:00
skidau 0926f1d344 Merge pull request #897 from Sonicadvance1/AArch64-jit
Initial AArch64 JIT
2014-09-09 12:34:58 +10:00
Lioncash 22800dc711 Common: Remove unused variable in MemoryMap_Setup 2014-09-08 21:44:03 -04:00
Lioncash c2578d0668 InputCommon: Remove unnecessary breaks in XInput's GetName function 2014-09-08 21:36:04 -04:00
Ryan Houdek 859f86ac2d Merge pull request #1037 from lioncash/mem_fn
AudioCommon: Remove unnecessary usages of mem_fn
2014-09-08 18:01:33 -05:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
Lioncash bf0c4a644b Merge pull request #1002 from waddlesplash/wx-fixup
WiiSaveCrypted: migrate to Core/HW.
2014-09-08 15:20:12 -04:00
Lioncash 789a500ddc AudioCommon: Remove unnecessary usages of mem_fn 2014-09-08 13:41:02 -04:00
Augustin Cavalier e601b6f2c5 WiiSaveCrypted: migrate to Core/HW.
There's really no reason to have this in DolphinWX, as it does
not use any DolphinWX code.
2014-09-08 13:31:23 -04:00
Scott Mansell 1bbc7b4dbb JitIL: Fix matching bug in Store Paired.
Most non-wii, non-mmu games run now.
2014-09-08 23:57:00 +12:00
Scott Mansell 199377db43 Fix bug in Load Paired so JitIL actually runs again.
Was broken in the PowerPCState Register PR a few days ago.
2014-09-08 23:25:18 +12:00
Fiora ce494a5e4f JIT: fix a corner case in crXXX
It didn't behave correctly with an input of zero, resulting in some games
breaking (at the least, Fight Night 2). This should be fixed now.

Also clean it up, add a few comments, and fix some variants of the instruction
that are so rare that they probably never got tested.
2014-09-08 04:16:50 -07:00
Ryan Houdek 652b8602d3 Fix building ARMv7 on the 64bit Android NDK.
Google has gotten their act together and fixes a few of the signal handling headers.
Change over to a header that works on both r10 32bit and r10 64bit.
32bit has the old "broken" headers as in some didn't even exist.
64bit has the "fixed" headers that one would expect on any regular unix system.
2014-09-08 06:05:03 -05:00
skidau 9529667eae Merge pull request #1032 from FioraAeterna/fixnocc
JIT: fix conditional-continue=off
2014-09-08 17:34:28 +10:00
Fiora 3855396422 JIT: fix conditional-continue=off 2014-09-08 00:28:56 -07:00
Ryan Houdek d3a742eb38 Merge pull request #1028 from Sonicadvance1/fix-android-cmake
Fix a few minor bugs that appeared in the latest android cmake script
2014-09-08 02:28:21 -05:00
skidau dae162c2b5 Merge pull request #971 from TurboK234/EFB_copies_togglefix
Remove "EFB Copies Disabled" option from hotkey toggling cycle.
2014-09-08 17:05:52 +10:00
comex 7fb6628789 Merge pull request #1024 from comex/abi-cleanup
ABI cleanup
2014-09-08 01:03:36 -04:00
comex 4dc090643d Remove ABI_AlignStack/ABI_RestoreStack and the noProlog option to ABI_CallFunctionRR.
The latter being true was the only case where the former would do
anything, and it was never true.  They became obsolete with x86's
removal.
2014-09-08 01:00:10 -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
comex 2dafbfb3ef Improve code and clarify parameters to ABI_Push/PopRegistersAndAdjustStack.
- Factor common work into a helper function.
- Replace confusingly named "noProlog" with "rsp_alignment".  Now that
x86 is not supported, we can just specify it explicitly as 8 for
clarity.
- Add the option to include more frame size, which I'll need later.
- Revert a change by magumagu in March which replaced MOVAPD with MOVUPD
on account of 32-bit Windows, since it's no longer supported.  True,
apparently recent processors don't execute the former any faster if the
pointer is, in fact, aligned, but there's no point using MOVUPD for
something that's guaranteed to be aligned...

(I discovered that GenFrsqrte and GenFres were incorrectly passing false
to noProlog - they were, in fact, functions without prologs, the
original meaning of the parameter - which caused the previous change to
break.  This is now fixed.)
2014-09-08 00:58:56 -04:00
Ryan Houdek 707d21e36b Fix a few minor bugs that appeared in the latest android cmake script 2014-09-07 23:18:43 -05:00
skidau 262fa1de02 Merge pull request #1026 from lioncash/str
DolphinWX: Use std::string over char arrays in MemoryView
2014-09-08 10:40:16 +10:00
Lioncash 9db370ea40 DolphinWX: Use std::string over char arrays in MemoryView 2014-09-07 20:36:02 -04:00
skidau c70f31cca9 Merge pull request #1016 from lioncash/vardecl
Common: Inline declare some loop variables in ArmEmitter
2014-09-08 10:24:38 +10:00
Zhuowei Zhang e63f7c01a3 Fix twi/tw instructions being switched in Jit64 and JitArm; downgrade the ERROR_LOG printed when tw is ran in the interpreter to DEBUG 2014-09-07 13:35:18 -04:00
Zhuowei Zhang b70c0ae521 for tw/twi instructions, force propagated constant into a register to avoid "a1 cannot be immediate" errors from the emitter 2014-09-07 11:31:51 -04:00
Lioncash e218c38721 DolphinWX: Remove unnecessary unique_ptr get calls in InputConfigDiag 2014-09-07 01:59:56 -04:00
Lioncash a38093729e Common: Inline declare some loop variables in ArmEmitter 2014-09-07 00:26:26 -04:00
skidau 7863295555 Used a constant for the default high value. 2014-09-07 14:25:06 +10:00
skidau 8abe9622fd Route the wiimote speaker to the sound mixer (the host system's speakers). Emulated Wiimote speaker sounds will go to the host system's speakers. Real Wiimotes will continue to use their own speaker for Wiimote speaker sounds. All Wiimote speaker sound can be disabled by unchecking the "Enable Speaker Data" option.
Each emulated Wiimote can have its speaker routed from left to right via the "Speaker Pan" setting in the emulated wiimote settings dialog.  Use any value from -127 for leftmost to 127 for rightmost with 0 being the centre.

Added code in the InputConfig to use a spin control for non-boolean values.

Defaulted the setting of "Enable Speaker Data" to disabled.
2014-09-07 14:16:20 +10:00
skidau 3caab10df8 Hooked up the emulated Wiimote speaker.
The Wiimotes are positioned as follows:
Wiimote 0 = Center
Wiimote 1 = Left
Wiimote 2 = Right
Wiimote 3 = Center

The Wiimote speaker output can be disabled via the "Enable Speaker Data" checkbox in the Wiimote settings.
2014-09-07 14:16:20 +10:00
skidau b801c7f8f1 Merge pull request #1015 from zhuowei/update_debugger_menu_at_startup
Update debugger button states at startup to disable non-functional JIT menu items
2014-09-07 14:14:11 +10:00
skidau a21ad12f1e Merge pull request #1014 from RachelBryk/active-movie
Add an IsMovieActive function.
2014-09-07 14:05:59 +10:00
Rachel Bryk 5a163ec5e6 Add an IsMovieActive function.
Makes things a bit simpler, since this is a common check.
2014-09-06 23:44:25 -04:00
skidau 741c0e2d50 Merge pull request #587 from RachelBryk/recording-race
Don't allow starting recording in states that will cause a crash or othe...
2014-09-07 13:41:57 +10:00
Zhuowei Zhang e0a909c076 Update debugger button states at startup to disable non-functional JIT menu entries 2014-09-06 23:38:22 -04:00
skidau 213c9a6ba7 Merge pull request #1011 from zhuowei/remove_twi_spam
Downgrade the ERROR log printed when twi is executed in interpreter to DEBUG
2014-09-07 13:33:31 +10:00
skidau 28253f4538 Merge pull request #1013 from lioncash/string
AudioCommon: Use std::string for the filename parameter of StartLogAudio
2014-09-07 13:32:55 +10:00
Lioncash daddc3317e AudioCommon: Use std::string for the filename parameter of StartLogAudio 2014-09-06 23:26:08 -04:00
Zhuowei Zhang 2ac2cbbcf6 Downgrade the ERROR log printed when twi is executed in interpreter to DEBUG 2014-09-06 22:36:17 -04:00
Ryan Houdek cdd2bd6cdc Add a couple of asserts to the Arm64 JIT to make sure we can load everything. 2014-09-06 20:14:53 -05:00
Ryan Houdek 82dae72b63 Add AArch64 target to the backpatch header.
This fixes the issue of a million warnings spawning from this header.
2014-09-06 20:14:53 -05:00
Ryan Houdek 5233c87dec Add immediate support to the GPR cache. 2014-09-06 20:14:53 -05:00
Ryan Houdek 2b06257e16 Beginning of the AArch64 JIT branch.
This is the bare minimum required to run a few games on AArch64.
Was able to run starfield and Animal Crossing to the Nintendo logo.
QEmu emulation is literally the slowest thing in the world, it maxes out at around 12mhz on my Core i7-4930MX.
2014-09-06 20:14:52 -05:00
Ryan Houdek f107b5e176 [AArch64-emitter] Initial work on a emitter for 64bit ARM.
I've tested a few instruction encodings and am expecting most to work as long as one stays away from VFP/SIMD.
This implements mostly instructions to bring up an initial JIT with integer support.
This can be improved to allow ease of use functions in the future, dealing with the raw imms/immr encodings is probably the worst thing ever.
2014-09-06 20:13:44 -05:00
Shawn Hoffman 9a9fd8752a Quiet initialization order warning in CFrame 2014-09-06 13:01:24 -07:00
shuffle2 9302218a19 Merge pull request #851 from lioncash/logg
Common: Kill off duplicate log warning definitions
2014-09-06 12:35:19 -07:00
Ryan Houdek 01b90c1007 Fix ArmEmitter's asserts from failing to compile.
Changed them all from debug asserts to regular asserts, since they shouldn't only be run at debug time.
2014-09-06 15:11:39 -04:00
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 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