Skip to content

Commit d3fb05b

Browse files
[lldb][AArch64][Linux] Add SME2 release notes and usage docs (#70935)
ZT0 is much like ZA apart from not being scalable, so there's not much new to cover.
1 parent 76b53a0 commit d3fb05b

File tree

2 files changed

+43
-4
lines changed

2 files changed

+43
-4
lines changed

lldb/docs/use/aarch64-linux.rst

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,48 @@ instrucion could interpret its contents as many kinds and sizes of data.
194194
So LLDB will default to showing ``za`` as one large vector of individual bytes.
195195
You can override this with a format option (see the SVE example above).
196196

197-
Expression evaluation
197+
Expression Evaluation
198198
.....................
199199

200200
The mode (streaming or non-streaming), streaming vector length and ZA state will
201201
be restored after expression evaluation. On top of all the things saved for SVE
202202
in general.
203+
204+
Scalable Matrix Extension (SME2)
205+
--------------------------------
206+
207+
The Scalable Matrix Extension 2 is documented in the same architecture
208+
specification as SME, and covered by the same kernel documentation page as SME.
209+
210+
SME2 adds 1 new register, ``zt0``. This register is a fixed size 512 bit
211+
register that is used by new instructions added in SME2. It is shown in LLDB in
212+
the existing SME register set.
213+
214+
``zt0`` can be active or inactive, as ``za`` can. The same ``SVCR.ZA`` bit
215+
controls this. An inactive ``zt0`` is shown as 0s, like ``za`` is. Though in
216+
``zt0``'s case, LLDB does not need to fake the value. Ptrace already returns a
217+
block of 0s for an inactive ``zt0``.
218+
219+
Like ``za``, writing to an inactive ``zt0`` will enable it and ``za``. This can
220+
be done from within LLDB. If the write is instead to ``za``, ``zt0`` becomes
221+
active but with a value of all 0s.
222+
223+
Since ``svcr`` is read only, there is no way at this time to deactivate the
224+
registers from within LLDB (though of course a running process can still do
225+
this).
226+
227+
To check whether ``zt0`` is active, refer to ``SVCR.ZA`` and not to the value of
228+
``zt0``.
229+
230+
ZT0 Register Presentation
231+
.........................
232+
233+
As for ``za``, the meaning of ``zt0`` depends on the instructions used with it,
234+
so LLDB does not attempt to guess this and defaults to showing it as a vector of
235+
bytes.
236+
237+
Expression Evaluation
238+
.....................
239+
240+
``zt0``'s value and whether it is active or not will be saved prior to
241+
expression evaluation and restored afterwards.

llvm/docs/ReleaseNotes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ Changes to LLDB
236236
instructions have been updated to reflect this. The underlying functionality
237237
remains unchanged.
238238
* The ``mte_ctrl`` register can now be read from AArch64 Linux core files.
239-
240-
* LLDB now supports debugging the Scalable Matrix Extension (SME) on AArch64
241-
Linux for both running processes and core files. For details refer to the
239+
* LLDB on AArch64 Linux now supports debugging the Scalable Matrix Extension
240+
(SME) and Scalable Matrix Extension 2 (SME2) for both live processes and core
241+
files. For details refer to the
242242
`AArch64 Linux documentation <https://lldb.llvm.org/use/aarch64-linux.html>`_.
243243

244244
Changes to Sanitizers

0 commit comments

Comments
 (0)