(low_32_bit_operand): New function.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 25 Feb 1995 11:51:17 +0000 (06:51 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 25 Feb 1995 11:51:17 +0000 (06:51 -0500)
From-SVN: r9078

gcc/config/rs6000/rs6000.c

index 4890134d09169062146f19cd8c75f8482a85fb9d..678f21f9954068ce37ac4945d7f86da8ccb82645 100644 (file)
@@ -322,6 +322,23 @@ easy_fp_constant (op, mode)
          || (low != 0 && input_operand (low, word_mode)));
 }
       
+/* Return 1 if the operand is a constant whose low-order 32 bits are
+   zero.  */
+
+int
+low_32_bit_operand (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  rtx low;
+
+  if (GET_CODE (op) != CONST_DOUBLE && GET_CODE (op) != CONST_INT)
+    return 0;
+
+  low = operand_subword (op, 1, 0, mode);
+  return low != 0 && GET_CODE (low) == CONST_INT && INTVAL (low) == 0;
+}
+
 /* Return 1 if the operand is either a floating-point register, a pseudo
    register, or memory.  */