aboutsummaryrefslogtreecommitdiff
path: root/sim/v850/v850.igen
diff options
context:
space:
mode:
Diffstat (limited to 'sim/v850/v850.igen')
-rw-r--r--sim/v850/v850.igen4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/v850/v850.igen b/sim/v850/v850.igen
index 6617bd8..c0382bc 100644
--- a/sim/v850/v850.igen
+++ b/sim/v850/v850.igen
@@ -356,7 +356,7 @@ rrrrr!0,000010,RRRRR!0:I:::divh
op0 = EXTEND16 (State.regs[OP[0]]);
op1 = State.regs[OP[1]];
- if (op0 == 0xffffffff && op1 == 0x80000000)
+ if (op0 == -1 && op1 == 0x80000000)
{
PSW &= ~PSW_Z;
PSW |= PSW_OV | PSW_S;
@@ -368,7 +368,7 @@ rrrrr!0,000010,RRRRR!0:I:::divh
}
else
{
- result = op1 / op0;
+ result = (signed32) op1 / op0;
ov = 0;
/* Compute the condition codes. */