re PR target/72767 ([avr] Some branches report too small insn length)
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 1 Aug 2016 12:36:11 +0000 (12:36 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 1 Aug 2016 12:36:11 +0000 (12:36 +0000)
PR target/72767
* config/avr/avr.md (length) [branch]: Correct insn length
attribute for forward branches.

From-SVN: r238948

gcc/ChangeLog
gcc/config/avr/avr.md

index 96f3259637d14c742050987560f49a3744583eb7..d5643ceaae36dcf96585de4b5d3ef394433ccfdd 100644 (file)
@@ -1,3 +1,9 @@
+2016-08-01  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR target/72767
+       * config/avr/avr.md (length) [branch]: Correct insn length
+       attribute for forward branches.
+
 2016-08-01  Georg-Johann Lay  <avr@gjlay.de>
 
        * doc/extend.texi (AVR Built-in Functions): Document
index 4c9037fa507321c96280e9c017f6918febd17cca..23790b6ac7faad5340b250d920a15fd98f17945b 100644 (file)
 (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)