[PATCH v1 10/11] [Binutils] aarch64: Fix FEAT_B16B16 sve2 instruction constraints.

Richard Earnshaw (lists) Richard.Earnshaw@arm.com
Thu Jun 13 15:44:02 GMT 2024


On 12/06/2024 16:59, srinath wrote:
> 
> Hi,
> 
> This patch adds missing contraints to FEAT_B16B16 sve2 instructions
> bfclamp, bfmla and bfmls and add negative tests for all the bfloat
> instructions.
> 
> Regression tested for aarch64-none-elf target and found no regressions.
> 
> Ok for binutils-master?
> 
> Regards,
> Srinath.
> ---
>  gas/testsuite/gas/aarch64/bfloat16-1.d        |   6 +
>  gas/testsuite/gas/aarch64/bfloat16-1.s        |   7 +-
>  .../gas/aarch64/bfloat16-2-invalid.d          |   4 +
>  .../gas/aarch64/bfloat16-2-invalid.l          | 265 ++++++++++++++++++
>  .../gas/aarch64/bfloat16-2-invalid.s          | 147 ++++++++++
>  gas/testsuite/gas/aarch64/bfloat16-bad.l      |   3 +
>  gas/testsuite/gas/aarch64/bfloat16-invalid.d  |   2 +-
>  gas/testsuite/gas/aarch64/bfloat16-invalid.l  |  17 +-
>  gas/testsuite/gas/aarch64/bfloat16-invalid.s  |   9 +-
>  opcodes/aarch64-tbl.h                         |  46 +--
>  10 files changed, 468 insertions(+), 38 deletions(-)
>  create mode 100644 gas/testsuite/gas/aarch64/bfloat16-2-invalid.d
>  create mode 100644 gas/testsuite/gas/aarch64/bfloat16-2-invalid.l
>  create mode 100644 gas/testsuite/gas/aarch64/bfloat16-2-invalid.s
> 
--- a/gas/testsuite/gas/aarch64/bfloat16-invalid.l
+++ b/gas/testsuite/gas/aarch64/bfloat16-invalid.l
...
+.*: Error: operand 3 must be the same register as operand 1 -- `bfmul .*
+.*: Error: operand 3 must be the same register as operand 1 -- `bfsub .*
+.*: Error: selected processor does not support `bfclamp z3.h,z4.h,z16.h'
+.*: Error: selected processor does not support `bfmla z3.h,z16.h,z6.h\[7\]'
+.*: Error: selected processor does not support `bfmls z3.h,z16.h,z6.h\[7\]'

It doesn't seem right to me that a test that is supposedly checking for invalid operand combinations would be reporting unsupported instructions.  Perhaps these should be in a separate test with different command-line options?

R.



More information about the Binutils mailing list