[Lldb-commits] [lldb] [lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (PR #66768)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 6 08:35:33 PDT 2023
================
@@ -783,6 +783,11 @@ 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.
----------------
DavidSpickett wrote:
>From what I've seen there's 2 scenarios to handle:
* Explicit write by the user to vg.
* We have just stopped and need to get the potentially new svg and vg.
The code as it was handled both but is really using mechanisms meant to handle the second scenario.
I have done what you suggest in a fixup commit, making vg invalidate svg. This will handle the first scenario specifically. If you approve of that I'll update the commit message prior to landing to explain that we have these two handlers for the 2 scenarios, and when/if they overlap, it is not a problem.
All of this is pessimistic, we assume any change to vg in any mode will invalidate svg. I think this is fine though because reading svg again is cheap, and getting the vector lengths mixed would waste a lot of user's time.
https://github.com/llvm/llvm-project/pull/66768
More information about the lldb-commits
mailing list