Author: David Spickett Date: 2023-09-20T16:05:34+01:00 New Revision: fdc265be26483be1e081ea3f1e11d78b8cc488af
URL: https://github.com/llvm/llvm-project/commit/fdc265be26483be1e081ea3f1e11d78b8cc488af DIFF: https://github.com/llvm/llvm-project/commit/fdc265be26483be1e081ea3f1e11d78b8cc488af.diff LOG: [lldb][AArch64] Invalidate cached VG value before reconfiguring SVE registers This fixes 46b961f36bc5b1105356d1701f0c7c9d439be9c8. Prior to the SME changes the steps were: * Invalidate all registers. * Update value of VG and use that to reconfigure the registers. * Invalidate all registers again. With the changes for SME I removed the initial invalidate thinking that it didn't make sense to do if we were going to invalidate them all anyway after reconfiguring. Well the reason it made sense was that it forced us to get the latest value of vg which we needed to reconfigure properly. Not doing so caused a test failure on our Graviton bot which has SVE (https://lab.llvm.org/buildbot/#/builders/96/builds/45722). It was flaky and looping it locally would always fail within a few minutes. Presumably it was using an invalid value of vg, which caused some offsets to be calculated incorrectly. To fix this I've invalided vg in AArch64Reconfigure just before we read it. This is the same as the fix I have in review for SME's svg register. Pushing this directly to fix the ongoing test failure. Added: Modified: lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp index 16dde28f6ee5396..b127d3d6213a4aa 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -772,6 +772,8 @@ void GDBRemoteRegisterContext::AArch64Reconfigure() { std::optional<uint64_t> vg_reg_value; const RegisterInfo *vg_reg_info = m_reg_info_sp->GetRegisterInfo("vg"); if (vg_reg_info) { + // Make sure we get the latest value of vg from the remote. + SetRegisterIsValid(vg_reg_info, false); uint32_t vg_reg_num = vg_reg_info->kinds[eRegisterKindLLDB]; uint64_t reg_value = ReadRegisterAsUnsigned(vg_reg_num, fail_value); if (reg_value != fail_value && reg_value <= 32) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits