Fix Overflow handling in Subtraction DP Register, w/ T
This commit is contained in:
parent
95c74964b3
commit
d73111515e
@ -262,7 +262,7 @@ static void executeDPRegister(Machine *state, a64inst_instruction *inst) {
|
||||
writeRegister(state, dest, regType, result);
|
||||
|
||||
updateCondNZ(state, result, regType);
|
||||
state->conditionCodes.Overflow = src1Val < result;
|
||||
state->conditionCodes.Overflow = getMSB(src1Val, regType) != getMSB(src2Val, regType) && getMSB(src1Val, regType) != getMSB(result, regType);
|
||||
state->conditionCodes.Carry = src1Val >= src2Val;
|
||||
break;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user