This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] fix dcbt operand order for "server" category
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, Andrew Pinski <pinskia at gmail dot com>
- Date: Thu, 05 Feb 2009 14:29:54 -0600
- Subject: [PATCH] fix dcbt operand order for "server" category
The dcbt instruction that supports the TH operand used to be optional but
now is part of the base ISA. However, Embdedded and Server categories use
different operand ordering, with Embedded having TH being the first operand
and Server having TH being the last/3rd operand. Ditto for dcbtst.
This has passed building and make check. Ok for mainline?
Peter
gas/testsuite/
* gas/ppc/booke.s ("dcbt", "dcbtst"): New tests.
* gas/ppc/booke.d: Likewise.
* gas/ppc/power4_32.s: Likewise.
* gas/ppc/power4_32.d: Likewise.
opcodes/
* ppc-opc.c (powerpc_opcodes) <"dcbt", "dcbtst">: Deprecate the Embedded
operand ordering for POWER4 and later and use the correct Server operand
ordering.
Index: gas/testsuite/gas/ppc/booke.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/booke.d,v
retrieving revision 1.13
diff -u -p -r1.13 booke.d
--- gas/testsuite/gas/ppc/booke.d 4 Dec 2008 10:29:16 -0000 1.13
+++ gas/testsuite/gas/ppc/booke.d 5 Feb 2009 20:09:09 -0000
@@ -38,3 +38,6 @@ Disassembly of section \.text:
68: 7c 07 42 a6 mfsprg r0,7
6c: 7c 17 43 a6 mtsprg 7,r0
70: 7c 17 43 a6 mtsprg 7,r0
+ 74: 7c 05 32 2c dcbt r5,r6
+ 78: 7c 05 32 2c dcbt r5,r6
+ 7c: 7d 05 32 2c dcbt 8,r5,r6
Index: gas/testsuite/gas/ppc/booke.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/booke.s,v
retrieving revision 1.6
diff -u -p -r1.6 booke.s
--- gas/testsuite/gas/ppc/booke.s 4 Dec 2008 10:29:16 -0000 1.6
+++ gas/testsuite/gas/ppc/booke.s 5 Feb 2009 20:09:09 -0000
@@ -36,3 +36,7 @@ branch_target_2:
mfsprg7 0
mtsprg 7, 0
mtsprg7 0
+
+ dcbt 5,6
+ dcbt 0,5,6
+ dcbt 8,5,6
Index: gas/testsuite/gas/ppc/power4_32.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/power4_32.d,v
retrieving revision 1.1
diff -u -p -r1.1 power4_32.d
--- gas/testsuite/gas/ppc/power4_32.d 9 Sep 2008 13:25:05 -0000 1.1
+++ gas/testsuite/gas/ppc/power4_32.d 5 Feb 2009 20:09:09 -0000
@@ -41,3 +41,6 @@ Disassembly of section \.text:
7c: 7c 01 17 ec dcbz r1,r2
80: 7c 23 27 ec dcbzl r3,r4
84: 7c 05 37 ec dcbz r5,r6
+ 88: 7c 05 32 2c dcbt r5,r6
+ 8c: 7c 05 32 2c dcbt r5,r6
+ 90: 7d 05 32 2c dcbt r5,r6,8
Index: gas/testsuite/gas/ppc/power4_32.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/ppc/power4_32.s,v
retrieving revision 1.1
diff -u -p -r1.1 power4_32.s
--- gas/testsuite/gas/ppc/power4_32.s 9 Sep 2008 13:25:05 -0000 1.1
+++ gas/testsuite/gas/ppc/power4_32.s 5 Feb 2009 20:09:09 -0000
@@ -34,3 +34,6 @@ start:
dcbz 1, 2
dcbzl 3, 4
dcbz 5, 6
+ dcbt 5,6
+ dcbt 5,6,0
+ dcbt 5,6,8
Index: opcodes/ppc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.114
diff -u -p -r1.114 ppc-opc.c
--- opcodes/ppc-opc.c 15 Jan 2009 04:27:28 -0000 1.114
+++ opcodes/ppc-opc.c 5 Feb 2009 20:09:11 -0000
@@ -3636,7 +3636,8 @@ const struct powerpc_opcode powerpc_opco
{"mtsrin", X(31,242), XRA_MASK, PPC32, PPCNONE, {RS, RB}},
{"mtsri", X(31,242), XRA_MASK, POWER32, PPCNONE, {RS, RB}},
-{"dcbtst", X(31,246), X_MASK, PPC, PPCNONE, {CT, RA, RB}},
+{"dcbtst", X(31,246), X_MASK, PPC, POWER4, {CT, RA, RB}},
+{"dcbtst", X(31,246), X_MASK, POWER4, PPCNONE, {RA, RB, CT}},
{"stbux", X(31,247), X_MASK, COM, PPCNONE, {RS, RAS, RB}},
@@ -3667,7 +3668,8 @@ const struct powerpc_opcode powerpc_opco
{"lscbx", XRC(31,277,0), X_MASK, M601, PPCNONE, {RT, RA, RB}},
{"lscbx.", XRC(31,277,1), X_MASK, M601, PPCNONE, {RT, RA, RB}},
-{"dcbt", X(31,278), X_MASK, PPC, PPCNONE, {CT, RA, RB}},
+{"dcbt", X(31,278), X_MASK, PPC, POWER4, {CT, RA, RB}},
+{"dcbt", X(31,278), X_MASK, POWER4, PPCNONE, {RA, RB, CT}},
{"lhzx", X(31,279), X_MASK, COM, PPCNONE, {RT, RA0, RB}},