mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Added processor state info to the OPCDesc table. However, since some opcodes are affected by the addressing mode, this info is unused in codegen/optimizer but just as quick in-code documentation/hints.
This commit is contained in:
parent
a7d6eb9190
commit
079f4a99dd
@ -61,394 +61,394 @@ const OPCDesc OPCTable[OP65_COUNT] = {
|
|||||||
{ OP65_ADC, /* opcode */
|
{ OP65_ADC, /* opcode */
|
||||||
"adc", /* mnemonic */
|
"adc", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
REG_A, /* use */
|
OF_SETF | OF_READ, /* flags */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_C, /* use */
|
||||||
OF_SETF | OF_READ /* flags */
|
REG_A | PSTATE_CZVN /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_AND, /* opcode */
|
{ OP65_AND, /* opcode */
|
||||||
"and", /* mnemonic */
|
"and", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_READ, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_SETF | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_ASL, /* opcode */
|
{ OP65_ASL, /* opcode */
|
||||||
"asl", /* mnemonic */
|
"asl", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_NOIMP | OF_RMW, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_CZN /* chg */
|
||||||
OF_SETF | OF_NOIMP | OF_RMW /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_BCC, /* opcode */
|
{ OP65_BCC, /* opcode */
|
||||||
"bcc", /* mnemonic */
|
"bcc", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C, /* use */
|
||||||
OF_CBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BCS, /* opcode */
|
{ OP65_BCS, /* opcode */
|
||||||
"bcs", /* mnemonic */
|
"bcs", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C, /* use */
|
||||||
OF_CBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BEQ, /* opcode */
|
{ OP65_BEQ, /* opcode */
|
||||||
"beq", /* mnemonic */
|
"beq", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_ZBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_Z, /* use */
|
||||||
OF_CBRA | OF_ZBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BIT, /* opcode */
|
{ OP65_BIT, /* opcode */
|
||||||
"bit", /* mnemonic */
|
"bit", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_READ, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_ZVN /* chg */
|
||||||
OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_BMI, /* opcode */
|
{ OP65_BMI, /* opcode */
|
||||||
"bmi", /* mnemonic */
|
"bmi", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_N, /* use */
|
||||||
OF_CBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BNE, /* opcode */
|
{ OP65_BNE, /* opcode */
|
||||||
"bne", /* mnemonic */
|
"bne", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_ZBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_Z, /* use */
|
||||||
OF_CBRA | OF_ZBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BPL, /* opcode */
|
{ OP65_BPL, /* opcode */
|
||||||
"bpl", /* mnemonic */
|
"bpl", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_N, /* use */
|
||||||
OF_CBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BRA, /* opcode */
|
{ OP65_BRA, /* opcode */
|
||||||
"bra", /* mnemonic */
|
"bra", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
|
OF_UBRA, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_UBRA /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_BRK, /* opcode */
|
{ OP65_BRK, /* opcode */
|
||||||
"brk", /* mnemonic */
|
"brk", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_B /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_BVC, /* opcode */
|
{ OP65_BVC, /* opcode */
|
||||||
"bvc", /* mnemonic */
|
"bvc", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_V, /* use */
|
||||||
OF_CBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_BVS, /* opcode */
|
{ OP65_BVS, /* opcode */
|
||||||
"bvs", /* mnemonic */
|
"bvs", /* mnemonic */
|
||||||
2, /* size */
|
2, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_V, /* use */
|
||||||
OF_CBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_CLC, /* opcode */
|
{ OP65_CLC, /* opcode */
|
||||||
"clc", /* mnemonic */
|
"clc", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_CLD, /* opcode */
|
{ OP65_CLD, /* opcode */
|
||||||
"cld", /* mnemonic */
|
"cld", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_D /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_CLI, /* opcode */
|
{ OP65_CLI, /* opcode */
|
||||||
"cli", /* mnemonic */
|
"cli", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_I /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_CLV, /* opcode */
|
{ OP65_CLV, /* opcode */
|
||||||
"clv", /* mnemonic */
|
"clv", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_V /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_CMP, /* opcode */
|
{ OP65_CMP, /* opcode */
|
||||||
"cmp", /* mnemonic */
|
"cmp", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_CMP | OF_READ, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_CZN /* chg */
|
||||||
OF_SETF | OF_CMP | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_CPX, /* opcode */
|
{ OP65_CPX, /* opcode */
|
||||||
"cpx", /* mnemonic */
|
"cpx", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_CMP | OF_READ, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_CZN /* chg */
|
||||||
OF_SETF | OF_CMP | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_CPY, /* opcode */
|
{ OP65_CPY, /* opcode */
|
||||||
"cpy", /* mnemonic */
|
"cpy", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_CMP | OF_READ, /* flags */
|
||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_CZN /* chg */
|
||||||
OF_SETF | OF_CMP | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_DEA, /* opcode */
|
{ OP65_DEA, /* opcode */
|
||||||
"dea", /* mnemonic */
|
"dea", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_REG_INCDEC | OF_SETF, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_REG_INCDEC | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_DEC, /* opcode */
|
{ OP65_DEC, /* opcode */
|
||||||
"dec", /* mnemonic */
|
"dec", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_NOIMP | OF_RMW, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_ZN /* chg */
|
||||||
OF_SETF | OF_NOIMP | OF_RMW /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_DEX, /* opcode */
|
{ OP65_DEX, /* opcode */
|
||||||
"dex", /* mnemonic */
|
"dex", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_REG_INCDEC | OF_SETF, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_X, /* chg */
|
REG_X | PSTATE_ZN /* chg */
|
||||||
OF_REG_INCDEC | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_DEY, /* opcode */
|
{ OP65_DEY, /* opcode */
|
||||||
"dey", /* mnemonic */
|
"dey", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_REG_INCDEC | OF_SETF, /* flags */
|
||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_Y, /* chg */
|
REG_Y | PSTATE_ZN /* chg */
|
||||||
OF_REG_INCDEC | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_EOR, /* opcode */
|
{ OP65_EOR, /* opcode */
|
||||||
"eor", /* mnemonic */
|
"eor", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_READ, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_SETF | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_INA, /* opcode */
|
{ OP65_INA, /* opcode */
|
||||||
"ina", /* mnemonic */
|
"ina", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_REG_INCDEC | OF_SETF, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_REG_INCDEC | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_INC, /* opcode */
|
{ OP65_INC, /* opcode */
|
||||||
"inc", /* mnemonic */
|
"inc", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_NOIMP | OF_RMW, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_ZN /* chg */
|
||||||
OF_SETF | OF_NOIMP | OF_RMW /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_INX, /* opcode */
|
{ OP65_INX, /* opcode */
|
||||||
"inx", /* mnemonic */
|
"inx", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_REG_INCDEC | OF_SETF, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_X, /* chg */
|
REG_X | PSTATE_ZN /* chg */
|
||||||
OF_REG_INCDEC | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_INY, /* opcode */
|
{ OP65_INY, /* opcode */
|
||||||
"iny", /* mnemonic */
|
"iny", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_REG_INCDEC | OF_SETF, /* flags */
|
||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_Y, /* chg */
|
REG_Y | PSTATE_ZN /* chg */
|
||||||
OF_REG_INCDEC | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_JCC, /* opcode */
|
{ OP65_JCC, /* opcode */
|
||||||
"jcc", /* mnemonic */
|
"jcc", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C, /* use */
|
||||||
OF_CBRA | OF_LBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JCS, /* opcode */
|
{ OP65_JCS, /* opcode */
|
||||||
"jcs", /* mnemonic */
|
"jcs", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C, /* use */
|
||||||
OF_CBRA | OF_LBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JEQ, /* opcode */
|
{ OP65_JEQ, /* opcode */
|
||||||
"jeq", /* mnemonic */
|
"jeq", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA | OF_ZBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_Z, /* use */
|
||||||
OF_CBRA | OF_LBRA | OF_ZBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JMI, /* opcode */
|
{ OP65_JMI, /* opcode */
|
||||||
"jmi", /* mnemonic */
|
"jmi", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_N, /* use */
|
||||||
OF_CBRA | OF_LBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JMP, /* opcode */
|
{ OP65_JMP, /* opcode */
|
||||||
"jmp", /* mnemonic */
|
"jmp", /* mnemonic */
|
||||||
3, /* size */
|
3, /* size */
|
||||||
|
OF_UBRA | OF_LBRA | OF_READ, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_UBRA | OF_LBRA | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_JNE, /* opcode */
|
{ OP65_JNE, /* opcode */
|
||||||
"jne", /* mnemonic */
|
"jne", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA | OF_ZBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_Z, /* use */
|
||||||
OF_CBRA | OF_LBRA | OF_ZBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JPL, /* opcode */
|
{ OP65_JPL, /* opcode */
|
||||||
"jpl", /* mnemonic */
|
"jpl", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA | OF_FBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_N, /* use */
|
||||||
OF_CBRA | OF_LBRA | OF_FBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JSR, /* opcode */
|
{ OP65_JSR, /* opcode */
|
||||||
"jsr", /* mnemonic */
|
"jsr", /* mnemonic */
|
||||||
3, /* size */
|
3, /* size */
|
||||||
|
OF_CALL | OF_READ, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_CALL | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_JVC, /* opcode */
|
{ OP65_JVC, /* opcode */
|
||||||
"jvc", /* mnemonic */
|
"jvc", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_V, /* use */
|
||||||
OF_CBRA | OF_LBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_JVS, /* opcode */
|
{ OP65_JVS, /* opcode */
|
||||||
"jvs", /* mnemonic */
|
"jvs", /* mnemonic */
|
||||||
5, /* size */
|
5, /* size */
|
||||||
REG_NONE, /* use */
|
OF_CBRA | OF_LBRA, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_V, /* use */
|
||||||
OF_CBRA | OF_LBRA /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_LDA, /* opcode */
|
{ OP65_LDA, /* opcode */
|
||||||
"lda", /* mnemonic */
|
"lda", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_LOAD | OF_SETF | OF_READ, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_LOAD | OF_SETF | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_LDX, /* opcode */
|
{ OP65_LDX, /* opcode */
|
||||||
"ldx", /* mnemonic */
|
"ldx", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_LOAD | OF_SETF | OF_READ, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_X, /* chg */
|
REG_X | PSTATE_ZN /* chg */
|
||||||
OF_LOAD | OF_SETF | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_LDY, /* opcode */
|
{ OP65_LDY, /* opcode */
|
||||||
"ldy", /* mnemonic */
|
"ldy", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_LOAD | OF_SETF | OF_READ, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_Y, /* chg */
|
REG_Y | PSTATE_ZN /* chg */
|
||||||
OF_LOAD | OF_SETF | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_LSR, /* opcode */
|
{ OP65_LSR, /* opcode */
|
||||||
"lsr", /* mnemonic */
|
"lsr", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_NOIMP | OF_RMW, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_CZN /* chg */
|
||||||
OF_SETF | OF_NOIMP | OF_RMW /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_NOP, /* opcode */
|
{ OP65_NOP, /* opcode */
|
||||||
"nop", /* mnemonic */
|
"nop", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_ORA, /* opcode */
|
{ OP65_ORA, /* opcode */
|
||||||
"ora", /* mnemonic */
|
"ora", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_SETF | OF_READ, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_SETF | OF_READ /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PHA, /* opcode */
|
{ OP65_PHA, /* opcode */
|
||||||
"pha", /* mnemonic */
|
"pha", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PHP, /* opcode */
|
{ OP65_PHP, /* opcode */
|
||||||
"php", /* mnemonic */
|
"php", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
REG_NONE, /* use */
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_ALL, /* use */
|
||||||
OF_NONE /* flags */
|
REG_NONE /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_PHX, /* opcode */
|
{ OP65_PHX, /* opcode */
|
||||||
"phx", /* mnemonic */
|
"phx", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PHY, /* opcode */
|
{ OP65_PHY, /* opcode */
|
||||||
"phy", /* mnemonic */
|
"phy", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PLA, /* opcode */
|
{ OP65_PLA, /* opcode */
|
||||||
"pla", /* mnemonic */
|
"pla", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_SETF, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PLP, /* opcode */
|
{ OP65_PLP, /* opcode */
|
||||||
"plp", /* mnemonic */
|
"plp", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_ALL /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PLX, /* opcode */
|
{ OP65_PLX, /* opcode */
|
||||||
"plx", /* mnemonic */
|
"plx", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_SETF, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_X, /* chg */
|
REG_X | PSTATE_ZN /* chg */
|
||||||
OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_PLY, /* opcode */
|
{ OP65_PLY, /* opcode */
|
||||||
"ply", /* mnemonic */
|
"ply", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_SETF, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_Y, /* chg */
|
REG_Y | PSTATE_ZN /* chg */
|
||||||
OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_ROL, /* opcode */
|
{ OP65_ROL, /* opcode */
|
||||||
"rol", /* mnemonic */
|
"rol", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
REG_NONE, /* use */
|
OF_SETF | OF_NOIMP | OF_RMW, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C, /* use */
|
||||||
OF_SETF | OF_NOIMP | OF_RMW /* flags */
|
PSTATE_CZN /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_ROR, /* opcode */
|
{ OP65_ROR, /* opcode */
|
||||||
"ror", /* mnemonic */
|
"ror", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
REG_NONE, /* use */
|
OF_SETF | OF_NOIMP | OF_RMW, /* flags */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C, /* use */
|
||||||
OF_SETF | OF_NOIMP | OF_RMW /* flags */
|
PSTATE_CZN /* chg */
|
||||||
},
|
},
|
||||||
/* Mark RTI as "uses all registers but doesn't change them", so the
|
/* Mark RTI as "uses all registers but doesn't change them", so the
|
||||||
** optimizer won't remove preceeding loads.
|
** optimizer won't remove preceeding loads.
|
||||||
@ -456,135 +456,135 @@ const OPCDesc OPCTable[OP65_COUNT] = {
|
|||||||
{ OP65_RTI, /* opcode */
|
{ OP65_RTI, /* opcode */
|
||||||
"rti", /* mnemonic */
|
"rti", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_RET, /* flags */
|
||||||
REG_AXY, /* use */
|
REG_AXY, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_ALL /* chg */
|
||||||
OF_RET /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_RTS, /* opcode */
|
{ OP65_RTS, /* opcode */
|
||||||
"rts", /* mnemonic */
|
"rts", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_RET, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_RET /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_SBC, /* opcode */
|
{ OP65_SBC, /* opcode */
|
||||||
"sbc", /* mnemonic */
|
"sbc", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
REG_A, /* use */
|
OF_SETF | OF_READ, /* flags */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_C, /* use */
|
||||||
OF_SETF | OF_READ /* flags */
|
REG_A | PSTATE_CZVN /* chg */
|
||||||
},
|
},
|
||||||
{ OP65_SEC, /* opcode */
|
{ OP65_SEC, /* opcode */
|
||||||
"sec", /* mnemonic */
|
"sec", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_C /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_SED, /* opcode */
|
{ OP65_SED, /* opcode */
|
||||||
"sed", /* mnemonic */
|
"sed", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_D /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_SEI, /* opcode */
|
{ OP65_SEI, /* opcode */
|
||||||
"sei", /* mnemonic */
|
"sei", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_I /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_STA, /* opcode */
|
{ OP65_STA, /* opcode */
|
||||||
"sta", /* mnemonic */
|
"sta", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_STORE | OF_WRITE, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_STORE | OF_WRITE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_STP, /* opcode */
|
{ OP65_STP, /* opcode */
|
||||||
"stp", /* mnemonic */
|
"stp", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_NONE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_NONE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_STX, /* opcode */
|
{ OP65_STX, /* opcode */
|
||||||
"stx", /* mnemonic */
|
"stx", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_STORE | OF_WRITE, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_STORE | OF_WRITE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_STY, /* opcode */
|
{ OP65_STY, /* opcode */
|
||||||
"sty", /* mnemonic */
|
"sty", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_STORE | OF_WRITE, /* flags */
|
||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_STORE | OF_WRITE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_STZ, /* opcode */
|
{ OP65_STZ, /* opcode */
|
||||||
"stz", /* mnemonic */
|
"stz", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_STORE | OF_WRITE, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_STORE | OF_WRITE /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TAX, /* opcode */
|
{ OP65_TAX, /* opcode */
|
||||||
"tax", /* mnemonic */
|
"tax", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_XFR | OF_SETF, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_X, /* chg */
|
REG_X | PSTATE_ZN /* chg */
|
||||||
OF_XFR | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TAY, /* opcode */
|
{ OP65_TAY, /* opcode */
|
||||||
"tay", /* mnemonic */
|
"tay", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_XFR | OF_SETF, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_Y, /* chg */
|
REG_Y | PSTATE_ZN /* chg */
|
||||||
OF_XFR | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TRB, /* opcode */
|
{ OP65_TRB, /* opcode */
|
||||||
"trb", /* mnemonic */
|
"trb", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_RMW, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_Z /* chg */
|
||||||
OF_RMW /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TSB, /* opcode */
|
{ OP65_TSB, /* opcode */
|
||||||
"tsb", /* mnemonic */
|
"tsb", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
|
OF_RMW, /* flags */
|
||||||
REG_A, /* use */
|
REG_A, /* use */
|
||||||
REG_NONE, /* chg */
|
PSTATE_Z /* chg */
|
||||||
OF_RMW /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TSX, /* opcode */
|
{ OP65_TSX, /* opcode */
|
||||||
"tsx", /* mnemonic */
|
"tsx", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_XFR | OF_SETF, /* flags */
|
||||||
REG_NONE, /* use */
|
REG_NONE, /* use */
|
||||||
REG_X, /* chg */
|
REG_X | PSTATE_ZN /* chg */
|
||||||
OF_XFR | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TXA, /* opcode */
|
{ OP65_TXA, /* opcode */
|
||||||
"txa", /* mnemonic */
|
"txa", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_XFR | OF_SETF, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_XFR | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TXS, /* opcode */
|
{ OP65_TXS, /* opcode */
|
||||||
"txs", /* mnemonic */
|
"txs", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_XFR, /* flags */
|
||||||
REG_X, /* use */
|
REG_X, /* use */
|
||||||
REG_NONE, /* chg */
|
REG_NONE /* chg */
|
||||||
OF_XFR /* flags */
|
|
||||||
},
|
},
|
||||||
{ OP65_TYA, /* opcode */
|
{ OP65_TYA, /* opcode */
|
||||||
"tya", /* mnemonic */
|
"tya", /* mnemonic */
|
||||||
1, /* size */
|
1, /* size */
|
||||||
|
OF_XFR | OF_SETF, /* flags */
|
||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_A, /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
OF_XFR | OF_SETF /* flags */
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,9 +192,9 @@ typedef struct {
|
|||||||
opc_t OPC; /* Opcode */
|
opc_t OPC; /* Opcode */
|
||||||
char Mnemo[9]; /* Mnemonic */
|
char Mnemo[9]; /* Mnemonic */
|
||||||
unsigned char Size; /* Size, 0 = check addressing mode */
|
unsigned char Size; /* Size, 0 = check addressing mode */
|
||||||
unsigned short Use; /* Registers used by this insn */
|
|
||||||
unsigned short Chg; /* Registers changed by this insn */
|
|
||||||
unsigned short Info; /* Additional information */
|
unsigned short Info; /* Additional information */
|
||||||
|
unsigned int Use; /* Registers used by this insn */
|
||||||
|
unsigned int Chg; /* Registers changed by this insn */
|
||||||
} OPCDesc;
|
} OPCDesc;
|
||||||
|
|
||||||
/* Opcode description table */
|
/* Opcode description table */
|
||||||
|
Loading…
Reference in New Issue
Block a user