Coverage Report

Created: 2024-09-08 06:22

/src/capstonenext/arch/LoongArch/LoongArchMapping.h
Line
Count
Source (jump to first uncovered line)
1
/* Capstone Disassembly Engine */
2
/* By Jiajie Chen <c@jia.je>, 2024 */
3
/*    Yanglin Xun <1109673069@qq.com>, 2024 */
4
5
#ifndef CS_LOONGARCH_MAPPING_H
6
#define CS_LOONGARCH_MAPPING_H
7
8
#include "../../include/capstone/capstone.h"
9
#include "../../utils.h"
10
11
typedef enum {
12
#include "LoongArchGenCSOpGroup.inc"
13
} loongarch_op_group;
14
15
void LoongArch_init_mri(MCRegisterInfo *MRI);
16
17
// return name of register in friendly string
18
const char *LoongArch_reg_name(csh handle, unsigned int reg);
19
20
void LoongArch_printer(MCInst *MI, SStream *O,
21
           void * /* MCRegisterInfo* */ info);
22
23
// given internal insn id, return public instruction ID
24
void LoongArch_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id);
25
26
const char *LoongArch_insn_name(csh handle, unsigned int id);
27
28
const char *LoongArch_group_name(csh handle, unsigned int id);
29
30
void LoongArch_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 LoongArch_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 LoongArch_init_cs_detail(MCInst *MI);
40
void LoongArch_add_cs_detail(MCInst *MI, int /* loongarch_op_group */ op_group,
41
           va_list args);
42
static inline void add_cs_detail(MCInst *MI,
43
         int /* loongarch_op_group */ op_group, ...)
44
0
{
45
0
  if (!MI->flat_insn->detail)
46
0
    return;
47
0
  va_list args;
48
0
  va_start(args, op_group);
49
0
  LoongArch_add_cs_detail(MI, op_group, args);
50
0
  va_end(args);
51
0
}
Unexecuted instantiation: LoongArchModule.c:add_cs_detail
Unexecuted instantiation: LoongArchMapping.c:add_cs_detail
Unexecuted instantiation: LoongArchInstPrinter.c:add_cs_detail
52
53
#endif // CS_LOONGARCH_MAPPING_H