From: Nick Clifton Date: Thu, 29 Aug 2002 16:59:20 +0000 (+0000) Subject: Makefile.in: Add gen-zero-r0 option. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e551c2572e97cf7ab0a431f5a1f25207d9a4d179;p=binutils-gdb.git Makefile.in: Add gen-zero-r0 option. sim-main.h (GPR_SET, GPR_CLEAR): Define. simops.c (OP_24007E0): Sign extend the imm9 operand of a mul instruction. --- diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index cb20ad5f864..c8b3aabdc4a 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,12 @@ +2002-08-29 Nick Clifton + + From 2001-08-23 Catherine Moore + + * Makefile.in: Add gen-zero-r0 option. + * sim-main.h (GPR_SET, GPR_CLEAR): Define. + * simops.c (OP_24007E0): Sign extend the imm9 + operand of a mul instruction. + 2002-06-17 Andrew Cagney * simops.c (trace_result): Fix printf formatting. diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in index 110cb1761f9..89029d6a627 100644 --- a/sim/v850/Makefile.in +++ b/sim/v850/Makefile.in @@ -82,6 +82,7 @@ tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen ../igen/igen \ $(IGEN_TRACE) \ -G gen-direct-access \ + -G gen-zero-r0 \ -i $(IGEN_INSN) \ -o $(IGEN_DC) \ -x \ diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index 37ea31f3f4c..a16ec00a699 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -366,6 +366,8 @@ do { \ #endif +#define GPR_SET(N, VAL) (State.regs[(N)] = (VAL)) +#define GPR_CLEAR(N) (State.regs[(N)] = 0) extern void divun ( unsigned int N, unsigned long int als, diff --git a/sim/v850/simops.c b/sim/v850/simops.c index 9a83d0796a2..d8a4d58ae11 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -2458,7 +2458,7 @@ OP_24007E0 (void) { trace_input ("mul", OP_IMM_REG_REG, 0); - Multiply64 (true, (OP[3] & 0x1f) | ((OP[3] >> 13) & 0x1e0)); + Multiply64 (true, SEXT9 ((OP[3] & 0x1f) | ((OP[3] >> 13) & 0x1e0))); trace_output (OP_IMM_REG_REG);