dolphin/Source
smurf3tte 66b992cfe4 Jit: Fix correctness issue in dcbf/dcbi/dcbst
PR #2663 added a Jit64 implementation of dcbX and a fast path to skip JIT cache invalidation. Unfortunately, there is a mismatch between address spaces in this optimization. It tests the effective address (with the top 3 bits cleared) against the valid block bitset which is intended to be indexed by physical address. While this works in the common case, it fails (for example) when the effective address is in the 7E... region (a.k.a. "fake VMEM"). This may also fall apart under more complex memory mapping scenarios requiring full MMU emulation.

The good news is that even without this fast path, the underlying call to JitInterface::InvalidateICache() still does very little work in the common case. It correctly translates the effective address to a physical address which it tests against the valid block bitset, skipping invalidation if it is not necessary. As such, the cost of removing the fast path should not be too high.

The Jit64 implementation is retained, though all it does now is emit a call. This is marginally more efficient than simple interpreter fallback, which involves an extra call. The JitArm64 implementation has also been fixed.

The game Happy Feet is fixed by this change, as it loads code in the 7E... address region and depends upon JIT cache invalidation in reponse to dcbf.

https://bugs.dolphin-emu.org/issues/12133
2021-01-23 15:17:09 -08:00
..
Android Merge pull request #9443 from Simonx22/update-gradle 2021-01-16 06:55:10 -05:00
Core Jit: Fix correctness issue in dcbf/dcbi/dcbst 2021-01-23 15:17:09 -08:00
DSPSpy DSPSpy: sync Makefile with current devkitPro template 2020-06-08 04:21:41 +01:00
DSPTool DSP: Eliminate most global state 2020-12-27 06:38:02 -05:00
PCH msvc: bump _MSC_FULL_VER check to 192829335 2021-01-09 19:21:03 -08:00
UnitTests Merge pull request #9307 from Dentomologist/add-deleted-file-missing-warning-flag 2020-12-11 02:06:28 +01:00
VSProps msbuild: enable USE_GDBSTUB 2021-01-09 22:26:55 -08:00
.clang-format
CMakeLists.txt Turn format string issues into compile-time errors 2020-12-04 18:06:02 +01:00
dolphin-emu.sln Externals: Add zstd 2020-05-13 20:53:10 +02:00