[a64] Fix `ATOMIC_COMPARE_EXCHANGE_I32` comparison type
This fixes 32-bit atomic-compare-exchanges. The upper-half of the input register _must_ be clipped off. This fixes a deadlock in some games.
This commit is contained in:
parent
c33f543503
commit
f1235be462
|
@ -190,7 +190,7 @@ struct ATOMIC_COMPARE_EXCHANGE_I32
|
|||
// Emulate the 4 KB physical address offset in 0xE0000000+ when can't do
|
||||
// it via memory mapping.
|
||||
e.MOV(W3, 0xE0000000);
|
||||
e.CMP(i.src1.reg(), X3);
|
||||
e.CMP(i.src1.reg().toW(), W3);
|
||||
e.CSET(W1, Cond::HS);
|
||||
e.LSL(W1, W1, 12);
|
||||
e.ADD(W1, W1, i.src1.reg().toW());
|
||||
|
|
Loading…
Reference in New Issue