aboutsummaryrefslogtreecommitdiff
path: root/sim/aarch64/simulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/aarch64/simulator.c')
-rw-r--r--sim/aarch64/simulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index 6ba29a0..e0b428d 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -1650,10 +1650,10 @@ set_flags_for_add32 (sim_cpu *cpu, int32_t value1, int32_t value2)
if (result & (1 << 31))
flags |= N;
- if (uresult != (uint32_t)result)
+ if (uresult != (uint32_t)uresult)
flags |= C;
- if (sresult != result)
+ if (sresult != (int32_t)sresult)
flags |= V;
aarch64_set_CPSR (cpu, flags);