ROSE 0.11.145.192
InstructionEnumsAarch64.h
1#ifndef ROSE_BinaryAnalysis_InstructionEnumsAarch64_H
2#define ROSE_BinaryAnalysis_InstructionEnumsAarch64_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_ASM_AARCH64
5
6#include <capstone/arm64.h>
7#include <string>
8
9namespace Rose {
10namespace BinaryAnalysis {
11
12using ::arm64_insn;
13using Aarch64InstructionKind = ::arm64_insn;
15using ::arm64_cc;
16using Aarch64InstructionCondition = ::arm64_cc;
18using ::arm64_extender;
19using Aarch64Extender = ::arm64_extender;
21using ::arm64_vas;
22using Aarch64VectorArrangement = ::arm64_vas;
24using ::arm64_at_op;
25using Aarch64AtOperation = ::arm64_at_op;
27using ::arm64_prefetch_op;
28using Aarch64PrefetchOperation = ::arm64_prefetch_op;
30using ::arm64_barrier_op;
31using Aarch64BarrierOperation = ::arm64_barrier_op;
33using ::arm64_pstate;
34using Aarch64PState = ::arm64_pstate;
36// Exception types.
37enum class Aarch64Exception {
38 brk // Exception generated by BRK instruction.
39};
40
41// Major register numbers for AArch64.
43 aarch64_regclass_gpr, // General purpose registers.
44 aarch64_regclass_sp, // Stack pointer registers.
45 aarch64_regclass_ext, // SIMD and FP registers, so-called "extension" registers.
46 aarch64_regclass_pc, // Program counter, instruction pointer.
47 aarch64_regclass_cc, // Condition codes registers.
48 aarch64_regclass_system, // System registers.
49};
50
51// System registers.
52//
53// There are at most four copies of each system register, one per exception level. Since ROSE allows only 16 distinct major numbers
54// for the registers, but 1024 minor numbers, we use a single major number for all the system registers and use the minor numbers
55// for the different system registers. For simplicity, we reserve four minor numbers for each type of system register, although
56// this might change in the future.
58 aarch64_system_actlr = 0, // auxiliary control registers
59 aarch64_system_ccsidr = 4, // current cache size ID registers
60 aarch64_system_clidr = 8, // cache level ID registers
61 aarch64_system_cntfrq = 12, // counter-timer frequency registers
62 aarch64_system_cntpct = 16, // counter-timer physical count registers
63 aarch64_system_cntkctl = 20, // counter-timer kernel control registers
64 aarch64_system_cntp_cval = 24, // counter-timer physical timer compare registers
65 aarch64_system_cpacr = 28, // coprocessor access control registers
66 aarch64_system_csselr = 32, // cache size selection registers
67 aarch64_system_cntp_ctl = 36, // counter-timer physical control registers
68 aarch64_system_ctr = 40, // cache type registers
69 aarch64_system_dczid = 44, // data cache zero ID registers
70 aarch64_system_elr = 48, // exception link registers
71 aarch64_system_esr = 52, // exception syndrome registers
72 aarch64_system_far = 56, // fault address registers
73 aarch64_system_hcr = 60, // hypervisor configuration registers
74 aarch64_system_mair = 64, // memory attribute indirection registers
75 aarch64_system_midr = 68, // main ID registers
76 aarch64_system_mpidr = 72, // multiprocessor affinity registers
77 aarch64_system_scr = 76, // secure configuration registers
78 aarch64_system_sctlr = 80, // system control registers
79 aarch64_system_spsr = 84, // saved program status registers
80 aarch64_system_tcr = 88, // translation control registers
81 aarch64_system_tpidr = 92, // user read/write thread ID registers
82 aarch64_system_tpidrr0 = 96, // user read-only thread ID registers
83 aarch64_system_ttbr0 = 100, // translation table base registers 0
84 aarch64_system_ttbr1 = 104, // translation table base register 1
85 aarch64_system_vbar = 108, // vector based address registers
86 aarch64_system_vtcr = 112, // virtualization translation control registers
87 aarch64_system_vttbr = 116 // virtualization translation table base registers
88};
89
90} // namespace
91} // namespace
92
93#endif
94#endif
The ROSE library.
const char * Aarch64SystemRegisters(int64_t)
Convert Rose::BinaryAnalysis::Aarch64SystemRegisters enum constant to a string.
const char * Aarch64Exception(int64_t)
Convert Rose::BinaryAnalysis::Aarch64Exception enum constant to a string.
const char * Aarch64RegisterClass(int64_t)
Convert Rose::BinaryAnalysis::Aarch64RegisterClass enum constant to a string.