(cmplpower2_operand): New function.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 20 Jan 1993 03:48:54 +0000 (19:48 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 20 Jan 1993 03:48:54 +0000 (19:48 -0800)
From-SVN: r3293

gcc/config/i960/i960.c

index f20de25d29c1b93f944d1049dff73e600f4de0dd..4163ca441703ae20cfffa3304fe50ec15ab78a3d 100644 (file)
@@ -296,12 +296,26 @@ power2_operand (op,mode)
      rtx op;
      enum machine_mode mode;
 {
-  if (GET_CODE(op) != CONST_INT)
+  if (GET_CODE (op) != CONST_INT)
     return 0;
 
   return exact_log2 (INTVAL (op)) >= 0;
 }
 
+/* Return true if OP is an integer constant which is the complement of a
+   power of 2.  */
+
+int
+cmplpower2_operand (op, mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  if (GET_CODE (op) != CONST_INT)
+    return 0;
+
+  return exact_log2 (~ INTVAL (op)) >= 0;
+}
+
 /* If VAL has only one bit set, return the index of that bit.  Otherwise
    return -1.  */