(reg_or_cint_move_operand): New function.
authorTorbjorn Granlund <tege@gnu.org>
Wed, 10 Mar 1993 16:57:05 +0000 (16:57 +0000)
committerTorbjorn Granlund <tege@gnu.org>
Wed, 10 Mar 1993 16:57:05 +0000 (16:57 +0000)
(move_operand): Add header comment.

From-SVN: r3693

gcc/config/pa/pa.c

index 452052083568bae9879f4c86dfa26512c12e2f27..a42a87e3c7ff9b13e166cbf2c91a55b536e2bb64 100644 (file)
@@ -156,6 +156,8 @@ reg_or_0_or_nonsymb_mem_operand (op, mode)
   return 0;
 }
 
+/* Accept anything that can be moved in one instruction into a general
+   register.  */
 int
 move_operand (op, mode)
      rtx op;
@@ -185,6 +187,25 @@ move_operand (op, mode)
   return memory_address_p (mode, op);
 }
 
+/* Accept REG and any CONST_INT that can be moved in one instruction into a
+   general register.  */
+int
+reg_or_cint_move_operand (op, mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  if (register_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 0;
+}
+
 int
 pic_operand (op, mode)
      rtx op;