From 7b1e6314a7974967789dc987bc693671d285fd96 Mon Sep 17 00:00:00 2001 From: sBubshait Date: Wed, 5 Jun 2024 23:58:56 +0100 Subject: [PATCH] Fix Subs handling of carry PSTATE condition code, w/ T --- src/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/execute.c b/src/execute.c index 24e002d..dc0d4d8 100644 --- a/src/execute.c +++ b/src/execute.c @@ -263,7 +263,7 @@ static void executeDPRegister(Machine *state, a64inst_instruction *inst) { updateCondNZ(state, result, regType); state->conditionCodes.Overflow = src1Val < result; - state->conditionCodes.Carry = state->conditionCodes.Overflow; + state->conditionCodes.Carry = src1Val >= src2Val; break; case(a64inst_SUB):