From 5262de21672329804caaa818272c4ddbf83a2ad3 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 16 Sep 1997 01:45:23 +0000 Subject: [PATCH] * simops.c (Multiply64): Don't store into register zero. --- sim/v850/ChangeLog | 6 ++++++ sim/v850/simops.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 2785dc984f..0bb4d55217 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,9 @@ +start-sanitize-v850e +Mon Sep 15 18:44:05 1997 Jim Wilson + + * simops.c (Multiply64): Don't store into register zero. + +start-sanitize-v850e Tue Sep 16 09:02:00 1997 Andrew Cagney * Makefile.in (semantics.o): Add dependency. diff --git a/sim/v850/simops.c b/sim/v850/simops.c index c4ecdc4ac3..2cc54e47b8 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -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; }