pa.c (cint_ok_for_move): New function.
authorJeff Law <law@gcc.gnu.org>
Wed, 10 Mar 1993 17:31:38 +0000 (10:31 -0700)
committerJeff Law <law@gcc.gnu.org>
Wed, 10 Mar 1993 17:31:38 +0000 (10:31 -0700)
* pa.c (cint_ok_for_move): New function.  Returns 1 iff the given
CONST_INT can be loaded into a register in a single instruction.
(move_operand): Use cink_ok_for_move.

From-SVN: r3696

gcc/config/pa/pa.c

index a42a87e3c7ff9b13e166cbf2c91a55b536e2bb64..de5d5f768309d8f722c45496a83ca31bad997e62 100644 (file)
@@ -156,6 +156,17 @@ reg_or_0_or_nonsymb_mem_operand (op, mode)
   return 0;
 }
 
+/* Accept any constant that can be moved in one instructions into a 
+   general register.  */
+int 
+cint_ok_for_move (intval)
+     int intval;
+{
+  /* OK if ldo, ldil, or zdepi, can be used.  */
+  return (VAL_14_BITS_P (intval) || (intval & 0x7ff) == 0
+         || zdepi_cint_p (intval));
+}
+
 /* Accept anything that can be moved in one instruction into a general
    register.  */
 int
@@ -167,11 +178,7 @@ move_operand (op, mode)
     return 1;
 
   if (GET_CODE (op) == CONST_INT)
-    {
-      /* OK if ldo, ldil, or zdepi, can be used.  */
-      return (INT_14_BITS (op) || (INTVAL (op) & 0x7ff) == 0
-             || zdepi_cint_p (INTVAL (op)));
-    }
+    return cint_ok_for_move (INTVAL (op));
 
   if (GET_MODE (op) != mode)
     return 0;