[Lldb-commits] [lldb] [lldb][AArch64] Add SME2's ZT0 register (PR #70205)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 1 01:54:25 PDT 2023
================
@@ -624,6 +661,21 @@ NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) {
error = ReadZA();
if (error.Fail())
return error;
+
+ // We will only be restoring ZT data if ZA is active. As writing to an
+ // inactive ZT enables ZA, which may not be desireable.
+ if (
+ // If we have ZT0, or in other words, if we have SME2.
+ GetRegisterInfo().IsZTPresent() &&
+ // And ZA is active, which means that ZT0 is also active.
+ m_za_header.size > sizeof(m_za_header)) {
+ cached_size += sizeof(RegisterSetType) + GetZTBufferSize();
+ // Unlike ZA where we have to fake data for an inactive ZA, the kernel
+ // handles an inactive ZA for us and always returns some data.
----------------
DavidSpickett wrote:
Done.
https://github.com/llvm/llvm-project/pull/70205
More information about the lldb-commits
mailing list