[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:
Wunkolo 2024-05-13 09:46:41 -07:00
parent c33f543503
commit f1235be462
1 changed files with 1 additions and 1 deletions

View File

@ -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());