Commit graph

151 commits

Author SHA1 Message Date
Unknown W. Brackets
7dc775e54f IR: Use interp for unhandled prefix cases.
The interpreter is not changed yet, so in theory this shouldn't change
behavior.
2019-03-31 08:17:11 -07:00
Henrik Rydgard
a802adb1f6 Add simple UI for JIT feature disable flags 2019-02-04 13:00:08 +01:00
Unknown W. Brackets
46649a218e Core: Add flags to disable jit features.
Not actually disabling yet, just setup.
2019-02-03 13:58:24 -08:00
Unknown W. Brackets
09e307b097 arm64jit: Update rounding mode on thread switch.
Since fcr31 is per-thread, we must update jit state when it changes.
This also fixes the rounding mode on load state and jit/interp switch.
2018-04-01 10:12:32 -07:00
aliaspider
0af6d573bb remove all usage of __LIBRETRO__ 2018-03-24 12:45:20 +01:00
Unknown W. Brackets
97674b80bd irjit: Skip preloading blocks with jump to 0.
These will be changed before executing anyway.
2018-01-06 17:23:53 -08:00
Unknown W. Brackets
6149ac584f jit: Add interface to precompile functions.
This doesn't actually do any preloading yet, it just adds an API.
2018-01-06 16:43:38 -08:00
Henrik Rydgård
468b830bec Show IR disassembly in JIT Compare screen 2018-01-04 12:23:23 +01:00
Unknown W. Brackets
8c3b0aa89c jit: Skip unlinking blocks on clear.
Speeds up clear especially when on a WX exclusive platform.
2017-12-28 11:12:06 -08:00
Unknown W. Brackets
08e85d0cd4 arm64jit: Autodetect pointerify support.
Also, re-enable static alloc without pointerify, it works now.
2017-12-28 10:48:55 -08:00
Unknown W. Brackets
cccf448ae0 arm64jit: Allow disabling pointerification.
For platforms where we can't get base aligned.
2017-12-27 17:02:19 -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
twinaphex
4855b2d6f1 mingw patches 2017-08-31 22:15:05 +02:00
LunaMoo
5e0f8141d2 Corrections, some %i->%d around other code as well. 2017-05-30 13:52:29 +02: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 Rydgård
6e49341b91 Workaround a shutdown crash by adding a sanity check .. which actually catches stuff. A bit worrying. 2017-01-26 08:43:26 +01:00
Henrik Rydgard
5df685fa07 Fix another couple of arch define things 2016-11-03 22:25:55 +01:00
Florent Castelli
8c3552de74 cmake: Detect features at compile time
Instead of relying on manually passed down flags from CMake,
we now have ppsspp_config.h file to create the platform defines for us.
This improves support for multiplatform builds (such as iOS).
2016-10-19 12:31:19 +02:00
Henrik Rydgard
4e5f1e2797 Fix block linking with W^X mode 2016-08-28 18:54:14 +02:00
Henrik Rydgard
b264657d56 Implement W^X-compatible path. Works on Windows and Android, hopefully iOS (untested).
Disabled block linking in this mode, can re-enable with some more work later.

To enable W^X on other platforms than iOS, simply change PlatformIsWXExclusive.
2016-08-28 14:52:08 +02: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
e37777648e jit-ir: Restore emuhacks before saving state.
Let's just ask jit to do this, not its block cache directly.
2016-05-14 08:59:44 -07:00
Henrik Rydgard
6e44e97ffa Refactor prep: Split JitInterface into MIPSFrontendInterface and JitInterface 2016-05-09 19:41:39 +02:00
Henrik Rydgard
492ea5fac4 Address a bunch of comments, thanks for the review 2016-05-08 21:38:03 +02:00
Henrik Rydgard
ce8aae5ed1 Make the IRJit core selectable in developer tools 2016-05-08 01:43:27 +02:00
Henrik Rydgard
12edfcea5a Enough to run cpu_alu.prx. 2016-05-07 21:00:30 +02:00
Henrik Rydgard
4acf85aa06 It's kind of starting to run 2016-05-07 17:37:19 +02:00
Henrik Rydgard
d399c4a470 Initial commit for IRJit 2016-05-07 13:58:29 +02:00
Henrik Rydgard
ccce19e14a Fix accidentally truncated comment. 2016-05-01 18:47:32 +02:00
Henrik Rydgard
ffe4c266ef Add CodeBlockCommon base class to remove further arch-specificity in JitBlockCache
Remove unused ArmThunk.
2016-05-01 11:40:00 +02:00
Henrik Rydgard
8b450c8034 Merge NativeJit.cpp/h with JitCommon.cpp/h 2016-05-01 11:39:59 +02:00
Henrik Rydgard
5aadce59a2 Move architecture-specific code out of JitBlockCache 2016-05-01 11:39:58 +02:00
Henrik Rydgard
a5be0976bd Remove preprocessor hacks to choose JIT implementation.
Opens up for having multiple JIT implementations available at runtime,
which could be use for experimenting with new JIT compiler types or for
unit testing one JIT on another architecture.

Very few of the newly virtual calls are on any sort of critical path so
hopefully there will not be a performance loss.
2016-05-01 11:39:53 +02:00
Henrik Rydgard
d60f5ba285 Fix minor memory leak in JIT block cache 2016-02-10 15:43:36 +01:00
Unknown W. Brackets
eebe3e7bce armjit: Fix block exit safety writes.
This ensures we don't link to invalid blocks, fixes BKPTs on relinking,
and fixes BKPTs when relinking a prelinked block.

