Blame SOURCES/gdb-rhbz1320945-power9-14of38.patch

a094f6
commit 4fff86c517abb5ba454befe0ec0f284f720dde00
a094f6
Author: Peter Bergner <bergner@vnet.ibm.com>
a094f6
Date:   Mon Apr 27 11:06:54 2015 -0500
a094f6
a094f6
    opcodes/
a094f6
    
a094f6
            * ppc-opc.c (DCBT_EO): New define.
a094f6
            (powerpc_opcodes) <lbarx>: Enable for POWER8 and later.
a094f6
            <lharx>: Likewise.
a094f6
            <stbcx.>: Likewise.
a094f6
            <sthcx.>: Likewise.
a094f6
            <waitrsv>: Do not enable for POWER7 and later.
a094f6
            <waitimpl>: Likewise.
a094f6
            <dcbt>: Default to the two operand form of the instruction for all
a094f6
            "old" cpus.  For "new" cpus, use the operand ordering that matches
a094f6
            whether the cpu is server or embedded.
a094f6
            <dcbtst>: Likewise.
a094f6
    
a094f6
    gas/testsuite/
a094f6
    
a094f6
            * gas/ppc/a2.s: Fixup test case due to dcbt/dcbtst embedded operand
a094f6
            ordering change.
a094f6
            * gas/ppc/a2.d: Likewise.
a094f6
            * gas/ppc/476.d: Likewise.
a094f6
            * gas/ppc/booke.s: Remove invalid 3 operand dcbt tests.
a094f6
            * gas/ppc/booke.d: Likewise.
a094f6
            * gas/ppc/power7.s: Remove lbarx, lharx, stbcx., sthcx., waitrsv
a094f6
            and waitimpl tests.
a094f6
            * gas/ppc/power7.d: Likewise.
a094f6
a094f6
### a/opcodes/ChangeLog
a094f6
### b/opcodes/ChangeLog
a094f6
## -1,3 +1,17 @@
a094f6
+2015-04-27  Peter Bergner  <bergner@vnet.ibm.com>
a094f6
+
a094f6
+	* ppc-opc.c (DCBT_EO): New define.
a094f6
+	(powerpc_opcodes) <lbarx>: Enable for POWER8 and later.
a094f6
+	<lharx>: Likewise.
a094f6
+	<stbcx.>: Likewise.
a094f6
+	<sthcx.>: Likewise.
a094f6
+	<waitrsv>: Do not enable for POWER7 and later.
a094f6
+	<waitimpl>: Likewise.
a094f6
+	<dcbt>: Default to the two operand form of the instruction for all
a094f6
+	"old" cpus.  For "new" cpus, use the operand ordering that matches
a094f6
+	whether the cpu is server or embedded.
a094f6
+	<dcbtst>: Likewise.
a094f6
+
a094f6
 2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
a094f6
 
a094f6
 	* s390-opc.c: New instruction type VV0UU2.
a094f6
--- a/opcodes/ppc-opc.c
a094f6
+++ b/opcodes/ppc-opc.c
a094f6
@@ -2756,6 +2756,12 @@ extract_vleil (unsigned long insn,
a094f6
 #define E6500	PPC_OPCODE_E6500
a094f6
 #define PPCVLE  PPC_OPCODE_VLE
a094f6
 #define PPCHTM  PPC_OPCODE_HTM
a094f6
+/* The list of embedded processors that use the embedded operand ordering
a094f6
+   for the 3 operand dcbt and dcbtst instructions.  */
a094f6
+#define DCBT_EO	(PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_476 \
a094f6
+		 | PPC_OPCODE_A2 | PPC_OPCODE_VLE)
a094f6
+
a094f6
+
a094f6
 
