[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Warning?
On Tue, Feb 09, 1999 at 06:49:27PM +0100, Konrad Kokoszkiewicz wrote:
> This was like I added a NOP before RTS in it, and kernel with such a
> "change" froze when you tried to compile anything with Devpac. When you
> removed the NOP and recompiled MiNT, everything started to work again.
> Very weird, as you see and costed me quite a bit of nerves and some days
> of investigation.
If you experience this on a 68040, it might well be cache-related in soem
way - either selfmodifying code somewhere, or write-cache related stuff.
One thing to note on the '040 is the write pipeline (which is active even in
non-copyback mode, unless the target page is marked as no-cache/serialzed).
The effect is that this:
move.l #error,8.w
tst.l $FFFFFA42
rts
error:
will jump to a bogus address (the old contents of 8.w) if a bus error occurs
on the tst.l, since the new value for the bus error vector is still in the
write pipeline and not written to memory. Inserting a nop after the write to
the bus error vector waits for the pipeline to be flushed. In more complex
cases, the results may depend on code alignment etc..
cu
Michael
--
Michael Schwingen, Ahornstrasse 36, 52074 Aachen