16#define HWCAP_FPHP (1ULL << 9)
17#define HWCAP_ASIMDHP (1ULL << 10)
18#define HWCAP_DIT (1ULL << 24)
19#define HWCAP_SSBS (1ULL << 28)
21#define HWCAP2_BTI (1ULL << 17)
22#define HWCAP2_MTE (1ULL << 18)
23#define HWCAP2_AFP (1ULL << 20)
24#define HWCAP2_SME (1ULL << 23)
25#define HWCAP2_EBF16 (1ULL << 32)
26#define HWCAP2_FPMR (1ULL << 48)
37 static const FieldEnum fp8_format_enum(
"fp8_format_enum", {
47 {
"F8D", 6, 8, &fp8_format_enum},
48 {
"F8S2", 3, 5, &fp8_format_enum},
49 {
"F8S1", 0, 2, &fp8_format_enum},
83 {{0,
"TCF_NONE"}, {1,
"TCF_SYNC"}, {2,
"TCF_ASYNC"}, {3,
"TCF_ASYMM"}});
84 return {{
"TAGS", 3, 18},
85 {
"TCF", 1, 2, &tcf_enum},
86 {
"TAGGED_ADDR_ENABLE", 0}};
92 "rmode_enum", {{0,
"RN"}, {1,
"RP"}, {2,
"RM"}, {3,
"RZ"}});
94 std::vector<RegisterFlags::Field> fpcr_fields{
95 {
"AHP", 26}, {
"DN", 25}, {
"FZ", 24}, {
"RMode", 22, 23, &rmode_enum},
102 fpcr_fields.push_back({
"FZ16", 19});
106 fpcr_fields.push_back({
"IDE", 15});
110 fpcr_fields.push_back({
"EBF", 13});
112 fpcr_fields.push_back({
"IXE", 12});
113 fpcr_fields.push_back({
"UFE", 11});
114 fpcr_fields.push_back({
"OFE", 10});
115 fpcr_fields.push_back({
"DZE", 9});
116 fpcr_fields.push_back({
"IOE", 8});
120 fpcr_fields.push_back({
"NEP", 2});
121 fpcr_fields.push_back({
"AH", 1});
122 fpcr_fields.push_back({
"FIZ", 0});
155 std::vector<RegisterFlags::Field> cpsr_fields{
156 {
"N", 31}, {
"Z", 30}, {
"C", 29}, {
"V", 28},
161 cpsr_fields.push_back({
"TCO", 25});
163 cpsr_fields.push_back({
"DIT", 24});
168 cpsr_fields.push_back({
"SS", 21});
169 cpsr_fields.push_back({
"IL", 20});
175 cpsr_fields.push_back({
"SSBS", 12});
177 cpsr_fields.push_back({
"BTYPE", 10, 11});
179 cpsr_fields.push_back({
"D", 9});
180 cpsr_fields.push_back({
"A", 8});
181 cpsr_fields.push_back({
"I", 7});
182 cpsr_fields.push_back({
"F", 6});
185 cpsr_fields.push_back({
"nRW", 4});
187 cpsr_fields.push_back({
"EL", 2, 3});
189 cpsr_fields.push_back({
"SP", 0});
196 reg.m_flags.SetFields(reg.m_detector(hwcap, hwcap2));
203 "Must call DetectFields before updating register info.");
208 std::vector<std::pair<llvm::StringRef, const RegisterFlags *>>
213 if (reg.m_flags.GetFields().size())
214 search_registers.push_back({reg.m_name, ®.m_flags});
224 for (uint32_t idx = 0; idx < num_regs && search_registers.size();
226 auto reg_it = std::find_if(
227 search_registers.cbegin(), search_registers.cend(),
228 [reg_info](
auto reg) { return reg.first == reg_info->name; });
230 if (reg_it != search_registers.end()) {
234 search_registers.erase(reg_it);
std::vector< RegisterFlags::Field > Fields
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 DetectFPSRFields(uint64_t hwcap, uint64_t hwcap2)
static Fields DetectSVCRFields(uint64_t hwcap, uint64_t hwcap2)
struct lldb_private::Arm64RegisterFlagsDetector::RegisterEntry m_registers[6]
static Fields DetectFPMRFields(uint64_t hwcap, uint64_t hwcap2)
static Fields DetectCPSRFields(uint64_t hwcap, uint64_t hwcap2)
static Fields DetectMTECtrlFields(uint64_t hwcap, uint64_t hwcap2)
void DetectFields(uint64_t hwcap, uint64_t hwcap2)
For the registers listed in this class, detect which fields are present.
static Fields DetectFPCRFields(uint64_t hwcap, uint64_t hwcap2)
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.