From fb8eb42bd6eff8642f9aa9f3300bc2659b41634e Mon Sep 17 00:00:00 2001
From: Jeff Law <law@redhat.com>
Date: Thu, 29 Aug 1996 22:05:15 +0000
Subject: Fix typos in multiply and divide code.

---
 sim/v850/simops.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'sim')

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
-- 
cgit v1.1