[Lldb-commits] [PATCH] D82863: [LLDB] Add support to resize SVE registers at run-time

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 7 15:22:02 PDT 2020


omjavaid added inline comments.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp:767
+      m_reg_data.Clear();
+      m_reg_data.SetData(reg_data_sp);
+      m_reg_data.SetByteOrder(GetByteOrder());
----------------
jasonmolenda wrote:
> I'm probably not following this correctly, but isn't this going to shorten the register buffer m_reg_data to the end of the SVE registers in the buffer, right?  If the goal here is to create a heap object, why not just copy the entire m_data_reg?  If someone ever adds a register past the SVE's, this would truncate it away.  
Register data can expand on shrink based on vector length update of SVE register set. So heap size will change accordingly.
We need to preserve VG register and GPRs from current register data so we copy the whole data in case vector length update caused register data to expand. However we truncate data to new vector length in case vector length has shrunk. All register past VG registers are invalidated anyways. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82863/new/

https://reviews.llvm.org/D82863



More information about the lldb-commits mailing list