From 421fdc1f2b58819aea1105f4fc6a60e67950b7f4 Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 27 Apr 2026 23:52:48 +0000 Subject: [PATCH] f --- src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp b/src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp index 7715b318fb..9332288cd1 100644 --- a/src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp +++ b/src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp @@ -65,9 +65,9 @@ void EmitSpinLockLock(Xbyak::CodeGenerator& code, Xbyak::Address ptr, Xbyak::Reg code.mov(tmp, 1); if (ptr.is64bitDisp()) { // if tmp is on eax, use ebx, otherwise use eax! - auto const other_tmp = tmp == Xbyak::util::eax - ? Xbyak::util::ebx - : Xbyak::util::eax; + auto const other_tmp = tmp.cvt32() == Xbyak::util::eax + ? Xbyak::util::rbx + : Xbyak::util::rax; code.push(other_tmp); code.mov(other_tmp, ptr.getDisp()); /*code.lock();*/ code.xchg(other_tmp, tmp); @@ -86,9 +86,9 @@ void EmitSpinLockLock(Xbyak::CodeGenerator& code, Xbyak::Address ptr, Xbyak::Reg code.mov(tmp, 1); if (ptr.is64bitDisp()) { // if tmp is on eax, use ebx, otherwise use eax! - auto const other_tmp = tmp == Xbyak::util::eax - ? Xbyak::util::ebx - : Xbyak::util::eax; + auto const other_tmp = tmp.cvt32() == Xbyak::util::eax + ? Xbyak::util::rbx + : Xbyak::util::rax; code.push(other_tmp); code.mov(other_tmp, ptr.getDisp()); /*code.lock();*/ code.xchg(other_tmp, tmp);