Commit Graph
48 Commits
Author SHA1 Message Date
Henrik Rydgard 5ad04a23f4 x86 jit: Rename BindToRegister to MapReg 2013-11-09 15:23:31 +01:00
Henrik Rydgard 5a95e267fb Add an optimization to discard registers at the end of functions when possible.
Works in some games but crashes many so hiding it for now. Do not add UI.
2013-11-08 12:43:48 +01:00
Unknown W. Brackets 732ae13ebb Fast path CallSyscall where possible.
It seems we're spending a decent amount of time there, which isn't
entirely unexpected.  We can eliminate some things easily.
2013-11-04 07:59:37 -08:00
Unknown W. Brackets 2e8ef3027f Write the retaddr to rd, not always ra, in jalr.
Thanks go entirely to @Kingcom for pointing this out.

Don't know of any games not using RA as the rd.
2013-10-17 07:39:33 -07:00
Unknown W. Brackets c3839a53e5 Fix some minor warnings. 2013-09-07 22:40:08 -07:00
Unknown W. Brackets dc05051696 Add more reporting for cpu instructions. 2013-09-05 23:27:51 -07:00
Unknown W. Brackets 97aa1a631e Improve typesafety in the x86 regalloc. 2013-08-24 19:41:10 -07:00
Unknown W. Brackets 6c97b66806 Cap imm branch instructions, reset compiling.
Break and other delay slot ops could've set it to false.

It's actually sometimes faster now.
2013-08-24 17:26:24 -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 9864c1cd8d Minor x86 jit branch tweak from arm. 2013-08-16 23:48:41 -07:00
Unknown W. Brackets 8327cd0f8e Clean up some inconsistency in jit branches on arm. 2013-08-16 02:02:56 -07:00
Unknown W. Brackets df32c99be6 Attempt to follow branches to a max # of ops.
Seems to make it slower also.  Maybe taking the branch would be better...
hmmph.
2013-08-16 01:07:11 -07:00
Unknown W. Brackets defd2b6383 Attempt at doing branches with imm args. 2013-08-16 01:05:52 -07:00
Unknown W. Brackets 6b0b5145e5 Clean up some inconsistency in jit branches. 2013-08-16 00:44:23 -07:00
Unknown W. Brackets 2758634a0f Avoid overhead calling __KernelIdle().
~1.8% improvement in Zettai Hero Project.
2013-08-15 01:35:17 -07:00
Unknown W. Brackets df50e03146 Add a safety log for cases we don't handle right. 2013-08-14 23:14:25 -07:00
Unknown W. Brackets e639f8d15f Handle branches in VFPU delay slots better.
Based on tests on a PSP, all branches are attempted.  The behavior is
technically undefined.

It seems to take the delay slot's target if they differ and both pass.
This is the behavior the interpreter has, but it's more work in jit.

Since only a couple games seem to do this, and clearly expect this
behavior, this fixes all known cases of #1926.
2013-08-14 22:56:02 -07:00
Unknown W. Brackets c9c3bc83e4 Log more info about branches in delay slots. 2013-06-30 13:19:27 -07:00
Unknown W. Brackets 5595146f56 Add reporting for jumps in delay slots. 2013-05-26 20:30:14 -07:00
Henrik Rydgard 9eace8a80e Combine the two JitCache implementations (x86, ARM) into one. 2013-04-27 01:32:03 +02:00
Henrik Rydgard 81444c92a1 win32-gl-ui: Cleanup 2013-03-29 21:21:27 +01:00
Unknown W. Brackets ed76563973 Don't bother checking nice, just do it after. 2013-03-11 02:18:27 -07:00
Unknown W. Brackets b5fe67eb3d If the out is RA, delay slot isn't nice for jal.
Fixes Phantasy Star Portable 2 in jit.
2013-03-11 02:14:38 -07:00
Unknown W. Brackets 08923c092b Implement ins and ext in the x86 jit. 2013-02-21 01:25:01 -08:00
Unknown W. Brackets bab7947be6 Read delay slots as instructions not mem.
Just in case - could be a jump target, maybe?  Never seen it, though.
2013-02-02 11:46:35 -08:00
Unknown W. Brackets 44b5adeaac Properly jit the break instruction.
Otherwise, it just keeps on going past it.
We never want to hit this anyway, but it's good to know if we do.
2013-02-01 00:49:14 -08:00
Henrik Rydgard c97f63a9d9 Minor armjit opt 2013-01-30 20:01:42 +01:00
Unknown W. Brackets d1909a1581 Add a quick disable define for nice delay slots. 2013-01-24 19:11:03 -08:00
Unknown W. Brackets 75cbe18afc Simplify nice delay slot detect, and yes for noop.
NOOP seems very common so this should already benefit speed a bit.
2013-01-24 08:29:32 -08:00
Unknown W. Brackets 2eba209f64 Move around the jit nice delay slot logic.
Nice delay slots don't not save flags, they run before the CMP.
2013-01-24 07:31:51 -08:00
Unknown W. Brackets 3444fc8981 Avoid some memory writes on jr.
Should improve tight mips function loops a bit.
2013-01-24 01:23:50 -08:00
Unknown W. Brackets c324983340 Make the jit support bltzal and friends.
Fixes problems with jit in games.  Android changes completely untested.
2013-01-22 08:04:01 -08:00
Unknown W. Brackets a9d0390426 Adjust downcount before syscalls, not after.
This makes jit slightly slower for syscalls, but it's minor and makes
sure jit and interpreter timing are determistically the same.
2013-01-21 22:57:53 -08:00
Unknown W. Brackets 566b7a0910 A branch was missing inDelaySlot, refactor it. 2013-01-21 22:45:07 -08:00
Unknown W. Brackets c897e6446a Don't over decr downcount when hitting a jit bp. 2013-01-21 19:41:12 -08:00
Unknown W. Brackets 1485b0865c Improve the speed of branch debugging a bit. 2013-01-20 19:48:55 -08:00
Unknown W. Brackets dd69694302 Add some optional logging to debug jit branching. 2013-01-20 19:48:55 -08:00
Unknown W. Brackets 776eb8ab2e Simplify CompileDelaySlot(). 2013-01-20 19:48:54 -08:00
Unknown W. Brackets 11c5cdfdb0 Refactor out all the CheckJitBreakpoint()s.
Ah, much cleaner.
2013-01-18 21:33:23 -08:00
Unknown W. Brackets 5080285e54 Add breakpoints for delay slots.
Wanted to do this in CompileAt(), darn not nice delay slots.
2013-01-18 21:12:58 -08:00
Henrik Rydgard f5c94775b9 Cleanup 2013-01-09 00:12:02 +01:00
Henrik Rydgard e3a4ed510c Fix bug in x86 jit :) 2013-01-08 19:30:28 +01:00
Henrik Rydgard 8c06edc47b It's getting close to the first totally unoptimized jit run. 2013-01-08 17:03:17 +01:00
Henrik Rydgård ed68dea0d5 JIT: Ignore branches in delay slots. Not sure if this is 100% correct. 2012-12-26 08:37:53 +01:00
Henrik Rydgard d485b76e11 Jit fixes, test update 2012-11-12 14:35:10 +01:00
Henrik Rydgard 64cc573703 Switch to "GPL 2.0 or later" for various reasons. I wrote most of the code I imported from Dolphin (which is GPL2-but-not-later), so it should be OK. 2012-11-04 23:24:00 +01:00
Henrik Rydgard 4f7ad15758 Add snapshot of the whole source code. 2012-11-01 16:19:01 +01:00