public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Victor Do Nascimento <victor.donascimento@arm.com>
To: <binutils@sourceware.org>
Cc: <richard.earnshaw@arm.com>, <nickc@redhat.com>,
	Victor Do Nascimento <victor.donascimento@arm.com>
Subject: [PATCH 0/4] aarch64: Add armv9.5-a FP8 datatype conversion
Date: Wed, 10 Apr 2024 16:29:46 +0100	[thread overview]
Message-ID: <20240410152950.1134020-1-victor.donascimento@arm.com> (raw)

The addition of the novel FP8 8-bit floating-point data-type, as
highlighted in "Arm A-Profile Architecture Developments 2023" [1],
(both in its E5M2 and E4M3 formats) and its associated data-processing
operations has led to the requirement that we be able to convert
between FP8 and existing data-types as well as scale resulting
floating-point values.

The following conversions are made possible as a result of the FP8
extension:

  - FP8 to BFloat16
  - FP8 to half-precision
  - Half-precision to FP8
  - single-precision to FP8

Scaling instructions allow FP8 values to be scaled by integer powers
of two.

Such conversion and scaling instructions are added not only in the
context of the advanced SIMD architectural extension, but are also
supported for the SVE2 and SME2 architectural extensions.

SME2 FP8 support:
-----------------
In the presence of SME2 support, the FP8 extension adds the following
SME2 multi-vector instructions:
  - FP8 convert instructions.
  - Floating-point scaling instructions.

SVE2 FP8 convert instructions:
------------------------------
  - In the presence of the SVE2 extension, these convert instructions
require that the streaming SVE mode is not enabled.
  - In the presence of the SME2 extension, these convert instructions
  require that the streaming SVE mode be enabled.

N.B. Due to the collaborative nature of FP8 feature implementation,
this patch series does not add the FPMR register.  Upstreaming of this
patch-series should be deferred until the register implementation has
been upstreamed.

Regtested on aarch64-linux-gnu, no new regressions.

[1] https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2023

Victor Do Nascimento (4):
  aarch64: fp8 convert and scale - add feature flags and related
    structures
  aarch64: fp8 convert and scale - Add advsimd insn variants
  aarch64: fp8 convert and scale - add sve2 insn variants
  aarch64: fp8 convert and scale - add sme2 insn variants

 gas/config/tc-aarch64.c                       |   1 +
 gas/doc/c-aarch64.texi                        |   2 +
 gas/testsuite/gas/aarch64/advsimd-fp8-fail.d  |   2 +
 gas/testsuite/gas/aarch64/advsimd-fp8-fail.l  | 262 ++++++
 gas/testsuite/gas/aarch64/advsimd-fp8-fail.s  | 121 +++
 gas/testsuite/gas/aarch64/advsimd-fp8.d       | 120 +++
 gas/testsuite/gas/aarch64/advsimd-fp8.s       |  76 ++
 gas/testsuite/gas/aarch64/sme2-24-invalid.l   |   4 +-
 gas/testsuite/gas/aarch64/sme2-fp8-fail.d     |   2 +
 gas/testsuite/gas/aarch64/sme2-fp8-fail.l     | 273 ++++++
 gas/testsuite/gas/aarch64/sme2-fp8-fail.s     | 106 +++
 .../gas/aarch64/sme2-fp8-streaming.d          |   4 +
 gas/testsuite/gas/aarch64/sme2-fp8.d          | 128 +++
 gas/testsuite/gas/aarch64/sme2-fp8.s          | 112 +++
 gas/testsuite/gas/aarch64/sve2-fp8-dump       |  53 ++
 gas/testsuite/gas/aarch64/sve2-fp8-fail.d     |   2 +
 gas/testsuite/gas/aarch64/sve2-fp8-fail.l     | 161 ++++
 gas/testsuite/gas/aarch64/sve2-fp8-fail.s     |  42 +
 gas/testsuite/gas/aarch64/sve2-fp8.d          |   3 +
 gas/testsuite/gas/aarch64/sve2-fp8.s          |  48 +
 include/opcode/aarch64.h                      |   2 +
 opcodes/aarch64-dis-2.c                       | 817 ++++++++++++++----
 opcodes/aarch64-tbl.h                         |  95 ++
 23 files changed, 2251 insertions(+), 185 deletions(-)
 create mode 100644 gas/testsuite/gas/aarch64/advsimd-fp8-fail.d
 create mode 100644 gas/testsuite/gas/aarch64/advsimd-fp8-fail.l
 create mode 100644 gas/testsuite/gas/aarch64/advsimd-fp8-fail.s
 create mode 100644 gas/testsuite/gas/aarch64/advsimd-fp8.d
 create mode 100644 gas/testsuite/gas/aarch64/advsimd-fp8.s
 create mode 100644 gas/testsuite/gas/aarch64/sme2-fp8-fail.d
 create mode 100644 gas/testsuite/gas/aarch64/sme2-fp8-fail.l
 create mode 100644 gas/testsuite/gas/aarch64/sme2-fp8-fail.s
 create mode 100644 gas/testsuite/gas/aarch64/sme2-fp8-streaming.d
 create mode 100644 gas/testsuite/gas/aarch64/sme2-fp8.d
 create mode 100644 gas/testsuite/gas/aarch64/sme2-fp8.s
 create mode 100644 gas/testsuite/gas/aarch64/sve2-fp8-dump
 create mode 100644 gas/testsuite/gas/aarch64/sve2-fp8-fail.d
 create mode 100644 gas/testsuite/gas/aarch64/sve2-fp8-fail.l
 create mode 100644 gas/testsuite/gas/aarch64/sve2-fp8-fail.s
 create mode 100644 gas/testsuite/gas/aarch64/sve2-fp8.d
 create mode 100644 gas/testsuite/gas/aarch64/sve2-fp8.s

-- 
2.34.1


             reply	other threads:[~2024-04-10 15:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 15:29 Victor Do Nascimento [this message]
2024-04-10 15:29 ` [PATCH 1/4] aarch64: fp8 convert and scale - add feature flags and related structures Victor Do Nascimento
2024-04-10 15:29 ` [PATCH 2/4] aarch64: fp8 convert and scale - Add advsimd insn variants Victor Do Nascimento
2024-05-17 15:43   ` Richard Earnshaw (lists)
2024-05-20 15:36   ` Andrew Carlotti
2024-04-10 15:29 ` [PATCH 3/4] aarch64: fp8 convert and scale - add sve2 " Victor Do Nascimento
2024-04-10 15:29 ` [PATCH 4/4] aarch64: fp8 convert and scale - add sme2 " Victor Do Nascimento
2024-04-17  9:50 ` [PATCH 0/4] aarch64: Add armv9.5-a FP8 datatype conversion Nick Clifton

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=20240410152950.1134020-1-victor.donascimento@arm.com \
    --to=victor.donascimento@arm.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=richard.earnshaw@arm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).