[J-core] qemu updates / roadmap

D. Jeff Dionne Jeff at SE-Instruments.com
Sun May 15 23:23:32 EDT 2016


On May 16, 2016, at 12:01, Rich Felker <dalias at libc.org> wrote:
> 
> although there are a few instructions you can't use in delay slots, mov.l is not one of them.

In fact, there is a special exception that needs to be raised if one of illegal for use instructions appears in a delay slot.  Any 'good' compiler will aggressively try to fill the delay slot with real work, so while this is a corner case, it's one that needs to work.   I'm surprised that qemu has this wrong, I would have expected that to spectacularly barf on any complex hand coded asm or optimised C
> 
> Perhaps qemu has a bug in the case where the branch destination is exactly the instruction after the delay slot, which is somewhat special in the sense that the branch just behaves like a nop.

I doubt that qemu models the pipeline effect as a natural part of its implementation.   Therefore, things like the delay slot need to be bolted on.  I've seen a few other SH2 emulators that get this wrong sometimes also, e.g. one of the sega emulators...


More information about the J-core mailing list