Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stephan Rohr <stephan.rohr@intel.com>
To: gdb-patches@sourceware.org
Cc: pedro@palves.net, eliz@gnu.org, jhb@FreeBSD.org, luis.machado@arm.com
Subject: [PATCH v2 0/5] Add Intel AMX support
Date: Fri, 30 Oct 2026 11:50:11 +0000	[thread overview]
Message-ID: <20261030115016.45786-1-stephan.rohr@intel.com> (raw)

From: "Rohr, Stephan" <stephan.rohr@intel.com>

Hi all,

this is our version 2 of the "Add AMX support" series to bring Intel AMX
support to upstream GDB.

Patch

  gdb: define additional integer built-in types

adds additional 256-bit and 512-bit integer types similar to the patch
we posted in v1.  256-bit types are currently not used but added for
completeness.

Patch

  gdb, gdbserver: Add Intel AMX registers.

implements basic support by adding the raw Intel AMX registers
$tmm0_raw .. $tmm7_raw and both the raw $tilecfg_raw and a $tilecfg
pseudo register.  $tilecfg provides a parsed and user friendly view
of the raw register.  The raw tile registers are added as a vector of
uint512 to avoid polluting the screen when printing a raw tile register.
The raw registers are hidden by removing them from the "all" and
"general" register groups.

Patch

  gdb: support register groups for user registers

adds support to include user registers in register groups.  We use this
in the following patches to include the tile user registers in the "info
registers all" command.  By default, user registers are not added to any
group so that the current behavior is preserved for the existing user
registers.

Next, we add a new register group "matrix" to include both the $tilecfg
pseudo register and the tile user registers.

Patch

  gdb: add Intel AMX tile registers as user registers

implements the tile registers as user registers.  The registers are
printed with respect to the configured dimensions using an array type with
a fixed stride.  This naturally supports remote targets and writing the
registers, too.  The tile user registers are added to the "all" and
"matrix" register groups.

Changes since v1
================

v1: https://sourceware.org/pipermail/gdb-patches/2022-May/188790.html

v1 patch 1/4: gdb: define int512 and uint512 as built-in types

The patch now introduces additional 256-bit integer types for
completeness.

v1 patch 2/4: gdb, gdbserver: Add AMX registers

- The patch now only adds the raw tile registers, the raw tilecfg register
  and a tilecfg pseudo-register.

- The raw registers naturally support the user history.

- I386_MAX_REGISTER_SIZE is 1024 bytes, the size of a single raw tile
  register.

- Removed the dynamically sized tile pseudo registers and replaced them
  with user registers as part of this series.

- Addressed Pedro's feedback on tilecfg_reg, no std::pair any more, members
  are initialized at their declaration, and a fixed-size std::array replaces
  the vector that was sized by a delegated constructor.

- Addressed Eli's documentation feedback (index entries, @acronym, @dots,
  long lines).  The documentation was largely rewritten.  A NEWS entry
  was added.

v1 patch 3/4: gdb, gdbserver: Allocate only a sane amount of buffer when
           fetching registers

Dropped.  The maximum register size is now 1024 bytes.

v1 patch 4/4: gdb: Clear tilecfg.start_row for any PC modification

Not included in this series.  We can confirm the concerns raised by
Pedro when unconditionally resetting start_row in write_pc.  We are
planning to submit a proper fix in a second series which will also
include fixes for:

- Write $pc, e.g., set $pc = <value>.
- Inferior calls.
- The jump command.

I appreciate your feedback.

Thanks
Stephan

Aleksandar Paunovic (1):
  gdb: define additional integer built-in types

Felix Willgerodt (1):
  gdb, gdbserver: Add Intel AMX registers.

