Browse Source

f

lizzie/bundle-v53
lizzie 1 month ago
committed by crueter
parent
commit
0677e26387
  1. 12
      src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp

12
src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp

@ -59,9 +59,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);
@ -80,9 +80,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);

Loading…
Cancel
Save