qemu-e2k/target/m68k
Richard Henderson 710d747b2d target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0
According to the M68040 Users Manual, section 8.4.3,
Six word stack frame (format 2), Zero Div (and others)
is supposed to record the next insn in PC and the
address of the trapping instruction in ADDRESS.

While the N, Z and V flags are documented to be undefine on DIV0,
the C flag is documented as always cleared.

Update helper_div* to take the instruction length as an argument
and use raise_exception_format2.  Hoist the reset of the C flag
above the division by zero check.

Update m68k_interrupt_all to pass mmu.ar to do_stack_frame.
Update cpu_loop to pass mmu.ar to siginfo.si_addr, as the
kernel does in trap_c().

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220602013401.303699-8-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-06-02 09:35:02 +02:00
..
cpu-param.h Normalize header guard symbol definition 2022-05-11 16:50:26 +02:00
cpu-qom.h target: Introduce and use OBJECT_DECLARE_CPU_TYPE() macro 2022-03-06 22:23:09 +01:00
cpu.c target/m68k: Clear mach in m68k_cpu_disas_set_info 2022-05-26 19:07:38 +02:00
cpu.h target/m68k: Fix address argument for EXCP_CHK 2022-06-02 09:35:02 +02:00
fpu_helper.c softfloat: Introduce Floatx80RoundPrec 2021-06-03 14:04:02 -07:00
gdbstub.c
helper.c target/m68k: Make m68k_cpu_tlb_fill sysemu only 2021-11-02 07:00:52 -04:00
helper.h target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0 2022-06-02 09:35:02 +02:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
m68k-semi.c Replace qemu_gettimeofday() with g_get_real_time() 2022-04-06 10:50:37 +02:00
meson.build
monitor.c
op_helper.c target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0 2022-06-02 09:35:02 +02:00
qregs.def
softfloat_fpsp_tables.h
softfloat.c softfloat: Introduce Floatx80RoundPrec 2021-06-03 14:04:02 -07:00
softfloat.h
translate.c target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0 2022-06-02 09:35:02 +02:00