Commit Graph
196 Commits
Author SHA1 Message Date
Unknown W. Brackets 5db79dcf11 Fix some missing semicolons on log statements. 2014-06-29 19:09:37 -07:00
Unknown W. Brackets f544a87b2f jit: Initialize startDefaultPrefix when switching. 2014-06-28 00:38:56 -07:00
Unknown W. Brackets 24d8a34a0b Properly respect resolveReplacements.
And use the same opcode reading func in armjit as x86jit.
Fixes Star Ocean on Android.
2014-06-23 08:20:38 -07:00
Unknown W. Brackets e87e1606c5 Fix func replacements and delay slots on arm.
Fixes #6303.
2014-06-19 08:02:49 -07:00
Unknown W. Brackets 9efbc2694b Add an invalidate all method to the jit. 2014-06-19 01:13:06 -07:00
Unknown W. Brackets d09be5a4bc Update PC before going into a replacement func.
This way we can report the PC properly on errors, and the replacement func
can even look at PC.
2014-05-31 10:03:01 -07:00
Unknown W. Brackets f489694515 Add the option to hook, rather than replace, funcs.
This can be useful for debugging or developing translations/game hacks,
and also gives us options when dealing with GLES incompatibilities.
2014-05-31 10:03:00 -07:00
Unknown W. Brackets 5a89c17cf0 armjit: Allow R1 in regalloc, use LR as temp.
LR should be safe, although it may make stack traces not work within jit,
they don't really tend to work anyway.
2014-03-28 18:38:38 -07:00
Unknown W. Brackets 05ab192c9c Reduce includes in Core/HLE/.
Especially templates.
2014-03-15 11:22:19 -07:00
Henrik Rydgård 3957b5fb42 Call ProxyBlock in ArmJit too. Plus various cleanup and one more string function. 2013-12-19 11:45:39 +01:00
Unknown W. Brackets 438361d0bc Clean up code pointer naming for the jit.
Now it properly identifies thunk code which is actually a decent percent
when fastmem is off at least.
2013-12-18 23:57:39 -08:00
Henrik Rydgard 1cb7965cb1 Jit feature preparation: Introduce "proxy blocks".
When these are invalidated, the block they point to gets invalidated too.

Will be useful to implement various types of block merging and function inlining
without affecting correctness of cache clears etc.

Also, with this commit we can now fully inline replaced functions. fabsf() boils
down to 1-2 instructions and the block continues, for example.
2013-12-19 00:39:49 +01:00
Henrik Rydgard 6937719c3b Minor fixes around function replacement, a couple of math funcs 2013-12-18 10:35:50 +01:00
Henrik Rydgard 1d2f1efd06 Fix function replacement on ARM 2013-12-18 00:09:08 +01:00
Henrik Rydgard 2eab4aa1bf Play around with function replacement. Turned off by default of course. 2013-12-17 23:40:27 +01:00
Henrik Rydgard 2140892074 Initial preparations for ability to replace game functions with custom implementations.
Also auto-saves hashmap additions and reapplies the hashmap on function
rename so that if you rename a function that exists in several copies
they will all be labelled.

Note that actual function replacement is not activated yet.
2013-12-17 12:27:20 +01:00
Henrik Rydgard 2d8429ac48 Assorted cleanup in the MIPS emulation 2013-12-10 13:15:16 +01:00
Henrik Rydgard 030e6460cc ARM: NEON-optimize software skinning 2013-11-24 18:03:42 +01:00
Henrik Rydgard ab3037112f Some scaffolding for a future VFPU-on-NEON implementation 2013-11-19 21:41:48 +01:00
Henrik Rydgard dca457e6df Optimize multiple sv.s and lv.s calls on ARM. Also some cleanup. 2013-11-19 21:41:47 +01:00
Sacha e3bdb3e09b Disable LitPool as it is causing crashes with Vertex Decoder JIT. Performance seems to be almost unaffected since the IMM changes. 2013-11-15 14:12:00 +10:00
Sacha 20e8a81268 Switch to compile-time ARMV7 define. 2013-11-15 11:20:39 +10:00
Unknown W. Brackets 359110f010 x86/armjit: Add jump following (off by default.)
Inlines function calls up to a certain extent.  Allows us to get
immediates all the way to a syscall, for example, usually.

Not sure if faster.
2013-11-10 21:59:49 -08:00
Unknown W. Brackets aacb31bc18 armjit: Copy over (disabled) immbranch optim.
This does a little loop unrolling.  Costs a bit more cache space, but
avoids flushing regs for longer.

