dolphin/Source/Core/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
..
Boot Call JitInterface::UpdateMembase from PowerPC::MSRUpdated 2025-11-02 21:18:07 +01:00
Config Merge pull request #14066 from Biendeo/master 2025-11-25 23:12:39 +01:00
ConfigLoaders Core: Add VBI Frequency Override 2025-05-12 18:54:36 +02:00
Debugger RetroAchievements - Remove Hardcore Check from ApplyMemoryPatch 2025-11-27 11:52:56 -05:00
DSP Jit64: Dynamic length of regular jump instruction (for known addresses) 2025-10-08 00:15:57 +02:00
FifoPlayer Merge pull request #13236 from JosJuice/jit-set-msr-on-fallback 2025-11-11 20:55:24 -05:00
HLE HLE_VarArgs: Replace enable_if with concepts. 2025-10-13 23:42:31 -05:00
HW Merge pull request #14180 from jordan-woyak/mgba-link-fix 2025-11-30 18:26:18 +01:00
IOS Merge pull request #14066 from Biendeo/master 2025-11-25 23:12:39 +01:00
PowerPC Jit64: Explicitly get imm for clobbered stores 2025-12-08 23:19:10 +01:00
AchievementManager.cpp Merge pull request #13583 from LillyJadeKatrin/retroachievements-android 2025-11-22 17:00:03 +01:00
AchievementManager.h Merge pull request #13583 from LillyJadeKatrin/retroachievements-android 2025-11-22 17:00:03 +01:00
ActionReplay.cpp Merge pull request #13939 from Dentomologist/logging_avoid_overwriting_debug_verbosity_in_release_builds 2025-11-08 14:47:27 +01:00
ActionReplay.h PatchEngine: OSD message showing number of enabled patches and cheats 2025-08-30 16:51:51 +02:00
ARDecrypt.cpp Fix various warnings 2025-07-12 12:47:30 +02:00
ARDecrypt.h
BootManager.cpp Core/Core: fix typos 2025-03-08 15:41:53 -05:00
BootManager.h Core/Core: fix typos 2025-03-08 15:41:53 -05:00
CheatCodes.h Common/IniFile: Move interface into Common namespace 2023-04-13 10:19:28 -04:00
CheatGeneration.cpp Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
CheatGeneration.h
CheatSearch.cpp CheatSearchWidget: New feature, writing a value to all selected addresses 2025-10-08 11:33:44 +02:00
CheatSearch.h CheatSearchWidget: New feature, writing a value to all selected addresses 2025-10-08 11:33:44 +02:00
CMakeLists.txt Merge pull request #14066 from Biendeo/master 2025-11-25 23:12:39 +01:00
CommonTitles.h Add Everybody Votes Channel and Region Select to WiiLink config 2023-09-03 15:56:02 -04:00
ConfigManager.cpp AdvancedPane: Add a button to restore default settings 2025-10-27 15:59:33 +01:00
ConfigManager.h AdvancedPane: Add a button to restore default settings 2025-10-27 15:59:33 +01:00
Core.cpp Core: Make s_cpu_thread_job_finished a local variable 2025-11-23 15:17:20 +01:00
Core.h Merge pull request #13689 from JosJuice/lock-core-any-thread 2025-11-16 18:35:17 +01:00
CoreTiming.cpp CoreTiming: Fix percent speed display when "Rush Frame Presentation" is enabled. 2025-11-22 05:04:09 -06:00
CoreTiming.h CoreTiming: Add "Rush Frame Presentation" setting to throttle only once after each presentation for lower input latency. 2025-11-11 20:01:52 -06:00
CPUThreadConfigCallback.cpp Remove redundant semicolons 2024-08-20 14:59:54 +02:00
CPUThreadConfigCallback.h CPUThreadConfigCallback: Use maximum value of size_t instead of -1 as default value ConfigChangedCallbackID 2025-11-08 23:23:33 -05:00
DolphinAnalytics.cpp DolphinAnalytics: Only call ReloadConfig in config changed callback when analytics enabled value changes 2025-11-12 00:09:41 -05:00
DolphinAnalytics.h DolphinAnalytics: Only call ReloadConfig in config changed callback when analytics enabled value changes 2025-11-12 00:09:41 -05:00
DSPEmulator.cpp Core/DSPHLE: Store reference to System in DSPHLE instances. 2024-01-08 10:23:28 +01:00
DSPEmulator.h DSPEmulator: Remove redundant parameter and code 2025-10-26 18:03:31 -07:00
FreeLookConfig.cpp FreeLook: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
FreeLookConfig.h FreeLook: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
FreeLookManager.cpp FreeLook: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
FreeLookManager.h Android: Get profile name from core 2023-10-01 18:47:49 +02:00
GeckoCode.cpp MMU: Use templates for Read/Write functions 2025-10-08 11:27:06 +02:00
GeckoCode.h PatchEngine: OSD message showing number of enabled patches and cheats 2025-08-30 16:51:51 +02:00
GeckoCodeConfig.cpp GeckoCodeConfig: Remove HTTPS workaround for Android 2025-01-07 23:02:13 -05:00
GeckoCodeConfig.h GeckoCodeConfig: Remove HTTPS workaround for Android 2025-01-07 23:02:13 -05:00
Host.h Host: Remove unnecessary functions 2025-08-03 13:19:30 -07:00
HotkeyManager.cpp HotkeyManager: Add HK_TOGGLE_WII_SPEAK_MUTE 2025-05-07 21:27:50 +04:00
HotkeyManager.h Merge pull request #13522 from tygyh/Enforce-overriding-destructor-style-Core&UnitTests 2025-06-07 17:55:14 -05:00
LibusbUtils.cpp LibusbUtils: Change libusb_init failure from an ASSERT_MSG to an ERROR_LOG_FMT. 2025-07-23 21:16:04 -05:00
LibusbUtils.h LibusbUtils: Add GetStringDescriptor function to return unicode strings and replace our libusb_get_string_descriptor_ascii calls. 2025-07-06 19:41:14 -05:00
MachineContext.h Add OpenBSD/arm64 support. 2024-05-22 14:32:37 -04:00
MemoryWatcher.cpp MMU: Use templates for Read/Write functions 2025-10-08 11:27:06 +02:00
MemoryWatcher.h DolphinQt: Properly lock CPU before accessing emulated memory 2023-02-12 11:27:50 +01:00
MemTools.cpp JitInterface: Refactor to class, move to System. 2023-03-26 14:38:07 +02:00
MemTools.h UnitTests: Skip PageFaultTest if exception handlers are not supported 2022-05-19 12:26:41 -07:00
Movie.cpp Movie: Replace a blocking RunOnCPUThread call with a CPUThreadGuard. 2025-11-17 11:57:43 -06:00
Movie.h Movie: Eliminate MovieManager::SetGraphicsConfig. 2025-03-10 18:16:49 -05:00
NetPlayClient.cpp Avoid map/set double lookups 2025-07-08 06:53:42 +02:00
NetPlayClient.h Make overriding explicit and remove redundant virtual specifiers on overriding destructors - Core & UnitTests 2025-05-01 15:00:37 +02:00
NetPlayCommon.cpp Migrate to SFML>=3.0.0 2025-02-25 06:42:13 +01:00
NetPlayCommon.h Updated PEER_TIMOUT in NetPlayCommon.h to use chrono literals; Updated NetPlayServer.cpp OnConnect() by putting commonly used code into named functions 2022-08-09 16:26:52 -06:00
NetPlayProto.h Core: Add VBI Frequency Override 2025-05-12 18:54:36 +02:00
NetPlayServer.cpp Avoid map/set double lookups 2025-07-08 06:53:42 +02:00
NetPlayServer.h Make overriding explicit and remove redundant virtual specifiers on overriding destructors - Core & UnitTests 2025-05-01 15:00:37 +02:00
NetworkCaptureLogger.cpp fmt: Replace deprecated fmt::localtime usage with Common::LocalTime 2025-06-04 13:32:12 +02:00
NetworkCaptureLogger.h Make overriding explicit and remove redundant virtual specifiers on overriding destructors - Core & UnitTests 2025-05-01 15:00:37 +02:00
PatchEngine.cpp MMU: Use templates for Read/Write functions 2025-10-08 11:27:06 +02:00
PatchEngine.h Core: apply Dolphin OnFrame patches right after boot 2024-10-16 02:58:03 +01:00
State.cpp Host: Remove unnecessary function 2025-08-03 13:12:01 -07:00
State.h Fix various warnings 2025-07-12 12:47:30 +02:00
SyncIdentifier.h Core/SyncIdentifier: Default operator== 2023-12-11 19:39:55 -05:00
SysConf.cpp Simplify std::find_if with std::ranges::find and projections 2025-03-09 13:26:35 -07:00
SysConf.h
System.cpp Common: Make HookableEvent use non-static data. 2025-11-02 17:30:43 -06:00
System.h Common: Make HookableEvent use non-static data. 2025-11-02 17:30:43 -06:00
TimePlayed.cpp Core: Don't store game ID inside TimePlayed 2025-04-12 15:20:49 +02:00
TimePlayed.h Core: Don't store game ID inside TimePlayed 2025-04-12 15:20:49 +02:00
TitleDatabase.cpp Implement Triforce ID parsing 2025-04-21 22:05:25 +10:00
TitleDatabase.h Implement Triforce ID parsing 2025-04-21 22:05:25 +10:00
USBUtils.cpp USBUtils: Refactor USB device handling 2025-07-23 03:26:25 +02:00
USBUtils.h USBUtils: Refactor USB device handling 2025-07-23 03:26:25 +02:00
WC24PatchEngine.cpp Simplify std::find with Common::Contains 2025-01-01 09:52:03 -08:00
WC24PatchEngine.h WC24PatchEngine: Make GetNetworkPatch() take a std::string_view 2023-12-14 14:24:49 -05:00
WiiRoot.cpp Core: Move Emulation IOS instance to System. 2024-02-07 22:07:30 +01:00
WiiRoot.h Core/Boot: Add Wii FS sync data (for temp NAND/netplay) to BootSessionData and handle it in the boot and shutdown logic. 2021-11-22 01:33:45 +01:00
WiiUtils.cpp Source: Remove redundant lambda parameter lists 2025-06-14 10:19:31 +02:00
WiiUtils.h Qt: Add file size stats to NAND Check. 2023-07-14 05:24:29 +02:00