LLDB mainline
RegisterContextPOSIX_arm64.h
Go to the documentation of this file.
1//===-- RegisterContextPOSIX_arm64.h ----------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM64_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM64_H
11
15#include "lldb/Utility/Log.h"
16
18public:
21 std::unique_ptr<RegisterInfoPOSIX_arm64> register_info);
22
24
25 void Invalidate();
26
27 void InvalidateAllRegisters() override;
28
29 size_t GetRegisterCount() override;
30
31 virtual size_t GetGPRSize();
32
33 virtual unsigned GetRegisterSize(unsigned reg);
34
35 virtual unsigned GetRegisterOffset(unsigned reg);
36
37 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
38
39 size_t GetRegisterSetCount() override;
40
41 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
42
43 const char *GetRegisterName(unsigned reg);
44
45protected:
46 std::unique_ptr<RegisterInfoPOSIX_arm64> m_register_info_up;
47
49
50 bool IsGPR(unsigned reg);
51
52 bool IsFPR(unsigned reg);
53
54 size_t GetFPUSize() { return sizeof(RegisterInfoPOSIX_arm64::FPU); }
55
56 bool IsSVE(unsigned reg) const;
57 bool IsPAuth(unsigned reg) const;
58 bool IsTLS(unsigned reg) const;
59 bool IsSME(unsigned reg) const;
60 bool IsMTE(unsigned reg) const;
61
62 bool IsSVEZ(unsigned reg) const { return m_register_info_up->IsSVEZReg(reg); }
63 bool IsSVEP(unsigned reg) const { return m_register_info_up->IsSVEPReg(reg); }
64 bool IsSVEVG(unsigned reg) const {
65 return m_register_info_up->IsSVERegVG(reg);
66 }
67 bool IsSMEZA(unsigned reg) const {
68 return m_register_info_up->IsSMERegZA(reg);
69 }
70
71 uint32_t GetRegNumSVEZ0() const {
72 return m_register_info_up->GetRegNumSVEZ0();
73 }
74 uint32_t GetRegNumSVEFFR() const {
75 return m_register_info_up->GetRegNumSVEFFR();
76 }
77 uint32_t GetRegNumFPCR() const { return m_register_info_up->GetRegNumFPCR(); }
78 uint32_t GetRegNumFPSR() const { return m_register_info_up->GetRegNumFPSR(); }
79
80 virtual bool ReadGPR() = 0;
81 virtual bool ReadFPR() = 0;
82 virtual bool WriteGPR() = 0;
83 virtual bool WriteFPR() = 0;
84};
85
86#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM64_H
virtual bool ReadGPR()=0
virtual unsigned GetRegisterOffset(unsigned reg)
virtual unsigned GetRegisterSize(unsigned reg)
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
virtual bool ReadFPR()=0
~RegisterContextPOSIX_arm64() override
std::unique_ptr< RegisterInfoPOSIX_arm64 > m_register_info_up
bool IsSMEZA(unsigned reg) const
virtual bool WriteGPR()=0
virtual bool WriteFPR()=0
const char * GetRegisterName(unsigned reg)
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
bool IsSVEVG(unsigned reg) const
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.