diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-03-31 02:20:29 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-03-31 02:20:29 +0200 |
commit | 3a61ed0a917ee3e41a62733af7433c7bde82794c (patch) | |
tree | bea4421642b8c1381519143f6b2f233edb521f3b /src | |
parent | bfe22e0b9b2ab42a8c21b00a00114cf303c8b93c (diff) |
allow crapoed THUMB hireg ADD/CMP/MOV
Diffstat (limited to 'src')
-rw-r--r-- | src/ARMInterpreter_ALU.cpp | 3 | ||||
-rw-r--r-- | src/ARM_InstrTable.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ARMInterpreter_ALU.cpp b/src/ARMInterpreter_ALU.cpp index d6c5abd..822bf49 100644 --- a/src/ARMInterpreter_ALU.cpp +++ b/src/ARMInterpreter_ALU.cpp @@ -1384,6 +1384,9 @@ void T_MVN_REG(ARM* cpu) } +// TODO: check those when MSBs and MSBd are cleared +// GBAtek says it's not allowed, but it works atleast on the ARM9 + void T_ADD_HIREG(ARM* cpu) { u32 rd = (cpu->CurInstr & 0x7) | ((cpu->CurInstr >> 4) & 0x8); diff --git a/src/ARM_InstrTable.h b/src/ARM_InstrTable.h index 830a2d0..47b3e1c 100644 --- a/src/ARM_InstrTable.h +++ b/src/ARM_InstrTable.h @@ -1692,9 +1692,9 @@ INSTRFUNC_PROTO(THUMBInstrTable[1024]) = T_ORR_REG, T_MUL_REG, T_BIC_REG, T_MVN_REG, // 0100 0100 00 - T_UNK, T_ADD_HIREG, T_ADD_HIREG, T_ADD_HIREG, - T_UNK, T_CMP_HIREG, T_CMP_HIREG, T_CMP_HIREG, - T_UNK, T_MOV_HIREG, T_MOV_HIREG, T_MOV_HIREG, + T_ADD_HIREG, T_ADD_HIREG, T_ADD_HIREG, T_ADD_HIREG, + T_CMP_HIREG, T_CMP_HIREG, T_CMP_HIREG, T_CMP_HIREG, + T_MOV_HIREG, T_MOV_HIREG, T_MOV_HIREG, T_MOV_HIREG, T_BX, T_BX, T_BLX_REG, T_BLX_REG, // 0100 1000 00 |