ROSE 0.11.145.147
InstructionEnumsAarch32.h
1#ifndef ROSE_BinaryAnalysis_InstructionEnumsAarch32_H
2#define ROSE_BinaryAnalysis_InstructionEnumsAarch32_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_ASM_AARCH32
5
6#include <capstone/arm.h>
7
8namespace Rose {
9namespace BinaryAnalysis {
10
11using ::arm_insn; // from capstone
12using Aarch32InstructionKind = ::arm_insn;
14using ::arm_cc;
15using Aarch32InstructionCondition = ::arm_cc;
17// Exception major numbers.
19 aarch32_exception_svc, // Exception for the SVC instruction.
20 aarch32_exception_udf, // Exception for the UDF instruction.
21 aarch32_exception_hvc // Exception for hypervisor calls.
22};
23
24// Major register numbers for AArch32.
26 aarch32_regclass_gpr, // General purpose registers.
27 aarch32_regclass_sys, // Special purpose, non-user registers.
28 aarch32_regclass_ext, // NEON and VFP extension register bank.
29 aarch32_regclass_coproc, // Coprocessor.
30 aarch32_regclass_debug // Debug registers.
31};
32
33// General purpose registers for AArch32.
35 aarch32_gpr_sb = 9,
36 aarch32_gpr_sl = 10,
37 aarch32_gpr_fp = 11,
38 aarch32_gpr_ip = 12, // not the instruction pointer
39 aarch32_gpr_sp = 13, // User stack pointer. Not the priviledged stack pointers.
40 aarch32_gpr_lr = 14, // User link register. Not the privileged link registers.
41 aarch32_gpr_pc = 15
42};
43
44// Debug registers for AArch32.
46 // These numbers are specified in the ARM documentation
47 aarch32_debug_didr = 0, // Debug ID register.
48 // 1 - 5 is reserved
49 aarch32_debug_wfar = 6, // Watchpoint fault address register.
50 aarch32_debug_vcr = 7, // Vector catch register.
51 // 8 reserved
52 aarch32_debug_ecr = 9, // Event catch register.
53 aarch32_debug_dsccr = 10, // Debug state catch control register.
54 aarch32_debug_dsmcr = 11, // Debug state MMU control register.
55 // 12 - 31 are reserved
56 aarch32_debug_dtrrx = 32, // DTRRX external view.
57 aarch32_debug_itr = 33, // Instruction transfer register.
58 aarch32_debug_dscr = 34, // DSCR external view.
59 aarch32_debug_dtrtx = 35, // DTRTX external view.
60 aarch32_debug_drcr = 36, // Debug run control register.
61 // 37 - 63 are reserved
62 aarch32_debug_bvr0 = 64, // First breakpoint value register. There are 16 of these.
63 // 65 - 79 are the other 15 BVR registers
64 aarch32_debug_bcr0 = 80, // First breakpiont control register. There are 16 of these.
65 // 81 - 95 are the other 15 BCR registers
66 aarch32_debug_wvr0 = 96, // First watchpoint value register. There are 16 of these.
67 // 97 - 111 are the other 15 WVR registers
68 aarch32_debug_wcr0 = 112, // First watchpoint control register. There are 16 of these.
69 // 128 - 191 are reserved
70 aarch32_debug_oslar = 192, // OS lock access register.
71 aarch32_debug_oslsr = 193, // OS lock status register.
72 aarch32_debug_ossrr = 194, // OS save and restore register.
73 // 195 reserved
74 aarch32_debug_prcr = 196, // Device power-down and reset control register.
75 aarch32_debug_prsr = 197, // Device power-down and reset status register.
76 // 198 - 511 are reserved
77 // 512 - 575 are implementation defined
78 // 576 - 831 are reserved
79 // 832 - 895 are processor identification registers (no names given in documentation)
80 // 896 - 927 are reserved
81 // 928 - 959 are implementation defined
82 aarch32_debug_itctrl = 960, // Integration mode control register.
83 // 961 -999 are reserved for management register expansion
84 aarch32_debug_claimset = 1000, // Claim tag set register.
85 aarch32_debug_claimclr = 1001, // Claim tag clear register.
86 // 1002 - 1003 are reserved
87 aarch32_debug_lar = 1004, // Lock access register.
88 aarch32_debug_lsr = 1005, // Lock status register.
89 aarch32_debug_authstatus = 1006, // Authentication status register.
90 // 1007 - 1009 are reserved
91 aarch32_debug_devid = 1010, // Device identifier.
92 aarch32_debug_devtype = 1011, // Device type register.
93 aarch32_debug_peripheralid0 = 1012, // Peripheral identification registers. There are 8 of these.
94 aarch32_debug_componentid0 = 1020, // Component identification registers. There are 4 of these.
95
96 // These registers have their register number specified as "N/A" in the documentation: "These registers are only
97 // implemented through the Baseline CP14 Interface and do not have register numbers or offsets."
98 aarch32_debug_drar = 2000,
99 aarch32_debug_dsar
100};
101
102// System (non-user) registers for AArch32.
104 aarch32_sys_r8_usr,
105 aarch32_sys_r8_fiq,
106 aarch32_sys_r9_usr,
107 aarch32_sys_r9_fiq,
108 aarch32_sys_r10_usr,
109 aarch32_sys_r10_fiq,
110 aarch32_sys_r11_usr,
111 aarch32_sys_r11_fiq,
112 aarch32_sys_r12_usr,
113 aarch32_sys_r12_fiq,
114 aarch32_sys_sp_hyp,
115 aarch32_sys_sp_svc,
116 aarch32_sys_sp_abt,
117 aarch32_sys_sp_und,
118 aarch32_sys_sp_mon,
119 aarch32_sys_sp_irq,
120 aarch32_sys_sp_fiq,
121 aarch32_sys_sp_usr,
122 aarch32_sys_lr_svc,
123 aarch32_sys_lr_abt,
124 aarch32_sys_lr_und,
125 aarch32_sys_lr_mon,
126 aarch32_sys_lr_irq,
127 aarch32_sys_lr_fiq,
128 aarch32_sys_lr_usr,
129 aarch32_sys_cpsr,
130 aarch32_sys_apsr,
131 aarch32_sys_spsr, // not really a hardware register: stand in for aarch32_sys_spsr_*
132 aarch32_sys_spsr_hyp,
133 aarch32_sys_spsr_svc,
134 aarch32_sys_spsr_abt,
135 aarch32_sys_spsr_und,
136 aarch32_sys_spsr_mon,
137 aarch32_sys_spsr_irq,
138 aarch32_sys_spsr_fiq,
139 aarch32_sys_ipsr,
140 aarch32_sys_iepsr,
141 aarch32_sys_iapsr,
142 aarch32_sys_eapsr,
143 aarch32_sys_psr,
144 aarch32_sys_msp,
145 aarch32_sys_psp,
146 aarch32_sys_primask,
147 aarch32_sys_control,
148 aarch32_sys_fpsid,
149 aarch32_sys_fpscr,
150 aarch32_sys_fpexc,
151 aarch32_sys_fpinst,
152 aarch32_sys_fpinst2,
153 aarch32_sys_mvfr0,
154 aarch32_sys_mvfr1,
155 aarch32_sys_mvfr2,
156 aarch32_sys_itstate,
157 aarch32_sys_unknown // not really a hardware register; used internally by ROSE
158};
159
160} // namespace
161} // namespace
162
163#endif
164#endif
The ROSE library.
const char * Aarch32DebugRegister(int64_t)
Convert Rose::BinaryAnalysis::Aarch32DebugRegister enum constant to a string.
const char * Aarch32SystemRegister(int64_t)
Convert Rose::BinaryAnalysis::Aarch32SystemRegister enum constant to a string.
const char * Aarch32Exception(int64_t)
Convert Rose::BinaryAnalysis::Aarch32Exception enum constant to a string.
const char * Aarch32GeneralPurposeRegister(int64_t)
Convert Rose::BinaryAnalysis::Aarch32GeneralPurposeRegister enum constant to a string.
const char * Aarch32RegisterClass(int64_t)
Convert Rose::BinaryAnalysis::Aarch32RegisterClass enum constant to a string.