[11/20] s390: clclu operands R1 and R3 must be register pairs

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

Commit Message

Jens Remus Sept. 30, 2026, 8:18 a.m. UTC
  clclu R1,R3,D2(B2) operands R1 and R3 must each designate an even-odd
pair of general registers and must designate an even-numbered register;
otherwise, a specification exception is recognized. [1, 2]

[1]: IBM ESA/390 Principles of Operation, SA22-7201-08, z990,
     https://publibfp.dhe.ibm.com/epubs/pdf/dz9ar008.pdf

[2]: IBM z/Architecture Principles of Operation, SA22-7832-14, IBM z17,
     https://www.ibm.com/docs/en/module_1678991624569/pdf/SA22-7832-14.pdf

opcodes/
	* s390-opc.txt (clclu): Use RSY_RERERD instruction format.

gas/testsuite/
	* gas/s390/esa-z990.d (clclu): Operands R1 and R3 must designate
	even-odd register pairs.
	* gas/s390/esa-z990.s (clclu): Likewise.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
---
 gas/testsuite/gas/s390/esa-z990.d | 2 +-
 gas/testsuite/gas/s390/esa-z990.s | 2 +-
 opcodes/s390-opc.txt              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gas/testsuite/gas/s390/esa-z990.d b/gas/testsuite/gas/s390/esa-z990.d
index 61baffdc9948..55747f6b70fe 100644
--- a/gas/testsuite/gas/s390/esa-z990.d
+++ b/gas/testsuite/gas/s390/esa-z990.d
@@ -11,5 +11,5 @@  Disassembly of section .text:
 .*:	b9 3e 00 68 [	 ]*kimd	%r6,%r8
 .*:	b9 3f 00 68 [	 ]*klmd	%r6,%r8
 .*:	b9 1e 00 68 [	 ]*kmac	%r6,%r8
-.*:	eb 69 50 00 80 8f [	 ]*clclu	%r6,%r9,-524288\(%r5\)
+.*:	eb 68 50 00 80 8f [	 ]*clclu	%r6,%r8,-524288\(%r5\)
 .*:	07 07 [ 	]*nopr	%r7
diff --git a/gas/testsuite/gas/s390/esa-z990.s b/gas/testsuite/gas/s390/esa-z990.s
index dffc7f2cff14..361987de4c98 100644
--- a/gas/testsuite/gas/s390/esa-z990.s
+++ b/gas/testsuite/gas/s390/esa-z990.s
@@ -5,4 +5,4 @@  foo:
 	kimd	%r6,%r8
 	klmd	%r6,%r8
 	kmac	%r6,%r8
-	clclu	%r6,%r9,-524288(%r5)
+	clclu	%r6,%r8,-524288(%r5)
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
index 4e131709ae12..cc1a18beba84 100644
--- a/opcodes/s390-opc.txt
+++ b/opcodes/s390-opc.txt
@@ -720,7 +720,7 @@  eb0000000044 bxhg RSY_RRRD "branch on index high 64" z990 zarch
 eb0000000045 bxleg RSY_RRRD "branch on index low or equal 64" z990 zarch
 eb0000000080 icmh RSY_RURD "insert characters under mask high with long offset" z990 zarch
 eb000000008e mvclu RSY_RERERD "move long unicode" z990 esa,zarch
-eb000000008f clclu RSY_RRRD "compare logical long unicode with long offset" z990 esa,zarch
+eb000000008f clclu RSY_RERERD "compare logical long unicode with long offset" z990 esa,zarch
 eb0000000096 lmh RSY_RRRD "load multiple high" z990 zarch
 # new z990 instructions
 b98a cspg RRE_RR "compare and swap and purge" z990 zarch