qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 06/15] target/m68k: Fix address argument for EXCP_CHK


From: Laurent Vivier
Subject: Re: [PATCH v2 06/15] target/m68k: Fix address argument for EXCP_CHK
Date: Fri, 3 Dec 2021 15:27:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

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.

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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]