[v2,4/5] gdb: add a "matrix" register group
Checks
Commit Message
From: "Rohr, Stephan" <stephan.rohr@intel.com>
Add "matrix" as a new standard register group, next to the "vector"
register group. Architectures can use it for registers that hold
matrices, which can then be listed with "info registers matrix".
By default, no register is part of the group.
This is in preparation to add Intel AMX registers as user registers.
---
gdb/NEWS | 3 +++
gdb/doc/gdb.texinfo | 6 ++++--
gdb/reggroups.c | 3 +++
gdb/reggroups.h | 1 +
4 files changed, 11 insertions(+), 2 deletions(-)
Comments
> From: Stephan Rohr <stephan.rohr@intel.com>
> Cc: pedro@palves.net,
> eliz@gnu.org,
> jhb@FreeBSD.org,
> luis.machado@arm.com
> Date: Fri, 30 Oct 2026 11:50:15 +0000
>
> From: "Rohr, Stephan" <stephan.rohr@intel.com>
>
> Add "matrix" as a new standard register group, next to the "vector"
> register group. Architectures can use it for registers that hold
> matrices, which can then be listed with "info registers matrix".
>
> By default, no register is part of the group.
>
> This is in preparation to add Intel AMX registers as user registers.
> ---
> gdb/NEWS | 3 +++
> gdb/doc/gdb.texinfo | 6 ++++--
> gdb/reggroups.c | 3 +++
> gdb/reggroups.h | 1 +
> 4 files changed, 11 insertions(+), 2 deletions(-)
The documentation parts are okay, thanks.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
@@ -49,6 +49,9 @@
source is modified. Source tracking can be enabled with 'set
breakpoint source-tracking enabled on'.
+* A new standard register group "matrix" has been added. Its registers can
+ be printed with "info registers matrix".
+
* New targets
i386 Windows/MSVC i[34567]86-*-windows-msvc
@@ -42788,6 +42788,7 @@ The register groups info looks like this:
float user
all user
vector user
+ matrix user
system user
save internal
restore internal
@@ -49868,8 +49869,9 @@ architecture's normal floating point format) of the correct size for
@item group
The register group to which this register belongs. It can be one of the
-standard register groups @code{general}, @code{float}, @code{vector} or an
-arbitrary string. Group names should be limited to alphanumeric characters.
+standard register groups @code{general}, @code{float}, @code{vector},
+@code{matrix} or an arbitrary string. Group names should be limited to
+alphanumeric characters.
If a group name is made up of multiple words the words may be separated by
hyphens; e.g.@: @code{special-group} or @code{ultra-special-group}. If no
@var{group} is specified, @value{GDBN} will not display the register in
@@ -58,6 +58,7 @@ struct reggroups
add (float_reggroup);
add (system_reggroup);
add (vector_reggroup);
+ add (matrix_reggroup);
add (all_reggroup);
add (save_reggroup);
add (restore_reggroup);
@@ -240,6 +241,7 @@ static const reggroup general_group = { "general", USER_REGGROUP };
static const reggroup float_group = { "float", USER_REGGROUP };
static const reggroup system_group = { "system", USER_REGGROUP };
static const reggroup vector_group = { "vector", USER_REGGROUP };
+static const reggroup matrix_group = { "matrix", USER_REGGROUP };
static const reggroup all_group = { "all", USER_REGGROUP };
static const reggroup save_group = { "save", INTERNAL_REGGROUP };
static const reggroup restore_group = { "restore", INTERNAL_REGGROUP };
@@ -248,6 +250,7 @@ const reggroup *const general_reggroup = &general_group;
const reggroup *const float_reggroup = &float_group;
const reggroup *const system_reggroup = &system_group;
const reggroup *const vector_reggroup = &vector_group;
+const reggroup *const matrix_reggroup = &matrix_group;
const reggroup *const all_reggroup = &all_group;
const reggroup *const save_reggroup = &save_group;
const reggroup *const restore_reggroup = &restore_group;
@@ -68,6 +68,7 @@ extern const reggroup *const general_reggroup;
extern const reggroup *const float_reggroup;
extern const reggroup *const system_reggroup;
extern const reggroup *const vector_reggroup;
+extern const reggroup *const matrix_reggroup;
extern const reggroup *const all_reggroup;
/* Pre-defined, internal, register groups. */