aboutsummaryrefslogtreecommitdiff
path: root/sim/v850/sim-main.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-09-15 23:09:26 +0000
committerAndrew Cagney <cagney@redhat.com>1997-09-15 23:09:26 +0000
commit4dda50b0520889ccb5f71fac4781a6f02bc5a829 (patch)
tree54b3be56706e0e1a24e46d188c2d8409508f6212 /sim/v850/sim-main.h
parent0604253676dae7f100d569f89b3273a91bb87849 (diff)
downloadgdb-4dda50b0520889ccb5f71fac4781a6f02bc5a829.zip
gdb-4dda50b0520889ccb5f71fac4781a6f02bc5a829.tar.gz
gdb-4dda50b0520889ccb5f71fac4781a6f02bc5a829.tar.bz2
For instructions moved into v850.igen was computing (wrong) NIA when
this wasn't needed.
Diffstat (limited to 'sim/v850/sim-main.h')
-rw-r--r--sim/v850/sim-main.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index 2cab082..d222282 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -96,21 +96,27 @@ OP[2] = (inst >> 16) & 0xffff; /* wwwww -> reg3 */
OP[3] = inst;
#endif
-#define COMPAT_1(CALL) \
+#define SAVE_1 \
PC = cia; \
OP[0] = instruction_0 & 0x1f; \
OP[1] = (instruction_0 >> 11) & 0x1f; \
OP[2] = 0; \
-OP[3] = instruction_0 ; \
+OP[3] = instruction_0
+
+#define COMPAT_1(CALL) \
+SAVE_1; \
PC += (CALL); \
nia = PC
-#define COMPAT_2(CALL) \
+#define SAVE_2 \
PC = cia; \
OP[0] = instruction_0 & 0x1f; \
OP[1] = (instruction_0 >> 11) & 0x1f; \
OP[2] = instruction_1; \
-OP[3] = (instruction_1 << 16) | instruction_0; \
+OP[3] = (instruction_1 << 16) | instruction_0
+
+#define COMPAT_2(CALL) \
+SAVE_2; \
PC += (CALL); \
nia = PC