From: Georg-Johann Lay Date: Tue, 27 Sep 2011 08:08:16 +0000 (+0000) Subject: avr.md (ashrqi3): Split alternative "n" into its remaining parts C03... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cd12949e12ec05f9730ce1663aca7e00e00d867;p=gcc.git avr.md (ashrqi3): Split alternative "n" into its remaining parts C03... * config/avr/avr.md (ashrqi3): Split alternative "n" into its remaining parts C03, C04, C05, C06, C07 and describe impact in CC by attribute "cc" appropriately. * config/avr/avr.c (notice_update_cc): Clean-up: Don't patch CC0 by digging RTX. From-SVN: r179241 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52c2e9b1a65..27f31c7c248 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-09-27 Georg-Johann Lay + + * config/avr/avr.md (ashrqi3): Split alternative "n" + into its remaining parts C03, C04, C05, C06, C07 and describe + impact in CC by attribute "cc" appropriately. + * config/avr/avr.c (notice_update_cc): Clean-up: Don't patch CC0 + by digging RTX. + 2011-09-27 Jakub Jelinek * rtl.h (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 8675845fb9d..5ffa7fc2a17 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1574,26 +1574,6 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn) case CC_CLOBBER: /* Insn doesn't leave CC in a usable state. */ CC_STATUS_INIT; - - /* Correct CC for the ashrqi3 with the shift count as CONST_INT < 6 */ - set = single_set (insn); - if (set) - { - rtx src = SET_SRC (set); - - if (GET_CODE (src) == ASHIFTRT - && GET_MODE (src) == QImode) - { - rtx x = XEXP (src, 1); - - if (CONST_INT_P (x) - && IN_RANGE (INTVAL (x), 1, 5)) - { - cc_status.value1 = SET_DEST (set); - cc_status.flags |= CC_OVERFLOW_UNUSABLE; - } - } - } break; } } diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 790f6967482..3b1800d3fb0 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -2820,14 +2820,14 @@ ;; arithmetic shift right (define_insn "ashrqi3" - [(set (match_operand:QI 0 "register_operand" "=r,r,r,r,r,r") - (ashiftrt:QI (match_operand:QI 1 "register_operand" "0,0,0,0,0,0") - (match_operand:QI 2 "general_operand" "r,L,P,K,n,Qm")))] + [(set (match_operand:QI 0 "register_operand" "=r,r,r,r,r ,r ,r") + (ashiftrt:QI (match_operand:QI 1 "register_operand" "0,0,0,0,0 ,0 ,0") + (match_operand:QI 2 "general_operand" "r,L,P,K,C03 C04 C05,C06 C07,Qm")))] "" "* return ashrqi3_out (insn, operands, NULL);" - [(set_attr "length" "5,0,1,2,5,9") + [(set_attr "length" "5,0,1,2,5,4,9") (set_attr "adjust_len" "ashrqi") - (set_attr "cc" "clobber,none,clobber,clobber,clobber,clobber")]) + (set_attr "cc" "clobber,none,set_czn,set_czn,set_czn,clobber,clobber")]) (define_insn "ashrhi3" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r,r,r")