aboutsummaryrefslogtreecommitdiffstats
path: root/capstone/arch/AArch64/AArch64Mapping.h
blob: a8eda4f899dbb070ddf4d3e1c4d53fda23cce425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* Capstone Disassembly Engine */
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */

#ifndef CS_ARM64_MAP_H
#define CS_ARM64_MAP_H

#include "capstone/capstone.h"

#define ARR_SIZE(a) (sizeof(a)/sizeof(a[0]))

// return name of regiser in friendly string
const char *AArch64_reg_name(csh handle, unsigned int reg);

// given internal insn id, return public instruction info
void AArch64_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id);

const char *AArch64_insn_name(csh handle, unsigned int id);

const char *AArch64_group_name(csh handle, unsigned int id);

// map instruction name to public instruction ID
arm64_insn AArch64_map_insn(const char *name);

// map internal vregister to public register
arm64_reg AArch64_map_vregister(unsigned int r);

void arm64_op_addReg(MCInst *MI, int reg);

void arm64_op_addVectorArrSpecifier(MCInst * MI, int sp);

void arm64_op_addFP(MCInst *MI, float fp);

void arm64_op_addImm(MCInst *MI, int64_t imm);

const uint8_t *AArch64_get_op_access(cs_struct *h, unsigned int id);

void AArch64_reg_access(const cs_insn *insn,
		cs_regs regs_read, uint8_t *regs_read_count,
		cs_regs regs_write, uint8_t *regs_write_count);

#endif