16#define HWCAP_FPHP (1ULL << 9)
17#define HWCAP_ASIMDHP (1ULL << 10)
18#define HWCAP_DIT (1ULL << 24)
19#define HWCAP_SSBS (1ULL << 28)
20#define HWCAP_GCS (1ULL << 32)
22#define HWCAP2_BTI (1ULL << 17)
23#define HWCAP2_MTE (1ULL << 18)
24#define HWCAP2_AFP (1ULL << 20)
25#define HWCAP2_SME (1ULL << 23)
26#define HWCAP2_EBF16 (1ULL << 32)
27#define HWCAP2_FPMR (1ULL << 48)
29#define HWCAP3_MTE_STORE_ONLY (1ULL << 1)
42 static const FieldEnum fp8_format_enum(
"fp8_format_enum", {
52 {
"F8D", 6, 8, &fp8_format_enum},
53 {
"F8S2", 3, 5, &fp8_format_enum},
54 {
"F8S1", 0, 2, &fp8_format_enum},
105 std::vector<RegisterFlags::Field> fields;
108 fields.push_back({
"STORE_ONLY", 19});
112 {{0,
"TCF_NONE"}, {1,
"TCF_SYNC"}, {2,
"TCF_ASYNC"}, {3,
"TCF_ASYMM"}});
117 {
"TCF", 1, 2, &tcf_enum},
118 {
"TAGGED_ADDR_ENABLE", 0}});
129 "rmode_enum", {{0,
"RN"}, {1,
"RP"}, {2,
"RM"}, {3,
"RZ"}});
131 std::vector<RegisterFlags::Field> fpcr_fields{
132 {
"AHP", 26}, {
"DN", 25}, {
"FZ", 24}, {
"RMode", 22, 23, &rmode_enum},
139 fpcr_fields.push_back({
"FZ16", 19});
143 fpcr_fields.push_back({
"IDE", 15});
147 fpcr_fields.push_back({
"EBF", 13});
149 fpcr_fields.push_back({
"IXE", 12});
150 fpcr_fields.push_back({
"UFE", 11});
151 fpcr_fields.push_back({
"OFE", 10});
152 fpcr_fields.push_back({
"DZE", 9});
153 fpcr_fields.push_back({
"IOE", 8});
157 fpcr_fields.push_back({
"NEP", 2});
158 fpcr_fields.push_back({
"AH", 1});
159 fpcr_fields.push_back({
"FIZ", 0});
197 std::vector<RegisterFlags::Field> cpsr_fields{
198 {
"N", 31}, {
"Z", 30}, {
"C", 29}, {
"V", 28},
203 cpsr_fields.push_back({
"TCO", 25});
205 cpsr_fields.push_back({
"DIT", 24});
210 cpsr_fields.push_back({
"SS", 21});
211 cpsr_fields.push_back({
"IL", 20});
217 cpsr_fields.push_back({
"SSBS", 12});
219 cpsr_fields.push_back({
"BTYPE", 10, 11});
221 cpsr_fields.push_back({
"D", 9});
222 cpsr_fields.push_back({
"A", 8});
223 cpsr_fields.push_back({
"I", 7});
224 cpsr_fields.push_back({
"F", 6});
227 cpsr_fields.push_back({
"nRW", 4});
229 cpsr_fields.push_back({
"EL", 2, 3});
231 cpsr_fields.push_back({
"SP", 0});
239 reg.m_flags.SetFields(reg.m_detector(hwcap, hwcap2, hwcap3));
246 "Must call DetectFields before updating register info.");
251 std::vector<std::pair<llvm::StringRef, const RegisterFlags *>>
256 if (reg.m_flags.GetFields().size())
257 search_registers.push_back({reg.m_name, ®.m_flags});
267 for (uint32_t idx = 0; idx < num_regs && search_registers.size();
269 auto reg_it = std::find_if(
270 search_registers.cbegin(), search_registers.cend(),
271 [reg_info](
auto reg) { return reg.first == reg_info->name; });
273 if (reg_it != search_registers.end()) {
277 search_registers.erase(reg_it);
#define HWCAP3_MTE_STORE_ONLY
static Fields DetectFPCRFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
std::vector< RegisterFlags::Field > Fields
void DetectFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
For the registers listed in this class, detect which fields are present.
void UpdateRegisterInfo(const RegisterInfo *reg_info, uint32_t num_regs)
Add the field information of any registers named in this class, to the relevant RegisterInfo instance...
static Fields DetectSVCRFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
static Fields DetectFPMRFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
static Fields DetectFPSRFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
struct lldb_private::Arm64RegisterFlagsDetector::RegisterEntry m_registers[8]
static Fields DetectMTECtrlFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
static Fields DetectGCSFeatureFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
static Fields DetectCPSRFields(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3)
A class that represents a running process on the host machine.
Every register is described in detail including its name, alternate name (optional),...
const RegisterFlags * flags_type
If not nullptr, a type defined by XML descriptions.