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
..
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +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 gdbstub: extend GByteArray to read register helpers 2020-03-17 17:38:38 +00:00
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
m68k-semi.c Replace qemu_gettimeofday() with g_get_real_time() 2022-04-06 10:50:37 +02:00
meson.build meson: target 2020-08-21 06:30:35 -04:00
monitor.c hmp: Pass monitor to mon_get_cpu_env() 2020-11-13 12:45:51 +00:00
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 target-m68k: use floatx80 internally 2017-06-21 22:10:29 +02:00
softfloat.c softfloat: Introduce Floatx80RoundPrec 2021-06-03 14:04:02 -07:00
softfloat.h softfloat: merge floatx80_mod and floatx80_rem 2020-06-26 09:39:37 -04:00
softfloat_fpsp_tables.h m68k comments break patch submission due to being incorrectly formatted 2019-06-26 17:14:39 +02:00
translate.c target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0 2022-06-02 09:35:02 +02:00