aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-08-29 16:59:20 +0000
committerNick Clifton <nickc@redhat.com>2002-08-29 16:59:20 +0000
commite551c2572e97cf7ab0a431f5a1f25207d9a4d179 (patch)
treeb2a67edac542e66bf508e95cdaa04e1fb46256d2 /sim
parent07c988968aac519ba013f6e22f881d9d66fdfa44 (diff)
downloadgdb-e551c2572e97cf7ab0a431f5a1f25207d9a4d179.zip
gdb-e551c2572e97cf7ab0a431f5a1f25207d9a4d179.tar.gz
gdb-e551c2572e97cf7ab0a431f5a1f25207d9a4d179.tar.bz2
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.
Diffstat (limited to 'sim')
-rw-r--r--sim/v850/ChangeLog9
-rw-r--r--sim/v850/Makefile.in1
-rw-r--r--sim/v850/sim-main.h2
-rw-r--r--sim/v850/simops.c2
4 files changed, 13 insertions, 1 deletions
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index cb20ad5..c8b3aab 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-29 Nick Clifton <nickc@redhat.com>
+
+ From 2001-08-23 Catherine Moore <clm@redhat.com>
+
+ * 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 <cagney@redhat.com>
* simops.c (trace_result): Fix printf formatting.
diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in
index 110cb17..89029d6 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 37ea31f..a16ec00 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 9a83d07..d8a4d58 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);