aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-02-27 10:47:55 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-02-27 10:47:55 -0500
commit39178486b7be0b8fda4fc391b2f2892593bf0f78 (patch)
treec9def94af6438055fe20ed1db240ef404d14943e /gcc/final.c
parentd0c766547a0a65ee3103538331dff4e8f1eb6250 (diff)
downloadgcc-39178486b7be0b8fda4fc391b2f2892593bf0f78.zip
gcc-39178486b7be0b8fda4fc391b2f2892593bf0f78.tar.gz
gcc-39178486b7be0b8fda4fc391b2f2892593bf0f78.tar.bz2
(final_scan_insn): Always set OPS and use alloca.
From-SVN: r6643
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 53cf97b..23541ef 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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;
}