|
@@ -7,7 +7,7 @@ |
|
|
`make` should trigger a rebuild when it is modified; if not, use: |
|
|
`make` should trigger a rebuild when it is modified; if not, use: |
|
|
`python scripts/update_asm_instructions.py`. |
|
|
`python scripts/update_asm_instructions.py`. |
|
|
|
|
|
|
|
|
@AUTOGEN_DATE Mon May 18 05:31:58 2015 UTC |
|
|
|
|
|
|
|
|
@AUTOGEN_DATE Mon May 18 08:11:32 2015 UTC |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
/* @AUTOGEN_INST_BLOCK_START */ |
|
|
/* @AUTOGEN_INST_BLOCK_START */ |
|
@@ -146,6 +146,53 @@ INST_FUNC(add) |
|
|
INST_ERROR(ARG_TYPE) |
|
|
INST_ERROR(ARG_TYPE) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
INST_FUNC(and) |
|
|
|
|
|
{ |
|
|
|
|
|
INST_TAKES_ARGS( |
|
|
|
|
|
AT_IMMEDIATE|AT_INDEXED|AT_INDIRECT|AT_REGISTER, |
|
|
|
|
|
AT_NONE, |
|
|
|
|
|
AT_NONE |
|
|
|
|
|
) |
|
|
|
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_REGISTER) { |
|
|
|
|
|
if (INST_REG(0) == REG_A) |
|
|
|
|
|
INST_RETURN(1, 0xA7) |
|
|
|
|
|
if (INST_REG(0) == REG_B) |
|
|
|
|
|
INST_RETURN(1, 0xA0) |
|
|
|
|
|
if (INST_REG(0) == REG_C) |
|
|
|
|
|
INST_RETURN(1, 0xA1) |
|
|
|
|
|
if (INST_REG(0) == REG_D) |
|
|
|
|
|
INST_RETURN(1, 0xA2) |
|
|
|
|
|
if (INST_REG(0) == REG_E) |
|
|
|
|
|
INST_RETURN(1, 0xA3) |
|
|
|
|
|
if (INST_REG(0) == REG_H) |
|
|
|
|
|
INST_RETURN(1, 0xA4) |
|
|
|
|
|
if (INST_REG(0) == REG_IXH) |
|
|
|
|
|
INST_RETURN(2, INST_IX_PREFIX, 0xA4) |
|
|
|
|
|
if (INST_REG(0) == REG_IYH) |
|
|
|
|
|
INST_RETURN(2, INST_IY_PREFIX, 0xA4) |
|
|
|
|
|
if (INST_REG(0) == REG_L) |
|
|
|
|
|
INST_RETURN(1, 0xA5) |
|
|
|
|
|
if (INST_REG(0) == REG_IXL) |
|
|
|
|
|
INST_RETURN(2, INST_IX_PREFIX, 0xA5) |
|
|
|
|
|
if (INST_REG(0) == REG_IYL) |
|
|
|
|
|
INST_RETURN(2, INST_IY_PREFIX, 0xA5) |
|
|
|
|
|
INST_ERROR(ARG_VALUE) |
|
|
|
|
|
} |
|
|
|
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_IMMEDIATE) { |
|
|
|
|
|
if (INST_IMM(0).mask & IMM_U8) |
|
|
|
|
|
INST_RETURN(2, 0xE6, INST_IMM(0).uval) |
|
|
|
|
|
INST_ERROR(ARG_VALUE) |
|
|
|
|
|
} |
|
|
|
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_INDIRECT && |
|
|
|
|
|
(INST_INDIRECT(0).type == AT_REGISTER && INST_INDIRECT(0).addr.reg == REG_HL)) { |
|
|
|
|
|
INST_RETURN(1, 0xA6) |
|
|
|
|
|
} |
|
|
|
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_INDEXED) { |
|
|
|
|
|
INST_RETURN(3, INST_INDEX_PREFIX(0), 0xA6, INST_INDEX(0).offset) |
|
|
|
|
|
} |
|
|
|
|
|
INST_ERROR(ARG_TYPE) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
INST_FUNC(ccf) |
|
|
INST_FUNC(ccf) |
|
|
{ |
|
|
{ |
|
|
INST_TAKES_NO_ARGS |
|
|
INST_TAKES_NO_ARGS |
|
@@ -258,14 +305,10 @@ INST_FUNC(inc) |
|
|
} |
|
|
} |
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_INDIRECT && |
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_INDIRECT && |
|
|
(INST_INDIRECT(0).type == AT_REGISTER && INST_INDIRECT(0).addr.reg == REG_HL)) { |
|
|
(INST_INDIRECT(0).type == AT_REGISTER && INST_INDIRECT(0).addr.reg == REG_HL)) { |
|
|
if (1) |
|
|
|
|
|
INST_RETURN(1, 0x34) |
|
|
|
|
|
INST_ERROR(ARG_VALUE) |
|
|
|
|
|
|
|
|
INST_RETURN(1, 0x34) |
|
|
} |
|
|
} |
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_INDEXED) { |
|
|
if (INST_NARGS == 1 && INST_TYPE(0) == AT_INDEXED) { |
|
|
if (1) |
|
|
|
|
|
INST_RETURN(3, INST_INDEX_PREFIX(0), 0x34, INST_INDEX(0).offset) |
|
|
|
|
|
INST_ERROR(ARG_VALUE) |
|
|
|
|
|
|
|
|
INST_RETURN(3, INST_INDEX_PREFIX(0), 0x34, INST_INDEX(0).offset) |
|
|
} |
|
|
} |
|
|
INST_ERROR(ARG_TYPE) |
|
|
INST_ERROR(ARG_TYPE) |
|
|
} |
|
|
} |
|
@@ -797,6 +840,7 @@ static ASMInstParser lookup_parser(uint32_t key) |
|
|
/* @AUTOGEN_LOOKUP_BLOCK_START */ |
|
|
/* @AUTOGEN_LOOKUP_BLOCK_START */ |
|
|
HANDLE(adc) |
|
|
HANDLE(adc) |
|
|
HANDLE(add) |
|
|
HANDLE(add) |
|
|
|
|
|
HANDLE(and) |
|
|
HANDLE(ccf) |
|
|
HANDLE(ccf) |
|
|
HANDLE(cpd) |
|
|
HANDLE(cpd) |
|
|
HANDLE(cpdr) |
|
|
HANDLE(cpdr) |
|
|