/src/capstonenext/arch/PowerPC/PPCMapping.h
Line | Count | Source |
1 | | /* Capstone Disassembly Engine */ |
2 | | /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2015 */ |
3 | | |
4 | | #ifndef CS_PPC_MAP_H |
5 | | #define CS_PPC_MAP_H |
6 | | |
7 | | #include "../../cs_priv.h" |
8 | | #include "../../MCDisassembler.h" |
9 | | #include "capstone/capstone.h" |
10 | | |
11 | | typedef enum { |
12 | | #include "PPCGenCSOpGroup.inc" |
13 | | } ppc_op_group; |
14 | | |
15 | | void PPC_init_mri(MCRegisterInfo *MRI); |
16 | | |
17 | | void PPC_init_cs_detail(MCInst *MI); |
18 | | |
19 | | // return name of register in friendly string |
20 | | const char *PPC_reg_name(csh handle, unsigned int reg); |
21 | | |
22 | | void PPC_printer(MCInst *MI, SStream *O, void * /* MCRegisterInfo* */ info); |
23 | | bool PPC_getInstruction(csh handle, const uint8_t *code, size_t code_len, |
24 | | MCInst *instr, uint16_t *size, uint64_t address, |
25 | | void *info); |
26 | | |
27 | | // given internal insn id, return public instruction info |
28 | | void PPC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id); |
29 | | |
30 | | const char *PPC_insn_name(csh handle, unsigned int id); |
31 | | const char *PPC_group_name(csh handle, unsigned int id); |
32 | | |
33 | | typedef struct { |
34 | | unsigned int id; // instruction id |
35 | | const char *mnem; |
36 | | } ppc_alias_id; |
37 | | |
38 | | void PPC_set_mem_access(MCInst *MI, bool status); |
39 | | static inline void set_mem_access(MCInst *MI, bool status) |
40 | 24.0k | { |
41 | 24.0k | PPC_set_mem_access(MI, status); |
42 | 24.0k | } Unexecuted instantiation: PPCModule.c:set_mem_access PPCMapping.c:set_mem_access Line | Count | Source | 40 | 2.90k | { | 41 | 2.90k | PPC_set_mem_access(MI, status); | 42 | 2.90k | } |
Unexecuted instantiation: PPCDisassembler.c:set_mem_access PPCInstPrinter.c:set_mem_access Line | Count | Source | 40 | 21.1k | { | 41 | 21.1k | PPC_set_mem_access(MI, status); | 42 | 21.1k | } |
|
43 | | |
44 | | // map internal raw register to 'public' register |
45 | | ppc_reg PPC_map_register(unsigned int r); |
46 | | |
47 | | bool PPC_getFeatureBits(unsigned int mode, unsigned int feature); |
48 | | |
49 | | void PPC_add_cs_detail_0(MCInst *MI, ppc_op_group op_group, unsigned OpNo); |
50 | | void PPC_add_cs_detail_1(MCInst *MI, ppc_op_group op_group, unsigned OpNo, const char *Modifier); |
51 | | |
52 | | void PPC_set_detail_op_reg(MCInst *MI, unsigned OpNum, ppc_reg Reg); |
53 | | void PPC_set_detail_op_imm(MCInst *MI, unsigned OpNum, int64_t Imm); |
54 | | void PPC_set_detail_op_mem(MCInst *MI, unsigned OpNum, uint64_t Val, |
55 | | bool is_off_reg); |
56 | | |
57 | | void PPC_insert_detail_op_imm_at(MCInst *MI, unsigned index, int64_t Val, |
58 | | cs_ac_type access); |
59 | | |
60 | | void PPC_setup_op(cs_ppc_op *op); |
61 | | |
62 | | void PPC_check_updates_cr0(MCInst *MI); |
63 | | void PPC_set_instr_map_data(MCInst *MI, const uint8_t *Bytes, size_t BytesLen); |
64 | | |
65 | | #endif |