(final_scan_insn): Always set OPS and use alloca.
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 27 Feb 1994 15:47:55 +0000 (10:47 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 27 Feb 1994 15:47:55 +0000 (10:47 -0500)
From-SVN: r6643

gcc/final.c

index 53cf97b..23541ef 100644 (file)
@@ -1627,7 +1627,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
        if (asm_noperands (body) >= 0)
          {
            int noperands = asm_noperands (body);
-           rtx *ops;
+           rtx *ops = (rtx *) alloca (noperands * sizeof (rtx));
            char *string;
 
            /* There's no telling what that did to the condition codes.  */
@@ -1635,11 +1635,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
            if (prescan > 0)
              break;
 
-           /* alloca won't do here, since only return from `final'
-              would free it.  */
-           if (noperands > 0)
-             ops = (rtx *) xmalloc (noperands * sizeof (rtx));
-
            if (! app_on)
              {
                fprintf (file, ASM_APP_ON);
@@ -1652,11 +1647,10 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
            /* Inhibit aborts on what would otherwise be compiler bugs.  */
            insn_noperands = noperands;
            this_is_asm_operands = insn;
+
            /* Output the insn using them.  */
            output_asm_insn (string, ops);
            this_is_asm_operands = 0;
-           if (noperands > 0)
-             free (ops);
            break;
          }