| 1 | /* Capstone Disassembly Engine */ |
| 2 | /* M68K Backend by Daniel Collin <[email protected]> 2015-2016 */ |
| 3 | |
| 4 | #ifndef CS_M68KDISASSEMBLER_H |
| 5 | #define CS_M68KDISASSEMBLER_H |
| 6 | |
| 7 | #include "../../MCInst.h" |
| 8 | |
| 9 | /* Private, For internal use only */ |
| 10 | typedef struct m68k_info { |
| 11 | const uint8_t *code; |
| 12 | size_t code_len; |
| 13 | uint64_t baseAddress; |
| 14 | MCInst *inst; |
| 15 | unsigned int pc; /* program counter */ |
| 16 | unsigned int ir; /* instruction register */ |
| 17 | unsigned int type; |
| 18 | unsigned int address_mask; /* Address mask to simulate address lines */ |
| 19 | cs_m68k extension; |
| 20 | uint16_t regs_read[20]; // list of implicit registers read by this insn |
| 21 | uint8_t regs_read_count; // number of implicit registers read by this insn |
| 22 | uint16_t regs_write[20]; // list of implicit registers modified by this insn |
| 23 | uint8_t regs_write_count; // number of implicit registers modified by this insn |
| 24 | uint8_t groups[8]; |
| 25 | uint8_t groups_count; |
| 26 | } m68k_info; |
| 27 | |
| 28 | bool M68K_getInstruction(csh ud, const uint8_t* code, size_t code_len, MCInst* instr, uint16_t* size, uint64_t address, void* info); |
| 29 | |
| 30 | #endif |