From 4dda50b0520889ccb5f71fac4781a6f02bc5a829 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 15 Sep 1997 23:09:26 +0000 Subject: For instructions moved into v850.igen was computing (wrong) NIA when this wasn't needed. --- sim/v850/sim-main.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sim/v850/sim-main.h') 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 -- cgit v1.1