/src/capstonenext/arch/ARC/ARCMapping.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Capstone Disassembly Engine */ |
2 | | /* By Dmitry Sibirtsev <sibirtsevdl@gmail.com>, 2024 */ |
3 | | |
4 | | #ifndef CS_ARC_MAP_H |
5 | | #define CS_ARC_MAP_H |
6 | | |
7 | | #include "../../Mapping.h" |
8 | | #include "../../include/capstone/capstone.h" |
9 | | #include "../../utils.h" |
10 | | |
11 | | typedef enum { |
12 | | #include "ARCGenCSOpGroup.inc" |
13 | | } arc_op_group; |
14 | | |
15 | | void ARC_init_mri(MCRegisterInfo *MRI); |
16 | | |
17 | | // return name of register in friendly string |
18 | | const char *ARC_reg_name(csh handle, unsigned int reg); |
19 | | |
20 | | void ARC_printer(MCInst *MI, SStream *O, |
21 | | void * /* MCRegisterInfo* */ info); |
22 | | |
23 | | // given internal insn id, return public instruction ID |
24 | | void ARC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id); |
25 | | |
26 | | const char *ARC_insn_name(csh handle, unsigned int id); |
27 | | |
28 | | const char *ARC_group_name(csh handle, unsigned int id); |
29 | | |
30 | | void ARC_reg_access(const cs_insn *insn, cs_regs regs_read, |
31 | | uint8_t *regs_read_count, cs_regs regs_write, |
32 | | uint8_t *regs_write_count); |
33 | | |
34 | | bool ARC_getInstruction(csh handle, const uint8_t *code, size_t code_len, |
35 | | MCInst *instr, uint16_t *size, uint64_t address, |
36 | | void *info); |
37 | | |
38 | | // cs_detail related functions |
39 | | void ARC_init_cs_detail(MCInst *MI); |
40 | | void ARC_set_detail_op_imm(MCInst *MI, unsigned OpNum, |
41 | | arc_op_type ImmType, int64_t Imm); |
42 | | void ARC_add_cs_detail(MCInst *MI, int /* arc_op_group */ op_group, |
43 | | va_list args); |
44 | | static inline void add_cs_detail(MCInst *MI, |
45 | | int /* arc_op_group */ op_group, ...) |
46 | 0 | { |
47 | 0 | if (!detail_is_set(MI)) |
48 | 0 | return; |
49 | 0 | va_list args; |
50 | 0 | va_start(args, op_group); |
51 | 0 | ARC_add_cs_detail(MI, op_group, args); |
52 | 0 | va_end(args); |
53 | 0 | } Unexecuted instantiation: ARCModule.c:add_cs_detail Unexecuted instantiation: ARCMapping.c:add_cs_detail Unexecuted instantiation: ARCInstPrinter.c:add_cs_detail |
54 | | |
55 | | #endif |