This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] s390: Fix idte instruction format.


Greetings,
I've added a fix for the s390 assembler: the RRF_R0RR operand format is
incorrect. The only instruction that is using this format is IDTE and
for IDTE the correct instruction format is "IDTE R1,R3,R2" with R1 at
bit 24, R3 at bit 16 and R2 at bit 28. With this incompatible change all
user of IDTE needs to swap the arguments but fortunately this is a
privileged instruction. There should only be a handful of users, all
versions of the Linux kernel use the .insn notation and are not affected.

blue skies,
  Martin.
---

opcodes/ChangeLog
	
2008-05-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* s390-opc.c (INSTR_RRF_R0RR): Fix RRF_R0RR operand format.

gas/testsuite/ChangeLog

2008-05-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* gas/s390/zarch-z990.d (idte): Fix operand format.

diff -urpN src/gas/testsuite/gas/s390/zarch-z990.d src-s390/gas/testsuite/gas/s390/zarch-z990.d
--- src/gas/testsuite/gas/s390/zarch-z990.d	2005-08-12 19:44:45.000000000 +0200
+++ src-s390/gas/testsuite/gas/s390/zarch-z990.d	2008-05-27 13:44:48.000000000 +0200
@@ -45,7 +45,7 @@ Disassembly of section .text:
 .*:	eb 6f 50 00 80 80 [	 ]*icmh	%r6,15,-524288\(%r5\)
 .*:	eb 6f 50 00 80 81 [	 ]*icmy	%r6,15,-524288\(%r5\)
 .*:	e3 65 a0 00 80 73 [	 ]*icy	%r6,-524288\(%r5,%r10\)
-.*:	b9 8e 50 69 [	 ]*idte	%r6,%r9,%r5
+.*:	b9 8e 50 69 [	 ]*idte	%r6,%r5,%r9
 .*:	eb 69 50 00 80 9a [	 ]*lamy	%a6,%a9,-524288\(%r5\)
 .*:	e3 65 a0 00 80 71 [	 ]*lay	%r6,-524288\(%r5,%r10\)
 .*:	e3 65 a0 00 80 76 [	 ]*lb	%r6,-524288\(%r5,%r10\)
diff -urpN src/gas/testsuite/gas/s390/zarch-z990.s src-s390/gas/testsuite/gas/s390/zarch-z990.s
--- src/gas/testsuite/gas/s390/zarch-z990.s	2005-08-12 19:44:45.000000000 +0200
+++ src-s390/gas/testsuite/gas/s390/zarch-z990.s	2008-05-27 13:43:25.000000000 +0200
@@ -39,7 +39,7 @@ foo:
 	icmh	%r6,15,-524288(%r5)
 	icmy	%r6,15,-524288(%r5)
 	icy	%r6,-524288(%r5,%r10)
-	idte	%r6,%r9,%r5
+	idte	%r6,%r5,%r9
 	lamy	%a6,%a9,-524288(%r5)
 	lay	%r6,-524288(%r5,%r10)
 	lb	%r6,-524288(%r5,%r10)
diff -urpN src/opcodes/s390-opc.c src-s390/opcodes/s390-opc.c
--- src/opcodes/s390-opc.c	2008-04-09 16:18:24.000000000 +0200
+++ src-s390/opcodes/s390-opc.c	2008-05-27 13:42:44.000000000 +0200
@@ -268,7 +268,7 @@ const struct s390_operand s390_operands[
 #define INSTR_RRF_F0FR   4, { F_24,F_16,R_28,0,0,0 }           /* e.g. iedtr */
 #define INSTR_RRF_FUFF   4, { F_24,F_16,F_28,U4_20,0,0 }       /* e.g. didbr */
 #define INSTR_RRF_RURR   4, { R_24,R_28,R_16,U4_20,0,0 }       /* e.g. .insn */
-#define INSTR_RRF_R0RR   4, { R_24,R_28,R_16,0,0,0 }           /* e.g. idte  */
+#define INSTR_RRF_R0RR   4, { R_24,R_16,R_28,0,0,0 }           /* e.g. idte  */
 #define INSTR_RRF_U0FF   4, { F_24,U4_16,F_28,0,0,0 }          /* e.g. fixr  */
 #define INSTR_RRF_U0RF   4, { R_24,U4_16,F_28,0,0,0 }          /* e.g. cfebr */
 #define INSTR_RRF_UUFF   4, { F_24,U4_16,F_28,U4_20,0,0 }      /* e.g. fidtr */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]