[v0,08/13] aarch64: add PAuth_LR instructions belonging to NOP space

Message ID 20240708123452.1883314-9-matthieu.longo@arm.com
State New
Headers
Series aarch64: add instructions for Armv9.5-A PAC enhancement |

Checks

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

Commit Message

Matthieu Longo July 8, 2024, 12:34 p.m. UTC
  The 'pacm' instruction is introduced by the PAC enhancement feature
PAuth_LR, but does not require the declaration of this feature
because it belongs to the NOP space.
This patch also adds the relevant tests for the 'pacm' instruction.
---
 gas/testsuite/gas/aarch64/system-3.d | 2 ++
 gas/testsuite/gas/aarch64/system-3.s | 4 ++++
 gas/testsuite/gas/aarch64/system.d   | 2 +-
 opcodes/aarch64-tbl.h                | 1 +
 4 files changed, 8 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gas/testsuite/gas/aarch64/system-3.d b/gas/testsuite/gas/aarch64/system-3.d
index 04df1ee5cbf..4b5dae23d03 100644
--- a/gas/testsuite/gas/aarch64/system-3.d
+++ b/gas/testsuite/gas/aarch64/system-3.d
@@ -32,3 +32,5 @@  Disassembly of section \.text:
 .*:	d50323df 	autibz
 .*:	d50323ff 	autibsp
 .*:	d50323ff 	autibsp
+.*:	d50324ff 	pacm
+.*:	d50324ff 	pacm
diff --git a/gas/testsuite/gas/aarch64/system-3.s b/gas/testsuite/gas/aarch64/system-3.s
index c68b4a8e09d..319bf66cf40 100644
--- a/gas/testsuite/gas/aarch64/system-3.s
+++ b/gas/testsuite/gas/aarch64/system-3.s
@@ -39,3 +39,7 @@ 
 
 	autibsp
 	hint #0x1f
+
+	/* ARMv9.5 Pointer Authentication, HINT alias instructions. */
+	pacm
+	hint #0x27
diff --git a/gas/testsuite/gas/aarch64/system.d b/gas/testsuite/gas/aarch64/system.d
index c1400771d43..30db45b8ff1 100644
--- a/gas/testsuite/gas/aarch64/system.d
+++ b/gas/testsuite/gas/aarch64/system.d
@@ -54,7 +54,7 @@  Disassembly of section \.text:
 .*:	d503249f 	(hint	#0x24|bti	j)
 .*:	d50324bf 	hint	#0x25
 .*:	d50324df 	(hint	#0x26|bti	jc)
-.*:	d50324ff 	hint	#0x27
+.*:	d50324ff 	(hint	#0x27|pacm)
 .*:	d503251f 	(hint	#0x28|chkfeat	x16)
 .*:	d503253f 	hint	#0x29
 .*:	d503255f 	hint	#0x2a
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h
index 7ef9cea9119..dd9f2b6c6cd 100644
--- a/opcodes/aarch64-tbl.h
+++ b/opcodes/aarch64-tbl.h
@@ -4527,6 +4527,7 @@  const struct aarch64_opcode aarch64_opcode_table[] =
   CORE_INSN ("pacib1716", 0xd503215f, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
   CORE_INSN ("autia1716", 0xd503219f, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
   CORE_INSN ("autib1716", 0xd50321df, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
+  CORE_INSN ("pacm", 0xd50324ff, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
   CORE_INSN ("esb", 0xd503221f, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
   CORE_INSN ("psb", 0xd503223f, 0xffffffff, ic_system, 0, OP1 (BARRIER_PSB), {}, F_ALIAS),
   CORE_INSN ("tsb", 0xd503225f, 0xffffffff, ic_system, 0, OP1 (BARRIER_PSB), {}, F_ALIAS),