Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] gdb: Display fp8 format for AArch64 registers
@ 2025-09-25 21:18 Ezra.Sitorus
  2025-09-25 21:18 ` [PATCH 1/4] libiberty: Add fp8 float formats Ezra.Sitorus
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Ezra.Sitorus @ 2025-09-25 21:18 UTC (permalink / raw)
  To: gdb-patches; +Cc: eliz, luis.machado.foss, Ezra Sitorus

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-10-17 10:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-25 21:18 [PATCH 0/4] gdb: Display fp8 format for AArch64 registers Ezra.Sitorus
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox