[PATCH v1 1/3] kselftest/arm64: Provide a helper binary and "library" for SVE RDVL

Mark Brown broonie at kernel.org
Wed Jul 28 03:20:35 PDT 2021


On Wed, Jul 28, 2021 at 10:41:30AM +0100, Dave Martin wrote:
> On Tue, Jul 27, 2021 at 07:06:47PM +0100, Mark Brown wrote:
> > SVE provides an instruction RDVL which reports the currently configured
> > vector length. In order to validate that our vector length configuration
> > interfaces are working correctly without having to build the C code for

> > +.globl rdvl_sve
> > +rdvl_sve:
> > +	rdvl	x0, #1
> > +	ret
> 
> This works, but can we use an ACLE intrinsic for this?  I'm pretty GCC
> and LLVM have been up to date with that stuff for some time, though
> you'd have to check with the compiler folks.

If we put SVE into C source files we need to build the C code with SVE
support enabled, I felt it was safer to avoid any possibility that we
might get some interference with the tests due to interactions with SVE
code generated by the compiler.  It should be fine, but it's even easier
to not have to think about it at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210728/66dce6d6/attachment.sig>


More information about the linux-arm-kernel mailing list