entered into RCS
authortege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Jul 1992 19:43:44 +0000 (19:43 +0000)
committertege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Jul 1992 19:43:44 +0000 (19:43 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1390 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/pa/pa.c

index 88db91c..0239d86 100644 (file)
@@ -315,6 +315,25 @@ arith5_operand (op, mode)
   return register_operand (op, mode) || int5_operand (op, mode);
 }
 
+/* True iff zdepi can be used to generate this CONST_INT.  */
+zdepi_operand (op, mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  unsigned x;
+  unsigned lbmask, t;
+
+  if (GET_CODE (op) != CONST_INT)
+    return 0;
+
+  /* This might not be obvious, but it's at least fast.
+     This function is critcal; we don't have the time loops would take.  */
+  x = INTVAL (op);
+  lbmask = x & -x;
+  t = ((x >> 4) + lbmask) & ~(lbmask - 1);
+  return ((t & (t - 1)) == 0);
+}
+
 /* Return truth value of statement that OP is a call-clobbered register.  */
 int
 clobbered_register (op, mode)
@@ -621,6 +640,8 @@ emit_move_sequence (operands, mode)
              return 1;
            }
        }
+      else if (zdepi_operand (operand1, VOIDmode))
+       return 0;
       else if (GET_CODE (operand1) == CONST_INT
               ? (! SMALL_INT (operand1)
                  && (INTVAL (operand1) & 0x7ff) != 0) : 1)