From: Georg-Johann Lay Date: Mon, 1 Aug 2016 12:36:11 +0000 (+0000) Subject: re PR target/72767 ([avr] Some branches report too small insn length) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90c959fd0ca4b9e4a960e2f692ac45596738a453;p=gcc.git re PR target/72767 ([avr] Some branches report too small insn length) PR target/72767 * config/avr/avr.md (length) [branch]: Correct insn length attribute for forward branches. From-SVN: r238948 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96f3259637d..d5643ceaae3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-08-01 Georg-Johann Lay + + PR target/72767 + * config/avr/avr.md (length) [branch]: Correct insn length + attribute for forward branches. + 2016-08-01 Georg-Johann Lay * doc/extend.texi (AVR Built-in Functions): Document diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 4c9037fa507..23790b6ac7f 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -112,12 +112,12 @@ (define_attr "length" "" (cond [(eq_attr "type" "branch") (if_then_else (and (ge (minus (pc) (match_dup 0)) - (const_int -63)) + (const_int -62)) (le (minus (pc) (match_dup 0)) (const_int 62))) (const_int 1) (if_then_else (and (ge (minus (pc) (match_dup 0)) - (const_int -2045)) + (const_int -2044)) (le (minus (pc) (match_dup 0)) (const_int 2045))) (const_int 2)