mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-18 20:57:00 +02:00
f
This commit is contained in:
parent
617dccdf64
commit
421fdc1f2b
1 changed files with 6 additions and 6 deletions
|
|
@ -65,9 +65,9 @@ void EmitSpinLockLock(Xbyak::CodeGenerator& code, Xbyak::Address ptr, Xbyak::Reg
|
||||||
code.mov(tmp, 1);
|
code.mov(tmp, 1);
|
||||||
if (ptr.is64bitDisp()) {
|
if (ptr.is64bitDisp()) {
|
||||||
// if tmp is on eax, use ebx, otherwise use eax!
|
// if tmp is on eax, use ebx, otherwise use eax!
|
||||||
auto const other_tmp = tmp == Xbyak::util::eax
|
auto const other_tmp = tmp.cvt32() == Xbyak::util::eax
|
||||||
? Xbyak::util::ebx
|
? Xbyak::util::rbx
|
||||||
: Xbyak::util::eax;
|
: Xbyak::util::rax;
|
||||||
code.push(other_tmp);
|
code.push(other_tmp);
|
||||||
code.mov(other_tmp, ptr.getDisp());
|
code.mov(other_tmp, ptr.getDisp());
|
||||||
/*code.lock();*/ code.xchg(other_tmp, tmp);
|
/*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);
|
code.mov(tmp, 1);
|
||||||
if (ptr.is64bitDisp()) {
|
if (ptr.is64bitDisp()) {
|
||||||
// if tmp is on eax, use ebx, otherwise use eax!
|
// if tmp is on eax, use ebx, otherwise use eax!
|
||||||
auto const other_tmp = tmp == Xbyak::util::eax
|
auto const other_tmp = tmp.cvt32() == Xbyak::util::eax
|
||||||
? Xbyak::util::ebx
|
? Xbyak::util::rbx
|
||||||
: Xbyak::util::eax;
|
: Xbyak::util::rax;
|
||||||
code.push(other_tmp);
|
code.push(other_tmp);
|
||||||
code.mov(other_tmp, ptr.getDisp());
|
code.mov(other_tmp, ptr.getDisp());
|
||||||
/*code.lock();*/ code.xchg(other_tmp, tmp);
|
/*code.lock();*/ code.xchg(other_tmp, tmp);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue