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

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