]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/9888 (-mcpu=k6 -Os produces out of range loop instructions)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 12 Mar 2003 09:42:00 +0000 (10:42 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 12 Mar 2003 09:42:00 +0000 (09:42 +0000)
PR optimization/9888
* config/i386/i386.md (jcc_1): Fix range.
(jcc_2): Likewise.
(jump): LIkewise.
(doloop_end_internal): Likewise.

From-SVN: r64234

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/i386-loop-2.c

index 972e5abb40a3ba79fd1eddfe868e2521e77ad3d6..031a1b34494abbaf62f681b42d9ef20cb361b6b9 100644 (file)
@@ -1,3 +1,11 @@
+2003-03-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR optimization/9888
+       * config/i386/i386.md (jcc_1): Fix range.
+       (jcc_2): Likewise.
+       (jump): LIkewise.
+       (doloop_end_internal): Likewise.
+
 2003-03-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR optimization/9888
index ed497f0b0e08cf4c40e74e16c25d4954559d5d1f..13a830be09a3b9cd825170cfd3c368e3d07a2259 100644 (file)
    (set_attr "modrm" "0")
    (set (attr "length")
           (if_then_else (and (ge (minus (match_dup 0) (pc))
-                                 (const_int -128))
+                                 (const_int -126))
                              (lt (minus (match_dup 0) (pc))
-                                 (const_int 124)))
+                                 (const_int 128)))
             (const_int 2)
             (const_int 6)))])
 
    (set_attr "modrm" "0")
    (set (attr "length")
           (if_then_else (and (ge (minus (match_dup 0) (pc))
-                                 (const_int -128))
+                                 (const_int -126))
                              (lt (minus (match_dup 0) (pc))
-                                 (const_int 124)))
+                                 (const_int 128)))
             (const_int 2)
             (const_int 6)))])
 
   [(set_attr "type" "ibr")
    (set (attr "length")
           (if_then_else (and (ge (minus (match_dup 0) (pc))
-                                 (const_int -128))
+                                 (const_int -126))
                              (lt (minus (match_dup 0) (pc))
-                                 (const_int 124)))
+                                 (const_int 128)))
             (const_int 2)
             (const_int 5)))
    (set_attr "modrm" "0")])
    (set (attr "length")
        (if_then_else (and (eq_attr "alternative" "0")
                           (and (ge (minus (match_dup 0) (pc))
-                                   (const_int -128))
+                                   (const_int -126))
                                (lt (minus (match_dup 0) (pc))
-                                   (const_int 124))))
+                                   (const_int 128))))
                      (const_int 2)
                      (const_int 16)))
    ;; We don't know the type before shorten branches.  Optimistically expect
index 97a86d1e6e3ad9c31d246609d183559df9eb92d2..7d877607d4deba96e4fba27d77e8cf1ca25bc96a 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * gcc.dg/i386-loop-2.c: New test.
+
 2003-03-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/i386-loop-1.c: New test.
index 3a3e69e98b4f64a3f195eefca8d6785da4baf9a3..9c87d8b840c1617e21195d0fd8ae4bf9d341614d 100644 (file)
@@ -1,7 +1,7 @@
 /* PR optimization/9888 */
 /* Originator: Jim Bray <jb@as220.org> */
 /* { dg-do run { target i?86-*-* } } */
-/* { dg-options "-mtune=k6 -Os" } */
+/* { dg-options "-mcpu=k6 -Os" } */
 
 enum reload_type
 {