[02/12] aarch64: Expand maximum number of operands from 5 to 6

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

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Testing passed

Commit Message

Victor Do Nascimento Jan. 3, 2024, 1:17 a.m. UTC
  Given the introduction of the new Armv9.4-a `sysp' insn using the
following syntax:

	sysp #<op1>, <Cn>, <Cm>, #<op2>{, <Xt1>, <Xt2>}

and by extension the need to encode 6 assembly operands, extend
Binutils to handle instructions taking 6 operands, up from a previous
maximum of 5.
---
 include/opcode/aarch64.h | 2 +-
 opcodes/aarch64-tbl.h    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 9fc7643ffa1..b9ea73c4259 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -1075,7 +1075,7 @@  enum err_type
 };
 
 /* Maximum number of operands an instruction can have.  */
-#define AARCH64_MAX_OPND_NUM 6
+#define AARCH64_MAX_OPND_NUM 7
 /* Maximum number of qualifier sequences an instruction can have.  */
 #define AARCH64_MAX_QLF_SEQ_NUM 10
 /* Operand qualifier typedef; optimized for the size.  */
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h
index 3be6daeb3b0..605f6f2438f 100644
--- a/opcodes/aarch64-tbl.h
+++ b/opcodes/aarch64-tbl.h
@@ -34,6 +34,7 @@ 
 #define OP3(a,b,c) {OPND(a), OPND(b), OPND(c)}
 #define OP4(a,b,c,d) {OPND(a), OPND(b), OPND(c), OPND(d)}
 #define OP5(a,b,c,d,e) {OPND(a), OPND(b), OPND(c), OPND(d), OPND(e)}
+#define OP6(a,b,c,d,e,f) {OPND(a), OPND(b), OPND(c), OPND(d), OPND(e), OPND(f)}
 
 #define QLF(x) AARCH64_OPND_QLF_##x
 #define QLF1(a) {QLF(a)}
@@ -41,6 +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)}
 
 /* Qualifiers list.  */