Blame SOURCES/binutils-SUPPRESS-PPC-TLBIE-CHECK.patch

c27370
--- binutils-2.25.1/gas/testsuite/gas/ppc/power7.s	2015-07-21 09:20:58.000000000 +0100
c27370
+++ binutils-2.25.1.new/gas/testsuite/gas/ppc/power7.s	2016-03-01 14:08:17.020136029 +0000
c27370
@@ -98,4 +98,4 @@ power7:
c27370
 	mfppr32	  11
c27370
 	mtppr	  12
c27370
 	mtppr32	  13
c27370
-	tlbie     10,11
c27370
+	tlbie     10
c27370
--- binutils-2.25.1/gas/testsuite/gas/ppc/power7.d	2015-07-21 09:20:58.000000000 +0100
c27370
+++ binutils-2.25.1.new/gas/testsuite/gas/ppc/power7.d	2016-03-01 14:08:17.020136029 +0000
c27370
@@ -107,5 +107,5 @@ Disassembly of section \.text:
c27370
 .*:	(7d 62 e2 a6|a6 e2 62 7d) 	mfppr32 r11
c27370
 .*:	(7d 80 e3 a6|a6 e3 80 7d) 	mtppr   r12
c27370
 .*:	(7d a2 e3 a6|a6 e3 a2 7d) 	mtppr32 r13
c27370
-.*:	(7d 60 52 64|64 52 60 7d) 	tlbie   r10,r11
c27370
+.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10
c27370
 #pass
c27370
--- binutils.orig/opcodes/ppc-opc.c	2017-01-17 09:44:23.341397357 +0000
c27370
+++ binutils-2.27/opcodes/ppc-opc.c	2017-01-17 09:45:24.000684653 +0000
c27370
@@ -5182,8 +5182,7 @@ const struct powerpc_opcode powerpc_opco
c27370
 {"mfbhrbe",	X(31,302),	X_MASK,	     POWER8,	0,		{RT, BHRBE}},
c27370
 
c27370
 {"tlbie",	X(31,306),	X_MASK|1<<20,POWER9,	TITAN,		{RB, RS, RIC, PRS, X_R}},
c27370
-{"tlbie",	X(31,306),	XRA_MASK,    POWER7,	POWER9|TITAN,	{RB, RS}},
c27370
-{"tlbie",	X(31,306),	XRTLRA_MASK, PPC,    E500|POWER7|TITAN,	{RB, L}},
c27370
+{"tlbie",	X(31,306),	XRTLRA_MASK, PPC,	POWER9|TITAN,  	{RB, L}},
c27370
 {"tlbi",	X(31,306),	XRT_MASK,    POWER,	0,		{RA0, RB}},
c27370
 
c27370
 {"mfvsrld",	X(31,307),	XX1RB_MASK,  PPCVSX3,	0,		{RA, XS6}},
c27370
--- binutils.orig/gas/testsuite/gas/ppc/e500-ill.s	2017-01-17 10:34:39.821866168 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/e500-ill.s	2017-01-17 10:56:56.766061777 +0000
c27370
@@ -7,4 +7,4 @@ start:
c27370
 	mfdcr   5, 234
c27370
 	mtdcr   432, 8
c27370
 	tlbia
c27370
-	tlbie  3
c27370
+
c27370
--- binutils.orig/gas/testsuite/gas/ppc/e500-ill.l	2017-01-17 10:34:39.821866168 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/e500-ill.l	2017-01-17 10:57:09.021915557 +0000
c27370
@@ -5,4 +5,3 @@
c27370
 .*: Error: unrecognized opcode: `mfdcr'
c27370
 .*: Error: unrecognized opcode: `mtdcr'
c27370
 .*: Error: unrecognized opcode: `tlbia'
c27370
-.*: Error: unrecognized opcode: `tlbie'
c27370
--- binutils.orig/gas/testsuite/gas/ppc/power6.s	2017-01-17 10:34:39.822866157 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/power6.s	2017-01-17 10:58:38.316849143 +0000
c27370
@@ -69,6 +69,5 @@ start:
c27370
 	slbia
c27370
 	slbia   0
c27370
 	slbia   7
c27370
-	tlbie   10
c27370
 	tlbie   10,0
c27370
 	tlbie   10,1
c27370
--- binutils.orig/gas/testsuite/gas/ppc/power6.d	2017-01-17 10:34:39.822866157 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/power6.d	2017-01-17 10:59:24.780294250 +0000
c27370
@@ -74,7 +74,6 @@ Disassembly of section \.text:
c27370
 .*:	(7c 00 03 e4|e4 03 00 7c) 	slbia   
c27370
 .*:	(7c 00 03 e4|e4 03 00 7c) 	slbia   
c27370
 .*:	(7c e0 03 e4|e4 03 e0 7c) 	slbia   7
c27370
-.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10
c27370
-.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10
c27370
+.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10,0
c27370
 .*:	(7c 20 52 64|64 52 20 7c) 	tlbie   r10,1
c27370
 #pass
c27370
--- binutils.orig/gas/testsuite/gas/ppc/power7.s	2017-01-17 10:34:39.823866144 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/power7.s	2017-01-17 11:00:19.835636746 +0000
c27370
@@ -98,4 +98,4 @@ power7:
c27370
 	mfppr32	  11
c27370
 	mtppr	  12
c27370
 	mtppr32	  13
