dolphin/Source/Core
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
..
AudioCommon CubebStream: Use WorkQueueThread::PushBlocking instead of sync_event 2025-11-07 13:19:18 -08:00
Common Windows/DirectIOFile: Don't request DELETE access for read-only Open 2025-11-29 14:02:24 -08:00
Core Jit64: Explicitly get imm for clobbered stores 2025-12-08 23:19:10 +01:00
DiscIO Merge pull request #13539 from tygyh/DiscIO-Remove-redundant-casts 2025-11-19 17:40:42 -06:00
DolphinNoGUI Merge pull request #13689 from JosJuice/lock-core-any-thread 2025-11-16 18:35:17 +01:00
DolphinQt DolphinQt: Use QtUtils::CreateIconWarning to make the RetroAchievements "hardcore mode" warning size consistent with the other warnings. 2025-11-27 01:43:50 -06:00
DolphinTool Core: Remove IsHostThread 2025-11-10 21:14:56 +01:00
InputCommon DITConfiguration: Prevent a crash if images fail to load 2025-11-29 23:54:48 +01:00
MacUpdater
UICommon Merge pull request #13748 from Dentomologist/autoupdatechecker_delete_old_updater_log_file 2025-11-18 18:12:47 +01:00
UpdaterCommon
VideoBackends Merge pull request #14042 from iwubcode/bp_functions_global 2025-11-02 13:17:38 -05:00
VideoCommon Merge pull request #14149 from iwubcode/shader_asset_vector_properties 2025-11-23 06:34:45 -05:00
WinUpdater
CMakeLists.txt
DolphinLib.ARM64.props
DolphinLib.props Merge pull request #14066 from Biendeo/master 2025-11-25 23:12:39 +01:00
DolphinLib.vcxproj Core/HW: Add Broadband Adapter (IPC). 2025-10-28 18:50:59 +00:00
DolphinLib.vcxproj.user
DolphinLib.x64.props
VersionInfo.plist.in