|
From: | Richard Henderson |
Subject: | Re: [PATCH v2 06/15] target/m68k: Fix address argument for EXCP_CHK |
Date: | Fri, 3 Dec 2021 06:29:23 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 12/3/21 6:27 AM, Laurent Vivier wrote:
Le 02/12/2021 à 21:48, Richard Henderson a écrit :According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), CHK, CHK2 (and others) are supposed to record the next insn in PC and the address of the trapping instruction in ADDRESS. Create a raise_exception_format2 function to centralize recording of the trapping pc in mmu.ar, plus advancing to the next insn.It's weird to use mmu.ar as the field is used for MMU exceptions.
Should I rename the field to "excp_addr" or something? r~
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(). Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/m68k/cpu_loop.c | 2 +- target/m68k/op_helper.c | 54 ++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 26 deletions(-)Reviewed-by: Laurent Vivier <laurent@vivier.eu>
[Prev in Thread] | Current Thread | [Next in Thread] |