a094f6
 /* The opcode table.
a094f6
 
a094f6
@@ -4463,7 +4469,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"mfvrd",	X(31,51)|1,	XX1RB_MASK|1, PPCVSX2,	PPCNONE,	{RA, VS}},
a094f6
 {"eratilx",	X(31,51),	X_MASK,	     PPCA2,	PPCNONE,	{ERAT_T, RA, RB}},
a094f6
 
a094f6
-{"lbarx",	X(31,52),	XEH_MASK,    POWER7|PPCVLE, PPCNONE,	{RT, RA0, RB, EH}},
a094f6
+{"lbarx",	X(31,52),	XEH_MASK,    POWER8|PPCVLE, PPCNONE,	{RT, RA0, RB, EH}},
a094f6
 
a094f6
 {"ldux",	X(31,53),	X_MASK,      PPC64|PPCVLE, PPCNONE,	{RT, RAL, RB}},
a094f6
  
a094f6
@@ -4478,8 +4484,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"andc",	XRC(31,60,0),	X_MASK,	     COM|PPCVLE, PPCNONE,	{RA, RS, RB}},
a094f6
 {"andc.",	XRC(31,60,1),	X_MASK,	     COM|PPCVLE, PPCNONE,	{RA, RS, RB}},
a094f6
 
a094f6
-{"waitrsv",	X(31,62)|(1<<21), 0xffffffff, POWER7|E500MC|PPCA2, PPCNONE, {0}},
a094f6
-{"waitimpl",	X(31,62)|(2<<21), 0xffffffff, POWER7|E500MC|PPCA2, PPCNONE, {0}},
a094f6
+{"waitrsv",	X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, PPCNONE,	{0}},
a094f6
+{"waitimpl",	X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, PPCNONE,	{0}},
a094f6
 {"wait",	X(31,62),	XWC_MASK,    POWER7|E500MC|PPCA2|PPCVLE, PPCNONE, {WC}},
a094f6
  
a094f6
 {"dcbstep",	XRT(31,63,0),	XRT_MASK,    E500MC|PPCA2|PPCVLE, PPCNONE, {RA0, RB}},
a094f6
@@ -4543,7 +4549,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"mfvrwz",	X(31,115)|1,	XX1RB_MASK|1, PPCVSX2,	PPCNONE,	{RA, VS}},
a094f6
 {"mfvsrwz",	X(31,115),	XX1RB_MASK,   PPCVSX2,	PPCNONE,	{RA, XS6}},
a094f6
 
a094f6
-{"lharx",	X(31,116),	XEH_MASK,    POWER7|PPCVLE, PPCNONE,	{RT, RA0, RB, EH}},
a094f6
+{"lharx",	X(31,116),	XEH_MASK,    POWER8|PPCVLE, PPCNONE,	{RT, RA0, RB, EH}},
a094f6
 
a094f6
 {"clf",		X(31,118),	XTO_MASK,    POWER,	PPCNONE,	{RA, RB}},
a094f6
 
a094f6
@@ -4711,9 +4717,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"mtvsrwz",	X(31,243),	XX1RB_MASK,   PPCVSX2,	PPCNONE,	{XT6, RA}},
a094f6
 
a094f6
 {"dcbtstt",	XRT(31,246,0x10), XRT_MASK,  POWER7,	PPCNONE,	{RA0, RB}},
a094f6
-{"dcbtst",	X(31,246),	X_MASK,      POWER4,	PPCNONE,	{RA0, RB, CT}},
a094f6
-{"dcbtst",	X(31,246),	X_MASK,      PPC|PPCVLE, POWER4,	{CT, RA0, RB}},
a094f6
- 
a094f6
+{"dcbtst",	X(31,246),	X_MASK,      POWER4,	DCBT_EO,	{RA0, RB, CT}},
a094f6
+{"dcbtst",	X(31,246),	X_MASK,      DCBT_EO,	PPCNONE,	{CT, RA0, RB}},
a094f6
+{"dcbtst",	X(31,246),	X_MASK,      PPC,	POWER4|DCBT_EO,	{RA0, RB}},
a094f6
+
a094f6
 {"stbux",	X(31,247),	X_MASK,	     COM|PPCVLE, PPCNONE,	{RS, RAS, RB}},
a094f6
 
a094f6
 {"slliq",	XRC(31,248,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
a094f6
@@ -4753,9 +4760,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"lscbx.",	XRC(31,277,1),	X_MASK,      M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
 {"dcbtt",	XRT(31,278,0x10), XRT_MASK,  POWER7,	PPCNONE,	{RA0, RB}},
a094f6
-{"dcbt",	X(31,278),	X_MASK,      POWER4,	PPCNONE,	{RA0, RB, CT}},
a094f6
-{"dcbt",	X(31,278),	X_MASK,      PPC|PPCVLE, POWER4,	{CT, RA0, RB}},
a094f6
- 
a094f6
+{"dcbt",	X(31,278),	X_MASK,      POWER4,	DCBT_EO,	{RA0, RB, CT}},
a094f6
+{"dcbt",	X(31,278),	X_MASK,      DCBT_EO,	PPCNONE,	{CT, RA0, RB}},
a094f6
+{"dcbt",	X(31,278),	X_MASK,      PPC,	POWER4|DCBT_EO,	{RA0, RB}},
a094f6
+
a094f6
 {"lhzx",	X(31,279),	X_MASK,      COM|PPCVLE, PPCNONE,	{RT, RA0, RB}},
a094f6
 
a094f6
 {"cdtbcd",	X(31,282),	XRB_MASK,    POWER6,	PPCNONE,	{RA, RS}},
a094f6
@@ -5531,7 +5539,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"tendall.",	XRC(31,686,1)|(1<<25), XRTRARB_MASK, PPCHTM, PPCNONE,	{0}},
a094f6
 {"tend.",	XRC(31,686,1), XRTARARB_MASK, PPCHTM,	PPCNONE,	{HTM_A}},
a094f6
 
a094f6
-{"stbcx.",	XRC(31,694,1),	X_MASK,      POWER7,	PPCNONE,	{RS, RA0, RB}},
a094f6
+{"stbcx.",	XRC(31,694,1),	X_MASK,      POWER8,	PPCNONE,	{RS, RA0, RB}},
a094f6
 
a094f6
 {"stfsux",	X(31,695),	X_MASK,      COM,	PPCEFS,		{FRS, RAS, RB}},
a094f6
 
a094f6
@@ -5561,7 +5569,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"stswi",	X(31,725),	X_MASK, PPCCOM|PPCVLE,	E500|E500MC,	{RS, RA0, NB}},
a094f6
 {"stsi",	X(31,725),	X_MASK,      PWRCOM,	PPCNONE,	{RS, RA0, NB}},
a094f6
 
a094f6
-{"sthcx.",	XRC(31,726,1),	X_MASK,      POWER7,	PPCNONE,	{RS, RA0, RB}},
a094f6
+{"sthcx.",	XRC(31,726,1),	X_MASK,      POWER8,	PPCNONE,	{RS, RA0, RB}},
a094f6
 
a094f6
 {"stfdx",	X(31,727),	X_MASK,      COM,	PPCEFS,		{FRS, RA0, RB}},
a094f6