]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sme: Enable SME registers and pseudo-registers
authorLuis Machado <luis.machado@arm.com>
Tue, 7 Feb 2023 09:36:23 +0000 (09:36 +0000)
committerLuis Machado <luis.machado@arm.com>
Wed, 4 Oct 2023 15:23:39 +0000 (16:23 +0100)
commitca65640ff724f330e90e63ae0b14a195be79b4f6
tree1ad86912de1ab8a0a62166e4b8922626a732a1b5
parent89c4ee8398e3915c6685bb74057eb5644cf36959
sme: Enable SME registers and pseudo-registers

The SME (Scalable Matrix Extension) [1] exposes a new matrix register ZA with
variable sizes.  It also exposes a new mode called streaming mode.

Similarly to SVE, the ZA register size is dictated by a vector length, but the
SME vector length is called streaming vetor length. The total size for
ZA in a given moment is svl x svl.

In streaming mode, the SVE registers have their sizes based on svl rather than
the regular vector length (vl).

The feature detection is controlled by the HWCAP2_SME bit, but actual support
should be validated by attempting a ptrace call for one of the new register
sets: NT_ARM_ZA and NT_ARM_SSVE.

Due to its large size, the ZA register is exposed as a vector of bytes, but we
introduce a number of pseudo-registers that gives various different views
into the ZA contents. These can be arranged in a couple categories: tiles and
tile slices.

Tiles are matrices the same size or smaller than ZA.  Tile slices are vectors
which map to ZA's rows/columns in different ways.

A new dynamic target description is provided containing the ZA register, the SVG
register and the SVCR register.  The size of ZA, like the SVE vector registers,
is based on the vector length register SVG (VG for SVE).

This patch enables SME register support for gdb.

[1] https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/scalable-matrix-extension-armv9-a-architecture

Co-Authored-By: Ezra Sitorus <ezra.sitorus@arm.com>
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14 files changed:
gdb/Makefile.in
gdb/aarch64-linux-nat.c
gdb/aarch64-tdep.c
gdb/aarch64-tdep.h
gdb/arch/aarch64-scalable-linux.c [new file with mode: 0644]
gdb/arch/aarch64-scalable-linux.h [new file with mode: 0644]
gdb/arch/aarch64.c
gdb/arch/aarch64.h
gdb/configure.tgt
gdb/features/aarch64-sme.c [new file with mode: 0644]
gdb/nat/aarch64-scalable-linux-ptrace.c
gdb/nat/aarch64-scalable-linux-ptrace.h
gdb/nat/aarch64-scalable-linux-sigcontext.h
gdbserver/configure.srv