PR 4448 overstrict powerpc operand check

Alan Modra amodra@bigpond.net.au
Wed May 2 11:23:00 GMT 2007


gas/
	PR 4448
	* config/tc-ppc.c (ppc_insert_operand): Don't increase min for
	PPC_OPERAND_PLUS1.
include/opcode/
	* ppc.h (PPC_OPERAND_PLUS1): Update comment.

Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.120
diff -u -p -r1.120 tc-ppc.c
--- gas/config/tc-ppc.c	30 Apr 2007 00:27:57 -0000	1.120
+++ gas/config/tc-ppc.c	2 May 2007 11:20:25 -0000
@@ -1544,10 +1544,7 @@ ppc_insert_operand (insn, operand, val, 
     }
 
   if ((operand->flags & PPC_OPERAND_PLUS1) != 0)
-    {
-      max++;
-      min++;
-    }
+    max++;
 
   if ((operand->flags & PPC_OPERAND_NEGATIVE) != 0)
     test = - val;
Index: include/opcode/ppc.h
===================================================================
RCS file: /cvs/src/src/include/opcode/ppc.h,v
retrieving revision 1.24
diff -u -p -r1.24 ppc.h
--- include/opcode/ppc.h	20 Apr 2007 12:25:12 -0000	1.24
+++ include/opcode/ppc.h	2 May 2007 11:21:53 -0000
@@ -294,7 +294,7 @@ extern const unsigned int num_powerpc_op
 /* This operand is for the DQ field in a DQ form instruction.  */
 #define PPC_OPERAND_DQ (0x8000)
 
-/* Valid range of operand is 1..n rather than 0..n-1.  */
+/* Valid range of operand is 0..n rather than 0..n-1.  */
 #define PPC_OPERAND_PLUS1 (0x10000)
 
 /* The POWER and PowerPC assemblers use a few macros.  We keep them

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list