@@ -286,12 +286,9 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
{
CPUState *cs = env_cpu(env);
uint32_t sp;
- uint32_t retaddr;
uint32_t vector;
uint16_t sr, oldsr;
- retaddr = env->pc;
-
if (!is_hw) {
switch (cs->exception_index) {
case EXCP_RTE:
@@ -384,7 +381,7 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
sp -= 4;
cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0);
- do_stack_frame(env, &sp, 7, oldsr, 0, retaddr);
+ do_stack_frame(env, &sp, 7, oldsr, 0, env->pc);
env->mmu.fault = false;
if (qemu_loglevel_mask(CPU_LOG_INT)) {
qemu_log(" "
@@ -394,7 +391,7 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
break;
case EXCP_ADDRESS:
- do_stack_frame(env, &sp, 2, oldsr, 0, retaddr);
+ do_stack_frame(env, &sp, 2, oldsr, 0, env->pc);
break;
case EXCP_ILLEGAL:
@@ -403,23 +400,23 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
case EXCP_TRAPCC:
case EXCP_TRACE:
/* FIXME: addr is not only env->pc */
- do_stack_frame(env, &sp, 2, oldsr, env->pc, retaddr);
+ do_stack_frame(env, &sp, 2, oldsr, env->pc, env->pc);
break;
case EXCP_SPURIOUS ... EXCP_INT_LEVEL_7:
if (is_hw && oldsr & SR_M) {
- do_stack_frame(env, &sp, 0, oldsr, 0, retaddr);
+ do_stack_frame(env, &sp, 0, oldsr, 0, env->pc);
oldsr = sr;
env->aregs[7] = sp;
cpu_m68k_set_sr(env, sr &= ~SR_M);
sp = env->aregs[7] & ~1;
- do_stack_frame(env, &sp, 1, oldsr, 0, retaddr);
+ do_stack_frame(env, &sp, 1, oldsr, 0, env->pc);
break;
}
/* fall through */
default:
- do_stack_frame(env, &sp, 0, oldsr, 0, retaddr);
+ do_stack_frame(env, &sp, 0, oldsr, 0, env->pc);
break;
}
The only value this variable holds is now env->pc. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/m68k/op_helper.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)