]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Addi needs to set the carry
authorMichael Meissner <gnu@the-meissners.org>
Mon, 9 Sep 1996 21:12:46 +0000 (21:12 +0000)
committerMichael Meissner <gnu@the-meissners.org>
Mon, 9 Sep 1996 21:12:46 +0000 (21:12 +0000)
sim/d10v/ChangeLog
sim/d10v/simops.c

index e597684d31e9dc28f3e19339d5025730f047d497..7b3b659cde490ff14341e3619e1815bb27d4092b 100644 (file)
@@ -9,6 +9,7 @@ Mon Sep  9 13:27:26 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
        (trace_{input,output}): Support OP_FLAG_OUTPUT.
        (OP_31000000): This ld2w varient is a 16-bit memory reference, not
        an 8-bit memory reference instruction for tracing purposes.
+       (OP_201): Addi needs to set the carry.
 
 Fri Sep  6 17:56:17 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
 
index 1af4e09a70672a5b71690e06e85de0eed0d450d8..b35a434135b07e03683d07d5a5a1621c74c151d0 100644 (file)
@@ -584,10 +584,15 @@ OP_17001202 ()
 void
 OP_201 ()
 {
+  uint tmp = State.regs[OP[0]];
   if (OP[1] == 0)
     OP[1] = 16;
   trace_input ("addi", OP_REG, OP_CONSTANT16, OP_VOID);
   State.regs[OP[0]] += OP[1];
+  if (tmp > State.regs[OP[0]])
+    State.C = 1;
+  else
+    State.C = 0;
   trace_output (OP_REG);
 }