Skip to content

Commit

Permalink
target/m68k: Fix stack frame for EXCP_ILLEGAL
Browse files Browse the repository at this point in the history
According to the M68040 Users Manual, section 8.4.1, Four word
stack frame (format 0), includes Illegal Instruction.  Use the
correct frame format, which does not use the ADDR argument.

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220602013401.303699-10-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  • Loading branch information
rth7680 authored and vivier committed Jun 2, 2022
1 parent 8115fc9 commit a1aedd6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion target/m68k/op_helper.c
Expand Up @@ -391,11 +391,14 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
}
break;

case EXCP_ILLEGAL:
do_stack_frame(env, &sp, 0, oldsr, 0, env->pc);
break;

case EXCP_ADDRESS:
do_stack_frame(env, &sp, 2, oldsr, 0, env->pc);
break;

case EXCP_ILLEGAL:
case EXCP_TRAPCC:
/* FIXME: addr is not only env->pc */
do_stack_frame(env, &sp, 2, oldsr, env->pc, env->pc);
Expand Down

0 comments on commit a1aedd6

Please sign in to comment.