Commit graph

258 commits

Author SHA1 Message Date
Unknown W. Brackets
463b2a90c7 irjit: Allow precompiling funcs at start.
This can take a second, but cuts down on jitc spikes throughout runtime.
Note: bits of the game will still be recompiled as games change code.

This is basically the same operation as loading from cache, without the
cache yet.
2018-01-06 17:06:53 -08:00
Unknown W. Brackets
ccd562d934 irjit: Add a safety check for block num overflow.
In case a game is very frequently modifying some block.
2018-01-04 23:24:15 -08:00
Unknown W. Brackets
0bfab27b46 irjit: Calculate bloat statistics.
At least based on IR for now.  Can do something else later.

memset() was causing a crash on the std::map.
2018-01-04 23:09:03 -08:00
Henrik Rydgård
2709472abd
Merge pull request #10506 from hrydgard/ir-interpreter-simd
More IR interpreter SIMD
2018-01-05 01:21:32 +01:00
Henrik Rydgård
8c3a50d089
Merge pull request #10505 from hrydgard/ir-disasm-jit-compare
Show IR disassembly in JIT Compare screen
2018-01-05 01:20:49 +01:00
Henrik Rydgård
d1d01bfdcb Cleanup GetBlockNumberFromStartAddress 2018-01-05 01:20:10 +01:00
Henrik Rydgård
331a8f91e8 Fix that weird unordered compare mode, hopefully 2018-01-04 20:06:26 +01:00
Henrik Rydgård
18be23eccc IR: More fixes. Still something wrong with VFPU compares (not caused by this PR). 2018-01-04 19:38:36 +01:00
Henrik Rydgård
ca9050b84c On Linux, can't even include nmmintrin without explicitly enabling SSE 4.2 support. 2018-01-04 18:27:19 +01:00
Henrik Rydgård
fe88d12055 IR interpreter: Add some braces to allow variable declaration in the switch cases. 2018-01-04 18:27:19 +01:00
Henrik Rydgård
e0cc126d09 Add some more SIMD support to IR interpreter. Mostly just because, but also serves as implementation reference for later code generation backends. 2018-01-04 18:27:19 +01:00
Henrik Rydgård
a128624f98 IRInterpreter: Fix bugs in floating point truncation functions 2018-01-04 18:25:54 +01:00
Henrik Rydgård
1a97f62dc9 Fix running the CPU test from the UI. 2018-01-04 18:10:41 +01:00
Henrik Rydgård
468b830bec Show IR disassembly in JIT Compare screen 2018-01-04 12:23:23 +01:00
Henrik Rydgård
604b3c3e97 IR Interpreter: Add missing break; to switch case IROp::FSign. 2018-01-04 11:08:56 +01:00
Unknown W. Brackets
bc541bd020 irjit: Encode downcount directly as a constant.
Simpler this way, now.
2018-01-03 23:32:31 -08:00
Unknown W. Brackets
cffb2d61a7 irjit: Embed constant inside IRInst.
This simplifies a bunch of code and improves compile performance by about
30%, at the cost of a bit more memory.
2018-01-03 23:24:04 -08:00
Unknown W. Brackets
64b57a0329 irjit: Fix swr typo.
Shifting the wrong direction - oops.
2018-01-03 08:14:25 -08:00
Henrik Rydgård
3ac2350ad6 IR Interpreter: Add a comment, minor cleanup, minor SSE stuff. 2018-01-03 16:31:55 +01:00
Unknown W. Brackets
b11858d9a0 irjit: Properly account for delay slots in size.
Otherwise we think blocks are 4 bytes too short, which can affect
invalidation.
2018-01-01 22:54:40 -08:00
Unknown W. Brackets
3abcc4d6d8 irjit: Implement lwl/lwr/swl/swr.
This is very similar to the arm64jit implementation.
2018-01-01 08:38:13 -08:00
Unknown W. Brackets
b37ba9e599 irjit: Add options for compile/optimize steps.
This way the backend can set flags for the type of IR it wants.  It's
seems too complex to combine certain things like lwl/lwr in a pass.
2018-01-01 08:38:12 -08:00
Unknown W. Brackets
671be24105 irjit: Add extra temps to make lwl/swl/etc. easier. 2018-01-01 08:38:11 -08:00
Unknown W. Brackets
905d2c2da6 irjit: Cleanup some invalid op handling.
And log blocks the same way as other backends.
2018-01-01 08:38:11 -08:00
Unknown W. Brackets
8ffb0101fe jit: Report blocks with uneaten VFPU prefixes.
There may be options to avoid, like continuing these blocks, especially if
they're likely or something.
2018-01-01 08:38:10 -08:00
Unknown W. Brackets
3af78883c7 irjit: Speed up icache block invalidation.
Turns out, in games using a ton of small memcpys, this was causing perf
issues.
2017-12-31 10:37:09 -08:00
Unknown W. Brackets
8c2edd432b irjit: Allow continuing from mips break.
Some games currently generate break instructions, and can be played
otherwise.  Should be fixed, but let's not hard crash.
2017-12-25 10:21:22 -08:00
Henrik Rydgård
0207739d76 Can't call functions through known-nil pointers, even if they don't touch local data - LLVM's optimizer might have done something stupid. 2017-11-30 01:07:03 +01:00
Henrik Rydgård
22e65ba80d Get rid of ugly alignment macros and some other cruft, we now have alignas(16) from C++11 2017-08-31 01:14:51 +02:00
Unknown W. Brackets
33b073c545 Jit: Fix syscall outside delay slot.
Doesn't happen in real games, but useful in debug code.
2017-06-04 10:39:01 -07:00
Unknown W. Brackets
b483444fab IR: Cleanup some invalid ops. 2017-04-20 21:11:40 -07:00
Henrik Rydgard
b0bd7e3c6f Minor changes for compatibility with VS2017 2017-03-12 17:33:00 +01:00
Henrik Rydgård
635b2ada43 Remove a function that didn't make a lot of sense. 2017-01-26 09:50:16 +01:00
Henrik Rydgard
5d5f10d956 Attempts to counter crashes seen in the Google Play developer console 2016-12-01 22:07:03 +01:00
Florent Castelli
4145b60a0e symbian: Remove! 2016-10-11 18:49:08 +02:00
Henrik Rydgård
ea6b72d4c9 Merge pull request #8888 from unknownbrackets/warnings
Warning fixes
2016-08-06 10:59:06 +02:00
Unknown W. Brackets
fd546ff21d Fix some type comparison warnings. 2016-08-05 10:47:45 -07:00
Unknown W. Brackets
e55198f7e7 Correct some initialization order warnings.
Also, another missing init with IRBlocks.
2016-08-05 10:46:11 -07:00
Unknown W. Brackets
9972e5b10a Debugger: Allow logging on CPU breakpoints. 2016-08-04 12:39:29 -07:00
Henrik Rydgard
eb72a746b9 Fix one possible (reproducible!) startup crash in IRJit. May help #8848 2016-07-25 00:21:01 +02:00
Henrik Rydgård
c6d4966067 Make really sure we're not using the IRBlock copy constructor other than on Symbian.
Turns out it ended up being used on Mac, and our asserts just debugprint and don't actually assert...
2016-07-09 09:32:41 +02:00
Henrik Rydgard
e0845b876f Fix some bugs in the IRJit. Hopefully helps #8848 2016-07-08 00:05:44 +02:00
Henrik Rydgård
1091fd2dc0 Merge pull request #8840 from unknownbrackets/ir-vfpu
Minor IR cleanup in the VFPU
2016-07-04 10:02:52 +02:00
Unknown W. Brackets
1de4943632 jit-ir: Avoid crash in stack walk.
This can happen if something is data, I suppose, and not a valid block.
2016-07-02 20:51:06 -07:00
Unknown W. Brackets
4578c3cb54 jit-ir: Implement memory breakpoints.
These generally work, but likely delay slots will make downcount slightly
off, and won't resume when you hit run again without manually stepping
through them.
2016-07-02 16:38:30 -07:00
Unknown W. Brackets
7cd666c351 jit-ir: Decrease downcount after delayslot.
Except for likely delay slots.  This makes breakpoints work more
correctly when they trigger within a delay slot.
2016-07-02 16:35:56 -07:00
Unknown W. Brackets
1df08518ae jit-ir: Implement basic icache clear. 2016-07-01 17:27:24 -07:00
Unknown W. Brackets
6fb34d0bee jit-ir: Add initial breakpoint support.
No memory breakpoints yet, and cache isn't cleared yet so these don't work
exactly the way you might expect...
2016-07-01 17:15:57 -07:00
Unknown W. Brackets
8fab3dc91b jit-ir: Allow 3x3 and 2x2 vmmov in IR.
While this will generate a lot of FMovs, it should still be better than
bailing to interp.
2016-07-01 14:08:32 -07:00
Unknown W. Brackets
65394f1dba jit-ir: Fix vbfy with overlap. 2016-07-01 14:08:31 -07:00