dolphin-emulator/Source/Core
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
..
AudioCommon AudioCommon: Convert alerts over to fmt-based variants 2020-11-27 10:10:11 -05:00
Common Arm64Emitter: Convert ShiftType to enum class 2021-01-17 16:21:38 -08:00
Core Jit: Fix correctness issue in dcbf/dcbi/dcbst 2021-01-23 15:17:09 -08:00
DiscIO DiscIO: Fix recursive directory extraction 2020-12-03 21:13:53 +01:00
DolphinNoGUI Clean up screen saver inhibition and apply setting change immediately. 2020-10-18 16:31:48 -05:00
DolphinQt Use GX_CMD_UNKNOWN_METRICS instead of magic number 0x44 2021-01-11 12:41:04 -08:00
InputCommon Fix a couple of typos 2021-01-05 15:24:21 +01:00
MacUpdater
UICommon Turn Config::Info into a class with getters 2020-12-11 19:54:16 +01:00
UpdaterCommon Fix updater not always cleaning up temp directory 2020-11-13 12:25:53 -08:00
VideoBackends Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings 2020-12-16 16:04:19 +01:00
VideoCommon Arm64Emitter: Convert ShiftType to enum class 2021-01-17 16:21:38 -08:00
WinUpdater DolphinQt: Handle non-ASCII characters in Windows cmd arguments 2020-09-21 17:26:29 +02:00
CMakeLists.txt