[20/20] s390: Drop htm extension requirement from ppa insn with arch13

Message ID 20260930081834.2948939-42-jremus@linux.ibm.com
State New
Headers
Series s390: Instruction cleanups |

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-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Jens Remus Sept. 30, 2026, 8:18 a.m. UTC
  Starting with IBM z15 (arch13) the perform processor assist (ppa)
instruction may be used for purposes that are unrelated to the
hardware transactional memory (htm) extension, specifically the
(Constrained-)Transactional-Execution facilities.  Therefore drop
the htm extension requirement with z15 (arch3).

opcodes/
	* s390-opc.txt (ppa): Drop htm extension requirement with z15
	(arch13).

gas/testsuite/
	* gas/s390/s390.exp: Run new zarch-machine-err test.
	* gas/s390/zarch-machine.d: Add new ppa tests.
	* gas/s390/zarch-machine.s: Likewise.
	* gas/s390/zarch-machine-err.d: New ppa error tests.
	* gas/s390/zarch-machine-err.s: Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 gas/testsuite/gas/s390/s390.exp            | 1 +
 gas/testsuite/gas/s390/zarch-machine-err.d | 6 ++++++
 gas/testsuite/gas/s390/zarch-machine-err.s | 9 +++++++++
 gas/testsuite/gas/s390/zarch-machine.d     | 5 ++++-
 gas/testsuite/gas/s390/zarch-machine.s     | 8 ++++++++
 opcodes/s390-opc.txt                       | 3 +++
 6 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 gas/testsuite/gas/s390/zarch-machine-err.d
 create mode 100644 gas/testsuite/gas/s390/zarch-machine-err.s
  

Patch

diff --git a/gas/testsuite/gas/s390/s390.exp b/gas/testsuite/gas/s390/s390.exp
index 49876aa00e33..90863de6198c 100644
--- a/gas/testsuite/gas/s390/s390.exp
+++ b/gas/testsuite/gas/s390/s390.exp
@@ -47,6 +47,7 @@  if [expr [istarget "s390-*-*"] ||  [istarget "s390x-*-*"]]  then {
     run_dump_test "zarch-reloc" "{as -m64}"
     run_dump_test "zarch-operands" "{as -m64} {as -march=z9-109}"
     run_dump_test "zarch-machine" "{as -m64} {as -march=z900}"
+    run_dump_test "zarch-machine-err" "{as -m64} {as -march=z900}"
     run_dump_test "zarch-optargs" "{as -m64} {as -march=arch12}"
     run_dump_test "zarch-insndesc" "{as -m64}"
     run_list_test "machine-parsing-1" ""
diff --git a/gas/testsuite/gas/s390/zarch-machine-err.d b/gas/testsuite/gas/s390/zarch-machine-err.d
new file mode 100644
index 000000000000..7501c98cc9a7
--- /dev/null
+++ b/gas/testsuite/gas/s390/zarch-machine-err.d
@@ -0,0 +1,6 @@ 
+#name: s390x machine error
+#as: -march=z900
+#error: 4: Error: Unrecognized opcode: `ppa'.*
+#error: 6: Error: Unrecognized opcode: `ppa'.*
+#error: 8: Error: Unrecognized opcode: `ppa'.*
+#objdump: -dr
diff --git a/gas/testsuite/gas/s390/zarch-machine-err.s b/gas/testsuite/gas/s390/zarch-machine-err.s
new file mode 100644
index 000000000000..abe14ca972ab
--- /dev/null
+++ b/gas/testsuite/gas/s390/zarch-machine-err.s
@@ -0,0 +1,9 @@ 
+	.text
+	.machine push
+	.machine "z196"
+	ppa	%r1,%r2,3
+	.machine "zEC12+nohtm"
+	ppa	%r1,%r2,3
+	.machine "z14+nohtm"
+	ppa	%r1,%r2,3
+	.machine pop
diff --git a/gas/testsuite/gas/s390/zarch-machine.d b/gas/testsuite/gas/s390/zarch-machine.d
index 96a202dfb9d8..e08d0237ba22 100644
--- a/gas/testsuite/gas/s390/zarch-machine.d
+++ b/gas/testsuite/gas/s390/zarch-machine.d
@@ -9,4 +9,7 @@  Disassembly of section .text:
 .*:	e3 95 af ff 00 08 [ 	]*ag	%r9,4095\(%r5,%r10\)
 .*:	eb d6 65 b3 01 6a [ 	]*asi	5555\(%r6\),-42
 .*:	e3 95 af ff 00 18 [ 	]*agf	%r9,4095\(%r5,%r10\)
-.*:	07 07 [ 	]*nopr	%r7
+.*:	b2 e8 30 12 [	 ]*ppa	%r1,%r2,3
+.*:	b2 e8 30 12 [	 ]*ppa	%r1,%r2,3
+.*:	b2 e8 30 12 [	 ]*ppa	%r1,%r2,3
+#?.*:	07 07 [	 ]*nopr	%r7
diff --git a/gas/testsuite/gas/s390/zarch-machine.s b/gas/testsuite/gas/s390/zarch-machine.s
index f40a18c22209..ac37e2b6faff 100644
--- a/gas/testsuite/gas/s390/zarch-machine.s
+++ b/gas/testsuite/gas/s390/zarch-machine.s
@@ -6,3 +6,11 @@  foo:
 	asi	5555(%r6),-42
 .machine pop
 	agf	%r9,4095(%r5,%r10)
+	.machine push
+	.machine "z900+htm"
+	ppa	%r1,%r2,3
+	.machine "zEC12"
+	ppa	%r1,%r2,3
+	.machine "z15+nohtm"
+	ppa	%r1,%r2,3
+	.machine pop
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
index d95caa8bb791..bd6df3ff0fba 100644
--- a/opcodes/s390-opc.txt
+++ b/opcodes/s390-opc.txt
@@ -2049,6 +2049,9 @@  e60000000052 vcvbg VRR_RV0UU "vector convert to binary 64 bit" arch13 zarch optp
 
 b93a kdsa RRE_RR "compute digital signature authentication" arch13 zarch
 
+# PPA-in-Order Facility
+
+b2e8 ppa RRF_U0RR "perform processor assist" arch13 zarch
 
 # z16 (arch14) instructions