Rohr, Stephan (3):
  gdb: support register groups for user registers
  gdb: add a "matrix" register group
  gdb: add Intel AMX tile registers as user registers

 gdb/NEWS                             |  17 ++
 gdb/amd64-linux-tdep.c               |   2 +
 gdb/amd64-tdep.c                     | 150 ++++++++++-
 gdb/amd64-tdep.h                     |   3 +
 gdb/arch/amd64.c                     |   4 +
 gdb/arch/x86-linux-tdesc-features.c  |   5 +-
 gdb/doc/gdb.texinfo                  |  68 ++++-
 gdb/features/Makefile                |   1 +
 gdb/features/i386/64bit-amx.c        |  26 ++
 gdb/features/i386/64bit-amx.xml      |  26 ++
 gdb/gdbtypes.c                       |   8 +
 gdb/gdbtypes.h                       |   4 +
 gdb/i386-tdep.c                      | 230 ++++++++++++++++-
 gdb/i386-tdep.h                      | 106 +++++++-
 gdb/i387-tdep.c                      | 196 ++++++++++++++-
 gdb/i387-tdep.h                      |   6 +
 gdb/infcmd.c                         |  28 +++
 gdb/nat/x86-xstate.c                 |   2 +
 gdb/reggroups.c                      |   3 +
 gdb/reggroups.h                      |   1 +
 gdb/target-debug.h                   |   2 +
 gdb/target-descriptions.c            |  12 +
 gdb/testsuite/gdb.arch/amd64-amx.c   | 124 ++++++++++
 gdb/testsuite/gdb.arch/amd64-amx.exp | 356 +++++++++++++++++++++++++++
 gdb/testsuite/lib/amd64-amx.h        |  41 +++
 gdb/testsuite/lib/gdb.exp            |  75 ++++++
 gdb/user-regs.c                      |  46 +++-
 gdb/user-regs.h                      |  17 +-
 gdbserver/i387-fp.cc                 |  70 +++++-
 gdbserver/linux-x86-low.cc           |   2 +
 gdbsupport/tdesc.cc                  |   4 +
 gdbsupport/tdesc.h                   |   4 +
 gdbsupport/x86-xstate.h              |  26 +-
 33 files changed, 1630 insertions(+), 35 deletions(-)
 create mode 100644 gdb/features/i386/64bit-amx.c
 create mode 100644 gdb/features/i386/64bit-amx.xml
 create mode 100644 gdb/testsuite/gdb.arch/amd64-amx.c
 create mode 100644 gdb/testsuite/gdb.arch/amd64-amx.exp
 create mode 100644 gdb/testsuite/lib/amd64-amx.h

-- 
2.43.0

________________________________________
Intel Deutschland GmbH 

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany 

Tel: +49 (89) 99143-0 

www.intel.de 

Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman

Chairperson of the Supervisory Board: Sonja Pierer

Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


             reply	other threads:[~2026-10-30 11:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 11:50 Stephan Rohr [this message]
2026-10-30 11:50 ` [PATCH v2 1/5] gdb: define additional integer built-in types Stephan Rohr
2026-10-30 12:45   ` Eli Zaretskii
2026-10-30 11:50 ` [PATCH v2 2/5] gdb, gdbserver: Add Intel AMX registers Stephan Rohr
2026-10-30 12:47   ` Eli Zaretskii
2026-11-03 10:44   ` Joos, Christina
2026-11-03 14:40   ` Joos, Christina
2026-10-30 11:50 ` [PATCH v2 3/5] gdb: support register groups for user registers Stephan Rohr
2026-10-30 12:48   ` Eli Zaretskii
2026-10-30 11:50 ` [PATCH v2 4/5] gdb: add a "matrix" register group Stephan Rohr
2026-10-30 12:49   ` Eli Zaretskii
2026-10-30 11:50 ` [PATCH v2 5/5] gdb: add Intel AMX tile registers as user registers Stephan Rohr
2026-10-30 12:50   ` Eli Zaretskii
2026-11-03 15:19   ` Joos, Christina
2026-11-04  9:00     ` Joos, Christina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030115016.45786-1-stephan.rohr@intel.com \
    --to=stephan.rohr@intel.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=luis.machado@arm.com \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox