i386.c (output_strlen_unroll): Don't write xops[7] label if it wasn't set.
authorJim Kingdon <kingdon@redhat.com>
Tue, 31 Aug 1999 20:05:20 +0000 (13:05 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 31 Aug 1999 20:05:20 +0000 (13:05 -0700)
        * config/i386/i386.c (output_strlen_unroll): Don't write xops[7]
        label if it wasn't set.

From-SVN: r29010

gcc/ChangeLog
gcc/config/i386/i386.c

index 6a1e8934a8c0f1ee8e1b43576f3ea20ef83ccfa7..e9cac978f1ca233aec58d6eeec7f661f218e6126 100644 (file)
@@ -1,3 +1,8 @@
+Tue Aug 31 11:51:06 1999  Jim Kingdon  <http://developer.redhat.com>
+
+       * i386.c (output_strlen_unroll): Don't write xops[7]
+       label if it wasn't set.
+
 1999-08-31 12:44 -0700  Zack Weinberg  <zack@bitmover.com>
 
        * cpplib.c (struct directive): Const-ify name pointer and
index 62bbd1b7274d6ff088a67577c72dfb01e3b5652b..4abb5944e1372674a46778cf20d74a91465b8134 100644 (file)
@@ -5234,14 +5234,19 @@ output_strlen_unroll (operands)
           output_asm_insn (AS1 (je,%l12), xops);
           output_asm_insn (AS1 (inc%L0,%0), xops);
 
-         ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
-                                    CODE_LABEL_NUMBER (xops[7]));
-          output_asm_insn (AS2 (cmp%B13,%2,%13), xops);
-          output_asm_insn (AS1 (je,%l12), xops);
-          output_asm_insn (AS1 (inc%L0,%0), xops);
+         /* Not needed with an alignment of 2 */
+         if (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 2)
+           {
+             ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
+                                        CODE_LABEL_NUMBER (xops[7]));
+             output_asm_insn (AS2 (cmp%B13,%2,%13), xops);
+             output_asm_insn (AS1 (je,%l12), xops);
+             output_asm_insn (AS1 (inc%L0,%0), xops);
+
+             ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
+                                        CODE_LABEL_NUMBER (xops[6]));
+           }
 
-         ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
-                                    CODE_LABEL_NUMBER (xops[6]));
           output_asm_insn (AS2 (cmp%B13,%2,%13), xops);
         }