tonioni / WinUAE

WinUAE Amiga emulator
http://www.winuae.net/
528 stars 86 forks source link

BKPT instruction (68010) pushes a wrong stack frame #236

Open dirkwhoffmann opened 1 year ago

dirkwhoffmann commented 1 year ago

As part of the vAmiga regression test suite, I've written a small program which calls BKPT and dumps the generated stack frame:

On my real machine (A500 ECS, 68010, 512 Chip, 0 Slow, 0 Fast) it looks like this:

stackframe3_A500_ECS_68010

In UAE 4.9.1 I get this:

Bildschirmfoto 2022-11-15 um 16 10 53

It seems like the PC pushed by UAE is too high by 2.

tonioni commented 1 year ago

I am not 100% sure what the output means but if 2/4 means stacked PC is +2/+4 from start of BKPT, I get expected +2 if I check what your test program does in UAE debugger.

00075750 lea.l (pc,$0000) == $00075752,a6 00075754 bkpt #$02

If above suspicious LEA is corrected, it looks like BKPT does not increase PC. I am planning to do full 68010 tester check later.

(and I still hate adf based test programs :))