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)
59 {{0,
"TCF_NONE"}, {1,
"TCF_SYNC"}, {2,
"TCF_ASYNC"}, {3,
"TCF_ASYMM"}});
60 return {{
"TAGS", 3, 18},
61 {
"TCF", 1, 2, &tcf_enum},
62 {
"TAGGED_ADDR_ENABLE", 0}};
68 "rmode_enum", {{0,
"RN"}, {1,
"RP"}, {2,
"RM"}, {3,
"RZ"}});
70 std::vector<RegisterFlags::Field> fpcr_fields{
71 {
"AHP", 26}, {
"DN", 25}, {
"FZ", 24}, {
"RMode", 22, 23, &rmode_enum},
78 fpcr_fields.push_back({
"FZ16", 19});
82 fpcr_fields.push_back({
"IDE", 15});
86 fpcr_fields.push_back({
"EBF", 13});
88 fpcr_fields.push_back({
"IXE", 12});
89 fpcr_fields.push_back({
"UFE", 11});
90 fpcr_fields.push_back({
"OFE", 10});
91 fpcr_fields.push_back({
"DZE", 9});
92 fpcr_fields.push_back({
"IOE", 8});
96 fpcr_fields.push_back({
"NEP", 2});
97 fpcr_fields.push_back({
"AH", 1});
98 fpcr_fields.push_back({
"FIZ", 0});
131 std::vector<RegisterFlags::Field> cpsr_fields{
132 {
"N", 31}, {
"Z", 30}, {
"C", 29}, {
"V", 28},
137 cpsr_fields.push_back({
"TCO", 25});
139 cpsr_fields.push_back({
"DIT", 24});
144 cpsr_fields.push_back({
"SS", 21});
145 cpsr_fields.push_back({
"IL", 20});
151 cpsr_fields.push_back({
"SSBS", 12});
153 cpsr_fields.push_back({
"BTYPE", 10, 11});
155 cpsr_fields.push_back({
"D", 9});
156 cpsr_fields.push_back({
"A", 8});
157 cpsr_fields.push_back({
"I", 7});
158 cpsr_fields.push_back({
"F", 6});
161 cpsr_fields.push_back({
"nRW", 4});
163 cpsr_fields.push_back({
"EL", 2, 3});
165 cpsr_fields.push_back({
"SP", 0});
172 reg.m_flags.SetFields(reg.m_detector(hwcap, hwcap2));
179 "Must call DetectFields before updating register info.");
184 std::vector<std::pair<llvm::StringRef, const RegisterFlags *>>
189 if (reg.m_flags.GetFields().size())
190 search_registers.push_back({reg.m_name, ®.m_flags});
200 for (uint32_t idx = 0; idx < num_regs && search_registers.size();
202 auto reg_it = std::find_if(
203 search_registers.cbegin(), search_registers.cend(),
204 [reg_info](
auto reg) { return reg.first == reg_info->name; });
206 if (reg_it != search_registers.end()) {
210 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)
struct lldb_private::Arm64RegisterFlagsDetector::RegisterEntry m_registers[5]
static Fields DetectSVCRFields(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.