aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1996-08-29 22:05:15 +0000
committerJeff Law <law@redhat.com>1996-08-29 22:05:15 +0000
commitfb8eb42bd6eff8642f9aa9f3300bc2659b41634e (patch)
tree635a8e29bafc27677d01a315218378334b22ece7 /sim
parentba5f27cd57292f390e89d3eebb53a3524707100d (diff)
downloadfsf-binutils-gdb-fb8eb42bd6eff8642f9aa9f3300bc2659b41634e.zip
fsf-binutils-gdb-fb8eb42bd6eff8642f9aa9f3300bc2659b41634e.tar.gz
fsf-binutils-gdb-fb8eb42bd6eff8642f9aa9f3300bc2659b41634e.tar.bz2
Fix typos in multiply and divide code.
Diffstat (limited to 'sim')
-rw-r--r--sim/v850/simops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 13d77ae..a6c4768 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -188,7 +188,7 @@ void
OP_E0 ()
{
State.regs[OP[1]] = ((State.regs[OP[1]] & 0xffff)
- * (State.regs[OP[2]] & 0xffff));
+ * (State.regs[OP[0]] & 0xffff));
}
/* mulh sign_extend(imm5), reg2
@@ -214,7 +214,7 @@ OP_6E0 ()
value = value & 0xffff;
- State.regs[OP[1]] = (State.regs[OP[1]] & 0xffff) * value;
+ State.regs[OP[2]] = (State.regs[OP[1]] & 0xffff) * value;
}
/* divh reg1, reg2
@@ -224,7 +224,7 @@ OP_6E0 ()
void
OP_40 ()
{
- State.regs[OP[1]] /= (State.regs[OP[1]] & 0xffff);
+ State.regs[OP[1]] /= (State.regs[OP[0]] & 0xffff);
}
void