From: <Ezra.Sitorus@arm.com>
To: <gdb-patches@sourceware.org>
Cc: <eliz@gnu.org>, <luis.machado.foss@gmail.com>,
Ezra Sitorus <ezra.sitorus@arm.com>
Subject: [PATCH 0/4] gdb: Display fp8 format for AArch64 registers
Date: Thu, 25 Sep 2025 22:18:00 +0100 [thread overview]
Message-ID: <20250925211804.21967-1-Ezra.Sitorus@arm.com> (raw)
From: Ezra Sitorus <ezra.sitorus@arm.com>
FP8 introduces 2 new formats: E4M3 and E5M2. This patch aims to add
support for these types in gdb, and then display them in AArch64
registers.
So far, this patch series only adds support for these in register printing.
I've picked this, as opposed to printing fp8 variables because (as far
as I'm aware) there is not enough DWARF information to help out with this.
The __mfp8 type has the encoding type 7/unsigned. I'd like to hear any
comments about this approach.
This has been regression tested on aarch64-none-linux-gnu.
1/4: Adds these new formats in libiberty. This is maintained by gcc,
but I've included it here for completeness.
2/4: adds support for these types in GDB. E5M2 follows the IEE
floating point conventions, E4M3 is slightly different. It has fewer
special values to stretch the dynamic range.
More information about FP8 can be found in the technical paper here: https://arxiv.org/abs/2209.05433
3/4: adds support for displaying these formats in certain AArch64 registers.
4/4: adds test cases for these register displays.
Ezra Sitorus (4):
libiberty: Add fp8 float formats
gdb: Add support for fp8 formats
gdb/aarch64: Display fp8 formats in registers
gdb/aarch64: Tests for verifying fp8 register formats
gdb/aarch64-tdep.c | 41 ++++++++++++++++++
gdb/aarch64-tdep.h | 4 ++
gdb/features/aarch64-fpu.c | 10 +++++
gdb/features/aarch64-fpu.xml | 4 ++
gdb/features/aarch64-sve.c | 10 +++++
gdb/gdbtypes.c | 8 ++++
gdb/gdbtypes.h | 2 +
gdb/target-descriptions.c | 10 +++++
gdb/target-float.c | 12 +++++-
gdb/testsuite/gdb.arch/aarch64-fp8-reg.c | 49 ++++++++++++++++++++++
gdb/testsuite/gdb.arch/aarch64-fp8-reg.exp | 42 +++++++++++++++++++
gdb/testsuite/gdb.arch/aarch64-fp8-sve.c | 49 ++++++++++++++++++++++
gdb/testsuite/gdb.arch/aarch64-fp8-sve.exp | 45 ++++++++++++++++++++
gdbsupport/tdesc.cc | 4 +-
gdbsupport/tdesc.h | 2 +
include/floatformat.h | 5 +++
libiberty/floatformat.c | 32 ++++++++++++++
17 files changed, 327 insertions(+), 2 deletions(-)
create mode 100644 gdb/testsuite/gdb.arch/aarch64-fp8-reg.c
create mode 100644 gdb/testsuite/gdb.arch/aarch64-fp8-reg.exp
create mode 100644 gdb/testsuite/gdb.arch/aarch64-fp8-sve.c
create mode 100644 gdb/testsuite/gdb.arch/aarch64-fp8-sve.exp
--
2.45.2
next reply other threads:[~2025-09-25 21:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 21:18 Ezra.Sitorus [this message]
2025-09-25 21:18 ` [PATCH 1/4] libiberty: Add fp8 float formats Ezra.Sitorus
2025-09-25 21:18 ` [PATCH] gdb: Add support for fp8 formats Ezra.Sitorus
2025-09-25 21:18 ` [PATCH 3/4] gdb/aarch64: Display fp8 formats in registers Ezra.Sitorus
2025-10-11 13:10 ` Luis
2025-10-14 0:56 ` Ezra Sitorus
2025-10-17 10:20 ` Luis
2025-09-25 21:18 ` [PATCH 4/4] gdb/aarch64: Tests for verifying fp8 register formats Ezra.Sitorus
2025-09-29 17:55 ` [PATCH 0/4] gdb: Display fp8 format for AArch64 registers Pedro Alves
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=20250925211804.21967-1-Ezra.Sitorus@arm.com \
--to=ezra.sitorus@arm.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado.foss@gmail.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