ARM7: Make illegal instruction decoding consistent between ARM and Thumb

This commit is contained in:
Jeffrey Pfau 2015-05-09 00:23:56 -07:00
parent 262e46b8a6
commit ec14557a1e
3 changed files with 14 additions and 4 deletions

View File

@ -48,6 +48,7 @@ Bugfixes:
- ARM7: Handle writeback for PC in addressing modes 2 and 3 - ARM7: Handle writeback for PC in addressing modes 2 and 3
- GBA: Handle out-of-bounds I/O access - GBA: Handle out-of-bounds I/O access
- GBA: Fix bounds-checking on EEPROM access - GBA: Fix bounds-checking on EEPROM access
- ARM7: Make illegal instruction decoding consistent between ARM and Thumb
Misc: Misc:
- Qt: Show multiplayer numbers in window title - Qt: Show multiplayer numbers in window title
- Qt: Handle saving input settings better - Qt: Handle saving input settings better

View File

@ -380,8 +380,12 @@ DEFINE_DECODER_ARM(MRC, ILL, info->operandFormat = ARM_OPERAND_NONE;)
// Begin miscellaneous definitions // Begin miscellaneous definitions
DEFINE_DECODER_ARM(BKPT, BKPT, info->operandFormat = ARM_OPERAND_NONE;) // Not strictly in ARMv4T, but here for convenience DEFINE_DECODER_ARM(BKPT, BKPT,
DEFINE_DECODER_ARM(ILL, ILL, info->operandFormat = ARM_OPERAND_NONE;) // Illegal opcode info->operandFormat = ARM_OPERAND_NONE;
info->traps = 1;) // Not strictly in ARMv4T, but here for convenience
DEFINE_DECODER_ARM(ILL, ILL,
info->operandFormat = ARM_OPERAND_NONE;
info->traps = 1;) // Illegal opcode
DEFINE_DECODER_ARM(MSR, MSR, DEFINE_DECODER_ARM(MSR, MSR,
info->affectsCPSR = 1; info->affectsCPSR = 1;

View File

@ -281,8 +281,13 @@ DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(POPR, ARM_SP, LDM, ARM_MEMORY_INCREMENT_AFTE
DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(PUSH, ARM_SP, STM, ARM_MEMORY_DECREMENT_BEFORE, 0) DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(PUSH, ARM_SP, STM, ARM_MEMORY_DECREMENT_BEFORE, 0)
DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(PUSHR, ARM_SP, STM, ARM_MEMORY_DECREMENT_BEFORE, 1 << ARM_LR) DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(PUSHR, ARM_SP, STM, ARM_MEMORY_DECREMENT_BEFORE, 1 << ARM_LR)
DEFINE_THUMB_DECODER(ILL, ILL, info->traps = 1;) DEFINE_THUMB_DECODER(ILL, ILL,
DEFINE_THUMB_DECODER(BKPT, BKPT, info->traps = 1;) info->operandFormat = ARM_OPERAND_NONE;
info->traps = 1;)
DEFINE_THUMB_DECODER(BKPT, BKPT,
info->operandFormat = ARM_OPERAND_NONE;
info->traps = 1;)
DEFINE_THUMB_DECODER(B, B, DEFINE_THUMB_DECODER(B, B,
int16_t immediate = (opcode & 0x07FF) << 5; int16_t immediate = (opcode & 0x07FF) << 5;