From b47de04b0832bb278ca84fcf73c9d32cb9ff580d Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 19 Jan 1993 19:48:54 -0800 Subject: (cmplpower2_operand): New function. From-SVN: r3293 --- gcc/config/i960/i960.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index f20de25..4163ca4 100644 --- a/gcc/config/i960/i960.c +++ b/gcc/config/i960/i960.c @@ -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. */ -- cgit v1.1