Stub out SWI

This commit is contained in:
Jeffrey Pfau 2013-04-06 19:58:01 -07:00
parent d620357ac8
commit 7a0fb72e7e
1 changed files with 13 additions and 6 deletions

View File

@ -389,6 +389,7 @@ DEFINE_INSTRUCTION_ARM(MSR,)
DEFINE_INSTRUCTION_ARM(MRS,)
DEFINE_INSTRUCTION_ARM(MSRI,)
DEFINE_INSTRUCTION_ARM(MRSI,)
DEFINE_INSTRUCTION_ARM(SWI,)
#define DECLARE_INSTRUCTION_ARM(COND, NAME) \
_ARMInstruction ## NAME ## COND
@ -403,6 +404,12 @@ DEFINE_INSTRUCTION_ARM(MRSI,)
DIRECTIVE, \
DIRECTIVE
#define DO_256(DIRECTIVE) \
DO_8(DO_8(DIRECTIVE)), \
DO_8(DO_8(DIRECTIVE)), \
DO_8(DO_8(DIRECTIVE)), \
DO_8(DO_8(DIRECTIVE))
#define DO_INTERLACE(LEFT, RIGHT) \
LEFT, \
RIGHT
@ -449,10 +456,7 @@ DEFINE_INSTRUCTION_ARM(MRSI,)
DO_8(DECLARE_INSTRUCTION_ARM(COND, NAME ## MODE ## W))
#define DECLARE_ARM_BRANCH_BLOCK(COND, NAME) \
DO_8(DO_8(DECLARE_INSTRUCTION_ARM(COND, NAME))), \
DO_8(DO_8(DECLARE_INSTRUCTION_ARM(COND, NAME))), \
DO_8(DO_8(DECLARE_INSTRUCTION_ARM(COND, NAME))), \
DO_8(DO_8(DECLARE_INSTRUCTION_ARM(COND, NAME)))
DO_256(DECLARE_INSTRUCTION_ARM(COND, NAME))
// TODO: Support coprocessors
#define DECLARE_ARM_LOAD_STORE_COPROCESSOR_BLOCK(COND, NAME, P, U, W, N) \
@ -463,6 +467,9 @@ DEFINE_INSTRUCTION_ARM(MRSI,)
DO_8(DO_8(DO_INTERLACE(0, 0))), \
DO_8(DO_8(DO_INTERLACE(0, 0)))
#define DECLARE_ARM_SWI_BLOCK(COND) \
DO_256(DECLARE_INSTRUCTION_ARM(COND, SWI))
#define DECLARE_COND_BLOCK(COND) \
DECLARE_ARM_ALU_BLOCK(COND, AND, MUL, STRH, ILL, ILL), \
DECLARE_ARM_ALU_BLOCK(COND, ANDS, MULS, LDRH, LDRSB, LDRSH), \
@ -673,8 +680,8 @@ DEFINE_INSTRUCTION_ARM(MRSI,)
DECLARE_ARM_LOAD_STORE_COPROCESSOR_BLOCK(COND, LDC, P, U, N, ), \
DECLARE_ARM_LOAD_STORE_COPROCESSOR_BLOCK(COND, STC, P, U, N, W), \
DECLARE_ARM_LOAD_STORE_COPROCESSOR_BLOCK(COND, LDC, P, U, N, W), \
DECLARE_ARM_COPROCESSOR_BLOCK(COND, CDP, MCR)//, \
// DECLARE_ARM_SWI_BLOCK
DECLARE_ARM_COPROCESSOR_BLOCK(COND, CDP, MCR), \
DECLARE_ARM_SWI_BLOCK(COND)
static const ARMInstruction armTable[0x10000] = {
DECLARE_COND_BLOCK(EQ),