Re: [hatari-devel] DSP long interrupts fix

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


On Mon, 24 Jun 2024 at 23:23, Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:
During prefetch the interrupt will then change from "fast" to "long" and PC/SR will be pushed automatically to the stack not because it's a JSR (else you would return with an rts, not an rti), but because it's a long interrupt.
That's good thinking however I'm still puzzled by this explicit line from the User's Manual:

While either an unconditional jump or conditional jump can be used to form a long interrupt, they do not store the PC on the stack; therefore, there is no return path.

Not only do they explicitly mention that the PC is not stored, they also mention that you simply can't return from it. So I'm wondering whether this is actually a bug in the DSP (i.e. the decoder should differentiate between JSR and JMP) or they didn't realise this side effect.

Laurent, did you test this on real hardware? I.e. JMP'ed on an interrupt, and investigated the stack immediately afterwards?

For completeness, maybe other instruction than JMP and JSR should also change to long interrupt mode (JScc for example).
That's for sure. There's quite a lot of them: Jcc, JScc, JCLR/JSET, JSCLR/JSSET

--
http://mikro.atari.org


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