Fix bug with cmn/adds where C flag was incorrectly set.
[binutils-gdb.git] / sim / aarch64 / simulator.c
index 8a8df7a27324cc8f5ccdd664aef3eaaa14485817..f0668ada93c0354ceee4297a979258393b44ea0d 100644 (file)
@@ -1650,7 +1650,7 @@ set_flags_for_add32 (sim_cpu *cpu, int32_t value1, int32_t value2)
   if (result & (1 << 31))
     flags |= N;
 
-  if (uresult != result)
+  if (uresult != (uint32_t)result)
     flags |= C;
 
   if (sresult != result)