fix an issue which could cause an invalid SWI in thumb mode to crash the emulator

This commit is contained in:
zeromus 2008-12-26 20:05:43 +00:00
parent 026bbe304d
commit 214798c3c1
1 changed files with 4 additions and 1 deletions

View File

@ -902,7 +902,10 @@ TEMPLATE static u32 FASTCALL OP_SWI_THUMB()
}
else
{
u32 swinum = cpu->instruction & 0xFF;
//zero 25-dec-2008 - in arm, we were masking to 0x1F.
//this is probably safer since an invalid opcode could crash the emu
//u32 swinum = cpu->instruction & 0xFF;
u32 swinum = cpu->instruction & 0x1F;
return cpu->swi_tab[swinum](cpu) + 3;
}
//return 3;