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

01917d
commit e43de63c8fd11a15d7c6c852747c81664c0beb2a
01917d
Author: Alan Modra <amodra@gmail.com>
01917d
Date:   Thu May 19 00:10:35 2016 +0930
01917d
01917d
    Fix powerpc subis range
01917d
    
01917d
            * ppc-opc.c: Formatting.
01917d
            (NSISIGNOPT): Define.
01917d
            (powerpc_opcodes <subis>): Use NSISIGNOPT.
01917d
01917d
### a/opcodes/ChangeLog
01917d
### b/opcodes/ChangeLog
01917d
## -1,3 +1,9 @@
01917d
+2016-05-19  Alan Modra  <amodra@gmail.com>
01917d
+
01917d
+	* ppc-opc.c: Formatting.
01917d
+	(NSISIGNOPT): Define.
01917d
+	(powerpc_opcodes <subis>): Use NSISIGNOPT.
01917d
+
01917d
 2016-05-18  Maciej W. Rozycki  <macro@imgtec.com>
01917d
 
01917d
 	* mips-dis.c (is_compressed_mode_p): Add `micromips_p' operand,
01917d
--- a/opcodes/ppc-opc.c
01917d
+++ b/opcodes/ppc-opc.c
01917d
@@ -186,25 +186,25 @@ const struct powerpc_operand powerpc_operands[] =
01917d
      This sets the y bit of the BO field appropriately.  */
01917d
 #define BDM BDA + 1
01917d
   { 0xfffc, 0, insert_bdm, extract_bdm,
01917d
-      PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
01917d
+    PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
01917d
 
01917d
   /* The BD field in a B form instruction when the - modifier is used
01917d
      and absolute address is used.  */
01917d
 #define BDMA BDM + 1
01917d
   { 0xfffc, 0, insert_bdm, extract_bdm,
01917d
-      PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
01917d
+    PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
01917d
 
01917d
   /* The BD field in a B form instruction when the + modifier is used.
01917d
      This sets the y bit of the BO field appropriately.  */
01917d
 #define BDP BDMA + 1
01917d
   { 0xfffc, 0, insert_bdp, extract_bdp,
01917d
-      PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
01917d
+    PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
01917d
 
01917d
   /* The BD field in a B form instruction when the + modifier is used
01917d
      and absolute addressing is used.  */
01917d
 #define BDPA BDP + 1
01917d
   { 0xfffc, 0, insert_bdp, extract_bdp,
01917d
-      PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
01917d
+    PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
01917d
 
01917d
   /* The BF field in an X or XL form instruction.  */
01917d
 #define BF BDPA + 1
01917d
@@ -414,7 +414,8 @@ const struct powerpc_operand powerpc_operands[] =
01917d
 
01917d
   /* Power4 version for mfcr.  */
01917d
 #define FXM4 FXM + 1
01917d
-  { 0xff, 12, insert_fxm, extract_fxm, PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE},
01917d
+  { 0xff, 12, insert_fxm, extract_fxm,
01917d
+    PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE},
01917d
   /* If the FXM4 operand is ommitted, use the sentinel value -1.  */
01917d
   { -1, -1, NULL, NULL, 0},
01917d
 
01917d
@@ -493,10 +494,16 @@ const struct powerpc_operand powerpc_operands[] =
01917d
      SI field, only negated.  */
01917d
 #define NSI NBI + 1
01917d
   { 0xffff, 0, insert_nsi, extract_nsi,
01917d
-      PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
01917d
+    PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
01917d
+
01917d
+  /* The NSI field in a D form instruction when we accept a wide range
01917d
+     of positive values.  */
01917d
+#define NSISIGNOPT NSI + 1
01917d
+  { 0xffff, 0, NULL, NULL,
01917d
+    PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
01917d
 
01917d
   /* The RA field in an D, DS, DQ, X, XO, M, or MDS form instruction.  */
01917d
-#define RA NSI + 1
01917d
+#define RA NSISIGNOPT + 1
01917d
 #define RA_MASK (0x1f << 16)
01917d
   { 0x1f, 16, NULL, NULL, PPC_OPERAND_GPR },
01917d
 
01917d
@@ -601,7 +608,7 @@ const struct powerpc_operand powerpc_operands[] =
01917d
      SCLSCI8 field, only negated.  */
01917d
 #define SCLSCI8N SCLSCI8 + 1
01917d
   { 0xffffffff, PPC_OPSHIFT_INV, insert_sci8n, extract_sci8n,
01917d
-      PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
01917d
+    PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
01917d
 
01917d
   /* The SD field of the SD4 form instruction.  */
01917d
 #define SE_SD SCLSCI8N + 1
01917d
@@ -690,7 +697,8 @@ const struct powerpc_operand powerpc_operands[] =
01917d
   /* The TBR field in an XFX form instruction.  This is like the SPR
01917d
      field, but it is optional.  */
01917d
 #define TBR SV + 1
01917d
-  { 0x3ff, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE},
01917d
+  { 0x3ff, 11, insert_tbr, extract_tbr,
01917d
+    PPC_OPERAND_OPTIONAL | PPC_OPERAND_OPTIONAL_VALUE},
01917d
   /* If the TBR operand is ommitted, use the value 268.  */
01917d
   { -1, 268, NULL, NULL, 0},
01917d
 
01917d
@@ -874,12 +882,12 @@ const struct powerpc_operand powerpc_operands[] =
01917d
   /* The VLESIMM field in a D form instruction.  */
01917d
 #define VLESIMM URC + 1
01917d
   { 0xffff, PPC_OPSHIFT_INV, insert_vlesi, extract_vlesi,
01917d
-      PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
01917d
+    PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
01917d
 
01917d
   /* The VLENSIMM field in a D form instruction.  */
01917d
 #define VLENSIMM VLESIMM + 1
01917d
   { 0xffff, PPC_OPSHIFT_INV, insert_vlensi, extract_vlensi,
01917d
-      PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
01917d
+    PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
01917d
 
01917d
   /* The VLEUIMM field in a D form instruction.  */
01917d
 #define VLEUIMM VLENSIMM + 1
01917d
@@ -3878,7 +3886,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
01917d
 {"liu",		OP(15),		DRA_MASK,    PWRCOM,	PPCNONE,	{RT, SISIGNOPT}},
01917d
 {"addis",	OP(15),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, SISIGNOPT}},
01917d
 {"cau",		OP(15),		OP_MASK,     PWRCOM,	PPCNONE,	{RT, RA0, SISIGNOPT}},
01917d
-{"subis",	OP(15),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, NSI}},
01917d
+{"subis",	OP(15),		OP_MASK,     PPCCOM,	PPCNONE,	{RT, RA0, NSISIGNOPT}},
01917d
 
01917d
 {"bdnz-",    BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDM}},
01917d
 {"bdnz+",    BBO(16,BODNZ,0,0),		BBOATBI_MASK,  PPCCOM,	 PPCNONE,	{BDP}},