[Lldb-commits] [lldb] [lldb][AArch64] Add SME2's ZT0 register (PR #70205)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 26 01:47:49 PDT 2023


github-actions[bot] wrote:


<!--LLVM CODE FORMAT COMMENT: {clang-format}-->

:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 23d6a6dfc1bc6e79bdcc48a59a0698a5b79262e9 3ed10ca4d37abce5114fe22110b587a0c78d2d0a -- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h lldb/source/Plugins/Process/elf-core/RegisterUtilities.h lldb/test/API/commands/register/register/aarch64_sme_z_registers/save_restore/main.c lldb/test/API/commands/register/register/aarch64_sme_z_registers/za_dynamic_resize/main.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index b4ae5dd7c35c..c93782e2d411 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -666,9 +666,9 @@ NativeRegisterContextLinux_arm64::CacheAllRegisters(uint32_t &cached_size) {
     // 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().IsZTEnabled() &&
-      // And ZA is active, which means that ZT0 is also active.
+        // If we have ZT0, or in other words, if we have SME2.
+        GetRegisterInfo().IsZTEnabled() &&
+        // 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
@@ -790,10 +790,10 @@ Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
   // If we leave ZA/ZT0 inactive and read ZT0, the kernel returns 0s. Therefore
   // there's nothing for us to restore if ZA was originally inactive.
   if (
-    // If we have SME2 and therefore ZT0.
-    GetRegisterInfo().IsZTEnabled() &&
-    // And ZA is enabled.
-    m_za_header.size > sizeof(m_za_header))
+      // If we have SME2 and therefore ZT0.
+      GetRegisterInfo().IsZTEnabled() &&
+      // And ZA is enabled.
+      m_za_header.size > sizeof(m_za_header))
     dst = AddSavedRegisters(dst, RegisterSetType::SME2, GetZTBuffer(),
                             GetZTBufferSize());
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/70205


More information about the lldb-commits mailing list