dolphin/Source
JosJuice fca27c375a Jit64: Explicitly get imm for clobbered stores
If we're on an x64 CPU that doesn't have the MOVBE extension, trying to
SwapAndStore a host register results in that register's value getting
clobbered with the swapped value. Jit64::stX and Jit64::stXx detect this
case, and if necessary, emit a MOV to a register that's fine to clobber.

This logic was broken by the merge of PR 12134. Jit64::stX and
Jit64::stXx were assuming that if RegCache::IsImm returns true for a
guest register, calling RegCache::Use or RegCache::BindOrImm for that
guest register would result in an immediate. However, PR 12134 made it
possible for a guest register to have both a host register and an
immediate in the register cache at the same time. When this happens,
RegCache::IsImm returns true, yet RegCache::Use and RegCache::BindForImm
return an RCOpArg whose Location returns a host register. (To make it
extra confusing, RCOpArg::IsImm calls RegCache::IsImm if the RCOpArg
came from RegCache, so RCOpArg::IsImm returns true!)

To fix this, in cases where Jit64::stX and Jit64::stXx explicitly need
an immediate to avoid having to emit an extra MOV, let's call
RegCache::Imm32 so that we're certain that we're getting an immediate.

This fixes an issue on older x64 CPUs that manifested as e.g. completely
broken graphics in Spyro: Enter the Dragonfly.
2025-12-08 23:19:10 +01:00
..
Android Merge pull request #14159 from JosJuice/android-retroachievements-login-gone 2025-11-25 20:52:29 +01:00
Core Jit64: Explicitly get imm for clobbered stores 2025-12-08 23:19:10 +01:00
DSPSpy DSPSpy: Make RealDSP final and make overide explicit 2025-05-10 13:02:55 +02:00
DSPTool Host: Remove unnecessary functions 2025-08-03 13:19:30 -07:00
PCH
UnitTests Disable PatchAllowlistTest if USE_RETRO_ACHIEVEMENTS is OFF 2025-11-27 01:26:51 +01:00
VSProps Merge pull request #13694 from jordan-woyak/sdl3 2025-06-24 18:59:48 -04:00
.clang-format Clang-format: Fix invalid settings 2025-05-01 22:05:07 +02:00
CMakeLists.txt CMakeLists: Disable -Wtrigraphs. 2025-11-08 22:38:03 +00:00
dolphin-emu.sln Core/HW: Add Visual Studio project files for cpp-ipc library. 2025-10-28 18:50:58 +00:00