[Lldb-commits] [lldb] [lldb][AArch64] Fix Apple M4 on Linux (PR #135563)

2025-04-14 Thread Marcel Laverdet via lldb-commits

https://github.com/laverdet reopened 
https://github.com/llvm/llvm-project/pull/135563
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb][AArch64] Fix Apple M4 on Linux (PR #135563)

2025-04-13 Thread Marcel Laverdet via lldb-commits

https://github.com/laverdet created 
https://github.com/llvm/llvm-project/pull/135563

This architecture implements SSVE but does not implement SVE.

More information is included in #121693

cc: @DavidSpickett

>From 5c85083f41230ec83bd862ebf2723d03d9bcfb65 Mon Sep 17 00:00:00 2001
From: Marcel Laverdet 
Date: Sun, 13 Apr 2025 15:41:56 -0500
Subject: [PATCH] [lldb][AArch64] Fix Apple M4 on Linux

This architecture implements SSVE but does not implement SVE.
---
 .../NativeRegisterContextLinux_arm64.cpp  | 22 +--
 1 file changed, 11 insertions(+), 11 deletions(-)

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;

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb][AArch64] Fix Apple M4 on Linux (PR #135563)

2025-04-14 Thread Marcel Laverdet via lldb-commits

https://github.com/laverdet closed 
https://github.com/llvm/llvm-project/pull/135563
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb][AArch64] Fix Apple M4 on Linux (PR #135563)

2025-04-15 Thread Marcel Laverdet via lldb-commits

laverdet wrote:

Closing this since Docker on macOS simply disabled SME, SVE, etc. I believe 
this is still an issue in theory for users with Linux installed directly on M4 
hardware but if such a user exists I haven't heard of them.

https://github.com/llvm/llvm-project/pull/135563
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits