OSDN Git Service

Word wrap comment
[pf3gnuchains/gcc-fork.git] / gcc / combine.c
index 614a95d..911ebbf 100644 (file)
@@ -93,6 +93,20 @@ Boston, MA 02111-1307, USA.  */
 #include "recog.h"
 #include "real.h"
 #include "toplev.h"
+#include "defaults.h"
+
+#ifndef ACCUMULATE_OUTGOING_ARGS
+#define ACCUMULATE_OUTGOING_ARGS 0
+#endif
+
+/* Supply a default definition for PUSH_ARGS.  */
+#ifndef PUSH_ARGS
+#ifdef PUSH_ROUNDING
+#define PUSH_ARGS      !ACCUMULATE_OUTGOING_ARGS
+#else
+#define PUSH_ARGS      0
+#endif
+#endif
 
 /* It is not safe to use ordinary gen_lowpart in combine.
    Use gen_lowpart_for_combine instead.  See comments there.  */
@@ -7883,7 +7897,7 @@ nonzero_bits (x, mode)
          int sp_alignment = STACK_BOUNDARY / BITS_PER_UNIT;
 
 #ifdef PUSH_ROUNDING
-         if (REGNO (x) == STACK_POINTER_REGNUM)
+         if (REGNO (x) == STACK_POINTER_REGNUM && PUSH_ARGS)
            sp_alignment = MIN (PUSH_ROUNDING (1), sp_alignment);
 #endif
 
@@ -10438,13 +10452,10 @@ simplify_comparison (code, pop0, pop1)
          break;
 
        case MINUS:
-         /* (op (minus A B) 0) -> (op A B) */
-         if (op1 == const0_rtx)
-           {
-             op1 = XEXP (op0, 1);
-             op0 = XEXP (op0, 0);
-             continue;
-           }
+         /* We used to optimize signed comparisons against zero, but that
+            was incorrect.  Unsigned comparisons against zero (GTU, LEU)
+            arrive here as equality comparisons, or (GEU, LTU) are
+            optimized away.  No need to special-case them.  */
 
          /* (eq (minus A B) C) -> (eq A (plus B C)) or
             (eq B (minus A C)), whichever simplifies.  We can only do
@@ -11422,7 +11433,7 @@ use_crosses_set_p (x, from_cuid)
 #ifdef PUSH_ROUNDING
       /* Don't allow uses of the stack pointer to be moved,
         because we don't know whether the move crosses a push insn.  */
-      if (regno == STACK_POINTER_REGNUM)
+      if (regno == STACK_POINTER_REGNUM && PUSH_ARGS)
        return 1;
 #endif
       for (; regno < endreg; regno++)