Commit Graph

87 Commits

Author SHA1 Message Date
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
Henrik Rydgard 5293c152c6 Untested support for Android-x86. No idea if this actually works. 2013-03-21 20:52:33 +01:00
Unknown W. Brackets 9561f1d9c1 iOS: Protect/unprotect isn't needed for jit. 2013-03-14 02:16:51 -07:00
Unknown W. Brackets ead6983ad2 Don't lock armjit memory before aligning code. 2013-03-14 01:16:28 -07:00
Sacha f88bf8bbff Attempt at fixing JIT on iOS. Can only have PROT_WRITE or PROT_EXEC enabled. So toggle between them as needed. 2013-03-14 14:40:01 +10:00
Unknown W. Brackets c4ab0855b4 Make sure interpreter and jit savestates match. 2013-03-08 08:49:21 -08:00
Unknown W. Brackets 028e85dc92 Cleanup some differences between the two jits. 2013-03-07 02:08:44 -08:00
Henrik Rydgard a69b09a831 More work on TestRunner, now runs all the CPU tests. 2013-03-07 00:22:39 +01:00
Sacha d77632bfb0 Fix literal pools on games with very large code blocks (eg. Zero no Kieski).
Was flushing after an offset of 4088 which did not take in to account that a single MIPS instruction can turn in to numerous ARM instructions. Chose a safer value of 4020.
Was insta-flushing after reaching this offset value. Some code blocks are over 8K in size. Use a partialFlushOffset to keep track of when the next flush is required.
Was protecting flush branch manually. Can use B_CC(CC_AL) for this instead.
2013-03-07 02:25:27 +10:00
Sacha 268d16bd24 Use correct args for STR(..) throughout armjit. 2013-03-07 00:59:07 +10:00