diff options
Diffstat (limited to 'sim/d10v/simops.c')
-rw-r--r-- | sim/d10v/simops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index 1af4e09..b35a434 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -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); } |