aboutsummaryrefslogtreecommitdiff
path: root/ARMInterpreter_ALU.cpp
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-03-06 18:13:57 +0100
committerStapleButter <thetotalworm@gmail.com>2017-03-06 18:13:57 +0100
commit383093c5fffde7b29649ca4f452e892299b337c6 (patch)
treee14ce380d33539a4d430b9a82a7465212388552a /ARMInterpreter_ALU.cpp
parent52d866fa1784facb994caf7668f31383621816ef (diff)
make NEG update flags correctly (oops).
also misc graphics notes added.
Diffstat (limited to 'ARMInterpreter_ALU.cpp')
-rw-r--r--ARMInterpreter_ALU.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ARMInterpreter_ALU.cpp b/ARMInterpreter_ALU.cpp
index 88b69e7..d6c5abd 100644
--- a/ARMInterpreter_ALU.cpp
+++ b/ARMInterpreter_ALU.cpp
@@ -1301,8 +1301,10 @@ void T_NEG_REG(ARM* cpu)
u32 b = cpu->R[(cpu->CurInstr >> 3) & 0x7];
u32 res = -b;
cpu->R[cpu->CurInstr & 0x7] = res;
- cpu->SetNZ(res & 0x80000000,
- !res);
+ cpu->SetNZCV(res & 0x80000000,
+ !res,
+ CARRY_SUB(0, b),
+ OVERFLOW_SUB(0, b, res));
}
void T_CMP_REG(ARM* cpu)