mirror of https://github.com/mgba-emu/mgba.git
ARM7: Fix decoding of some ARM ALU instructions with shifters
This commit is contained in:
parent
e30674d053
commit
1fa904878b
1
CHANGES
1
CHANGES
|
@ -31,6 +31,7 @@ Bugfixes:
|
||||||
- Libretro: Fix aspect ratio
|
- Libretro: Fix aspect ratio
|
||||||
- Qt: Fix some potential crashes with the gamepad mapping
|
- Qt: Fix some potential crashes with the gamepad mapping
|
||||||
- Debugger: Fix watchpoints in gdb
|
- Debugger: Fix watchpoints in gdb
|
||||||
|
- ARM7: Fix decoding of some ARM ALU instructions with shifters
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Window size command line options are now supported
|
- Qt: Window size command line options are now supported
|
||||||
- Qt: Increase usability of key mapper
|
- Qt: Increase usability of key mapper
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
|
|
||||||
#define ADDR_MODE_1_SHIFT(OP) \
|
#define ADDR_MODE_1_SHIFT(OP) \
|
||||||
info->op3.reg = opcode & 0x0000000F; \
|
info->op3.reg = opcode & 0x0000000F; \
|
||||||
|
info->op3.shifterOp = ARM_SHIFT_ ## OP; \
|
||||||
info->operandFormat |= ARM_OPERAND_REGISTER_3; \
|
info->operandFormat |= ARM_OPERAND_REGISTER_3; \
|
||||||
if (opcode & 0x00000010) { \
|
if (opcode & 0x00000010) { \
|
||||||
info->op3.shifterOp = ARM_SHIFT_ ## OP; \
|
|
||||||
info->op3.shifterReg = (opcode >> 8) & 0xF; \
|
info->op3.shifterReg = (opcode >> 8) & 0xF; \
|
||||||
++info->iCycles; \
|
++info->iCycles; \
|
||||||
info->operandFormat |= ARM_OPERAND_SHIFT_REGISTER_3; \
|
info->operandFormat |= ARM_OPERAND_SHIFT_REGISTER_3; \
|
||||||
|
@ -101,11 +101,13 @@
|
||||||
info->affectsCPSR = S; \
|
info->affectsCPSR = S; \
|
||||||
SHIFTER; \
|
SHIFTER; \
|
||||||
if (SKIPPED == 1) { \
|
if (SKIPPED == 1) { \
|
||||||
info->operandFormat >>= 8; \
|
|
||||||
info->op1 = info->op2; \
|
info->op1 = info->op2; \
|
||||||
info->op2 = info->op3; \
|
info->op2 = info->op3; \
|
||||||
|
info->operandFormat >>= 8; \
|
||||||
} else if (SKIPPED == 2) { \
|
} else if (SKIPPED == 2) { \
|
||||||
info->operandFormat &= ~ARM_OPERAND_2; \
|
info->op2 = info->op3; \
|
||||||
|
info->operandFormat |= info->operandFormat >>= 8; \
|
||||||
|
info->operandFormat &= ~ARM_OPERAND_3; \
|
||||||
} \
|
} \
|
||||||
if (info->op1.reg == ARM_PC) { \
|
if (info->op1.reg == ARM_PC) { \
|
||||||
info->branchType = ARM_BRANCH_INDIRECT; \
|
info->branchType = ARM_BRANCH_INDIRECT; \
|
||||||
|
|
Loading…
Reference in New Issue