[Lldb-commits] [lldb] be5f35e - lldb: Fix usage of sve functions on arm64
Manoj Gupta via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 27 15:00:27 PDT 2023
Author: Manoj Gupta
Date: 2023-04-27T14:59:49-07:00
New Revision: be5f35e24f4c15caf3c4aeccddc54c52560c28a0
URL: https://github.com/llvm/llvm-project/commit/be5f35e24f4c15caf3c4aeccddc54c52560c28a0
DIFF: https://github.com/llvm/llvm-project/commit/be5f35e24f4c15caf3c4aeccddc54c52560c28a0.diff
LOG: lldb: Fix usage of sve functions on arm64
Use correct internal sve functions for arm64.
Otherwise, when cross-compling lld for AArch64 there are build
errors like:
NativeRegisterContextLinux_arm64.cpp:936:11:
error: use of undeclared identifier 'sve_vl_valid
NativeRegisterContextLinux_arm64.cpp:63:28:
error: variable has incomplete type 'struct user_sve_header'
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D148752
Added:
Modified:
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index c57b9499d5247..0ec152f0643a4 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -61,7 +61,7 @@ NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
case llvm::Triple::aarch64: {
// Configure register sets supported by this AArch64 target.
// Read SVE header to check for SVE support.
- struct user_sve_header sve_header;
+ struct sve::user_sve_header sve_header;
struct iovec ioVec;
ioVec.iov_base = &sve_header;
ioVec.iov_len = sizeof(sve_header);
@@ -380,7 +380,7 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
if (GetRegisterInfo().IsSVERegVG(reg)) {
uint64_t vg_value = reg_value.GetAsUInt64();
- if (sve_vl_valid(vg_value * 8)) {
+ if (sve::vl_valid(vg_value * 8)) {
if (m_sve_header_is_valid && vg_value == GetSVERegVG())
return error;
@@ -566,7 +566,7 @@ Status NativeRegisterContextLinux_arm64::WriteAllRegisterValues(
if (contains_sve_reg_data) {
// We have SVE register data first write SVE header.
::memcpy(GetSVEHeader(), src, GetSVEHeaderSize());
- if (!sve_vl_valid(m_sve_header.vl)) {
+ if (!sve::vl_valid(m_sve_header.vl)) {
m_sve_header_is_valid = false;
error.SetErrorStringWithFormat("NativeRegisterContextLinux_arm64::%s "
"Invalid SVE header in data_sp",
@@ -934,7 +934,7 @@ void NativeRegisterContextLinux_arm64::ConfigureRegisterContext() {
// On every stop we configure SVE vector length by calling
// ConfigureVectorLength regardless of current SVEState of this thread.
uint32_t vq = RegisterInfoPOSIX_arm64::eVectorQuadwordAArch64SVE;
- if (sve_vl_valid(m_sve_header.vl))
+ if (sve::vl_valid(m_sve_header.vl))
vq = sve::vq_from_vl(m_sve_header.vl);
GetRegisterInfo().ConfigureVectorLength(vq);
More information about the lldb-commits
mailing list