[Lldb-commits] [PATCH] D157845: [lldb][AArch64] Remove bool return from UpdateARM64SVERegistersInfos
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 5 02:04:07 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf6b6234d14d2: [lldb][AArch64] Remove bool return from UpdateARM64SVERegistersInfos (authored by DavidSpickett).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157845/new/
https://reviews.llvm.org/D157845
Files:
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
@@ -38,7 +38,7 @@
~GDBRemoteDynamicRegisterInfo() override = default;
- bool UpdateARM64SVERegistersInfos(uint64_t vg);
+ void UpdateARM64SVERegistersInfos(uint64_t vg);
};
class GDBRemoteRegisterContext : public RegisterContext {
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -772,27 +772,28 @@
uint32_t vg_reg_num = reg_info->kinds[eRegisterKindLLDB];
uint64_t vg_reg_value = ReadRegisterAsUnsigned(vg_reg_num, fail_value);
- if (vg_reg_value != fail_value && vg_reg_value <= 32) {
- const RegisterInfo *reg_info = m_reg_info_sp->GetRegisterInfo("p0");
- if (!reg_info || vg_reg_value == reg_info->byte_size)
- return false;
+ if (vg_reg_value == fail_value || vg_reg_value > 32)
+ return false;
- if (m_reg_info_sp->UpdateARM64SVERegistersInfos(vg_reg_value)) {
- // Make a heap based buffer that is big enough to store all registers
- m_reg_data.SetData(std::make_shared<DataBufferHeap>(
- m_reg_info_sp->GetRegisterDataByteSize(), 0));
- m_reg_data.SetByteOrder(GetByteOrder());
+ reg_info = m_reg_info_sp->GetRegisterInfo("p0");
+ // Predicate registers have 1 bit per byte in the vector so their size is
+ // VL / 8. VG is in units of 8 bytes already, so if the size of p0 == VG
+ // already, we do not have to reconfigure.
+ if (!reg_info || vg_reg_value == reg_info->byte_size)
+ return false;
- InvalidateAllRegisters();
+ m_reg_info_sp->UpdateARM64SVERegistersInfos(vg_reg_value);
+ // Make a heap based buffer that is big enough to store all registers
+ m_reg_data.SetData(std::make_shared<DataBufferHeap>(
+ m_reg_info_sp->GetRegisterDataByteSize(), 0));
+ m_reg_data.SetByteOrder(GetByteOrder());
- return true;
- }
- }
+ InvalidateAllRegisters();
- return false;
+ return true;
}
-bool GDBRemoteDynamicRegisterInfo::UpdateARM64SVERegistersInfos(uint64_t vg) {
+void GDBRemoteDynamicRegisterInfo::UpdateARM64SVERegistersInfos(uint64_t vg) {
// SVE Z register size is vg x 8 bytes.
uint32_t z_reg_byte_size = vg * 8;
@@ -813,5 +814,4 @@
// Re-calculate register offsets
ConfigureOffsets();
- return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157845.555835.patch
Type: text/x-patch
Size: 2672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230905/e27285ca/attachment.bin>
More information about the lldb-commits
mailing list