================
@@ -79,36 +81,45 @@ class NativeRegisterContextLinux_arm64
lldb::addr_t FixWatchpointHitAddress(lldb::addr_t hit_addr) override;
private:
- enum RegisterSetType : uint32_t {
- GPR, // General purpose registers.
- SVE, // Used for SVE registers in streaming or non-streaming mode.
- FPR, // When there is no SVE, or SVE in FPSIMD mode, or streaming only SVE
- // that is in non-streaming mode.
- // Pointer authentication registers are read only, so not included here.
- MTE, // Memory tagging control registers.
- TLS, // Thread local storage registers.
- SME, // ZA only, because SVCR and SVG are pseudo registers.
- SME2, // ZT only.
- FPMR, // Floating point mode control registers.
- GCS, // Guarded Control Stack registers.
- POE, // Permission Overlay registers.
+ // Bit mask enum used to refer to the types of registers we support.
Currently
+ // used for tracking cache validity and ReadAll/WriteAllRegister data. Will
+ // be used for much more in future.
+ enum class RegisterSetType : uint32_t {
+ GPR = 1 << 0, // General purpose registers.
+ FPR = 1 << 1, // When there is no SVE, or SVE in FPSIMD mode, or streaming
+ // only SVE that is in non-streaming mode.
+ SVE = 1 << 2, // Used for SVE registers in streaming or non-streaming mode.
+ SVE_HEADER = 1 << 3, // Only the ptrace header for SVE.
+ PAC = 1 << 4, // Pointer authentication mask registers.
+ MTE = 1 << 5, // Memory tagging control registers.
+ TLS = 1 << 6, // Thread local storage registers.
+ ZA = 1 << 7, // ZA only, because SVCR and SVG are pseudo registers.
+ ZA_HEADER = 1 << 8, // Only the ptrace header for ZA.
+ ZT = 1 << 9, // ZT only.
+ FPMR = 1 << 10, // Floating point mode control registers.
+ GCS = 1 << 11, // Guarded Control Stack registers.
+ POE = 1 << 12, // Permission Overlay registers.
+ LLVM_MARK_AS_BITMASK_ENUM(POE),
----------------
Teemperor wrote:
<PersonalOpinion> I like having the comments before each enum case as the
inline-comments become hard to read once they spawn several rows or the
identifier gets too long.</PersonalOpinion>
https://github.com/llvm/llvm-project/pull/197113
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits