mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
t blx long with bit 0 set should raise an exception
fixes a bug with gbarunner3
This commit is contained in:
parent
3bd6274477
commit
ef5de6091b
@ -104,6 +104,9 @@ void T_BL_LONG_1(ARM* cpu)
|
||||
|
||||
void T_BL_LONG_2(ARM* cpu)
|
||||
{
|
||||
if ((cpu->CurInstr & 0x1801) == 0x0801) // "BLX" with bit 0 set is an unvalid instruction.
|
||||
return T_UNK(cpu); // TODO: Check ARM7 for exceptions
|
||||
|
||||
s32 offset = (cpu->CurInstr & 0x7FF) << 1;
|
||||
u32 pc = cpu->R[14] + offset;
|
||||
cpu->R[14] = (cpu->R[15] - 2) | 1;
|
||||
|
Loading…
Reference in New Issue
Block a user