mirror of https://github.com/mgba-emu/mgba.git
Stub out SWI
This commit is contained in:
parent
d620357ac8
commit
7a0fb72e7e
19
src/arm.c
19
src/arm.c
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue