* simops.c (Multiply64): Don't store into register zero.
authorJim Wilson <wilson@tuliptree.org>
Tue, 16 Sep 1997 01:45:23 +0000 (01:45 +0000)
committerJim Wilson <wilson@tuliptree.org>
Tue, 16 Sep 1997 01:45:23 +0000 (01:45 +0000)
sim/v850/ChangeLog
sim/v850/simops.c

index 2785dc9..0bb4d55 100644 (file)
@@ -1,3 +1,9 @@
+start-sanitize-v850e
+Mon Sep 15 18:44:05 1997  Jim Wilson  <wilson@cygnus.com>
+
+       * simops.c (Multiply64): Don't store into register zero.
+
+start-sanitize-v850e
 Tue Sep 16 09:02:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * Makefile.in (semantics.o): Add dependency.
index c4ecdc4..2cc54e4 100644 (file)
@@ -414,8 +414,11 @@ Multiply64 (boolean sign, unsigned long op0)
        RdLo += 1;
     }
   
-  State.regs[ OP[1]       ] = RdLo;
-  State.regs[ OP[2] >> 11 ] = RdHi;
+  /* Don't store into register 0.  */
+  if (OP[1])
+    State.regs[ OP[1]       ] = RdLo;
+  if (OP[2] >> 11)
+    State.regs[ OP[2] >> 11 ] = RdHi;
 
   return;
 }