Re: [hatari-devel] 68040/060 MMU bug fix

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


Le 28/12/2023 à 17:59, Toni Wilen a écrit :
Hi

Just a note that few hours ago I fixed nasty and normally rare random 68040 MMU emulation bug. If interrupt was pending (and interrupts were enabled) when bus error handler executed RTE (and handler had interrupts disabled by setting imask=7), interrupt's first instruction was "retried" instead of the faulting instruction. Normally not that serious (but can cause problems in some situations) because RTE from interrupt handler would "retry" it  anyway but if both are MOVEM to memory, then interrupt handler's MOVEM used faulted MOVEM's pre-calculated EA.

68060 does not have this MOVEM EA feature but in some situations it can also cause bad results. 68030 is not affected because it does not restart instructions.
(https://github.com/tonioni/WinUAE/commit/0be6d4eaca09acdb838c0c6ea45c57267c8f4cce <https://github.com/tonioni/WinUAE/commit/0be6d4eaca09acdb838c0c6ea45c57267c8f4cce> unfortunately I included some do_specialties() clean ups in same patch, just ignore it)



Hi,

thanks for pointing it, I noticed it also this morning and was planning to merge it in Hatari (as for the cleanups in same patch, it's not a problem, I will also apply it to keep as close as possible to WinUAE's sources :) )

As you say, it seems a rather rare case, I don't think we hit this in Hatari.

Nicolas



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