diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2011-09-27 08:08:16 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2011-09-27 08:08:16 +0000 |
commit | 1cd12949e12ec05f9730ce1663aca7e00e00d867 (patch) | |
tree | 9fe74561bda193cd03df786340f041ff5815badf /gcc/config | |
parent | e7c82a992521536902a0b230d9b7508e27cd7839 (diff) | |
download | gcc-1cd12949e12ec05f9730ce1663aca7e00e00d867.zip gcc-1cd12949e12ec05f9730ce1663aca7e00e00d867.tar.gz gcc-1cd12949e12ec05f9730ce1663aca7e00e00d867.tar.bz2 |
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
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/avr/avr.c | 20 | ||||
-rw-r--r-- | gcc/config/avr/avr.md | 10 |
2 files changed, 5 insertions, 25 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 8675845..5ffa7fc 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 790f696..3b1800d 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") |