Message ID | 20220430175342.370628-10-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | target/m68k: Conditional traps + trap cleanup | expand |
Le 30/04/2022 à 19:53, Richard Henderson a écrit : > According to the M68040 Users Manual, section 8.4.3, Four word This is in section 8.4.1 Reviewed-by: Laurent Vivier <laurent@vivier.eu> > stack frame (format 0), includes Illegal Instruction. Use the > correct frame format, which does not use the ADDR argument. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > target/m68k/op_helper.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c > index 3cb71c9140..aa62158eb9 100644 > --- a/target/m68k/op_helper.c > +++ b/target/m68k/op_helper.c > @@ -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);
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 3cb71c9140..aa62158eb9 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -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);
According to the M68040 Users Manual, section 8.4.3, Four word stack frame (format 0), includes Illegal Instruction. Use the correct frame format, which does not use the ADDR argument. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/m68k/op_helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)