]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/72767 ([avr] Some branches report too small insn length)
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 1 Aug 2016 12:44:18 +0000 (12:44 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 1 Aug 2016 12:44:18 +0000 (12:44 +0000)
Backport from 2016-08-01 trunk r238948.
PR target/72767
* config/avr/avr.md (length) [branch]: Correct insn length
attribute for forward branches.

From-SVN: r238950

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

index 537ccf053125ed61f66cb2877d3dfdbcc0d9345e..ff4f6675938f6886797a60019824de9d9afed2c1 100644 (file)
@@ -1,3 +1,11 @@
+2016-08-01  Georg-Johann Lay  <avr@gjlay.de>
+
+       Backport from 2016-08-01 trunk r238948.
+
+       PR target/72767
+       * config/avr/avr.md (length) [branch]: Correct insn length
+       attribute for forward branches.
+
 2016-07-29  Marek Polacek  <polacek@redhat.com>
 
        Backport from mainline
index eee6c7000ad00957a6cb82ed503c3f0b21d169a7..881f374ed149a49ff928f3b6d7da9b49ad46d24a 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)