aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300/compile.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1993-07-15 17:01:40 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1993-07-15 17:01:40 +0000
commitcf5b4aa63a7e219290baa1c502ae82218b748e99 (patch)
treef48b954aa7f5caa9633afd514f5ed97bf8b96e60 /sim/h8300/compile.c
parentb3a2b4975f604f7c5b4a285eb1034448f9b196c4 (diff)
downloadbinutils-cf5b4aa63a7e219290baa1c502ae82218b748e99.zip
binutils-cf5b4aa63a7e219290baa1c502ae82218b748e99.tar.gz
binutils-cf5b4aa63a7e219290baa1c502ae82218b748e99.tar.bz2
* run.c (main): If h8/300h binary detected, call set_h8300h.
* compile.c (sim_resume): Fix O_NEG insn.
Diffstat (limited to 'sim/h8300/compile.c')
-rw-r--r--sim/h8300/compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 2db45dd..b18f7ea 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -823,11 +823,11 @@ sim_resume (step)
res = rd + ea;
goto alu8;
-#define RD rd = fetch(&code->src);
-#define RD_EA rd = fetch(&code->dst); ea = fetch(&code->src);
+#define EA ea = fetch(&code->src);
+#define RD_EA ea = fetch(&code->src); rd = fetch(&code->dst);
- ALUOP (1, O_SUB, RD_EA; ea = -ea ; res = rd + ea);
- ALUOP (1, O_NEG, RD; ea = -ea ;rd = 0; res = rd + ea);
+ ALUOP (1, O_SUB, RD_EA; ea = -ea ; res = rd + ea);
+ ALUOP (1, O_NEG, EA; ea = -ea ; rd = 0; res = rd + ea);
case O(O_ADD,SB):
rd = GET_B_REG(code->dst.reg);