aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/simops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/d10v/simops.c')
-rw-r--r--sim/d10v/simops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index faf7d7d..dc05f5e 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -1223,7 +1223,7 @@ OP_2600 ()
{
trace_input ("max", OP_REG, OP_REG, OP_VOID);
State.F1 = State.F0;
- if (State.regs[OP[1]] > State.regs[OP[0]])
+ if ((int16)State.regs[OP[1]] > (int16)State.regs[OP[0]])
{
State.regs[OP[0]] = State.regs[OP[1]];
State.F0 = 1;
@@ -1275,7 +1275,7 @@ OP_2601 ()
{
trace_input ("min", OP_REG, OP_REG, OP_VOID);
State.F1 = State.F0;
- if (State.regs[OP[1]] < State.regs[OP[0]])
+ if ((int16)State.regs[OP[1]] < (int16)State.regs[OP[0]])
{
State.regs[OP[0]] = State.regs[OP[1]];
State.F0 = 1;