Coverage Report

Created: 2023-12-08 06:05

/src/capstonenext/arch/AArch64/AArch64Mapping.h
Line
Count
Source (jump to first uncovered line)
1
/* Capstone Disassembly Engine */
2
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */
3
4
#ifndef CS_AARCH64_MAP_H
5
#define CS_AARCH64_MAP_H
6
7
#include "capstone/capstone.h"
8
#include "../../MCInst.h"
9
#include "../../SStream.h"
10
11
34.8M
#define ARR_SIZE(a) (sizeof(a)/sizeof(a[0]))
12
13
typedef enum {
14
#include "AArch64GenCSOpGroup.inc"
15
} aarch64_op_group;
16
17
// return name of regiser in friendly string
18
const char *AArch64_reg_name(csh handle, unsigned int reg);
19
20
// given internal insn id, return public instruction info
21
void AArch64_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id);
22
23
const char *AArch64_insn_name(csh handle, unsigned int id);
24
25
const char *AArch64_group_name(csh handle, unsigned int id);
26
27
void AArch64_reg_access(const cs_insn *insn, cs_regs regs_read,
28
            uint8_t *regs_read_count, cs_regs regs_write,
29
            uint8_t *regs_write_count);
30
31
void AArch64_add_cs_detail(MCInst *MI, int /* aarch64_op_group */ op_group,
32
               va_list args);
33
34
static inline void add_cs_detail(MCInst *MI,
35
                 int /* aarch64_op_group */ op_group, ...)
36
601k
{
37
601k
  if (!MI->flat_insn->detail)
38
0
    return;
39
601k
  va_list args;
40
601k
  va_start(args, op_group);
41
601k
  AArch64_add_cs_detail(MI, op_group, args);
42
601k
  va_end(args);
43
601k
}
Unexecuted instantiation: AArch64Module.c:add_cs_detail
Unexecuted instantiation: AArch64Mapping.c:add_cs_detail
Unexecuted instantiation: AArch64Disassembler.c:add_cs_detail
AArch64InstPrinter.c:add_cs_detail
Line
Count
Source
36
601k
{
37
601k
  if (!MI->flat_insn->detail)
38
0
    return;
39
601k
  va_list args;
40
601k
  va_start(args, op_group);
41
601k
  AArch64_add_cs_detail(MI, op_group, args);
42
601k
  va_end(args);
43
601k
}
44
45
void AArch64_init_mri(MCRegisterInfo *MRI);
46
47
void AArch64_init_cs_detail(MCInst *MI);
48
49
void AArch64_set_instr_map_data(MCInst *MI);
50
51
bool AArch64_getInstruction(csh handle, const uint8_t *code, size_t code_len,
52
              MCInst *instr, uint16_t *size, uint64_t address,
53
              void *info);
54
55
void AArch64_printer(MCInst *MI, SStream *O, void * /* MCRegisterInfo* */ info);
56
57
void AArch64_set_detail_op_reg(MCInst *MI, unsigned OpNum, aarch64_reg Reg);
58
void AArch64_set_detail_op_imm(MCInst *MI, unsigned OpNum, aarch64_op_type ImmType,
59
                 int64_t Imm);
60
void AArch64_set_detail_op_imm_range(MCInst *MI, unsigned OpNum,
61
               int64_t FirstImm, int64_t offset);
62
void AArch64_set_detail_op_mem(MCInst *MI, unsigned OpNum, uint64_t Val);
63
void AArch64_set_detail_op_mem_offset(MCInst *MI, unsigned OpNum, uint64_t Val);
64
void AArch64_set_detail_shift_ext(MCInst *MI, unsigned OpNum, bool SignExtend,
65
                  bool DoShift, unsigned ExtWidth, char SrcRegKind);
66
void AArch64_set_detail_op_float(MCInst *MI, unsigned OpNum, float Val);
67
void AArch64_set_detail_op_sys(MCInst *MI, unsigned OpNum, aarch64_sysop sys_op, aarch64_op_type type);
68
void AArch64_set_detail_op_sme(MCInst *MI, unsigned OpNum, aarch64_sme_op_part part, AArch64Layout_VectorLayout vas, ...);
69
void AArch64_insert_detail_op_reg_at(MCInst *MI, unsigned index, aarch64_reg Reg, cs_ac_type access);
70
void AArch64_insert_detail_op_float_at(MCInst *MI, unsigned index, double val, cs_ac_type access);
71
void AArch64_insert_detail_op_imm_at(MCInst *MI, unsigned index, int64_t Imm);
72
void AArch64_add_vas(MCInst *MI, const SStream *OS);
73
74
#endif