Blame SOURCES/binutils-2.27-power9.3.patch

be6651
diff -rup binutils.orig/gas/testsuite/gas/ppc/power9.d binutils-2.27/gas/testsuite/gas/ppc/power9.d
be6651
--- binutils.orig/gas/testsuite/gas/ppc/power9.d	2017-09-13 09:46:21.695333611 +0100
be6651
+++ binutils-2.27/gas/testsuite/gas/ppc/power9.d	2017-09-13 09:53:46.594277167 +0100
be6651
@@ -312,8 +312,9 @@ Disassembly of section \.text:
be6651
 .*:	(f1 31 9d 6f|6f 9d 31 f1) 	xscvdphp vs41,vs51
be6651
 .*:	(f1 58 a7 6f|6f a7 58 f1) 	xvcvhpsp vs42,vs52
be6651
 .*:	(f1 79 af 6f|6f af 79 f1) 	xvcvsphp vs43,vs53
be6651
-.*:	(4c 60 00 04|04 00 60 4c) 	addpcis r3,0
be6651
-.*:	(4c 60 00 04|04 00 60 4c) 	addpcis r3,0
be6651
+.*:	(4c 60 00 04|04 00 60 4c) 	lnia    r3
be6651
+.*:	(4c 60 00 04|04 00 60 4c) 	lnia    r3
be6651
+.*:	(4c 60 00 04|04 00 60 4c) 	lnia    r3
be6651
 .*:	(4c 80 00 05|05 00 80 4c) 	addpcis r4,1
be6651
 .*:	(4c 80 00 05|05 00 80 4c) 	addpcis r4,1
be6651
 .*:	(4c bf ff c4|c4 ff bf 4c) 	addpcis r5,-2
be6651
@@ -391,4 +392,7 @@ Disassembly of section \.text:
be6651
 .*:	(ff d7 04 8e|8e 04 d7 ff) 	mffscrni f30,0
be6651
 .*:	(ff d7 1c 8e|8e 1c d7 ff) 	mffscrni f30,3
be6651
 .*:	(ff f8 04 8e|8e 04 f8 ff) 	mffsl   f31
be6651
+.*:	(01 00 00 44|44 00 00 01) 	scv     0
be6651
+.*:	(e1 0f 00 44|44 00 0f e1) 	scv     127
be6651
+.*:	(a4 00 00 4c|4c 00 00 a4) 	rfscv
be6651
 #pass
be6651
diff -rup binutils.orig/gas/testsuite/gas/ppc/power9.s binutils-2.27/gas/testsuite/gas/ppc/power9.s
be6651
--- binutils.orig/gas/testsuite/gas/ppc/power9.s	2017-09-13 09:46:21.694333623 +0100
be6651
+++ binutils-2.27/gas/testsuite/gas/ppc/power9.s	2017-09-13 09:54:01.747104949 +0100
be6651
@@ -303,6 +303,7 @@ power9:
be6651
 	xscvdphp    41,51
be6651
 	xvcvhpsp    42,52
be6651
 	xvcvsphp    43,53
be6651
+	lnia        3
be6651
 	addpcis     3,0
be6651
 	subpcis     3,0
be6651
 	addpcis     4,1
be6651
@@ -382,3 +383,6 @@ power9:
be6651
 	mffscrni    30,0
be6651
 	mffscrni    30,3
be6651
 	mffsl       31
be6651
+	scv         0
be6651
+	scv         127
be6651
+	rfscv
be6651
diff -rup binutils.orig/opcodes/ppc-opc.c binutils-2.27/opcodes/ppc-opc.c
be6651
--- binutils.orig/opcodes/ppc-opc.c	2017-09-13 09:46:21.874331577 +0100
be6651
+++ binutils-2.27/opcodes/ppc-opc.c	2017-09-13 09:55:18.745229836 +0100
be6651
@@ -441,7 +441,7 @@ const struct powerpc_operand powerpc_ope
be6651
 #define L2OPT L32OPT + 1
be6651
   { 0x3, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
be6651
 
be6651
-  /* The LEV field in a POWER SVC form instruction.  */
be6651
+  /* The LEV field in a POWER SVC / POWER9 SCV form instruction.  */
be6651
 #define SVC_LEV L2OPT + 1
be6651
   { 0x7f, 5, NULL, NULL, 0 },
be6651
 
be6651
@@ -2447,6 +2447,9 @@ extract_vleil (unsigned long insn,
be6651
 #define DX(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1))
be6651
 #define DX_MASK DX (0x3f, 0x1f)
be6651
 
be6651
+/* An DX form instruction with the D bits specified.  */
be6651
+#define NODX_MASK (DX_MASK | 0x1fffc1)
be6651
+
be6651
 /* An EVSEL form instruction.  */
be6651
 #define EVSEL(op, xop) (OP (op) | (((unsigned long)(xop)) & 0xff) << 3)
be6651
 #define EVSEL_MASK EVSEL(0x3f, 0xff)
be6651
@@ -4145,6 +4148,7 @@ const struct powerpc_opcode powerpc_opco
be6651
 {"bcla",	B(16,1,1),	B_MASK,	     COM,	PPCVLE,		{BO, BI, BDA}},
be6651
 
be6651
 {"svc",		SC(17,0,0),	SC_MASK,     POWER,	PPCVLE,		{SVC_LEV, FL1, FL2}},
be6651
+{"scv",		SC(17,0,1),	SC_MASK,     POWER9,	PPCVLE,		{SVC_LEV}},
be6651
 {"svcl",	SC(17,0,1),	SC_MASK,     POWER,	PPCVLE,		{SVC_LEV, FL1, FL2}},
be6651
 {"sc",		SC(17,1,0),	SC_MASK,     PPC,	PPCVLE,		{LEV}},
be6651
 {"svca",	SC(17,1,0),	SC_MASK,     PWRCOM,	PPCVLE,		{SV}},
be6651
@@ -4157,6 +4161,7 @@ const struct powerpc_opcode powerpc_opco
be6651
 
be6651
 {"mcrf",     XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM,	PPCVLE,		{BF, BFA}},
be6651
 
be6651
+{"lnia",     DX(19,2),		NODX_MASK,   POWER9,	PPCVLE,		{RT}},
be6651
 {"addpcis",  DX(19,2),		DX_MASK,     POWER9,	PPCVLE,		{RT, DXD}},
be6651
 {"subpcis",  DX(19,2),		DX_MASK,     POWER9,	PPCVLE,		{RT, NDXD}},
be6651
 
be6651
@@ -4394,6 +4399,7 @@ const struct powerpc_opcode powerpc_opco
be6651
 {"rfi",		XL(19,50),	0xffffffff,  COM,	PPCVLE,		{0}},
be6651
 {"rfci",	XL(19,51), 0xffffffff, PPC403|BOOKE|PPCE300|PPCA2|PPC476, PPCVLE, {0}},
be6651
 
be6651
+{"rfscv",	XL(19,82),	0xffffffff,  POWER9,	PPCVLE,		{0}},
be6651
 {"rfsvc",	XL(19,82),	0xffffffff,  POWER,	PPCVLE,		{0}},
be6651
 
be6651
 {"rfgi",	XL(19,102),   0xffffffff, E500MC|PPCA2,	PPCVLE,		{0}},