--- gcc-4.3.1.orig/gcc/config/cris/cris.md 2007-12-15 22:38:19.000000000 +0100 +++ gcc-4.3.1/gcc/config/cris/cris.md 2008-07-08 16:17:45.000000000 +0200 @@ -458,38 +458,21 @@ (define_insn "*btst" [(set (cc0) (zero_extract - (match_operand:SI 0 "nonmemory_operand" "r,r,r,r,r,r,n") - (match_operand:SI 1 "const_int_operand" "K,n,K,n,K,n,n") - (match_operand:SI 2 "nonmemory_operand" "M,M,K,n,r,r,r")))] + (match_operand:SI 0 "nonmemory_operand" "r,r,r,r,r,r") + (match_operand:SI 1 "const_int_operand" "K,n,K,n,K,n") + (match_operand:SI 2 "nonmemory_operand" "M,M,K,n,r,r")))] ;; Either it is a single bit, or consecutive ones starting at 0. ;; The btst ones depend on stuff in NOTICE_UPDATE_CC. "CONST_INT_P (operands[1]) && (operands[1] == const1_rtx || operands[2] == const0_rtx) - && (REG_S_P (operands[0]) - || (operands[1] == const1_rtx - && REG_S_P (operands[2]) - && CONST_INT_P (operands[0]) - && exact_log2 (INTVAL (operands[0])) >= 0)) && !TARGET_CCINIT" - -;; The next-to-last "&&" condition above should be caught by some kind of -;; canonicalization in gcc, but we can easily help with it here. -;; It results from expressions of the type -;; "power_of_2_value & (1 << y)". -;; -;; Since there may be codes with tests in on bits (in constant position) -;; beyond the size of a word, handle that by assuming those bits are 0. -;; GCC should handle that, but it's a matter of easily-added belts while -;; having suspenders. - "@ btstq (%1-1),%0 cmpq 0,%0 btstq %2,%0 clearf nz btst %2,%0 - clearf nz - cmpq %p0,%2" + clearf nz" [(set_attr "slottable" "yes") (set_attr "cc" "noov32")])