enable-checking fixes for PPC

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Fri Nov 19 10:10:00 GMT 1999


Hi,

these patches fix problems revealed by --enable-checking on 
powerpc-linux-gnu. Now I'm stuck at the same AUTO_INC_DEC problem in flow.c 
with invalid LOG_LINKS like Richard Earnshaw on ARM.

Franz.

	* combine.c (try_combine): Only pass SET or CLOBBER to SET_DEST
	* rs6000.md: Only access a CONST_INT with INTVAL

Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.91
diff -u -p -r1.91 combine.c
--- combine.c   1999/11/05 00:49:02     1.91
+++ combine.c   1999/11/18 19:43:14
@@ -1541,7 +1541,9 @@ try_combine (i3, i2, i1)

        if (i == XVECLEN (p2, 0))
         for (i = 0; i < XVECLEN (p2, 0); i++)
-         if (SET_DEST (XVECEXP (p2, 0, i)) == SET_SRC (PATTERN (i3)))
+         if ((GET_CODE (XVECEXP (p2, 0, i)) == SET
+              || GET_CODE (XVECEXP (p2, 0, i)) == CLOBBER)
+             && SET_DEST (XVECEXP (p2, 0, i)) == SET_SRC (PATTERN (i3)))
             {
               combine_merges++;

Index: gcc/config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.76
diff -u -p -r1.76 rs6000.md
--- rs6000.md   1999/10/28 00:24:32     1.76
+++ rs6000.md   1999/11/18 19:43:22
@@ -1717,11 +1717,16 @@
    ""
    "
  {
-  int i = exact_log2 (INTVAL (operands[2]));
+  int i;
    rtx temp1;
    rtx temp2;

-  if (GET_CODE (operands[2]) != CONST_INT || i < 0)
+  if (GET_CODE (operands[2]) != CONST_INT)
+    FAIL;
+
+  i = exact_log2 (INTVAL (operands[2]));
+
+  if (i < 0)
      FAIL;

    temp1 = gen_reg_rtx (SImode);



More information about the Gcc-patches mailing list