diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2003-07-05 05:27:22 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-07-05 05:27:22 +0000 |
commit | 6906ba4054094c46f39aca07d82a05db00bcc22f (patch) | |
tree | d50d814f99d556b8b58fa2fb6da18f5ac6b89824 /gcc/genemit.c | |
parent | 3d7c150e3f05f0dc6e15c1517c4a652c3ecbcfd8 (diff) | |
download | gcc-6906ba4054094c46f39aca07d82a05db00bcc22f.zip gcc-6906ba4054094c46f39aca07d82a05db00bcc22f.tar.gz gcc-6906ba4054094c46f39aca07d82a05db00bcc22f.tar.bz2 |
genattr.c (internal_dfa_insn_code): Output prototype.
* genattr.c (internal_dfa_insn_code): Output prototype.
* genattrtab.c: Don't output unnecessary decls, output in ISO C.
* genautomata.c: Likewise.
* genconditions.c: Likewise.
* genemit.c: Likewise.
* genextract.c: Likewise.
* gengenrtl.c: Likewise.
* gengtype.c: Likewise.
* genopinit.c: Likewise.
* genoutput.c: Likewise.
* genpeep.c: Likewise.
* genrecog.c: Likewise.
From-SVN: r68959
Diffstat (limited to 'gcc/genemit.c')
-rw-r--r-- | gcc/genemit.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/gcc/genemit.c b/gcc/genemit.c index 619dfa0..edeb154 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -386,14 +386,15 @@ gen_insn (rtx insn, int lineno) /* Output the function name and argument declarations. */ printf ("rtx\ngen_%s (", XSTR (insn, 0)); - for (i = 0; i < operands; i++) - if (i) - printf (", operand%d", i); - else - printf ("operand%d", i); + if (operands) + for (i = 0; i < operands; i++) + if (i) + printf (",\n\trtx operand%d ATTRIBUTE_UNUSED", i); + else + printf ("rtx operand%d ATTRIBUTE_UNUSED", i); + else + printf ("void"); printf (")\n"); - for (i = 0; i < operands; i++) - printf (" rtx operand%d ATTRIBUTE_UNUSED;\n", i); printf ("{\n"); /* Output code to construct and return the rtl for the instruction body */ @@ -439,14 +440,15 @@ gen_expand (rtx expand) /* Output the function name and argument declarations. */ printf ("rtx\ngen_%s (", XSTR (expand, 0)); - for (i = 0; i < operands; i++) - if (i) - printf (", operand%d", i); - else - printf ("operand%d", i); + if (operands) + for (i = 0; i < operands; i++) + if (i) + printf (",\n\trtx operand%d", i); + else + printf ("rtx operand%d", i); + else + printf ("void"); printf (")\n"); - for (i = 0; i < operands; i++) - printf (" rtx operand%d;\n", i); printf ("{\n"); /* If we don't have any C code to write, only one insn is being written, @@ -585,16 +587,13 @@ gen_split (rtx split) { printf ("extern rtx gen_%s_%d (rtx, rtx *);\n", name, insn_code_number); - printf ("rtx\ngen_%s_%d (curr_insn, operands)\n", + printf ("rtx\ngen_%s_%d (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands)\n", name, insn_code_number); - printf (" rtx curr_insn ATTRIBUTE_UNUSED;\n"); - printf (" rtx *operands%s;\n", unused); } else { printf ("extern rtx gen_split_%d (rtx *);\n", insn_code_number); - printf ("rtx\ngen_%s_%d (operands)\n", name, insn_code_number); - printf (" rtx *operands%s;\n", unused); + printf ("rtx\ngen_%s_%d (rtx *operands)\n", name, insn_code_number); } printf ("{\n"); @@ -678,8 +677,7 @@ output_add_clobbers () struct clobber_ent *ent; int i; - printf ("\n\nvoid\nadd_clobbers (pattern, insn_code_number)\n"); - printf (" rtx pattern ATTRIBUTE_UNUSED;\n int insn_code_number;\n"); + printf ("\n\nvoid\nadd_clobbers (rtx pattern ATTRIBUTE_UNUSED, int insn_code_number)\n"); printf ("{\n"); printf (" switch (insn_code_number)\n"); printf (" {\n"); @@ -717,8 +715,7 @@ output_added_clobbers_hard_reg_p (void) struct clobber_ent *ent; int clobber_p, used; - printf ("\n\nint\nadded_clobbers_hard_reg_p (insn_code_number)\n"); - printf (" int insn_code_number;\n"); + printf ("\n\nint\nadded_clobbers_hard_reg_p (int insn_code_number)\n"); printf ("{\n"); printf (" switch (insn_code_number)\n"); printf (" {\n"); |