Re: [hatari-devel] Wrong bus error stack frame with 68000 and JSR

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Christian Zietz schrieb:

I can't say if I will be able do more testing before next weekend,
either. Sorry.

I can, however, add that the behavior that I observed is documented in the 68000UM and should therefore apply to all addressing modes:

"The value saved for the program counter is advanced 2–10 bytes beyond the address of the first word of the instruction that made the reference causing the bus error. If the bus error occurred during the fetch of the next instruction, the saved program counter has a value in the vicinity of the current instruction, even if the current instruction is a branch, a jump, or a return instruction."

I.e., for branches, jumps and returns, the stacked PC is "near" the PC of the branch/jump/return instruction, and not the target of this instruction. Sadly, the exact offset is not documented, and probably depends on instruction and addressing mode.

Regards
Christian
--
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: https://www.chzsoft.de/
New GnuPG-Key-ID: 0x8708B34C827B159E



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/