[PATCH] aarch64: Fix sve2p1 gating and add missing instructions

Richard Sandiford richard.sandiford@arm.com
Fri Jan 17 11:20:30 GMT 2025


Andrew Carlotti <andrew.carlotti@arm.com> writes:
> Many FEAT_SVE2p1 instructions need to be enabled by either of two
> different features (one for streaming mode, and one for non-streaming
> mode).  This patch adds correct gating conditions for these
> instructions.
>
> There were also a few sve2p1 instructions missing altogether, so add
> those as well.
>
> The testsuite is modified to check for all alternative enablement
> conditions.  In many cases this is done by adding an alternative
> assembler commands to existing test files.  For some SME/SME2 tests,
> only some of the instructions are enabled by +sve2p1, so these are
> copied into a separate test.  For original SVE2p1 tests, the non-SME2p1
> instructions have been moved to a separate test file.

Makes sense.  An alternative would have been to pass a --defsym
on the +sve2p1 command line to disable the streaming-only instructions,
but a separate file is fine too, and I can see why it might be clearer.

> There are also new tests for the newly added instructions.  These
> include a couple of fixme comments relating to bad error reporting,
> which should be investigated later.
>
>
>
> Ok for master, and backport to 2.43?

Thanks for doing this.  The patch LGTM, but some suggestions:

- It would be good if the tests for the new scalar-plus-scalar
  instructions covered attempts to use xzr as an index register.
  OPD_F_NO_ZR is well established, so it's probably a bit redundant,
  but still...

- It might be worth moving all the SVE2p1_SME2 instructions to the:

    /* SME2 extensions to SVE2.  */

  block rather than intermingle them in the:

    /* SME2 extensions to SME.  */

  block.  SVE2p1 helps to define what should be considered "SVE" and
  what should be considered "SME".

But they're only suggestions.  The patch is OK for master and the
branch as-is if you prefer.

For the record, I tried to double-check each of the transitions from
streaming-only to sve2p1-or-streaming and they looked good to me.
I haven't checked for missing transitions though.

Richard


More information about the Binutils mailing list