Unknown W. Brackets
0fc774927f
jit: Minor cleanups.
2016-01-10 12:28:29 -08:00
Henrik Rydgard
b4dd094f56
x86jit: Save a MOV in many cases of "jr ra"
2016-01-10 12:28:00 -08:00
Henrik Rydgard
d628b9b57b
Minor fixes, mostly comments
2015-10-10 10:03:34 +02:00
Henrik Rydgard
7fee5abf9f
x86/x64: Don't use a separate code block for pregenerated functions, just like on ARM
2015-10-08 22:15:28 +02:00
Henrik Rydgard
c41baab747
Pregenerate code to handle rounding mode switches. This time, for all three cores.
2015-10-08 19:58:37 +02:00
Henrik Rydgård
a1f5c537d4
Merge pull request #7672 from unknownbrackets/jit-minor
...
More x86jit micro optimizations for the FPU
2015-04-13 09:57:02 +02:00
Henrik Rydgård
d014d420db
Unify JitOptions across the backends.
...
This is required to make ExtractIR not a member of the various backends.
2015-04-12 11:41:26 -07:00
Henrik Rydgård
81dec36da8
Use an accessor to read the compilerPC.
...
In the IR it will be read from the block.
2015-04-11 01:14:37 -07:00
Henrik Rydgård
a897723e6a
Separate out jit reading nearby instructions.
...
This makes it easier to use an IR for these things, or remove them.
2015-04-11 00:53:24 -07:00
Unknown W. Brackets
7e38df077f
x86jit: Prefer MOVAPS over MOVSS for reg->reg.
2015-04-10 20:07:43 -07:00
Chin
37f50a3792
Change to pass some arguments by reference
2015-03-01 16:49:00 +01:00
Unknown W. Brackets
77777e372d
x86jit: Use R15 when safe for the jit.
...
This is virtually always safe.
2014-12-17 08:09:59 -08:00
Henrik Rydgard
05a8e2e35d
Some work towards being able to build two JITs together
...
This will be useful for testing/debugging, but not there yet.
2014-12-13 21:13:54 +01:00
Henrik Rydgard
51d55bd645
Namespacing cleanup (it's bad to do "using namespace" in a header)
2014-12-07 14:44:15 +01:00
Henrik Rydgard
e3a81f4346
x86 Jit: Basic implementation of vbfy1/2 (mostly to just cross another one off the list..)
2014-12-04 00:18:58 +01:00
Henrik Rydgard
ac772f25ff
x86 JIT: Join adjacent vrot calls together to avoid redundant sin/cos calls. Add a prototype, fix minor issues.
2014-11-30 11:04:13 +01:00
Unknown W. Brackets
ab7dd0df25
x86jit: Add an option to enable/disable vpfu simd.
2014-11-17 20:37:27 -08:00
Unknown W. Brackets
d0a2ced2f9
x86jit: Flip cc in stl* to avoid reg loads.
...
Unfortunately, this zero thing is now concerning me...
2014-11-09 08:15:39 -08:00
Unknown W. Brackets
b53f13480a
x86jit: Centralize continuing logic.
2014-10-12 19:01:04 -07:00
Unknown W. Brackets
d98adf27d6
x86jit: Add proxy blocks for continuing.
2014-10-12 17:15:31 -07:00
Unknown W. Brackets
2f598e8f38
jit: Statically jump for fixed branches.
...
This handles both loops (first step is known) and static branches (some
code uses them instead of jumps, and we disassemble that to "b".)
Not likely to be a big improvement, but might help if the branch predictor
was wrong.
This is as opposed to continuing, which would build a larger jit block.
2014-10-12 12:51:47 -07:00
Unknown W. Brackets
928e2adfc9
jit: Avoid applying/restoring the rounding mode.
...
If the game never sets it, we can skip around syscalls, interpreter,
replacements, etc.
2014-10-12 12:51:45 -07:00
Unknown W. Brackets
8d0dca71fe
jit: Rename the rounding mode funcs to clarify.
...
They apply/restore the value, set/clear is confusing.
2014-10-12 11:35:20 -07:00
Unknown W. Brackets
4459b8f483
jit: Actually jit vmtfc/vmfvc.
...
Sicne we have them and they are easy.
2014-09-01 23:13:39 -07:00
Unknown W. Brackets
925557ed47
x86jit: Maintain the rounding mode always.
...
This should be less often than doing it per block that uses fpu, unless
the game doesn't use fpu much at all.
2014-08-22 09:53:00 -07:00
Unknown W. Brackets
dc91dc1ce8
x86jit: Support fpu rounding modes for mul, etc.
...
Fixes Gods Eater Burst loading PSP savedata, but can no longer load old
savedata.
2014-08-21 23:59:55 -07:00
Henrik Rydgard
903ddbc513
x86 JIT: Fix bug where NOR would not get computed correctly in corner case
...
(CompTriArith can end up not actually mapping rd to a register when taking
a shortcut)
May fix the JIT issue mentioned by CPkmn and located by daniel229 as an aside in #6638
2014-07-27 21:41:41 +02:00
Unknown W. Brackets
09b9d2ad81
Keep track of ranges that have emuhack ops.
...
So that we can invalidate them smarter.
2014-07-05 16:25:16 -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
6ccae8f5a7
x86jit: Use a faster safemem fallback.
...
Really helps performance in games that use uncached addresses a lot,
without really impacting performance of most games which don't.
Of course, fastmem is faster.
2014-05-06 08:05:12 -07:00
Unknown W. Brackets
d65af7353b
Avoid some ChunkFile includes.
2014-03-15 11:32:57 -07:00
Henrik Rydgard
c80510fb3b
MemMap should not be included in MIPS.h.
2014-03-15 10:45:39 +01:00
Unknown W. Brackets
2347498667
x86jit: Use templates to avoid some void * casts.
...
Makes it a bit cleaner and potentially safer.
2014-01-18 09:57:13 -08:00
Henrik Rydgård
00c32ddadb
Mostly get rid of including "Globals.h"
2013-12-30 10:17:11 +01:00
Henrik Rydgard
215a269b34
Optimize dl_write_matrix just because. not expecting a big speedup...
2013-12-21 12:39:34 +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
1e300447e1
Fix some replace-related bugs. Add "jal" replace inlining, not activated.
2013-12-18 16:27:23 +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
Unknown W. Brackets
5d2ff64252
Support for modified jit-enabled VerySleepy.
...
This allows profiling the jit. Should have zero perf impact when not
in use, since it's entirely triggered by VerySleepy.
2013-11-30 19:20:21 -08:00
Henrik Rydgard
5bb3824dcf
Implement vocp on ARM and x86.
2013-11-19 21:41:47 +01:00
Unknown W. Brackets
a334aaf6ca
x86jit: Refactor and skip flushes in branch cont.
...
Still not faster, but at least the code isn't as messy.
2013-11-12 00:45:28 -08:00
Unknown W. Brackets
7e19933f64
x86jit: Try predicting branch continues.
...
Still doesn't seem to work. Something like a 4% gain in Star Ocean was
the best I saw...
2013-11-10 22:50:23 -08: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
455a7e090d
Compile the cache instruction to nothing.
...
Was showing up in a few profiles, does nothing currently.
2013-11-10 14:38:10 -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
309f904c0c
Extract JitState into its own header (arm/x86)
2013-11-08 18:51:52 +01:00
Henrik Rydgard
6eb7f94065
Implement vsgn in x86/x64 and ARM jit
2013-11-07 15:29:13 +01:00