c27370
-	tlbie     10
c27370
+
c27370
--- binutils.orig/gas/testsuite/gas/ppc/power7.d	2017-01-17 10:34:39.822866157 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/power7.d	2017-01-17 11:00:27.995539295 +0000
c27370
@@ -107,5 +107,4 @@ Disassembly of section \.text:
c27370
 .*:	(7d 62 e2 a6|a6 e2 62 7d) 	mfppr32 r11
c27370
 .*:	(7d 80 e3 a6|a6 e3 80 7d) 	mtppr   r12
c27370
 .*:	(7d a2 e3 a6|a6 e3 a2 7d) 	mtppr32 r13
c27370
-.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10
c27370
 #pass
c27370
diff -rup binutils.orig/gas/config/tc-ppc.c binutils-2.27/gas/config/tc-ppc.c
c27370
--- binutils.orig/gas/config/tc-ppc.c	2017-02-02 12:21:55.246930313 +0000
c27370
+++ binutils-2.27/gas/config/tc-ppc.c	2017-02-02 12:29:13.568862941 +0000
c27370
@@ -2672,7 +2672,7 @@ md_assemble (char *str)
c27370
 
c27370
       operand = &powerpc_operands[*opindex_ptr];
c27370
       if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
c27370
-	  && !((operand->flags & PPC_OPERAND_OPTIONAL32) != 0 && ppc_obj64))
c27370
+	  || (operand->flags & PPC_OPERAND_OPTIONAL32))
c27370
 	{
c27370
 	  unsigned int opcount;
c27370
 	  unsigned int num_operands_expected;
c27370
@@ -2741,8 +2741,8 @@ md_assemble (char *str)
c27370
 
c27370
       /* If this is an optional operand, and we are skipping it, just
c27370
 	 insert a zero.  */
c27370
-      if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
c27370
-	  && !((operand->flags & PPC_OPERAND_OPTIONAL32) != 0 && ppc_obj64)
c27370
+      if (((operand->flags & PPC_OPERAND_OPTIONAL) != 0
c27370
+	   || (operand->flags & PPC_OPERAND_OPTIONAL32) != 0)
c27370
 	  && skip_optional)
c27370
 	{
c27370
 	  long val = ppc_optional_operand_value (operand);
c27370
diff -rup binutils-2.27.orig/gas/testsuite/gas/ppc/power6.d binutils-2.27/gas/testsuite/gas/ppc/power6.d
c27370
--- binutils-2.27.orig/gas/testsuite/gas/ppc/power6.d	2017-02-14 10:17:21.352033787 +0000
c27370
+++ binutils-2.27/gas/testsuite/gas/ppc/power6.d	2017-02-14 11:54:36.643091777 +0000
c27370
@@ -74,6 +74,6 @@ Disassembly of section \.text:
c27370
 .*:	(7c 00 03 e4|e4 03 00 7c) 	slbia   
c27370
 .*:	(7c 00 03 e4|e4 03 00 7c) 	slbia   
c27370
 .*:	(7c e0 03 e4|e4 03 e0 7c) 	slbia   7
c27370
-.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10,0
c27370
+.*:	(7c 00 52 64|64 52 00 7c) 	tlbie   r10
c27370
 .*:	(7c 20 52 64|64 52 20 7c) 	tlbie   r10,1
c27370
 #pass
c27370
diff -rup binutils-2.27.orig/opcodes/ppc-opc.c binutils-2.27/opcodes/ppc-opc.c
c27370
--- binutils-2.27.orig/opcodes/ppc-opc.c	2017-02-14 10:17:22.281021961 +0000
c27370
+++ binutils-2.27/opcodes/ppc-opc.c	2017-02-14 11:58:50.035840144 +0000
c27370
@@ -576,9 +576,12 @@ const struct powerpc_operand powerpc_ope
c27370
 #define RD RS
c27370
   { 0x1f, 21, NULL, NULL, PPC_OPERAND_GPR },
c27370
 
c27370
+#define RSLL RS + 1
c27370
+  { 0x1f, 21, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL32 },
c27370
+
c27370
   /* The RS and RT fields of the DS form stq and DQ form lq instructions,
c27370
      which have special value restrictions.  */
c27370
-#define RSQ RS + 1
c27370
+#define RSQ RSLL + 1
c27370
 #define RTQ RSQ
c27370
   { 0x1e, 21, NULL, NULL, PPC_OPERAND_GPR },
c27370
 
c27370
@@ -5132,7 +5135,8 @@ const struct powerpc_opcode powerpc_opco
c27370
 {"mfbhrbe",	X(31,302),	X_MASK,	     POWER8,	0,		{RT, BHRBE}},
c27370
 
c27370
 {"tlbie",	X(31,306),	X_MASK|1<<20,POWER9,	TITAN,		{RB, RS, RIC, PRS, X_R}},
c27370
-{"tlbie",	X(31,306),	XRTLRA_MASK, PPC,	POWER9|TITAN,  	{RB, L}},
c27370
+{"tlbie",	X(31,306),	XRA_MASK,    POWER7,	POWER9|TITAN,	{RB, RSLL}},
c27370
+{"tlbie",	X(31,306),	XRTLRA_MASK, PPC,    E500|POWER7|TITAN,	{RB, LOPT}},
c27370
 {"tlbi",	X(31,306),	XRT_MASK,    POWER,	0,		{RA0, RB}},
c27370
 
c27370
 {"mfvsrld",	X(31,307),	XX1RB_MASK,  PPCVSX3,	0,		{RA, XS6}},