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

Andrew Carlotti andrew.carlotti@arm.com
Fri Jan 17 12:50:27 GMT 2025


On Fri, Jan 17, 2025 at 11:20:30AM +0000, Richard Sandiford wrote:
> 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...

I forgot xzr existed when considering ways of referring to register '11111'.
> 
> - 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".

I think I'd prefer to preserve the existing definition order here, as it makes
the diff easier to read and verify.
> 
> 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