[00/12] aarch64: Add Armv9.4-A support for the d128 extension

Message ID 20240103011739.2444792-1-victor.donascimento@arm.com
Headers
Series aarch64: Add Armv9.4-A support for the d128 extension |

Message

Victor Do Nascimento Jan. 3, 2024, 1:17 a.m. UTC
  The d128 extension released as an optional architectural feature for
Armv9.4-a introduces 128-bit page table descriptors and support for
these.

Support is done via 128-bit system registers and instructions to
retrieve and write to these in the form of `mrrs'/`msrr',
respectively, as well as the 128-bit system instruction `sysp' and its
alias `tlbip': TLB Invalidate Pair operation.

This patch series adds the necessary changes for assembly, disassembly
and validation of these operations and their various operands.

Victor Do Nascimento (12):
  aarch64: Add +d128 architectural feature support
  aarch64: Expand maximum number of operands from 5 to 6
  aarch64: Add support for xzr register in register pair operands
  aarch64: Add support for optional operand pairs
  aarch64: Add support for the SYSP 128-bit system instruction
  aarch64: Apply narrowing of allowed immediate values for SYSP
  aarch64: Create QL_SRC_X2 and QL_DEST_X2 qualifier macros
  aarch64: Implement TLBIP 128-bit instruction
  aarch64: Add xs variants of tlbip operands
  aarch64: Add TLBIP tests
  aarch64: Add support for 128-bit system register mrrs and msrr insns
  arch64: Add optional operand register pair support tests

 gas/config/tc-aarch64.c                       |  54 ++++++-
 gas/doc/c-aarch64.texi                        |   2 +
 gas/testsuite/gas/aarch64/illegal-sys128.d    |   3 +
 gas/testsuite/gas/aarch64/illegal-sys128.l    |   4 +
 gas/testsuite/gas/aarch64/illegal-sys128.s    |   5 +
 .../gas/aarch64/illegal-sysp-tlbip-optional.d |   4 +
 .../gas/aarch64/illegal-sysp-tlbip-optional.l |   4 +
 .../gas/aarch64/illegal-sysp-tlbip-optional.s |  10 ++
 gas/testsuite/gas/aarch64/illegal-sysreg128.d |   2 +
 gas/testsuite/gas/aarch64/illegal-sysreg128.l |  11 ++
 gas/testsuite/gas/aarch64/illegal-sysreg128.s |   8 +
 .../gas/aarch64/sysp-tlbip-optional.d         |  17 ++
 .../gas/aarch64/sysp-tlbip-optional.s         |  22 +++
 gas/testsuite/gas/aarch64/sysp.d              |  10 ++
 gas/testsuite/gas/aarch64/sysp.s              |   4 +
 gas/testsuite/gas/aarch64/sysreg128.d         |  28 ++++
 gas/testsuite/gas/aarch64/sysreg128.s         |  17 ++
 gas/testsuite/gas/aarch64/tlbip.d             | 127 +++++++++++++++
 gas/testsuite/gas/aarch64/tlbip.s             | 132 +++++++++++++++
 include/opcode/aarch64.h                      |  26 ++-
 opcodes/aarch64-dis.c                         |   9 +-
 opcodes/aarch64-opc.c                         | 152 +++++++++++++++++-
 opcodes/aarch64-opc.h                         |   1 +
 opcodes/aarch64-tbl.h                         |  34 ++++
 24 files changed, 672 insertions(+), 14 deletions(-)
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sys128.d
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sys128.l
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sys128.s
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sysp-tlbip-optional.d
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sysp-tlbip-optional.l
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sysp-tlbip-optional.s
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sysreg128.d
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sysreg128.l
 create mode 100644 gas/testsuite/gas/aarch64/illegal-sysreg128.s
 create mode 100644 gas/testsuite/gas/aarch64/sysp-tlbip-optional.d
 create mode 100644 gas/testsuite/gas/aarch64/sysp-tlbip-optional.s
 create mode 100644 gas/testsuite/gas/aarch64/sysp.d
 create mode 100644 gas/testsuite/gas/aarch64/sysp.s
 create mode 100644 gas/testsuite/gas/aarch64/sysreg128.d
 create mode 100644 gas/testsuite/gas/aarch64/sysreg128.s
 create mode 100644 gas/testsuite/gas/aarch64/tlbip.d
 create mode 100644 gas/testsuite/gas/aarch64/tlbip.s
  

Comments

Nick Clifton Jan. 5, 2024, 4:10 p.m. UTC | #1
Hi Victor,

> The d128 extension released as an optional architectural feature for
> Armv9.4-a introduces 128-bit page table descriptors and support for
> these.

Did you run the testsuites after applying this patch series ?

I ask because I am seeing a *lot* of new failures in the assembler,
linker and binutils testsuites with this series applied. :-(

For example:

   FAIL: gas/aarch64/addsub

and the log shows:

   regexp_diff match failure
   regexp "^       0:	0b0100f0 	add	w16, w7, w1$"
   line   "       0:	0b0000f1 	add	w17, w7, w17, none #0"
   regexp_diff match failure
   regexp "^       4:	0b2100f0 	add	w16, w7, w1, uxtb$"
   line   "       4:	0b2100f0 	.inst	0x0b2100f0 ; undefined"
   [...]

Perhaps I have mis-applied the patch series, but before I investigate
further, please could you confirm that these failures are not something
that you see in your local builds.

Cheers
   Nick
  
Victor Do Nascimento Jan. 5, 2024, 4:53 p.m. UTC | #2
On 1/5/24 16:10, Nick Clifton wrote:
> Hi Victor,
> 
>> The d128 extension released as an optional architectural feature for
>> Armv9.4-a introduces 128-bit page table descriptors and support for
>> these.
> 
> Did you run the testsuites after applying this patch series ?

Sure did (and in this particular case, as did colleagues in the course 
of development discussions) :)

First thing I will ask is this: Did you remember to regenerate the 
opcodes/aarch64-(asm|dis|opc)-2.c files??

If you're seeing a *lot* of new failures (easily in the order of the 
hundreds), then I'm betting good money that this might be to blame.

Please let me know if you continue face any issues!

Best regards,
Victor

> I ask because I am seeing a *lot* of new failures in the assembler,
> linker and binutils testsuites with this series applied. :-(
> 
> For example:
> 
>    FAIL: gas/aarch64/addsub
> 
> and the log shows:
> 
>    regexp_diff match failure
>    regexp "^       0:    0b0100f0     add    w16, w7, w1$"
>    line   "       0:    0b0000f1     add    w17, w7, w17, none #0"
>    regexp_diff match failure
>    regexp "^       4:    0b2100f0     add    w16, w7, w1, uxtb$"
>    line   "       4:    0b2100f0     .inst    0x0b2100f0 ; undefined"
>    [...]
> 
> Perhaps I have mis-applied the patch series, but before I investigate
> further, please could you confirm that these failures are not something
> that you see in your local builds.
> 
> Cheers
>    Nick
>
  
Nick Clifton Jan. 8, 2024, 10:04 a.m. UTC | #3
Hi Victor,

>> Did you run the testsuites after applying this patch series ?

> First thing I will ask is this: Did you remember to regenerate the opcodes/aarch64-(asm|dis|opc)-2.c files??

*silence*

Doh!

*sigh*, no, I forgot.  Boy do I feel stupid now.

OK, so with the tables rebuilt the testsuite failures do not appear and
everything looks peachy.

Patch series approved - please apply them all.

Cheers
   Nick