| 1 | /* Capstone Disassembly Engine */ |
| 2 | /* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */ |
| 3 | |
| 4 | #ifndef CS_PPC_MAP_H |
| 5 | #define CS_PPC_MAP_H |
| 6 | |
| 7 | #include "capstone/capstone.h" |
| 8 | |
| 9 | // return name of regiser in friendly string |
| 10 | const char *PPC_reg_name(csh handle, unsigned int reg); |
| 11 | |
| 12 | // return register id, given register name |
| 13 | ppc_reg PPC_name_reg(const char *name); |
| 14 | |
| 15 | // given internal insn id, return public instruction info |
| 16 | void PPC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id); |
| 17 | |
| 18 | const char *PPC_insn_name(csh handle, unsigned int id); |
| 19 | const char *PPC_group_name(csh handle, unsigned int id); |
| 20 | |
| 21 | struct ppc_alias { |
| 22 | unsigned int id; // instruction id |
| 23 | int cc; // code condition |
| 24 | const char *mnem; |
| 25 | }; |
| 26 | |
| 27 | // map instruction name to public instruction ID |
| 28 | ppc_insn PPC_map_insn(const char *name); |
| 29 | |
| 30 | // check if this insn is relative branch |
| 31 | bool PPC_abs_branch(cs_struct *h, unsigned int id); |
| 32 | |
| 33 | // map internal raw register to 'public' register |
| 34 | ppc_reg PPC_map_register(unsigned int r); |
| 35 | |
| 36 | // given alias mnemonic, return instruction ID & CC |
| 37 | bool PPC_alias_insn(const char *name, struct ppc_alias *alias); |
| 38 | |
| 39 | #endif |
| 40 |