Le 03/12/2021 à 15:29, Richard Henderson a écrit :
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?


No, I'm wondering if we shoud move it or duplicate it. It's not clear. I think we can keep it like this and later do a cleanup.

But I think you should add a comment in CPUM68KState next to ar to point out that it is also used to store address of CHK/CHK2/DIV/TRAP/....

Thanks,
Laurent

Reply via email to