From 5c7b4a98c680e4c40871a695746688d9250a17ec Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 6 Apr 2013 20:06:51 -0700 Subject: [PATCH] Load from ARM table now that we have one --- src/arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arm.c b/src/arm.c index 8cad37f52..3ed6da9aa 100644 --- a/src/arm.c +++ b/src/arm.c @@ -32,7 +32,7 @@ static inline void _immediate(struct ARMCore* cpu, uint32_t opcode) { } } -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 inline void _ARMSetMode(struct ARMCore* cpu, enum ExecutionMode execution 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_INSTRUCTION_ARM(SWI,) 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),