[Lldb-commits] [lldb] 8d80a45 - Revert "[lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (#66768)"

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 25 01:27:51 PDT 2023


Author: David Spickett
Date: 2023-10-25T08:27:27Z
New Revision: 8d80a452b841a211e0f3bce01a01c9a015d287f3

URL: https://github.com/llvm/llvm-project/commit/8d80a452b841a211e0f3bce01a01c9a015d287f3
DIFF: https://github.com/llvm/llvm-project/commit/8d80a452b841a211e0f3bce01a01c9a015d287f3.diff

LOG: Revert "[lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (#66768)"

This reverts commit f2c09e5e16d592303b5a1c158cdef28ef08104f0, due to compilation
failures on buildbots.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
    lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
    lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
index e6e6c12d0404aed..60070819cb92699 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
@@ -374,17 +374,6 @@ void RegisterInfoPOSIX_arm64::AddRegSetSME() {
       std::make_pair(sme_regnum, m_dynamic_reg_infos.size());
   m_dynamic_reg_sets.push_back(g_reg_set_sme_arm64);
   m_dynamic_reg_sets.back().registers = m_sme_regnum_collection.data();
-
-  // When vg is written during streaming mode, svg will also change, as vg and
-  // svg in this state are both showing the streaming vector length.
-  // We model this as vg invalidating svg. In non-streaming mode this doesn't
-  // happen but to keep things simple we will invalidate svg anyway.
-  //
-  // This must be added now, rather than when vg is defined because SME is a
-  // dynamic set that may or may not be present.
-  static const uint32_t vg_invalidates[] = {sme_regnum + 1 /*svg*/,
-                                            LLDB_INVALID_REGNUM};
-  m_dynamic_reg_infos[GetRegNumSMESVG()].invalidate_regs = vg_invalidates;
 }
 
 uint32_t RegisterInfoPOSIX_arm64::ConfigureVectorLengthSVE(uint32_t sve_vq) {

diff  --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index 72280927471f883..b127d3d6213a4aa 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -783,11 +783,6 @@ void GDBRemoteRegisterContext::AArch64Reconfigure() {
   std::optional<uint64_t> svg_reg_value;
   const RegisterInfo *svg_reg_info = m_reg_info_sp->GetRegisterInfo("svg");
   if (svg_reg_info) {
-    // When vg is written it is automatically made invalid. Writing vg will also
-    // change svg if we're in streaming mode but it will not be made invalid
-    // so do this manually so the following read gets the latest svg value.
-    SetRegisterIsValid(svg_reg_info, false);
-
     uint32_t svg_reg_num = svg_reg_info->kinds[eRegisterKindLLDB];
     uint64_t reg_value = ReadRegisterAsUnsigned(svg_reg_num, fail_value);
     if (reg_value != fail_value && reg_value <= 32)

diff  --git a/lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py b/lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py
index d2a26ce71bde1d8..65d1071c26b2a34 100644
--- a/lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py
+++ b/lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py
@@ -125,13 +125,11 @@ def za_test_impl(self, enable_za):
                 self.runCmd("thread select %d" % (idx + 1))
                 self.check_za_register(4, 2)
                 self.runCmd("register write vg 2")
-                self.check_disabled_za_register(2)
 
             elif stopped_at_line_number == thY_break_line1:
                 self.runCmd("thread select %d" % (idx + 1))
                 self.check_za_register(2, 3)
                 self.runCmd("register write vg 4")
-                self.check_disabled_za_register(4)
 
         self.runCmd("thread continue 2")
         self.runCmd("thread continue 3")


        


More information about the lldb-commits mailing list