Not enabled.
2013-11-10 21:59:48 -08:00
Unknown W. Brackets 92ecff4396 armjit: keep track of instructions in jitstate.
To match x86.
2013-11-10 21:59:48 -08:00
Unknown W. Brackets 8ceaafc159 armjit: Verify free space while compiling. 2013-11-10 21:59:48 -08:00
Unknown W. Brackets 7e46ee0b0f armjit: Replace MOVI2R with using the regcache.
So that it can optimize the value with existing imms.

Not actually optimizing yet.
2013-11-10 15:50:45 -08:00
Henrik Rydgard 0a844ce98d Delete functions for vsge and vslt, these have been rolled into VecDo3 2013-11-09 19:29:52 +01:00
Henrik Rydgard 502f772856 Add experimental mode to cache pointers in the arm jit.
Turned off for now as it needs more work but seems quite promising already.
2013-11-09 17:15:30 +01:00
Henrik Rydgard d26692ef92 Fix bug from a couple of commits ago in ARMJit 2013-11-09 15:22:39 +01:00
Henrik Rydgard 04451623b9 This variant didn't seem to make much difference either (see prev commit) 2013-11-09 13:06:10 +01:00
Henrik Rydgard 15bc5a8db7 Add small ARM perf experiment. Did not help on ARMv7 so turned it off.
xsacha might want to try it on ARMv6.
2013-11-09 12:57:07 +01:00
Henrik Rydgard 58db79672f Fix vmtvc on ARM, fixing issues with our prefix check. Add some logging.
Also improve vcmp on ARM.
2013-11-08 19:59:11 +01:00
Henrik Rydgard 309f904c0c Extract JitState into its own header (arm/x86) 2013-11-08 18:51:52 +01:00
Sacha 803148b8ca ARMv6: Fix offsets > 4096 for litpool. More aggressive check.
Somehow Scooby Doo gets to offsets of ~4200 unless i drop the threshold down to ~3200. Not sure why the offset can jump by so much in one instruction.
Makes Scooby Doo playable now instead of showing a blue screen in the main game. Likely affects other games.
2013-11-08 16:07:05 +10:00
Unknown W. Brackets 50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Henrik Rydgard 324cde5a79 Let's actually use the log category mechanism. A first step. 2013-09-07 21:19:21 +02:00
Henrik Rydgard 78d3ee3d6a Misc cleanup, mostly logging code 2013-09-07 13:01:19 +02:00
Unknown W. Brackets b558189c37 Just invalidate blocks on ClearCacheAt().
This makes it safe to call from a jitted syscall, etc.
2013-09-01 00:32:43 -07:00
Unknown W. Brackets 109ad17ac6 Use a typesafe struct for opcodes.
Also, correctly read delayslots using Read_Instruction on ARM.
2013-08-24 15:36:24 -07:00
Unknown W. Brackets b37f09cedf Make MIPSInfo a struct for typesafety.
Found a bug in ReadsFromReg().
2013-08-24 13:22:10 -07:00
Unknown W. Brackets 8327cd0f8e Clean up some inconsistency in jit branches on arm. 2013-08-16 02:02:56 -07:00
Henrik Rydgard 0a8f85a919 Some JIT cleanup, implement VI2F on ARM. also disabled untested impl of viim for x86. 2013-07-31 17:27:04 +02:00
Henrik Rydgard 51596b636a Fix numerous ARM JIT bugs. Activate vmtvc and vscl, and vadd/vmul/vdiv/vsub for real this time. 2013-07-31 10:34:58 +02:00
Henrik Rydgard e93c2abe27 x86 jit: implement vfim. Move some stuff to native. cleanup for armjit logging 2013-07-30 22:28:05 +02:00
Henrik Rydgard 76a937f489 ARMJIT Experiment: Keep downcount in a register. Needs benchmarking. 2013-07-27 17:27:26 +02:00
Henrik Rydgard 78fe42fe80 Buildfix 2013-04-27 12:04:42 +02:00
Henrik Rydgard 2a39a3b972 JIT: Get rid of one memory access per dispatch, and get rid of blockcodepointers. 2013-04-27 01:32:03 +02:00
Henrik Rydgard 9eace8a80e Combine the two JitCache implementations (x86, ARM) into one. 2013-04-27 01:32:03 +02:00
Henrik Rydgard 8a904fe478 Some JIT cleanup 2013-04-27 01:32:02 +02:00