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

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


Le 23/03/2024 à 11:35, Christian Zietz a écrit :
Toni Wilen schrieb:

Oops. Should be really fixed now. Because my test only checked $87fffe
and $880000 and only $880000 test triggered the bad case (first prefetch
= bus error), oldpc + $880000 + offset resulted in correct PC value due
to 24-bit overflow.. Retested fix with $880006 address successfully now.

Thank you. I manually merged your changes into my Hatari build, and can
now confirm that:

a) my tester reports the correct offset,
b) this change fixes the Spectre Mac emulator, which was the start of
this investigation.

@Nicolas: Could you please merge Toni's latest changes?

Hi

thanks to verifying this, jmp/jsr fix merged in main tree

Toni, I see christian also posted about some invalid opcodes doing a bus error instead of a invalid instruction exception :

https://www.atari-forum.com/viewtopic.php?f=27&t=43642

basically, instruction "3584 6900" " move.w d4,(a2,d6.l)" is using an invalid "bd size".

On real TT HW, it gives a bus error as it seems to not switch to supervisor mode when fetching the "invalid instruction" vector (remember, address < 0x10000 can only be accessed in supervisor mode on Atari machines). This would be a bug in the 68030.

On Hatari, it gives an "invalid instruction" because bit S is set (which should be the normal behaviour)

Is that sthg that your cputester is checking / should be checking ?

Also, maybe disassembly could be updated to indicate when some fields have an invalid value and would result in an "invalid instruction" exception when executed ?

Nicolas




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