]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
final.c (final_scan_insn): Don't enter APP_ON mode for empty asm strings.
authorRichard Henderson <rth@redhat.com>
Mon, 27 Aug 2001 17:29:57 +0000 (10:29 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 27 Aug 2001 17:29:57 +0000 (10:29 -0700)
        * final.c (final_scan_insn): Don't enter APP_ON mode for
        empty asm strings.

From-SVN: r45199

gcc/ChangeLog
gcc/final.c

index cdaf55abe6de1f7c15d552f04e6e3e1177d9308f..6b90b3eb84fd0d622e3e8ccb1e2876bc701f436b 100644 (file)
@@ -1,5 +1,8 @@
 2001-08-27  Richard Henderson  <rth@redhat.com>
 
+       * final.c (final_scan_insn): Don't enter APP_ON mode for
+       empty asm strings.
+
        * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Use proper
        alignment for assemble_integer for DW_EH_PE_aligned.
        * except.c (output_function_exception_table): Likewise.
index d524ccb934574cb7537b416f8608cf9b530ddbaa..ec29a45952d77b3dd462d7deb7e68b9a3847f94d 100644 (file)
@@ -2481,16 +2481,22 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
 
        if (GET_CODE (body) == ASM_INPUT)
          {
+           const char *string = XSTR (body, 0);
+
            /* There's no telling what that did to the condition codes.  */
            CC_STATUS_INIT;
            if (prescan > 0)
              break;
-           if (! app_on)
+
+           if (string[0])
              {
-               fputs (ASM_APP_ON, file);
-               app_on = 1;
+               if (! app_on)
+                 {
+                   fputs (ASM_APP_ON, file);
+                   app_on = 1;
+                 }
+               fprintf (asm_out_file, "\t%s\n", string);
              }
-           fprintf (asm_out_file, "\t%s\n", XSTR (body, 0));
            break;
          }
 
@@ -2506,12 +2512,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
            if (prescan > 0)
              break;
 
-           if (! app_on)
-             {
-               fputs (ASM_APP_ON, file);
-               app_on = 1;
-             }
-
            /* Get out the operand values.  */
            string = decode_asm_operands (body, ops, NULL, NULL, NULL);
            /* Inhibit aborts on what would otherwise be compiler bugs.  */
@@ -2519,7 +2519,16 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
            this_is_asm_operands = insn;
 
            /* Output the insn using them.  */
-           output_asm_insn (string, ops);
+           if (string[0])
+             {
+               if (! app_on)
+                 {
+                   fputs (ASM_APP_ON, file);
+                   app_on = 1;
+                 }
+               output_asm_insn (string, ops);
+             }
+
            this_is_asm_operands = 0;
            break;
          }