all repos — mgba @ 5c7b4a98c680e4c40871a695746688d9250a17ec

mGBA Game Boy Advance Emulator

Load from ARM table now that we have one
Jeffrey Pfau jeffrey@endrift.com
Sat, 06 Apr 2013 20:06:51 -0700
commit

5c7b4a98c680e4c40871a695746688d9250a17ec

parent

6bd7a5ee53d299c802614e91cd4710c8ed2126ff

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/arm.csrc/arm.c

@@ -32,7 +32,7 @@ cpu->shifterCarryOut = ARM_SIGN(cpu->shifterOperand);

} } -static const ARMInstruction armTable[0x10000]; +static const ARMInstruction _armTable[0x10000]; static inline void _ARMSetMode(struct ARMCore* cpu, enum ExecutionMode executionMode) { if (executionMode == cpu->executionMode) {

@@ -56,7 +56,7 @@

static ARMInstruction _ARMLoadInstructionARM(struct ARMMemory* memory, uint32_t address, uint32_t* opcodeOut) { uint32_t opcode = memory->load32(memory, address); *opcodeOut = opcode; - return 0; + return _armTable[((opcode >> 16) & 0xFFF0) | ((opcode >> 4) & 0x000F)]; } static ARMInstruction _ARMLoadInstructionThumb(struct ARMMemory* memory, uint32_t address, uint32_t* opcodeOut) {

@@ -687,7 +687,7 @@ #define DECLARE_EMPTY_BLOCK \

DO_8(DO_256(0)), \ DO_8(DO_256(0)) -static const ARMInstruction armTable[0x10000] = { +static const ARMInstruction _armTable[0x10000] = { DECLARE_COND_BLOCK(EQ), DECLARE_COND_BLOCK(NE), DECLARE_COND_BLOCK(CS),