Re: [hatari-devel] CPU emulation issue in 68030 emulation? (movem.w (sp)+,Dn)

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



Am 07.09.2024 um 19:54 schrieb Uwe Seimet <Uwe..Seimet@xxxxxxxxx>:

Hi,

I just stumbled upon this in the 68030 emulation:

moveq #0,d0
move #$ffff,-(sp)
movem.w (sp)+,d0

D0 now is $ffffffff, but it should be $0000ffff, shouldn't it? For an
address register $ffffffff would be correct, but not for a data register.
Or am I missing something?

Best regards

Uwe


I think it is correct. See https://68k.hax.com/MOVEM:

In the case of a word transfer to either address or data registers, each word is sign extended to 32 bits, and the resulting long word is loaded into the associated register.“


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