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 PKA syntax


The PKA opcode has the same binary encoding as MVC, but the textual
opcode has the length in the L2 position, not the L1 position.  I.e:

	MVC	123(8,%r1),234(%r4)
	PKA	123(%r1),234(8,%r4)

Also, the maximum length is 32, not 256, so I corrected that in the
testcase as well.  Ok to apply?

2007-02-15  DJ Delorie  <dj@redhat.com>

	* s390-opc.c (INSTR_SS_L2RDRD): New.
	(MASK_SS_L2RDRD): New.
	* s390-opc.txt (pka): Use it.

2007-02-15  DJ Delorie  <dj@redhat.com>

	* gas/s390/esa-g5.s: Adjust for corrected PKA syntax.
	* gas/s390/esa-g5.d: Adjust for corrected PKA syntax.

Index: opcodes/s390-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/s390-opc.c,v
retrieving revision 1.11
diff -p -U3 -r1.11  opcodes/s390-opc.c
--- opcodes/s390-opc.c	12 Aug 2005 18:03:03 -0000	1.11
+++ opcodes/s390-opc.c	15 Feb 2007 23:37:38 -0000
@@ -244,6 +244,7 @@ const struct s390_operand s390_operands[
 #define INSTR_SIY_URD    6, { D20_20,B_16,U8_8,0,0,0 }         /* e.g. tmy   */
 #define INSTR_SSE_RDRD   6, { D_20,B_16,D_36,B_32,0,0 }        /* e.g. mvsdk */
 #define INSTR_SS_L0RDRD  6, { D_20,L8_8,B_16,D_36,B_32,0     } /* e.g. mvc   */
+#define INSTR_SS_L2RDRD  6, { D_20,B_16,D_36,L8_8,B_32,0     } /* e.g. pka   */
 #define INSTR_SS_LIRDRD  6, { D_20,L4_8,B_16,D_36,B_32,U4_12 } /* e.g. srp   */
 #define INSTR_SS_LLRDRD  6, { D_20,L4_8,B_16,D_36,L4_12,B_32 } /* e.g. pack  */
 #define INSTR_SS_RRRDRD  6, { D_20,R_8,B_16,D_36,B_32,R_12 }   /* e.g. mvck  */
@@ -317,6 +318,7 @@ const struct s390_operand s390_operands[
 #define MASK_SIY_URD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_SSE_RDRD    { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SS_L0RDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_L2RDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SS_LIRDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SS_LLRDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SS_RRRDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
Index: opcodes/s390-opc.txt
===================================================================
RCS file: /cvs/src/src/opcodes/s390-opc.txt,v
retrieving revision 1.12
diff -p -U3 -r1.12  opcodes/s390-opc.txt
--- opcodes/s390-opc.txt	19 Oct 2005 15:05:10 -0000	1.12
+++ opcodes/s390-opc.txt	15 Feb 2007 23:37:38 -0000
@@ -428,7 +428,7 @@ a701 tmll RI_RU "test under mask low low
 b278 stcke S_RD "store clock extended" g5 esa,zarch
 b2a5 tre RRE_RR "translate extended" g5 esa,zarch
 eb000000008e mvclu RSE_RRRD "move long unicode" g5 esa,zarch
-e9 pka SS_L0RDRD "pack ascii" g5 esa,zarch
+e9 pka SS_L2RDRD "pack ascii" g5 esa,zarch
 e1 pku SS_L0RDRD "pack unicode" g5 esa,zarch
 b993 troo RRE_RR "translate one to one" g5 esa,zarch
 b992 trot RRE_RR "translate one to two" g5 esa,zarch
Index: gas/testsuite/gas/s390/esa-g5.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/s390/esa-g5.d,v
retrieving revision 1.1
diff -p -U3 -r1.1  gas/testsuite/gas/s390/esa-g5.d
--- gas/testsuite/gas/s390/esa-g5.d	12 Aug 2005 18:01:33 -0000	1.1
+++ gas/testsuite/gas/s390/esa-g5.d	15 Feb 2007 23:37:38 -0000
@@ -341,7 +341,7 @@ Disassembly of section .text:
 .*:	b2 18 5f ff [	 ]*pc	4095\(%r5\)
 .*:	b2 2e 00 69 [	 ]*pgin	%r6,%r9
 .*:	b2 2f 00 69 [	 ]*pgout	%r6,%r9
-.*:	e9 ff 5f ff af ff [	 ]*pka	4095\(256,%r5\),4095\(%r10\)
+.*:	e9 1f 5f ff af ff [	 ]*pka	4095\(%r5\),4095\(32,%r10\)
 .*:	e1 ff 5f ff af ff [	 ]*pku	4095\(256,%r5\),4095\(%r10\)
 .*:	ee 69 5f ff af ff [	 ]*plo	%r6,4095\(%r5\),%r9,4095\(%r10\)
 .*:	01 01 [	 ]*pr
Index: gas/testsuite/gas/s390/esa-g5.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/s390/esa-g5.s,v
retrieving revision 1.1
diff -p -U3 -r1.1  gas/testsuite/gas/s390/esa-g5.s
--- gas/testsuite/gas/s390/esa-g5.s	12 Aug 2005 18:01:33 -0000	1.1
+++ gas/testsuite/gas/s390/esa-g5.s	15 Feb 2007 23:37:38 -0000
@@ -335,7 +335,7 @@ foo:
 	pc	4095(%r5)
 	pgin	%r6,%r9
 	pgout	%r6,%r9
-	pka	4095(256,%r5),4095(%r10)
+	pka	4095(%r5),4095(32,%r10)
 	pku	4095(256,%r5),4095(%r10)
 	plo	%r6,4095(%r5),%r9,4095(%r10)
 	pr


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