aboutsummaryrefslogtreecommitdiff
path: root/gcc/genoutput.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2003-07-05 05:27:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2003-07-05 05:27:22 +0000
commit6906ba4054094c46f39aca07d82a05db00bcc22f (patch)
treed50d814f99d556b8b58fa2fb6da18f5ac6b89824 /gcc/genoutput.c
parent3d7c150e3f05f0dc6e15c1517c4a652c3ecbcfd8 (diff)
downloadgcc-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/genoutput.c')
-rw-r--r--gcc/genoutput.c51
1 files changed, 3 insertions, 48 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index 044a643..e381074 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -174,7 +174,6 @@ struct data
static struct data *idata, **idata_end = &idata;
static void output_prologue (void);
-static void output_predicate_decls (void);
static void output_operand_data (void);
static void output_insn_data (void);
static void output_get_insn_name (void);
@@ -243,45 +242,6 @@ output_prologue (void)
printf ("#include \"target.h\"\n");
}
-
-/* We need to define all predicates used. Keep a list of those we
- have defined so far. There normally aren't very many predicates
- used, so a linked list should be fast enough. */
-struct predicate { const char *name; struct predicate *next; };
-
-static void
-output_predicate_decls (void)
-{
- struct predicate *predicates = 0;
- struct operand_data *d;
- struct predicate *p, *next;
-
- for (d = odata; d; d = d->next)
- if (d->predicate && d->predicate[0])
- {
- for (p = predicates; p; p = p->next)
- if (strcmp (p->name, d->predicate) == 0)
- break;
-
- if (p == 0)
- {
- printf ("extern int %s (rtx, enum machine_mode);\n",
- d->predicate);
- p = (struct predicate *) xmalloc (sizeof (struct predicate));
- p->name = d->predicate;
- p->next = predicates;
- predicates = p;
- }
- }
-
- printf ("\n\n");
- for (p = predicates; p; p = next)
- {
- next = p->next;
- free (p);
- }
-}
-
static void
output_operand_data (void)
{
@@ -415,8 +375,7 @@ static void
output_get_insn_name (void)
{
printf ("const char *\n");
- printf ("get_insn_name (code)\n");
- printf (" int code;\n");
+ printf ("get_insn_name (int code)\n");
printf ("{\n");
printf (" if (code == NOOP_MOVE_INSN_CODE)\n");
printf (" return \"NOOP_MOVE\";\n");
@@ -678,12 +637,9 @@ process_template (struct data *d, const char *template)
d->template = 0;
d->output_format = INSN_OUTPUT_FORMAT_FUNCTION;
- printf ("\nstatic const char *output_%d (rtx *, rtx);\n",
- d->code_number);
puts ("\nstatic const char *");
- printf ("output_%d (operands, insn)\n", d->code_number);
- puts (" rtx *operands ATTRIBUTE_UNUSED;");
- puts (" rtx insn ATTRIBUTE_UNUSED;");
+ printf ("output_%d (rtx *operands ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED)\n",
+ d->code_number);
puts ("{");
puts (template + 1);
@@ -1023,7 +979,6 @@ main (int argc, char **argv)
}
printf("\n\n");
- output_predicate_decls ();
output_operand_data ();
output_insn_data ();
output_get_insn_name ();