From: Victor Do Nascimento Date: Wed, 15 Nov 2023 14:29:31 +0000 (+0000) Subject: aarch64: Add support for the SYSP 128-bit system instruction X-Git-Tag: binutils-2_42~169 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3521a28f10900ed893f53fcceec2f66c335cb154;p=thirdparty%2Fbinutils-gdb.git aarch64: Add support for the SYSP 128-bit system instruction Mirroring the use of the `sys' - System Instruction assembly instruction, this implements its 128-bit counterpart, `sysp'. This optionally takes two contiguous general-purpose registers starting at an even number or, when these are omitted, by default sets both of these to xzr. Syntax: sysp #, , , #{, , } --- diff --git a/gas/testsuite/gas/aarch64/illegal-sys128.l b/gas/testsuite/gas/aarch64/illegal-sys128.l new file mode 100644 index 00000000000..b86fbc86af0 --- /dev/null +++ b/gas/testsuite/gas/aarch64/illegal-sys128.l @@ -0,0 +1,4 @@ +.*: Assembler messages: +.*: Error: C8 - C9 expected at operand 2 -- `sysp #0,C7,C0,#0,x0,x1' +.*: Error: C8 - C9 expected at operand 2 -- `sysp #0,C10,C0,#0,x0,x1' +.*: Error: C0 - C7 expected at operand 3 -- `sysp #6,C9,C8,#7,x27,x28' diff --git a/gas/testsuite/gas/aarch64/illegal-sys128.s b/gas/testsuite/gas/aarch64/illegal-sys128.s new file mode 100644 index 00000000000..42473c9b40e --- /dev/null +++ b/gas/testsuite/gas/aarch64/illegal-sys128.s @@ -0,0 +1,5 @@ + .arch armv8-a+d128 + + sysp #0, C7, C0, #0, x0, x1 + sysp #0, C10, C0, #0, x0, x1 + sysp #6, C9, C8, #7, x27, x28 diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 8f9925978dc..7eee3658fee 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -302,7 +302,8 @@ aarch64_ext_regno_pair (const aarch64_operand *self ATTRIBUTE_UNUSED, aarch64_op aarch64_operand_error *errors ATTRIBUTE_UNUSED) { assert (info->idx == 1 - || info->idx == 3); + || info->idx == 3 + || info->idx == 5); unsigned prev_regno = inst->operands[info->idx - 1].reg.regno; info->reg.regno = (prev_regno == 0x1f) ? 0x1f diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index a5f09370b6f..b750904f6d7 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -1710,7 +1710,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx, else if (type == AARCH64_OPND_PAIRREG || type == AARCH64_OPND_PAIRREG_OR_XZR) { - assert (idx == 1 || idx == 3); + assert (idx == 1 || idx == 3 || idx == 5); if (opnds[idx - 1].reg.regno % 2 != 0) { set_syntax_error (mismatch_detail, idx - 1, diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h index b2a8b347335..739e78be7e5 100644 --- a/opcodes/aarch64-tbl.h +++ b/opcodes/aarch64-tbl.h @@ -42,7 +42,7 @@ #define QLF3(a,b,c) {QLF(a), QLF(b), QLF(c)} #define QLF4(a,b,c,d) {QLF(a), QLF(b), QLF(c), QLF(d)} #define QLF5(a,b,c,d,e) {QLF(a), QLF(b), QLF(c), QLF(d), QLF(e)} -#define QLF6(a,b,c,d,e) {QLF(a), QLF(b), QLF(c), QLF(d), QLF(e), QLF(f)} +#define QLF6(a,b,c,d,e,f) {QLF(a), QLF(b), QLF(c), QLF(d), QLF(e), QLF(f)} /* Qualifiers list. */ @@ -70,6 +70,12 @@ QLF5(X,NIL,CR,CR,NIL), \ } +/* e.g. SYSP #, , , #{, , }. */ +#define QL_SYSP \ +{ \ + QLF6(NIL,CR,CR,NIL,X,X), \ +} + /* e.g. ADRP ,