I still haven't completely fixed my code, but at least I've found a few things that made me wonder how it ever could've worked in gens KMod:
At one place I had a jump-table with 16 LONG addresses, where I would branch to one of those addresses based on bits 12-15 of R0..
Code: Select all
extu.w r0,r2
mov r0,r3
mova write_byte_ftbl,r0
shlr8 r2
shlr2 r2
add r0,r2
mov r3,r0
mov.l @r2,r3
jmp @r3
nop
I also realized that I have a lot of mov.l some_label,rn in places where I have no idea if the instruction is aligned on a 4-byte boundary. Again, gens KMod didn't seem to care, but Fusion does.
BTW, not related to gens, but does GNU AS/LD have some flag that gives warnings/errors when you're trying to do a PC-relative mov.l from an place where PC isn't 4-byte aligned? I know it complains when you place data on misaligned addresses, but those are much easier to find yourself.