(ior_operand): New function.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 27 Dec 1993 11:27:52 +0000 (06:27 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 27 Dec 1993 11:27:52 +0000 (06:27 -0500)
From-SVN: r6330

gcc/config/alpha/alpha.c

index 7d32487e1e54d1902baf634660c50d6b5756c83d..3896044673b8d4f783cc6323882aa2a32205c0c7 100644 (file)
@@ -173,6 +173,20 @@ and_operand (op, mode)
   return register_operand (op, mode);
 }
 
+/* Return 1 if OP is a valid first operand to an IOR insn.  */
+
+int
+ior_operand (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  if (GET_CODE (op) == CONST_INT)
+    return ((unsigned HOST_WIDE_INT) INTVAL (op) < 0x100
+           || (unsigned HOST_WIDE_INT) ~ INTVAL (op) < 0x100);
+
+  return register_operand (op, mode);
+}
+
 /* Return 1 if OP is a constant that is the width, in bits, of an integral
    mode smaller than DImode.  */