Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Christina Schimpe <christina.schimpe@intel.com>
Cc: gdb-patches@sourceware.org, hjl.tools@gmail.com, keiths@redhat.com
Subject: Re: [PATCH 2/2] gdb, gdbserver: Add Intel APX register support
Date: Tue, 02 Jun 2026 15:25:21 +0300	[thread overview]
Message-ID: <865x41w2mm.fsf@gnu.org> (raw)
In-Reply-To: <20260602111122.3187712-3-christina.schimpe@intel.com> (message from Christina Schimpe on Tue, 2 Jun 2026 11:11:22 +0000)

> From: Christina Schimpe <christina.schimpe@intel.com>
> Cc: hjl.tools@gmail.com,
> 	keiths@redhat.com
> Date: Tue,  2 Jun 2026 11:11:22 +0000
> 
> From: "H.J. Lu" <hjl.tools@gmail.com>
> 
> Intel(R) Advanced Performance Extensions (APX) doubles the number of
> general-purpose registers (GPRs) from 16 to 32 (r16-r31).
> 
> Those new 64-bit Extended GPRs (EGPRs) do not change the size of the
> XSAVE area, as they take up the space left behind by the deprecated
> MPX registers.
> 
> In contrast to the legacy GPRS, EGPRs are not enabled by default in 64-bit
> mode but are xcr0 enabled based on APX_F Intel APX state.  Define
> X86_XSTATE_APX_F to support this new configuration.
> 
> Add gdb and gdbserver registers support for those new 64-bit EGPRs.
> Also add byte, word and dword pseudo register support.
> 
> Co-authored-by:  Christina Schimpe <christina.schimpe@intel.com>
> ---
>  gdb/NEWS                                      |   4 +
>  gdb/amd64-linux-tdep.c                        |   2 +
>  gdb/amd64-tdep.c                              | 262 ++++++++++++++----
>  gdb/amd64-tdep.h                              |   2 +
>  gdb/arch/amd64.c                              |   4 +
>  gdb/arch/x86-linux-tdesc-features.c           |   1 +
>  gdb/doc/gdb.texinfo                           |   4 +
>  gdb/features/Makefile                         |   1 +
>  gdb/features/i386/64bit-apx.c                 |  29 ++
>  gdb/features/i386/64bit-apx.xml               |  26 ++
>  gdb/i386-tdep.c                               |  32 ++-
>  gdb/i386-tdep.h                               |  26 ++
>  gdb/i387-tdep.c                               | 105 ++++++-
>  gdb/i387-tdep.h                               |   6 +
>  gdb/nat/x86-xstate.c                          |   1 +
>  gdb/target-debug.h                            |   1 +
>  gdb/testsuite/gdb.arch/amd64-apx-corefile.exp |  87 ++++++
>  gdb/testsuite/gdb.arch/amd64-apx.c            |  83 ++++++
>  gdb/testsuite/gdb.arch/amd64-apx.exp          | 106 +++++++
>  gdb/testsuite/lib/gdb.exp                     |  59 ++++
>  gdbserver/i387-fp.cc                          |  43 +++
>  gdbserver/linux-x86-low.cc                    |   4 +-
>  gdbsupport/x86-xstate.h                       |  12 +-
>  23 files changed, 838 insertions(+), 62 deletions(-)
>  create mode 100644 gdb/features/i386/64bit-apx.c
>  create mode 100644 gdb/features/i386/64bit-apx.xml
>  create mode 100644 gdb/testsuite/gdb.arch/amd64-apx-corefile.exp
>  create mode 100644 gdb/testsuite/gdb.arch/amd64-apx.c
>  create mode 100644 gdb/testsuite/gdb.arch/amd64-apx.exp

Thanks.

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -83,6 +83,10 @@
>  
>  * Support for native Thread Local Storage (TLS) variables on Windows.
>  
> +* Support for Intel APX registers on amd64 GNU/Linux.
> +  Support displaying and modifying Intel APX registers (Extended GPRs
> +  $r16 - $r31) including byte, word and dword pseudo registers.

This part is okay.

> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -50709,6 +50709,10 @@ amd64, 32 bits on amd64 with 32-bit pointer size (X32) and 32 bits on i386.
>  Following the restriction of the Linux kernel, only @value{GDBN} for amd64
>  targets makes use of this feature for now.
>  
> +The @samp{org.gnu.gdb.i386.apx} feature is optional.  It should describe
> +16 Extended General Purpose registers (EGPRs) @samp{r16} - @samp{r31} with
> +64 bits each.  All APX registers are valid only on amd64.

"EGPR" and "APX" should be in @acronym.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

  reply	other threads:[~2026-06-02 12:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 11:11 [PATCH 0/2] Add Intel APX support Christina Schimpe
2026-06-02 11:11 ` [PATCH 1/2] gdb: add maintenance set/show gcore xml-target-description command Christina Schimpe
2026-06-02 12:22   ` Eli Zaretskii
2026-06-09 21:02     ` Schimpe, Christina
2026-06-10 11:43       ` Eli Zaretskii
2026-06-15  7:54         ` Schimpe, Christina
2026-06-18 17:31   ` Keith Seitz
2026-07-07 17:07     ` Schimpe, Christina
2026-07-10 11:57       ` Schimpe, Christina
2026-06-02 11:11 ` [PATCH 2/2] gdb, gdbserver: Add Intel APX register support Christina Schimpe
2026-06-02 12:25   ` Eli Zaretskii [this message]
2026-06-18 17:33   ` Keith Seitz
2026-07-07 17:15     ` Schimpe, Christina
2026-07-07 17:53       ` Keith Seitz
2026-07-07 17:15     ` Schimpe, 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=865x41w2mm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=christina.schimpe@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=keiths@redhat.com \
    /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