GP-G770: Corrected MCS-96 CMPL carry flag

This commit is contained in:
ghidorahrex
2026-07-06 11:03:47 -04:00
parent 08e8f0b6d8
commit adf16957cf

View File

@@ -617,11 +617,7 @@ macro setSignedShiftRightCarryFlag(shiftee,amount) {
:CMPL dlreg, lreg is op8=0xc5; lreg; dlreg {
op1:4 = lreg;
tmp:4 = dlreg - op1;
$(N) = (tmp s< 0);
$(Z) = (tmp == 0);
$(C) = scarry(dlreg, op1);
$(V) = (((dlreg & ~op1 & ~tmp) | (~dlreg & op1 & tmp)) & 0x80000000 ) != 0;
$(VT) = $(VT) | $(V);
subtractFlags(dlreg, op1, tmp);
}
@endif