Should help #8524.
2016-01-30 20:44:57 -08:00
sum2012
8debe785b8 Revert "Fix Yu-Gi-Oh 6 crash with edit card in Android version"
This reverts commit f659e60c8d.

The crash is correctly fixed
2015-12-29 04:10:18 +08:00
Sacha
bbc4f64999 MIPS: Fix build so we can compile this again. 2015-10-29 02:46:43 +00:00
Henrik Rydgard
b7db15225f x64 disasm: properly symbolize rip-relative addresses 2015-10-24 10:37:01 +02:00
Henrik Rydgard
1ddb508542 Improve x86 disassembly (a few symbols) 2015-10-10 13:05:17 +02:00
Henrik Rydgard
8914cd9914 ARM64 disassembler improvements (show many kinds of branch targets properly) 2015-10-10 11:27:28 +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
b7725c4f40 Remove empty header files 2015-10-08 18:54:33 +02:00
Unknown W. Brackets
cd842ac21f Validate blocklinking in icache invalidate all.
Normally blocks are invalidated on entry.  But when blocklinking is on,
we don't validate on all entries.

This fixes Tales of Rebirth crashes (#7868.)
2015-07-19 13:08:32 -07:00
Unknown W. Brackets
96b01e4999 Make sure we don't clean up proxy blocks. 2015-07-19 13:04:06 -07:00
Henrik Rydgard
844a3f19a9 Fix bugs and issues in ARM64 static alloc. Thanks unknown for finding the problem. 2015-07-11 16:59:09 +02:00
Henrik Rydgard
a0bf934796 ARM64: Some work on static allocation. Close to working, cube.elf runs 700 blocks but then hangs (?!) 2015-07-11 16:59:09 +02:00
Unknown W. Brackets
4d7a948717 arm64: Fix a dump mistake with rounding modes. 2015-06-28 16:35:46 -07:00
Unknown W. Brackets
b6612edf67 arm64: Use a cached rounding func for cvt.w.s.
This is much faster for this particular instruction, although not all
games even use it.
2015-06-28 12:40:29 -07:00
Jan Beich
a4eb49f009 Unbreak build with FakeJit
Core/MIPS/fake/FakeJit.cpp:141:46: error:
      unknown type name 'FakeJitBlock'; did you mean 'JitBlock'?
const u8 *FakeJit::DoFakeJit(u32 em_address, FakeJitBlock *b)
                                             ^~~~~~~~~~~~
                                             JitBlock
Core/MIPS/JitCommon/JitBlockCache.h:59:8: note:
      'JitBlock' declared here
struct JitBlock {
       ^
Core/MIPS/fake/FakeJit.cpp:141:20: error:
      out-of-line definition of 'DoFakeJit' does not match any declaration in
      'MIPSComp::FakeJit'
const u8 *FakeJit::DoFakeJit(u32 em_address, FakeJitBlock *b)
                   ^~~~~~~~~
Core/HLE/ReplaceTables.cpp:1044:29: error:
      use of undeclared identifier 'JITFUNC'
        { "fabsf", &Replace_fabsf, JITFUNC(Replace_fabsf), REPFLAG_ALLOWINLI...
                                   ^
Core/HLE/ReplaceTables.cpp:1101:27: error:
      invalid application of 'sizeof' to an incomplete type 'const
      ReplacementTableEntry []'
        for (int i = 0; i < (int)ARRAY_SIZE(entries); i++) {
                                 ^~~~~~~~~~~~~~~~~~~
native/math/../base/basictypes.h:67:30: note:
      expanded from macro 'ARRAY_SIZE'
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
                             ^~~
Core/HLE/ReplaceTables.cpp:1117:9: error:
      invalid application of 'sizeof' to an incomplete type 'const
      ReplacementTableEntry []'
        return ARRAY_SIZE(entries);
               ^~~~~~~~~~~~~~~~~~~
native/math/../base/basictypes.h:67:30: note:
      expanded from macro 'ARRAY_SIZE'
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
                             ^~~
Core/MIPS/JitCommon/JitCommon.cpp:31:2: error:
      unknown type name 'Jit'
        Jit *jit;
        ^
Core/MIPS/JitCommon/JitCommon.cpp💯21: error:
      no member named 'Asm' in 'MIPSComp::FakeJit'
        if (MIPSComp::jit->Asm().IsInSpace((u8 *)(intptr_t)addr)) {
            ~~~~~~~~~~~~~  ^
Core/MIPS/JitCommon/JitCommon.cpp:101:45: error:
      no member named 'Asm' in 'MIPSComp::FakeJit'
                *offset = addr - (uint64_t)MIPSComp::jit->Asm().GetBasePtr();
                                           ~~~~~~~~~~~~~  ^
Core/MemMap.cpp:197:57: error:
      use of undeclared identifier 'MEMVIEW32_MASK'
  ...position, view.size, base + (view.virtual_address & MEMVIEW32_MASK));
                                                             ^
2015-05-26 15:20:10 +03:00
Henrik Rydgård
071b6b986a Best-effort update of the MipsJit prototype 2015-04-12 11:53:16 -07:00