[Lldb-commits] [lldb] [lldb][AArch64] Fix Apple M4 on Linux (PR #135563)
via lldb-commits
lldb-commits at lists.llvm.org
Sun Apr 13 13:44:45 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Marcel Laverdet (laverdet)
<details>
<summary>Changes</summary>
This architecture implements SSVE but does not implement SVE.
More information is included in #<!-- -->121693
cc: @<!-- -->DavidSpickett
---
Full diff: https://github.com/llvm/llvm-project/pull/135563.diff
1 Files Affected:
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp (+11-11)
``````````diff
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index 884c7d4b9e359..f540a160c901a 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -107,19 +107,19 @@ NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
if (NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET,
native_thread.GetID(), ®set,
&ioVec, sizeof(sve_header))
- .Success()) {
+ .Success())
opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskSVE);
- // We may also have the Scalable Matrix Extension (SME) which adds a
- // streaming SVE mode.
- ioVec.iov_len = sizeof(sve_header);
- regset = NT_ARM_SSVE;
- if (NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET,
- native_thread.GetID(), ®set,
- &ioVec, sizeof(sve_header))
- .Success())
- opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskSSVE);
- }
+ // We may also have the Scalable Matrix Extension (SME) which adds
+ // a streaming SVE mode. Note that SVE and SSVE may implemented
+ // independently, which is true on Apple's M4 architecture.
+ ioVec.iov_len = sizeof(sve_header);
+ regset = NT_ARM_SSVE;
+ if (NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET,
+ native_thread.GetID(), ®set,
+ &ioVec, sizeof(sve_header))
+ .Success())
+ opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskSSVE);
sve::user_za_header za_header;
ioVec.iov_base = &za_header;
``````````
</details>
https://github.com/llvm/llvm-project/pull/135563
More information about the lldb-commits
mailing list