[PATCH v1] aarch64: gas: Allow movprfx with fmmla widening instructions and bfscale [PR gas/33562]

Alice Carlotti alice.carlotti@arm.com
Wed Oct 22 17:13:51 GMT 2025


On Wed, Oct 22, 2025 at 08:45:27AM +0000, Alfie Richards wrote:
> Hello,
> 
> Some of the recently added instructions were not marked as C_SCAN_MOVPRFX.
> This fixes that and adds some tests.
> 
> Reg tested.
> 
> Okay for master and backport to 2.45?
> 
> Thanks,
> Alfie
> 
> -- >8 --
> 
> Instructions were previously incorrectly marked as not accepting movprfx.
> Fixes this and adds tests.
> 
> 	PR gas/33562
> 
> opcodes:
> 	* aarch64-tbl.h: Update widening fmmmla and bfscale instructions.
> gas:
> 	* testsuite/gas/aarch64/f8f16mm_sve2-bad.l: Update test with movprfx.
> 	* testsuite/gas/aarch64/f8f16mm_sve2.d: Ditto.
> 	* testsuite/gas/aarch64/f8f16mm_sve2.s: Ditto.
> 	* testsuite/gas/aarch64/f8f32mm_sve2-bad.l: Ditto.
> 	* testsuite/gas/aarch64/f8f32mm_sve2.d: Ditto.
> 	* testsuite/gas/aarch64/f8f32mm_sve2.s: Ditto.
> 	* testsuite/gas/aarch64/sve-f16f32mm-bad.l: Ditto.
> 	* testsuite/gas/aarch64/sve-f16f32mm.d: Ditto.
> 	* testsuite/gas/aarch64/sve-f16f32mm.s: Ditto.
> 	* testsuite/gas/aarch64/sve-bfscale-sve2.s: Ditto.
> 	* testsuite/gas/aarch64/sve-bfscale-sve2.d: Ditto.

...

> diff --git a/gas/testsuite/gas/aarch64/sve-bfscale-sve2.d b/gas/testsuite/gas/aarch64/sve-bfscale-sve2.d
> index 874dda04fe7..4ae6df15d12 100644
> --- a/gas/testsuite/gas/aarch64/sve-bfscale-sve2.d
> +++ b/gas/testsuite/gas/aarch64/sve-bfscale-sve2.d
> @@ -16,3 +16,19 @@ Disassembly of section .*:
>  .*:	650983ff 	bfscale	z31.h, p0/m, z31.h, z31.h
>  .*:	65099c1f 	bfscale	z31.h, p7/m, z31.h, z0.h
>  .*:	65099fff 	bfscale	z31.h, p7/m, z31.h, z31.h
> +.*:	0420bde0 	movprfx	z0, z15
> +.*:	65098020 	bfscale	z0.h, p0/m, z0.h, z1.h
> +.*:	0420bde0 	movprfx	z0, z15
> +.*:	650983e0 	bfscale	z0.h, p0/m, z0.h, z31.h
> +.*:	0420bde0 	movprfx	z0, z15
> +.*:	65099c20 	bfscale	z0.h, p7/m, z0.h, z1.h
> +.*:	0420bde0 	movprfx	z0, z15
> +.*:	65099fe0 	bfscale	z0.h, p7/m, z0.h, z31.h
> +.*:	0420bdff 	movprfx	z31, z15
> +.*:	6509801f 	bfscale	z31.h, p0/m, z31.h, z0.h
> +.*:	0420bdff 	movprfx	z31, z15
> +.*:	650983df 	bfscale	z31.h, p0/m, z31.h, z30.h
> +.*:	0420bdff 	movprfx	z31, z15
> +.*:	65099c1f 	bfscale	z31.h, p7/m, z31.h, z0.h
> +.*:	0420bdff 	movprfx	z31, z15
> +.*:	65099fdf 	bfscale	z31.h, p7/m, z31.h, z30.h

I think one test with an (unpredicated) movprfx would be sufficient (for each
instruction), but I have no objection to including more now that you have
written them.

For bfscale, a predicated movprfx is allowed.  Could you include a test for
this as well?

Otherwise looks good to me - thanks for spotting and fixing this.

Alice


More information about the Binutils mailing list