Skip to content

Commit 5c85083

Browse files
committed
[lldb][AArch64] Fix Apple M4 on Linux
This architecture implements SSVE but does not implement SVE.
1 parent 60b1d44 commit 5c85083

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,19 @@ NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
107107
if (NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET,
108108
native_thread.GetID(), &regset,
109109
&ioVec, sizeof(sve_header))
110-
.Success()) {
110+
.Success())
111111
opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskSVE);
112112

113-
// We may also have the Scalable Matrix Extension (SME) which adds a
114-
// streaming SVE mode.
115-
ioVec.iov_len = sizeof(sve_header);
116-
regset = NT_ARM_SSVE;
117-
if (NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET,
118-
native_thread.GetID(), &regset,
119-
&ioVec, sizeof(sve_header))
120-
.Success())
121-
opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskSSVE);
122-
}
113+
// We may also have the Scalable Matrix Extension (SME) which adds
114+
// a streaming SVE mode. Note that SVE and SSVE may implemented
115+
// independently, which is true on Apple's M4 architecture.
116+
ioVec.iov_len = sizeof(sve_header);
117+
regset = NT_ARM_SSVE;
118+
if (NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET,
119+
native_thread.GetID(), &regset,
120+
&ioVec, sizeof(sve_header))
121+
.Success())
122+
opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskSSVE);
123123

124124
sve::user_za_header za_header;
125125
ioVec.iov_base = &za_header;

0 commit comments

Comments
 (0)