mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-11 00:26:15 +00:00
Fixes CMPXCHG flags being incorrect aside from ZF
Almost everything only checks ZF but we had the arguments reversed for the rest of the comparison flag results.
This commit is contained in:
parent
6fee5b9ca2
commit
373f4275f6
@ -4342,11 +4342,11 @@ void OpDispatchBuilder::CMPXCHGOp(OpcodeArgs) {
|
||||
_StoreContext(GPRClass, Size, offsetof(FEXCore::Core::CPUState, gregs[FEXCore::X86State::REG_RAX]), CASResult);
|
||||
|
||||
auto Size = GetDstSize(Op) * 8;
|
||||
OrderedNode *Result = _Sub(CASResult, Src3);
|
||||
OrderedNode *Result = _Sub(Src3, CASResult);
|
||||
if (Size < 32)
|
||||
Result = _Bfe(Size, 0, Result);
|
||||
|
||||
GenerateFlags_SUB(Op, Result, CASResult, Src3);
|
||||
GenerateFlags_SUB(Op, Result, Src3, CASResult);
|
||||
|
||||
// Set ZF
|
||||
SetRFLAG<FEXCore::X86State::RFLAG_ZF_LOC>(ZFResult);
|
||||
|
Loading…
x
Reference in New Issue
Block a user