Commit 3d7aafde by Andreas Jaeger Committed by Andreas Jaeger

genrecog.c: Use ISO C90 prototypes.

	* genrecog.c: Use ISO C90 prototypes.
	(nodes_identical): Correct declaration to match prototype.
	(maybe_both_true): Likewise.
	(merge_trees): Likewise.

	* genpeep.c (gen_peephole): Remove #if 0 code.
	Use ISO C90 prototypes.

	* genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code.
	Remove #if 0'ed function simplify_by_alternatives.
	(optimize_attrs): Remove #if 0'ed code.
	Remove ^L.
	Use ISO C90 prototypes.
	(make_canonical): Remove #if 0'ed code.
	(convert_const_symbol_ref): Remove #if 0'ed function.

	* gen-protos.c (main): Check for argument.

	* rtl.h: Use ISO C90 prototypes for functions from lists.c.

	* params.h: Use ISO C90 prototypes.
	* params.c: Likewise.
	* intl.c: Likewise.
	* intl.h: Likewise.
	* lists.c: Likewise.
	* errors.c: Likewise.
	* errors.h: Likewise.
	* gencodes.c: Likewise.
	* genpreds.c: Likewise.
	* genattr.c: Likewise.
	* gen-protos.c: Likewise.
	* genflags.c: Likewise
	* genconditions.c: Likewise.
	* genautomata.c: Likewise.
	* gencheck.c: Likewise.
	* genconfig.c: Likewise.
	* genconstants.c: Likewise.
	* genemit.c: Likewise.
	* genextract.c: Likewise.
	* gengenrtl.c: Likewise.
	* gengtype.c: Likewise.
	* gengtype.h: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c: Likewise.
	* gensupport.c: Likewise.
	* gensupport.h: Likewise.

From-SVN: r67296
parent a5a88a76
2003-06-01 Andreas Jaeger <aj@suse.de> 2003-06-01 Andreas Jaeger <aj@suse.de>
* genrecog.c: Use ISO C90 prototypes.
(nodes_identical): Correct declaration to match prototype.
(maybe_both_true): Likewise.
(merge_trees): Likewise.
* genpeep.c (gen_peephole): Remove #if 0 code.
Use ISO C90 prototypes.
* genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code.
Remove #if 0'ed function simplify_by_alternatives.
(optimize_attrs): Remove #if 0'ed code.
Remove ^L.
Use ISO C90 prototypes.
(make_canonical): Remove #if 0'ed code.
(convert_const_symbol_ref): Remove #if 0'ed function.
* gen-protos.c (main): Check for argument.
* rtl.h: Use ISO C90 prototypes for functions from lists.c.
* params.h: Use ISO C90 prototypes.
* params.c: Likewise.
* intl.c: Likewise.
* intl.h: Likewise.
* lists.c: Likewise.
* errors.c: Likewise.
* errors.h: Likewise.
* gencodes.c: Likewise.
* genpreds.c: Likewise.
* genattr.c: Likewise.
* gen-protos.c: Likewise.
* genflags.c: Likewise
* genconditions.c: Likewise.
* genautomata.c: Likewise.
* gencheck.c: Likewise.
* genconfig.c: Likewise.
* genconstants.c: Likewise.
* genemit.c: Likewise.
* genextract.c: Likewise.
* gengenrtl.c: Likewise.
* gengtype.c: Likewise.
* gengtype.h: Likewise.
* genopinit.c: Likewise.
* genoutput.c: Likewise.
* gensupport.c: Likewise.
* gensupport.h: Likewise.
* sdbout.h: Use ISO C90 prototypes. * sdbout.h: Use ISO C90 prototypes.
* sdbout.c (CONTIN): Removed empty macro. * sdbout.c (CONTIN): Removed empty macro.
......
/* Basic error reporting routines. /* Basic error reporting routines.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -105,8 +106,7 @@ internal_error (const char *format, ...) ...@@ -105,8 +106,7 @@ internal_error (const char *format, ...)
version if for the gen* programs and so needn't handle subdirectories. */ version if for the gen* programs and so needn't handle subdirectories. */
const char * const char *
trim_filename (name) trim_filename (const char *name)
const char *name;
{ {
static const char this_file[] = __FILE__; static const char this_file[] = __FILE__;
const char *p = name, *q = this_file; const char *p = name, *q = this_file;
...@@ -130,10 +130,7 @@ trim_filename (name) ...@@ -130,10 +130,7 @@ trim_filename (name)
This file is used only by build programs, so we're not as polite as This file is used only by build programs, so we're not as polite as
the version in diagnostic.c. */ the version in diagnostic.c. */
void void
fancy_abort (file, line, func) fancy_abort (const char *file, int line, const char *func)
const char *file;
int line;
const char *func;
{ {
internal_error ("abort in %s, at %s:%d", func, file, line); internal_error ("abort in %s, at %s:%d", func, file, line);
} }
/* Basic error reporting routines. /* Basic error reporting routines.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -29,12 +30,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -29,12 +30,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_ERRORS_H #ifndef GCC_ERRORS_H
#define GCC_ERRORS_H #define GCC_ERRORS_H
extern void warning PARAMS ((const char *, ...)); extern void warning (const char *, ...);
extern void error PARAMS ((const char *, ...)); extern void error (const char *, ...);
extern void fatal PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN; extern void fatal (const char *, ...) ATTRIBUTE_NORETURN;
extern void internal_error PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN; extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN;
extern const char *trim_filename PARAMS ((const char *)); extern const char *trim_filename (const char *);
extern void fancy_abort PARAMS ((const char *, int, const char *)) extern void fancy_abort (const char *, int, const char *)
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
extern int have_error; extern int have_error;
......
/* gen-protos.c - massages a list of prototypes, for use by fixproto. /* gen-protos.c - massages a list of prototypes, for use by fixproto.
Copyright (C) 1993, 1994, 1995, 1996, 1998, Copyright (C) 1993, 1994, 1995, 1996, 1998,
1999 Free Software Foundation, Inc. 1999, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
...@@ -26,8 +26,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -26,8 +26,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
int verbose = 0; int verbose = 0;
const char *progname; const char *progname;
static void add_hash PARAMS ((const char *)); static void add_hash (const char *);
static int parse_fn_proto PARAMS ((char *, char *, struct fn_decl *)); static int parse_fn_proto (char *, char *, struct fn_decl *);
#define HASH_SIZE 2503 /* a prime */ #define HASH_SIZE 2503 /* a prime */
int hash_tab[HASH_SIZE]; int hash_tab[HASH_SIZE];
...@@ -35,8 +35,7 @@ int next_index; ...@@ -35,8 +35,7 @@ int next_index;
int collisions; int collisions;
static void static void
add_hash (fname) add_hash (const char *fname)
const char *fname;
{ {
int i, i0; int i, i0;
...@@ -67,9 +66,7 @@ add_hash (fname) ...@@ -67,9 +66,7 @@ add_hash (fname)
The fields of FN point to the input string. */ The fields of FN point to the input string. */
static int static int
parse_fn_proto (start, end, fn) parse_fn_proto (char *start, char *end, struct fn_decl *fn)
char *start, *end;
struct fn_decl *fn;
{ {
char *ptr; char *ptr;
int param_nesting = 1; int param_nesting = 1;
...@@ -131,12 +128,8 @@ parse_fn_proto (start, end, fn) ...@@ -131,12 +128,8 @@ parse_fn_proto (start, end, fn)
return 1; return 1;
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc ATTRIBUTE_UNUSED;
char **argv;
{ {
FILE *inf = stdin; FILE *inf = stdin;
FILE *outf = stdout; FILE *outf = stdout;
...@@ -144,6 +137,9 @@ main (argc, argv) ...@@ -144,6 +137,9 @@ main (argc, argv)
sstring linebuf; sstring linebuf;
struct fn_decl fn_decl; struct fn_decl fn_decl;
if (argc <= 1)
fatal ("no input file name");
i = strlen (argv[0]); i = strlen (argv[0]);
while (i > 0 && argv[0][i-1] != '/') --i; while (i > 0 && argv[0][i-1] != '/') --i;
progname = &argv[0][i]; progname = &argv[0][i];
......
/* Generate attribute information (insn-attr.h) from machine description. /* Generate attribute information (insn-attr.h) from machine description.
Copyright (C) 1991, 1994, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1991, 1994, 1996, 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GCC. This file is part of GCC.
...@@ -51,42 +52,36 @@ struct function_unit ...@@ -51,42 +52,36 @@ struct function_unit
struct range issue_delay; /* Range of issue delay values. */ struct range issue_delay; /* Range of issue delay values. */
}; };
static void extend_range PARAMS ((struct range *, int, int)); static void extend_range (struct range *, int, int);
static void init_range PARAMS ((struct range *)); static void init_range (struct range *);
static void write_upcase PARAMS ((const char *)); static void write_upcase (const char *);
static void gen_attr PARAMS ((rtx)); static void gen_attr (rtx);
static void write_units PARAMS ((int, struct range *, struct range *, static void write_units (int, struct range *, struct range *,
struct range *, struct range *, struct range *, struct range *,
struct range *)); struct range *);
static void static void
extend_range (range, min, max) extend_range (struct range *range, int min, int max)
struct range *range;
int min;
int max;
{ {
if (range->min > min) range->min = min; if (range->min > min) range->min = min;
if (range->max < max) range->max = max; if (range->max < max) range->max = max;
} }
static void static void
init_range (range) init_range (struct range *range)
struct range *range;
{ {
range->min = 100000; range->min = 100000;
range->max = -1; range->max = -1;
} }
static void static void
write_upcase (str) write_upcase (const char *str)
const char *str;
{ {
for (; *str; str++) for (; *str; str++)
putchar (TOUPPER(*str)); putchar (TOUPPER(*str));
} }
static void static void
gen_attr (attr) gen_attr (rtx attr)
rtx attr;
{ {
const char *p, *tag; const char *p, *tag;
int is_const = GET_CODE (XEXP (attr, 2)) == CONST; int is_const = GET_CODE (XEXP (attr, 2)) == CONST;
...@@ -96,7 +91,7 @@ gen_attr (attr) ...@@ -96,7 +91,7 @@ gen_attr (attr)
/* If numeric attribute, don't need to write an enum. */ /* If numeric attribute, don't need to write an enum. */
p = XSTR (attr, 1); p = XSTR (attr, 1);
if (*p == '\0') if (*p == '\0')
printf ("extern int get_attr_%s PARAMS ((%s));\n", XSTR (attr, 0), printf ("extern int get_attr_%s (%s);\n", XSTR (attr, 0),
(is_const ? "void" : "rtx")); (is_const ? "void" : "rtx"));
else else
{ {
...@@ -113,7 +108,7 @@ gen_attr (attr) ...@@ -113,7 +108,7 @@ gen_attr (attr)
} }
fputs ("};\n", stdout); fputs ("};\n", stdout);
printf ("extern enum attr_%s get_attr_%s PARAMS ((%s));\n\n", printf ("extern enum attr_%s get_attr_%s (%s);\n\n",
XSTR (attr, 0), XSTR (attr, 0), (is_const ? "void" : "rtx")); XSTR (attr, 0), XSTR (attr, 0), (is_const ? "void" : "rtx"));
} }
...@@ -122,29 +117,24 @@ gen_attr (attr) ...@@ -122,29 +117,24 @@ gen_attr (attr)
if (! strcmp (XSTR (attr, 0), "length")) if (! strcmp (XSTR (attr, 0), "length"))
{ {
puts ("\ puts ("\
extern void shorten_branches PARAMS ((rtx));\n\ extern void shorten_branches (rtx);\n\
extern int insn_default_length PARAMS ((rtx));\n\ extern int insn_default_length (rtx);\n\
extern int insn_variable_length_p PARAMS ((rtx));\n\ extern int insn_variable_length_p (rtx);\n\
extern int insn_current_length PARAMS ((rtx));\n\n\ extern int insn_current_length (rtx);\n\n\
#include \"insn-addr.h\"\n"); #include \"insn-addr.h\"\n");
} }
} }
static void static void
write_units (num_units, multiplicity, simultaneity, write_units (int num_units, struct range *multiplicity, struct range *simultaneity,
ready_cost, issue_delay, blockage) struct range *ready_cost, struct range *issue_delay,
int num_units; struct range *blockage)
struct range *multiplicity;
struct range *simultaneity;
struct range *ready_cost;
struct range *issue_delay;
struct range *blockage;
{ {
int i, q_size; int i, q_size;
printf ("#define INSN_SCHEDULING\n\n"); printf ("#define INSN_SCHEDULING\n\n");
printf ("extern int result_ready_cost PARAMS ((rtx));\n"); printf ("extern int result_ready_cost (rtx);\n");
printf ("extern int function_units_used PARAMS ((rtx));\n\n"); printf ("extern int function_units_used (rtx);\n\n");
printf ("extern const struct function_unit_desc\n"); printf ("extern const struct function_unit_desc\n");
printf ("{\n"); printf ("{\n");
printf (" const char *const name;\n"); printf (" const char *const name;\n");
...@@ -153,11 +143,11 @@ write_units (num_units, multiplicity, simultaneity, ...@@ -153,11 +143,11 @@ write_units (num_units, multiplicity, simultaneity,
printf (" const int simultaneity;\n"); printf (" const int simultaneity;\n");
printf (" const int default_cost;\n"); printf (" const int default_cost;\n");
printf (" const int max_issue_delay;\n"); printf (" const int max_issue_delay;\n");
printf (" int (*const ready_cost_function) PARAMS ((rtx));\n"); printf (" int (*const ready_cost_function) (rtx);\n");
printf (" int (*const conflict_cost_function) PARAMS ((rtx, rtx));\n"); printf (" int (*const conflict_cost_function) (rtx, rtx);\n");
printf (" const int max_blockage;\n"); printf (" const int max_blockage;\n");
printf (" unsigned int (*const blockage_range_function) PARAMS ((rtx));\n"); printf (" unsigned int (*const blockage_range_function) (rtx);\n");
printf (" int (*const blockage_function) PARAMS ((rtx, rtx));\n"); printf (" int (*const blockage_function) (rtx, rtx);\n");
printf ("} function_units[];\n\n"); printf ("} function_units[];\n\n");
printf ("#define FUNCTION_UNITS_SIZE %d\n", num_units); printf ("#define FUNCTION_UNITS_SIZE %d\n", num_units);
printf ("#define MIN_MULTIPLICITY %d\n", multiplicity->min); printf ("#define MIN_MULTIPLICITY %d\n", multiplicity->min);
...@@ -182,12 +172,8 @@ write_units (num_units, multiplicity, simultaneity, ...@@ -182,12 +172,8 @@ write_units (num_units, multiplicity, simultaneity,
printf ("#define INSN_QUEUE_SIZE %d\n", q_size); printf ("#define INSN_QUEUE_SIZE %d\n", q_size);
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
int have_delay = 0; int have_delay = 0;
...@@ -243,9 +229,9 @@ main (argc, argv) ...@@ -243,9 +229,9 @@ main (argc, argv)
if (! have_delay) if (! have_delay)
{ {
printf ("#define DELAY_SLOTS\n"); printf ("#define DELAY_SLOTS\n");
printf ("extern int num_delay_slots PARAMS ((rtx));\n"); printf ("extern int num_delay_slots (rtx);\n");
printf ("extern int eligible_for_delay PARAMS ((rtx, int, rtx, int));\n\n"); printf ("extern int eligible_for_delay (rtx, int, rtx, int);\n\n");
printf ("extern int const_num_delay_slots PARAMS ((rtx));\n\n"); printf ("extern int const_num_delay_slots (rtx);\n\n");
have_delay = 1; have_delay = 1;
} }
...@@ -254,14 +240,14 @@ main (argc, argv) ...@@ -254,14 +240,14 @@ main (argc, argv)
if (XVECEXP (desc, 1, i + 1) && ! have_annul_true) if (XVECEXP (desc, 1, i + 1) && ! have_annul_true)
{ {
printf ("#define ANNUL_IFTRUE_SLOTS\n"); printf ("#define ANNUL_IFTRUE_SLOTS\n");
printf ("extern int eligible_for_annul_true PARAMS ((rtx, int, rtx, int));\n"); printf ("extern int eligible_for_annul_true (rtx, int, rtx, int);\n");
have_annul_true = 1; have_annul_true = 1;
} }
if (XVECEXP (desc, 1, i + 2) && ! have_annul_false) if (XVECEXP (desc, 1, i + 2) && ! have_annul_false)
{ {
printf ("#define ANNUL_IFFALSE_SLOTS\n"); printf ("#define ANNUL_IFFALSE_SLOTS\n");
printf ("extern int eligible_for_annul_false PARAMS ((rtx, int, rtx, int));\n"); printf ("extern int eligible_for_annul_false (rtx, int, rtx, int);\n");
have_annul_false = 1; have_annul_false = 1;
} }
} }
...@@ -379,19 +365,19 @@ main (argc, argv) ...@@ -379,19 +365,19 @@ main (argc, argv)
printf (" same processor cycle. */\n"); printf (" same processor cycle. */\n");
printf ("#define MAX_DFA_ISSUE_RATE max_dfa_issue_rate\n\n"); printf ("#define MAX_DFA_ISSUE_RATE max_dfa_issue_rate\n\n");
printf ("/* Insn latency time defined in define_insn_reservation. */\n"); printf ("/* Insn latency time defined in define_insn_reservation. */\n");
printf ("extern int insn_default_latency PARAMS ((rtx));\n\n"); printf ("extern int insn_default_latency (rtx);\n\n");
printf ("/* Return nonzero if there is a bypass for given insn\n"); printf ("/* Return nonzero if there is a bypass for given insn\n");
printf (" which is a data producer. */\n"); printf (" which is a data producer. */\n");
printf ("extern int bypass_p PARAMS ((rtx));\n\n"); printf ("extern int bypass_p (rtx);\n\n");
printf ("/* Insn latency time on data consumed by the 2nd insn.\n"); printf ("/* Insn latency time on data consumed by the 2nd insn.\n");
printf (" Use the function if bypass_p returns nonzero for\n"); printf (" Use the function if bypass_p returns nonzero for\n");
printf (" the 1st insn. */\n"); printf (" the 1st insn. */\n");
printf ("extern int insn_latency PARAMS ((rtx, rtx));\n\n"); printf ("extern int insn_latency (rtx, rtx);\n\n");
printf ("\n#if AUTOMATON_ALTS\n"); printf ("\n#if AUTOMATON_ALTS\n");
printf ("/* The following function returns number of alternative\n"); printf ("/* The following function returns number of alternative\n");
printf (" reservations of given insn. It may be used for better\n"); printf (" reservations of given insn. It may be used for better\n");
printf (" insns scheduling heuristics. */\n"); printf (" insns scheduling heuristics. */\n");
printf ("extern int insn_alts PARAMS ((rtx));\n\n"); printf ("extern int insn_alts (rtx);\n\n");
printf ("#endif\n\n"); printf ("#endif\n\n");
printf ("/* Maximal possible number of insns waiting results being\n"); printf ("/* Maximal possible number of insns waiting results being\n");
printf (" produced by insns whose execution is not finished. */\n"); printf (" produced by insns whose execution is not finished. */\n");
...@@ -399,10 +385,10 @@ main (argc, argv) ...@@ -399,10 +385,10 @@ main (argc, argv)
printf ("/* Pointer to data describing current state of DFA. */\n"); printf ("/* Pointer to data describing current state of DFA. */\n");
printf ("typedef void *state_t;\n\n"); printf ("typedef void *state_t;\n\n");
printf ("/* Size of the data in bytes. */\n"); printf ("/* Size of the data in bytes. */\n");
printf ("extern int state_size PARAMS ((void));\n\n"); printf ("extern int state_size (void);\n\n");
printf ("/* Initiate given DFA state, i.e. Set up the state\n"); printf ("/* Initiate given DFA state, i.e. Set up the state\n");
printf (" as all functional units were not reserved. */\n"); printf (" as all functional units were not reserved. */\n");
printf ("extern void state_reset PARAMS ((state_t));\n"); printf ("extern void state_reset (state_t);\n");
printf ("/* The following function returns negative value if given\n"); printf ("/* The following function returns negative value if given\n");
printf (" insn can be issued in processor state described by given\n"); printf (" insn can be issued in processor state described by given\n");
printf (" DFA state. In this case, the DFA state is changed to\n"); printf (" DFA state. In this case, the DFA state is changed to\n");
...@@ -412,7 +398,7 @@ main (argc, argv) ...@@ -412,7 +398,7 @@ main (argc, argv)
printf (" for superscalar or VLIW processors. If the second\n"); printf (" for superscalar or VLIW processors. If the second\n");
printf (" parameter is NULL the function changes given DFA state\n"); printf (" parameter is NULL the function changes given DFA state\n");
printf (" as new processor cycle started. */\n"); printf (" as new processor cycle started. */\n");
printf ("extern int state_transition PARAMS ((state_t, rtx));\n"); printf ("extern int state_transition (state_t, rtx);\n");
printf ("\n#if AUTOMATON_STATE_ALTS\n"); printf ("\n#if AUTOMATON_STATE_ALTS\n");
printf ("/* The following function returns number of possible\n"); printf ("/* The following function returns number of possible\n");
printf (" alternative reservations of given insn in given\n"); printf (" alternative reservations of given insn in given\n");
...@@ -420,12 +406,12 @@ main (argc, argv) ...@@ -420,12 +406,12 @@ main (argc, argv)
printf (" heuristics. By default the function is defined if\n"); printf (" heuristics. By default the function is defined if\n");
printf (" macro AUTOMATON_STATE_ALTS is defined because its\n"); printf (" macro AUTOMATON_STATE_ALTS is defined because its\n");
printf (" implementation may require much memory. */\n"); printf (" implementation may require much memory. */\n");
printf ("extern int state_alts PARAMS ((state_t, rtx));\n"); printf ("extern int state_alts (state_t, rtx);\n");
printf ("#endif\n\n"); printf ("#endif\n\n");
printf ("extern int min_issue_delay PARAMS ((state_t, rtx));\n"); printf ("extern int min_issue_delay (state_t, rtx);\n");
printf ("/* The following function returns nonzero if no one insn\n"); printf ("/* The following function returns nonzero if no one insn\n");
printf (" can be issued in current DFA state. */\n"); printf (" can be issued in current DFA state. */\n");
printf ("extern int state_dead_lock_p PARAMS ((state_t));\n"); printf ("extern int state_dead_lock_p (state_t);\n");
printf ("/* The function returns minimal delay of issue of the 2nd\n"); printf ("/* The function returns minimal delay of issue of the 2nd\n");
printf (" insn after issuing the 1st insn in given DFA state.\n"); printf (" insn after issuing the 1st insn in given DFA state.\n");
printf (" The 1st insn should be issued in given state (i.e.\n"); printf (" The 1st insn should be issued in given state (i.e.\n");
...@@ -433,30 +419,30 @@ main (argc, argv) ...@@ -433,30 +419,30 @@ main (argc, argv)
printf (" the insn and the state). Data dependencies between\n"); printf (" the insn and the state). Data dependencies between\n");
printf (" the insns are ignored by the function. */\n"); printf (" the insns are ignored by the function. */\n");
printf printf
("extern int min_insn_conflict_delay PARAMS ((state_t, rtx, rtx));\n"); ("extern int min_insn_conflict_delay (state_t, rtx, rtx);\n");
printf ("/* The following function outputs reservations for given\n"); printf ("/* The following function outputs reservations for given\n");
printf (" insn as they are described in the corresponding\n"); printf (" insn as they are described in the corresponding\n");
printf (" define_insn_reservation. */\n"); printf (" define_insn_reservation. */\n");
printf ("extern void print_reservation PARAMS ((FILE *, rtx));\n"); printf ("extern void print_reservation (FILE *, rtx);\n");
printf ("\n#if CPU_UNITS_QUERY\n"); printf ("\n#if CPU_UNITS_QUERY\n");
printf ("/* The following function returns code of functional unit\n"); printf ("/* The following function returns code of functional unit\n");
printf (" with given name (see define_cpu_unit). */\n"); printf (" with given name (see define_cpu_unit). */\n");
printf ("extern int get_cpu_unit_code PARAMS ((const char *));\n"); printf ("extern int get_cpu_unit_code (const char *);\n");
printf ("/* The following function returns nonzero if functional\n"); printf ("/* The following function returns nonzero if functional\n");
printf (" unit with given code is currently reserved in given\n"); printf (" unit with given code is currently reserved in given\n");
printf (" DFA state. */\n"); printf (" DFA state. */\n");
printf ("extern int cpu_unit_reservation_p PARAMS ((state_t, int));\n"); printf ("extern int cpu_unit_reservation_p (state_t, int);\n");
printf ("#endif\n\n"); printf ("#endif\n\n");
printf ("/* Clean insn code cache. It should be called if there\n"); printf ("/* Clean insn code cache. It should be called if there\n");
printf (" is a chance that condition value in a\n"); printf (" is a chance that condition value in a\n");
printf (" define_insn_reservation will be changed after\n"); printf (" define_insn_reservation will be changed after\n");
printf (" last call of dfa_start. */\n"); printf (" last call of dfa_start. */\n");
printf ("extern void dfa_clean_insn_cache PARAMS ((void));\n\n"); printf ("extern void dfa_clean_insn_cache (void);\n\n");
printf ("/* Initiate and finish work with DFA. They should be\n"); printf ("/* Initiate and finish work with DFA. They should be\n");
printf (" called as the first and the last interface\n"); printf (" called as the first and the last interface\n");
printf (" functions. */\n"); printf (" functions. */\n");
printf ("extern void dfa_start PARAMS ((void));\n"); printf ("extern void dfa_start (void);\n");
printf ("extern void dfa_finish PARAMS ((void));\n"); printf ("extern void dfa_finish (void);\n");
} }
else else
{ {
...@@ -486,8 +472,7 @@ main (argc, argv) ...@@ -486,8 +472,7 @@ main (argc, argv)
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Generate check macros for tree codes. /* Generate check macros for tree codes.
Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -32,20 +33,16 @@ static const char *const tree_codes[] = { ...@@ -32,20 +33,16 @@ static const char *const tree_codes[] = {
(char*) 0 (char*) 0
}; };
static void usage PARAMS ((void)); static void usage (void);
static void static void
usage () usage (void)
{ {
fputs ("Usage: gencheck\n", stderr); fputs ("Usage: gencheck\n", stderr);
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv ATTRIBUTE_UNUSED)
int argc;
char **argv ATTRIBUTE_UNUSED;
{ {
int i; int i;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- some macros CODE_FOR_... giving the insn_code_number value - some macros CODE_FOR_... giving the insn_code_number value
for each of the defined standard insn names. for each of the defined standard insn names.
Copyright (C) 1987, 1991, 1995, 1998, Copyright (C) 1987, 1991, 1995, 1998,
1999, 2000, 2001 Free Software Foundation, Inc. 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -30,12 +30,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -30,12 +30,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "errors.h" #include "errors.h"
#include "gensupport.h" #include "gensupport.h"
static void gen_insn PARAMS ((rtx, int));
static void static void
gen_insn (insn, code) gen_insn (rtx insn, int code)
rtx insn;
int code;
{ {
const char *name = XSTR (insn, 0); const char *name = XSTR (insn, 0);
int truth = maybe_eval_c_test (XSTR (insn, 2)); int truth = maybe_eval_c_test (XSTR (insn, 2));
...@@ -52,12 +48,8 @@ gen_insn (insn, code) ...@@ -52,12 +48,8 @@ gen_insn (insn, code)
} }
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
...@@ -111,8 +103,7 @@ enum insn_code {"); ...@@ -111,8 +103,7 @@ enum insn_code {");
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
/* Process machine description and calculate constant conditions. /* Process machine description and calculate constant conditions.
Copyright (C) 2001, 2002 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -40,20 +40,17 @@ static int saw_eh_return; ...@@ -40,20 +40,17 @@ static int saw_eh_return;
static htab_t condition_table; static htab_t condition_table;
static void add_condition PARAMS ((const char *)); static void add_condition (const char *);
static void write_header PARAMS ((void)); static void write_header (void);
static void write_conditions PARAMS ((void)); static void write_conditions (void);
static int write_one_condition PARAMS ((PTR *, PTR)); static int write_one_condition (void **, void *);
extern int main PARAMS ((int, char **));
/* Record the C test expression EXPR in the condition_table. /* Record the C test expression EXPR in the condition_table.
Duplicates clobber previous entries, which leaks memory, but Duplicates clobber previous entries, which leaks memory, but
we don't care for this application. */ we don't care for this application. */
static void static void
add_condition (expr) add_condition (const char *expr)
const char *expr;
{ {
struct c_test *test; struct c_test *test;
...@@ -69,7 +66,7 @@ add_condition (expr) ...@@ -69,7 +66,7 @@ add_condition (expr)
/* Generate the header for insn-conditions.c. */ /* Generate the header for insn-conditions.c. */
static void static void
write_header () write_header (void)
{ {
puts ("\ puts ("\
/* Generated automatically by the program `genconditions' from the target\n\ /* Generated automatically by the program `genconditions' from the target\n\
...@@ -122,7 +119,7 @@ write_header () ...@@ -122,7 +119,7 @@ write_header ()
extern rtx insn;\n\ extern rtx insn;\n\
extern rtx ins1;\n\ extern rtx ins1;\n\
extern rtx operands[];\n\ extern rtx operands[];\n\
extern int next_insn_tests_no_inequality PARAMS ((rtx));\n"); extern int next_insn_tests_no_inequality (rtx);\n");
puts ("\ puts ("\
/* If we don't have __builtin_constant_p, or it's not acceptable in\n\ /* If we don't have __builtin_constant_p, or it's not acceptable in\n\
...@@ -142,9 +139,7 @@ extern int next_insn_tests_no_inequality PARAMS ((rtx));\n"); ...@@ -142,9 +139,7 @@ extern int next_insn_tests_no_inequality PARAMS ((rtx));\n");
MAYBE_EVAL (! optimize_size && ! TARGET_READ_MODIFY_WRITE) }, */ MAYBE_EVAL (! optimize_size && ! TARGET_READ_MODIFY_WRITE) }, */
static int static int
write_one_condition (slot, dummy) write_one_condition (void **slot, void *dummy ATTRIBUTE_UNUSED)
PTR *slot;
PTR dummy ATTRIBUTE_UNUSED;
{ {
const struct c_test *test = * (const struct c_test **) slot; const struct c_test *test = * (const struct c_test **) slot;
const char *p; const char *p;
...@@ -167,7 +162,7 @@ write_one_condition (slot, dummy) ...@@ -167,7 +162,7 @@ write_one_condition (slot, dummy)
/* Write out the complete conditions table, its size, and a flag /* Write out the complete conditions table, its size, and a flag
indicating that gensupport.c can now do insn elision. */ indicating that gensupport.c can now do insn elision. */
static void static void
write_conditions () write_conditions (void)
{ {
puts ("\ puts ("\
/* This table lists each condition found in the machine description.\n\ /* This table lists each condition found in the machine description.\n\
...@@ -186,9 +181,7 @@ const struct c_test insn_conditions[] = {"); ...@@ -186,9 +181,7 @@ const struct c_test insn_conditions[] = {");
} }
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
int pattern_lineno; /* not used */ int pattern_lineno; /* not used */
......
/* Generate from machine description: /* Generate from machine description:
- some #define configuration flags. - some #define configuration flags.
Copyright (C) 1987, 1991, 1997, 1998, Copyright (C) 1987, 1991, 1997, 1998, 1999, 2000, 2003
1999, 2000 Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -50,12 +50,12 @@ static int max_insns_per_peep2; ...@@ -50,12 +50,12 @@ static int max_insns_per_peep2;
static int clobbers_seen_this_insn; static int clobbers_seen_this_insn;
static int dup_operands_seen_this_insn; static int dup_operands_seen_this_insn;
static void walk_insn_part PARAMS ((rtx, int, int)); static void walk_insn_part (rtx, int, int);
static void gen_insn PARAMS ((rtx)); static void gen_insn (rtx);
static void gen_expand PARAMS ((rtx)); static void gen_expand (rtx);
static void gen_split PARAMS ((rtx)); static void gen_split (rtx);
static void gen_peephole PARAMS ((rtx)); static void gen_peephole (rtx);
static void gen_peephole2 PARAMS ((rtx)); static void gen_peephole2 (rtx);
/* RECOG_P will be nonzero if this pattern was seen in a context where it will /* RECOG_P will be nonzero if this pattern was seen in a context where it will
be used to recognize, rather than just generate an insn. be used to recognize, rather than just generate an insn.
...@@ -64,10 +64,7 @@ static void gen_peephole2 PARAMS ((rtx)); ...@@ -64,10 +64,7 @@ static void gen_peephole2 PARAMS ((rtx));
of a SET whose destination is not (pc). */ of a SET whose destination is not (pc). */
static void static void
walk_insn_part (part, recog_p, non_pc_set_src) walk_insn_part (rtx part, int recog_p, int non_pc_set_src)
rtx part;
int recog_p;
int non_pc_set_src;
{ {
int i, j; int i, j;
RTX_CODE code; RTX_CODE code;
...@@ -171,8 +168,7 @@ walk_insn_part (part, recog_p, non_pc_set_src) ...@@ -171,8 +168,7 @@ walk_insn_part (part, recog_p, non_pc_set_src)
} }
static void static void
gen_insn (insn) gen_insn (rtx insn)
rtx insn;
{ {
int i; int i;
...@@ -192,8 +188,7 @@ gen_insn (insn) ...@@ -192,8 +188,7 @@ gen_insn (insn)
/* Similar but scan a define_expand. */ /* Similar but scan a define_expand. */
static void static void
gen_expand (insn) gen_expand (rtx insn)
rtx insn;
{ {
int i; int i;
...@@ -219,8 +214,7 @@ gen_expand (insn) ...@@ -219,8 +214,7 @@ gen_expand (insn)
/* Similar but scan a define_split. */ /* Similar but scan a define_split. */
static void static void
gen_split (split) gen_split (rtx split)
rtx split;
{ {
int i; int i;
...@@ -234,8 +228,7 @@ gen_split (split) ...@@ -234,8 +228,7 @@ gen_split (split)
} }
static void static void
gen_peephole (peep) gen_peephole (rtx peep)
rtx peep;
{ {
int i; int i;
...@@ -246,8 +239,7 @@ gen_peephole (peep) ...@@ -246,8 +239,7 @@ gen_peephole (peep)
} }
static void static void
gen_peephole2 (peep) gen_peephole2 (rtx peep)
rtx peep;
{ {
int i, n; int i, n;
...@@ -265,12 +257,8 @@ gen_peephole2 (peep) ...@@ -265,12 +257,8 @@ gen_peephole2 (peep)
max_insns_per_peep2 = n; max_insns_per_peep2 = n;
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
...@@ -379,8 +367,7 @@ main (argc, argv) ...@@ -379,8 +367,7 @@ main (argc, argv)
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
a series of #define statements, one for each constant named in a series of #define statements, one for each constant named in
a (define_constants ...) pattern. a (define_constants ...) pattern.
Copyright (C) 1987, 1991, 1995, 1998, Copyright (C) 1987, 1991, 1995, 1998, 1999, 2000, 2001, 2003
1999, 2000, 2001 Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -34,16 +34,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -34,16 +34,13 @@ Boston, MA 02111-1307, USA. */
#include "errors.h" #include "errors.h"
#include "gensupport.h" #include "gensupport.h"
static int print_md_constant PARAMS ((void **, void *)); static int print_md_constant (void **, void *);
extern int main PARAMS ((int, char **));
/* Called via traverse_md_constants; emit a #define for /* Called via traverse_md_constants; emit a #define for
the current constant definition. */ the current constant definition. */
static int static int
print_md_constant (slot, info) print_md_constant (void **slot, void *info)
void **slot;
void *info;
{ {
struct md_constant *def = *slot; struct md_constant *def = *slot;
FILE *file = info; FILE *file = info;
...@@ -53,9 +50,7 @@ print_md_constant (slot, info) ...@@ -53,9 +50,7 @@ print_md_constant (slot, info)
} }
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int dummy1, dummy2; int dummy1, dummy2;
rtx desc; rtx desc;
......
/* Generate code from machine description to emit insns as rtl. /* Generate code from machine description to emit insns as rtl.
Copyright (C) 1987, 1988, 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001 Copyright (C) 1987, 1988, 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
Free Software Foundation, Inc. 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -57,22 +57,21 @@ struct clobber_ent ...@@ -57,22 +57,21 @@ struct clobber_ent
struct clobber_ent *next; struct clobber_ent *next;
}; };
static void max_operand_1 PARAMS ((rtx)); static void max_operand_1 (rtx);
static int max_operand_vec PARAMS ((rtx, int)); static int max_operand_vec (rtx, int);
static void print_code PARAMS ((RTX_CODE)); static void print_code (RTX_CODE);
static void gen_exp PARAMS ((rtx, enum rtx_code, char *)); static void gen_exp (rtx, enum rtx_code, char *);
static void gen_insn PARAMS ((rtx, int)); static void gen_insn (rtx, int);
static void gen_expand PARAMS ((rtx)); static void gen_expand (rtx);
static void gen_split PARAMS ((rtx)); static void gen_split (rtx);
static void output_add_clobbers PARAMS ((void)); static void output_add_clobbers (void);
static void output_added_clobbers_hard_reg_p PARAMS ((void)); static void output_added_clobbers_hard_reg_p (void);
static void gen_rtx_scratch PARAMS ((rtx, enum rtx_code)); static void gen_rtx_scratch (rtx, enum rtx_code);
static void output_peephole2_scratches PARAMS ((rtx)); static void output_peephole2_scratches (rtx);
static void static void
max_operand_1 (x) max_operand_1 (rtx x)
rtx x;
{ {
RTX_CODE code; RTX_CODE code;
int i; int i;
...@@ -112,9 +111,7 @@ max_operand_1 (x) ...@@ -112,9 +111,7 @@ max_operand_1 (x)
} }
static int static int
max_operand_vec (insn, arg) max_operand_vec (rtx insn, int arg)
rtx insn;
int arg;
{ {
int len = XVECLEN (insn, arg); int len = XVECLEN (insn, arg);
int i; int i;
...@@ -130,8 +127,7 @@ max_operand_vec (insn, arg) ...@@ -130,8 +127,7 @@ max_operand_vec (insn, arg)
} }
static void static void
print_code (code) print_code (RTX_CODE code)
RTX_CODE code;
{ {
const char *p1; const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++) for (p1 = GET_RTX_NAME (code); *p1; p1++)
...@@ -139,9 +135,7 @@ print_code (code) ...@@ -139,9 +135,7 @@ print_code (code)
} }
static void static void
gen_rtx_scratch (x, subroutine_type) gen_rtx_scratch (rtx x, enum rtx_code subroutine_type)
rtx x;
enum rtx_code subroutine_type;
{ {
if (subroutine_type == DEFINE_PEEPHOLE2) if (subroutine_type == DEFINE_PEEPHOLE2)
{ {
...@@ -157,10 +151,7 @@ gen_rtx_scratch (x, subroutine_type) ...@@ -157,10 +151,7 @@ gen_rtx_scratch (x, subroutine_type)
substituting any operand references appearing within. */ substituting any operand references appearing within. */
static void static void
gen_exp (x, subroutine_type, used) gen_exp (rtx x, enum rtx_code subroutine_type, char *used)
rtx x;
enum rtx_code subroutine_type;
char *used;
{ {
RTX_CODE code; RTX_CODE code;
int i; int i;
...@@ -299,9 +290,7 @@ gen_exp (x, subroutine_type, used) ...@@ -299,9 +290,7 @@ gen_exp (x, subroutine_type, used)
/* Generate the `gen_...' function for a DEFINE_INSN. */ /* Generate the `gen_...' function for a DEFINE_INSN. */
static void static void
gen_insn (insn, lineno) gen_insn (rtx insn, int lineno)
rtx insn;
int lineno;
{ {
int operands; int operands;
int i; int i;
...@@ -432,8 +421,7 @@ gen_insn (insn, lineno) ...@@ -432,8 +421,7 @@ gen_insn (insn, lineno)
/* Generate the `gen_...' function for a DEFINE_EXPAND. */ /* Generate the `gen_...' function for a DEFINE_EXPAND. */
static void static void
gen_expand (expand) gen_expand (rtx expand)
rtx expand;
{ {
int operands; int operands;
int i; int i;
...@@ -569,8 +557,7 @@ gen_expand (expand) ...@@ -569,8 +557,7 @@ gen_expand (expand)
/* Like gen_expand, but generates insns resulting from splitting SPLIT. */ /* Like gen_expand, but generates insns resulting from splitting SPLIT. */
static void static void
gen_split (split) gen_split (rtx split)
rtx split;
{ {
int i; int i;
int operands; int operands;
...@@ -596,7 +583,7 @@ gen_split (split) ...@@ -596,7 +583,7 @@ gen_split (split)
/* Output the prototype, function name and argument declarations. */ /* Output the prototype, function name and argument declarations. */
if (GET_CODE (split) == DEFINE_PEEPHOLE2) if (GET_CODE (split) == DEFINE_PEEPHOLE2)
{ {
printf ("extern rtx gen_%s_%d PARAMS ((rtx, rtx *));\n", printf ("extern rtx gen_%s_%d (rtx, rtx *);\n",
name, insn_code_number); name, insn_code_number);
printf ("rtx\ngen_%s_%d (curr_insn, operands)\n", printf ("rtx\ngen_%s_%d (curr_insn, operands)\n",
name, insn_code_number); name, insn_code_number);
...@@ -605,7 +592,7 @@ gen_split (split) ...@@ -605,7 +592,7 @@ gen_split (split)
} }
else else
{ {
printf ("extern rtx gen_split_%d PARAMS ((rtx *));\n", insn_code_number); printf ("extern rtx gen_split_%d (rtx *);\n", insn_code_number);
printf ("rtx\ngen_%s_%d (operands)\n", name, insn_code_number); printf ("rtx\ngen_%s_%d (operands)\n", name, insn_code_number);
printf (" rtx *operands%s;\n", unused); printf (" rtx *operands%s;\n", unused);
} }
...@@ -724,7 +711,7 @@ output_add_clobbers () ...@@ -724,7 +711,7 @@ output_add_clobbers ()
hard reg and 0 if they just clobber SCRATCH. */ hard reg and 0 if they just clobber SCRATCH. */
static void static void
output_added_clobbers_hard_reg_p () output_added_clobbers_hard_reg_p (void)
{ {
struct clobber_pat *clobber; struct clobber_pat *clobber;
struct clobber_ent *ent; struct clobber_ent *ent;
...@@ -761,8 +748,7 @@ output_added_clobbers_hard_reg_p () ...@@ -761,8 +748,7 @@ output_added_clobbers_hard_reg_p ()
scratch registers used by the peephole2 pattern in SPLIT. */ scratch registers used by the peephole2 pattern in SPLIT. */
static void static void
output_peephole2_scratches (split) output_peephole2_scratches (rtx split)
rtx split;
{ {
int i; int i;
int insn_nr = 0; int insn_nr = 0;
...@@ -800,12 +786,8 @@ output_peephole2_scratches (split) ...@@ -800,12 +786,8 @@ output_peephole2_scratches (split)
} }
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
...@@ -896,8 +878,7 @@ from the machine description file `md'. */\n\n"); ...@@ -896,8 +878,7 @@ from the machine description file `md'. */\n\n");
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
/* Generate code from machine description to extract operands from insn as rtl. /* Generate code from machine description to extract operands from insn as rtl.
Copyright (C) 1987, 1991, 1992, 1993, 1997, 1998, Copyright (C) 1987, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2003
1999, 2000 Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -95,14 +95,13 @@ static int dupnums[MAX_DUP_OPERANDS]; ...@@ -95,14 +95,13 @@ static int dupnums[MAX_DUP_OPERANDS];
static struct code_ptr *peepholes; static struct code_ptr *peepholes;
static void gen_insn PARAMS ((rtx)); static void gen_insn (rtx);
static void walk_rtx PARAMS ((rtx, const char *)); static void walk_rtx (rtx, const char *);
static void print_path PARAMS ((const char *)); static void print_path (const char *);
static void record_insn_name PARAMS ((int, const char *)); static void record_insn_name (int, const char *);
static void static void
gen_insn (insn) gen_insn (rtx insn)
rtx insn;
{ {
int i; int i;
struct extraction *p; struct extraction *p;
...@@ -181,9 +180,7 @@ gen_insn (insn) ...@@ -181,9 +180,7 @@ gen_insn (insn)
} }
static void static void
walk_rtx (x, path) walk_rtx (rtx x, const char *path)
rtx x;
const char *path;
{ {
RTX_CODE code; RTX_CODE code;
int i; int i;
...@@ -306,8 +303,7 @@ walk_rtx (x, path) ...@@ -306,8 +303,7 @@ walk_rtx (x, path)
evaluate to the rtx at that point. */ evaluate to the rtx at that point. */
static void static void
print_path (path) print_path (const char *path)
const char *path;
{ {
int len = strlen (path); int len = strlen (path);
int i; int i;
...@@ -346,12 +342,9 @@ print_path (path) ...@@ -346,12 +342,9 @@ print_path (path)
} }
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
int i; int i;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- some flags HAVE_... saying which simple standard instructions are - some flags HAVE_... saying which simple standard instructions are
available for this machine. available for this machine.
Copyright (C) 1987, 1991, 1995, 1998, Copyright (C) 1987, 1991, 1995, 1998,
1999, 2000 Free Software Foundation, Inc. 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -40,17 +40,16 @@ static int max_id_len; ...@@ -40,17 +40,16 @@ static int max_id_len;
/* Max operand encountered in a scan over some insn. */ /* Max operand encountered in a scan over some insn. */
static int max_opno; static int max_opno;
static void max_operand_1 PARAMS ((rtx)); static void max_operand_1 (rtx);
static int num_operands PARAMS ((rtx)); static int num_operands (rtx);
static void gen_proto PARAMS ((rtx)); static void gen_proto (rtx);
static void gen_macro PARAMS ((const char *, int, int)); static void gen_macro (const char *, int, int);
static void gen_insn PARAMS ((rtx)); static void gen_insn (rtx);
/* Count the number of match_operand's found. */ /* Count the number of match_operand's found. */
static void static void
max_operand_1 (x) max_operand_1 (rtx x)
rtx x;
{ {
RTX_CODE code; RTX_CODE code;
int i; int i;
...@@ -82,8 +81,7 @@ max_operand_1 (x) ...@@ -82,8 +81,7 @@ max_operand_1 (x)
} }
static int static int
num_operands (insn) num_operands (rtx insn)
rtx insn;
{ {
int len = XVECLEN (insn, 1); int len = XVECLEN (insn, 1);
int i; int i;
...@@ -100,9 +98,7 @@ num_operands (insn) ...@@ -100,9 +98,7 @@ num_operands (insn)
of arguments it takes. Any missing arguments are assumed to be at of arguments it takes. Any missing arguments are assumed to be at
the end. */ the end. */
static void static void
gen_macro (name, real, expect) gen_macro (const char *name, int real, int expect)
const char *name;
int real, expect;
{ {
int i; int i;
...@@ -131,8 +127,7 @@ gen_macro (name, real, expect) ...@@ -131,8 +127,7 @@ gen_macro (name, real, expect)
does nothing. */ does nothing. */
static void static void
gen_proto (insn) gen_proto (rtx insn)
rtx insn;
{ {
int num = num_operands (insn); int num = num_operands (insn);
int i; int i;
...@@ -159,9 +154,9 @@ gen_proto (insn) ...@@ -159,9 +154,9 @@ gen_proto (insn)
} }
if (truth != 0) if (truth != 0)
printf ("extern rtx gen_%-*s PARAMS ((", max_id_len, name); printf ("extern rtx gen_%-*s (", max_id_len, name);
else else
printf ("static inline rtx gen_%-*s PARAMS ((", max_id_len, name); printf ("static inline rtx gen_%-*s (", max_id_len, name);
if (num == 0) if (num == 0)
fputs ("void", stdout); fputs ("void", stdout);
...@@ -173,7 +168,7 @@ gen_proto (insn) ...@@ -173,7 +168,7 @@ gen_proto (insn)
fputs ("rtx", stdout); fputs ("rtx", stdout);
} }
puts ("));"); puts (");");
/* Some back ends want to take the address of generator functions, /* Some back ends want to take the address of generator functions,
so we cannot simply use #define for these dummy definitions. */ so we cannot simply use #define for these dummy definitions. */
...@@ -197,8 +192,7 @@ gen_proto (insn) ...@@ -197,8 +192,7 @@ gen_proto (insn)
} }
static void static void
gen_insn (insn) gen_insn (rtx insn)
rtx insn;
{ {
const char *name = XSTR (insn, 0); const char *name = XSTR (insn, 0);
const char *p; const char *p;
...@@ -238,12 +232,8 @@ gen_insn (insn) ...@@ -238,12 +232,8 @@ gen_insn (insn)
obstack_grow (&obstack, &insn, sizeof (rtx)); obstack_grow (&obstack, &insn, sizeof (rtx));
} }
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
rtx dummy; rtx dummy;
...@@ -299,8 +289,7 @@ main (argc, argv) ...@@ -299,8 +289,7 @@ main (argc, argv)
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
/* Generate code to allocate RTL structures. /* Generate code to allocate RTL structures.
Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -44,24 +45,23 @@ static const struct rtx_definition defs[] = ...@@ -44,24 +45,23 @@ static const struct rtx_definition defs[] =
static const char *formats[NUM_RTX_CODE]; static const char *formats[NUM_RTX_CODE];
static const char *type_from_format PARAMS ((int)); static const char *type_from_format (int);
static const char *accessor_from_format PARAMS ((int)); static const char *accessor_from_format (int);
static int special_format PARAMS ((const char *)); static int special_format (const char *);
static int special_rtx PARAMS ((int)); static int special_rtx (int);
static int excluded_rtx PARAMS ((int)); static int excluded_rtx (int);
static void find_formats PARAMS ((void)); static void find_formats (void);
static void gendecl PARAMS ((const char *)); static void gendecl (const char *);
static void genmacro PARAMS ((int)); static void genmacro (int);
static void gendef PARAMS ((const char *)); static void gendef (const char *);
static void genlegend PARAMS ((void)); static void genlegend (void);
static void genheader PARAMS ((void)); static void genheader (void);
static void gencode PARAMS ((void)); static void gencode (void);
/* Decode a format letter into a C type string. */ /* Decode a format letter into a C type string. */
static const char * static const char *
type_from_format (c) type_from_format (int c)
int c;
{ {
switch (c) switch (c)
{ {
...@@ -93,8 +93,7 @@ type_from_format (c) ...@@ -93,8 +93,7 @@ type_from_format (c)
/* Decode a format letter into the proper accessor function. */ /* Decode a format letter into the proper accessor function. */
static const char * static const char *
accessor_from_format (c) accessor_from_format (int c)
int c;
{ {
switch (c) switch (c)
{ {
...@@ -131,8 +130,7 @@ accessor_from_format (c) ...@@ -131,8 +130,7 @@ accessor_from_format (c)
the list of formats we write routines to create. */ the list of formats we write routines to create. */
static int static int
special_format (fmt) special_format (const char *fmt)
const char *fmt;
{ {
return (strchr (fmt, '*') != 0 return (strchr (fmt, '*') != 0
|| strchr (fmt, 'V') != 0 || strchr (fmt, 'V') != 0
...@@ -145,8 +143,7 @@ special_format (fmt) ...@@ -145,8 +143,7 @@ special_format (fmt)
is a wrapper in emit-rtl.c). */ is a wrapper in emit-rtl.c). */
static int static int
special_rtx (idx) special_rtx (int idx)
int idx;
{ {
return (strcmp (defs[idx].enumname, "CONST_INT") == 0 return (strcmp (defs[idx].enumname, "CONST_INT") == 0
|| strcmp (defs[idx].enumname, "REG") == 0 || strcmp (defs[idx].enumname, "REG") == 0
...@@ -160,8 +157,7 @@ special_rtx (idx) ...@@ -160,8 +157,7 @@ special_rtx (idx)
cannot have the obvious interface). */ cannot have the obvious interface). */
static int static int
excluded_rtx (idx) excluded_rtx (int idx)
int idx;
{ {
return (strcmp (defs[idx].enumname, "CONST_DOUBLE") == 0); return (strcmp (defs[idx].enumname, "CONST_DOUBLE") == 0);
} }
...@@ -169,7 +165,7 @@ excluded_rtx (idx) ...@@ -169,7 +165,7 @@ excluded_rtx (idx)
/* Place a list of all format specifiers we use into the array FORMAT. */ /* Place a list of all format specifiers we use into the array FORMAT. */
static void static void
find_formats () find_formats (void)
{ {
int i; int i;
...@@ -192,13 +188,12 @@ find_formats () ...@@ -192,13 +188,12 @@ find_formats ()
/* Write the declarations for the routine to allocate RTL with FORMAT. */ /* Write the declarations for the routine to allocate RTL with FORMAT. */
static void static void
gendecl (format) gendecl (const char *format)
const char *format;
{ {
const char *p; const char *p;
int i, pos; int i, pos;
printf ("extern rtx gen_rtx_fmt_%s\tPARAMS ((RTX_CODE, ", format); printf ("extern rtx gen_rtx_fmt_%s\t (RTX_CODE, ", format);
printf ("enum machine_mode mode"); printf ("enum machine_mode mode");
/* Write each parameter that is needed and start a new line when the line /* Write each parameter that is needed and start a new line when the line
...@@ -216,15 +211,14 @@ gendecl (format) ...@@ -216,15 +211,14 @@ gendecl (format)
pos += ourlen; pos += ourlen;
} }
printf ("));\n"); printf (");\n");
} }
/* Generate macros to generate RTL of code IDX using the functions we /* Generate macros to generate RTL of code IDX using the functions we
write. */ write. */
static void static void
genmacro (idx) genmacro (int idx)
int idx;
{ {
const char *p; const char *p;
int i; int i;
...@@ -257,8 +251,7 @@ genmacro (idx) ...@@ -257,8 +251,7 @@ genmacro (idx)
format is FORMAT. */ format is FORMAT. */
static void static void
gendef (format) gendef (const char *format)
const char *format;
{ {
const char *p; const char *p;
int i, j; int i, j;
...@@ -298,7 +291,7 @@ gendef (format) ...@@ -298,7 +291,7 @@ gendef (format)
/* Generate the documentation header for files we write. */ /* Generate the documentation header for files we write. */
static void static void
genlegend () genlegend (void)
{ {
puts ("/* Generated automatically by gengenrtl from rtl.def. */\n"); puts ("/* Generated automatically by gengenrtl from rtl.def. */\n");
} }
...@@ -306,7 +299,7 @@ genlegend () ...@@ -306,7 +299,7 @@ genlegend ()
/* Generate the text of the header file we make, genrtl.h. */ /* Generate the text of the header file we make, genrtl.h. */
static void static void
genheader () genheader (void)
{ {
int i; int i;
const char **fmt; const char **fmt;
...@@ -329,7 +322,7 @@ genheader () ...@@ -329,7 +322,7 @@ genheader ()
/* Generate the text of the code file we write, genrtl.c. */ /* Generate the text of the code file we write, genrtl.c. */
static void static void
gencode () gencode (void)
{ {
const char **fmt; const char **fmt;
...@@ -348,12 +341,9 @@ gencode () ...@@ -348,12 +341,9 @@ gencode ()
/* This is the main program. We accept only one argument, "-h", which /* This is the main program. We accept only one argument, "-h", which
says we are writing the genrtl.h file. Otherwise we are writing the says we are writing the genrtl.h file. Otherwise we are writing the
genrtl.c file. */ genrtl.c file. */
extern int main PARAMS ((int, char **));
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
find_formats (); find_formats ();
genlegend (); genlegend ();
......
...@@ -32,10 +32,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -32,10 +32,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Nonzero iff an error has occurred. */ /* Nonzero iff an error has occurred. */
static int hit_error = 0; static int hit_error = 0;
static void gen_rtx_next PARAMS ((void)); static void gen_rtx_next (void);
static void write_rtx_next PARAMS ((void)); static void write_rtx_next (void);
static void open_base_files PARAMS ((void)); static void open_base_files (void);
static void close_output_files PARAMS ((void)); static void close_output_files (void);
/* Report an error at POS, printing MSG. */ /* Report an error at POS, printing MSG. */
...@@ -56,10 +56,7 @@ error_at_line (struct fileloc *pos, const char *msg, ...) ...@@ -56,10 +56,7 @@ error_at_line (struct fileloc *pos, const char *msg, ...)
/* vasprintf, but produces fatal message on out-of-memory. */ /* vasprintf, but produces fatal message on out-of-memory. */
int int
xvasprintf (result, format, args) xvasprintf (char **result, const char *format, va_list args)
char ** result;
const char *format;
va_list args;
{ {
int ret = vasprintf (result, format, args); int ret = vasprintf (result, format, args);
if (*result == NULL || ret < 0) if (*result == NULL || ret < 0)
...@@ -97,19 +94,16 @@ static type_p structures; ...@@ -97,19 +94,16 @@ static type_p structures;
static type_p param_structs; static type_p param_structs;
static pair_p variables; static pair_p variables;
static void do_scalar_typedef PARAMS ((const char *, struct fileloc *)); static void do_scalar_typedef (const char *, struct fileloc *);
static type_p find_param_structure static type_p find_param_structure
PARAMS ((type_p t, type_p param[NUM_PARAM])); (type_p t, type_p param[NUM_PARAM]);
static type_p adjust_field_tree_exp PARAMS ((type_p t, options_p opt)); static type_p adjust_field_tree_exp (type_p t, options_p opt);
static type_p adjust_field_rtx_def PARAMS ((type_p t, options_p opt)); static type_p adjust_field_rtx_def (type_p t, options_p opt);
/* Define S as a typedef to T at POS. */ /* Define S as a typedef to T at POS. */
void void
do_typedef (s, t, pos) do_typedef (const char *s, type_p t, struct fileloc *pos)
const char *s;
type_p t;
struct fileloc *pos;
{ {
pair_p p; pair_p p;
...@@ -135,9 +129,7 @@ do_typedef (s, t, pos) ...@@ -135,9 +129,7 @@ do_typedef (s, t, pos)
/* Define S as a typename of a scalar. */ /* Define S as a typename of a scalar. */
static void static void
do_scalar_typedef (s, pos) do_scalar_typedef (const char *s, struct fileloc *pos)
const char *s;
struct fileloc *pos;
{ {
do_typedef (s, create_scalar_type (s, strlen (s)), pos); do_typedef (s, create_scalar_type (s, strlen (s)), pos);
} }
...@@ -145,9 +137,7 @@ do_scalar_typedef (s, pos) ...@@ -145,9 +137,7 @@ do_scalar_typedef (s, pos)
/* Return the type previously defined for S. Use POS to report errors. */ /* Return the type previously defined for S. Use POS to report errors. */
type_p type_p
resolve_typedef (s, pos) resolve_typedef (const char *s, struct fileloc *pos)
const char *s;
struct fileloc *pos;
{ {
pair_p p; pair_p p;
for (p = typedefs; p != NULL; p = p->next) for (p = typedefs; p != NULL; p = p->next)
...@@ -161,12 +151,8 @@ resolve_typedef (s, pos) ...@@ -161,12 +151,8 @@ resolve_typedef (s, pos)
at POS with fields FIELDS and options O. */ at POS with fields FIELDS and options O. */
void void
new_structure (name, isunion, pos, fields, o) new_structure (const char *name, int isunion, struct fileloc *pos,
const char *name; pair_p fields, options_p o)
int isunion;
struct fileloc *pos;
pair_p fields;
options_p o;
{ {
type_p si; type_p si;
type_p s = NULL; type_p s = NULL;
...@@ -239,9 +225,7 @@ new_structure (name, isunion, pos, fields, o) ...@@ -239,9 +225,7 @@ new_structure (name, isunion, pos, fields, o)
was defined previously. */ was defined previously. */
type_p type_p
find_structure (name, isunion) find_structure (const char *name, int isunion)
const char *name;
int isunion;
{ {
type_p s; type_p s;
...@@ -264,9 +248,7 @@ find_structure (name, isunion) ...@@ -264,9 +248,7 @@ find_structure (name, isunion)
union if none was defined previously. */ union if none was defined previously. */
static type_p static type_p
find_param_structure (t, param) find_param_structure (type_p t, type_p param[NUM_PARAM])
type_p t;
type_p param[NUM_PARAM];
{ {
type_p res; type_p res;
...@@ -290,9 +272,7 @@ find_param_structure (t, param) ...@@ -290,9 +272,7 @@ find_param_structure (t, param)
/* Return a scalar type with name NAME. */ /* Return a scalar type with name NAME. */
type_p type_p
create_scalar_type (name, name_len) create_scalar_type (const char *name, size_t name_len)
const char *name;
size_t name_len;
{ {
type_p r = xcalloc (1, sizeof (struct type)); type_p r = xcalloc (1, sizeof (struct type));
r->kind = TYPE_SCALAR; r->kind = TYPE_SCALAR;
...@@ -303,8 +283,7 @@ create_scalar_type (name, name_len) ...@@ -303,8 +283,7 @@ create_scalar_type (name, name_len)
/* Return a pointer to T. */ /* Return a pointer to T. */
type_p type_p
create_pointer (t) create_pointer (type_p t)
type_p t;
{ {
if (! t->pointer_to) if (! t->pointer_to)
{ {
...@@ -319,9 +298,7 @@ create_pointer (t) ...@@ -319,9 +298,7 @@ create_pointer (t)
/* Return an array of length LEN. */ /* Return an array of length LEN. */
type_p type_p
create_array (t, len) create_array (type_p t, const char *len)
type_p t;
const char *len;
{ {
type_p v; type_p v;
...@@ -336,11 +313,7 @@ create_array (t, len) ...@@ -336,11 +313,7 @@ create_array (t, len)
to `variables'. */ to `variables'. */
void void
note_variable (s, t, o, pos) note_variable (const char *s, type_p t, options_p o, struct fileloc *pos)
const char *s;
type_p t;
options_p o;
struct fileloc *pos;
{ {
pair_p n; pair_p n;
n = xmalloc (sizeof (*n)); n = xmalloc (sizeof (*n));
...@@ -366,7 +339,7 @@ static int rtx_next_new[NUM_RTX_CODE]; ...@@ -366,7 +339,7 @@ static int rtx_next_new[NUM_RTX_CODE];
in gengtype at all, but it's needed for adjust_field_rtx_def. */ in gengtype at all, but it's needed for adjust_field_rtx_def. */
static void static void
gen_rtx_next () gen_rtx_next (void)
{ {
int i; int i;
for (i = 0; i < NUM_RTX_CODE; i++) for (i = 0; i < NUM_RTX_CODE; i++)
...@@ -387,7 +360,7 @@ gen_rtx_next () ...@@ -387,7 +360,7 @@ gen_rtx_next ()
/* Write out the contents of the rtx_next array. */ /* Write out the contents of the rtx_next array. */
static void static void
write_rtx_next () write_rtx_next (void)
{ {
outf_p f = get_output_file_with_visibility (NULL); outf_p f = get_output_file_with_visibility (NULL);
int i; int i;
...@@ -409,9 +382,7 @@ write_rtx_next () ...@@ -409,9 +382,7 @@ write_rtx_next ()
are based in a complex way on the type of RTL. */ are based in a complex way on the type of RTL. */
static type_p static type_p
adjust_field_rtx_def (t, opt) adjust_field_rtx_def (type_p t, options_p opt ATTRIBUTE_UNUSED)
type_p t;
options_p opt ATTRIBUTE_UNUSED;
{ {
pair_p flds = NULL; pair_p flds = NULL;
options_p nodot; options_p nodot;
...@@ -659,9 +630,7 @@ adjust_field_rtx_def (t, opt) ...@@ -659,9 +630,7 @@ adjust_field_rtx_def (t, opt)
a new type for the field. */ a new type for the field. */
static type_p static type_p
adjust_field_tree_exp (t, opt) adjust_field_tree_exp (type_p t, options_p opt ATTRIBUTE_UNUSED)
type_p t;
options_p opt ATTRIBUTE_UNUSED;
{ {
pair_p flds; pair_p flds;
options_p nodot; options_p nodot;
...@@ -761,9 +730,7 @@ adjust_field_tree_exp (t, opt) ...@@ -761,9 +730,7 @@ adjust_field_tree_exp (t, opt)
*/ */
type_p type_p
adjust_field_type (t, opt) adjust_field_type (type_p t, options_p opt)
type_p t;
options_p opt;
{ {
int length_p = 0; int length_p = 0;
const int pointer_p = t->kind == TYPE_POINTER; const int pointer_p = t->kind == TYPE_POINTER;
...@@ -842,11 +809,8 @@ adjust_field_type (t, opt) ...@@ -842,11 +809,8 @@ adjust_field_type (t, opt)
in TYPEINFO. POS is used for error messages. */ in TYPEINFO. POS is used for error messages. */
void void
note_yacc_type (o, fields, typeinfo, pos) note_yacc_type (options_p o, pair_p fields, pair_p typeinfo,
options_p o; struct fileloc *pos)
pair_p fields;
pair_p typeinfo;
struct fileloc *pos;
{ {
pair_p p; pair_p p;
pair_p *p_p; pair_p *p_p;
...@@ -901,20 +865,16 @@ note_yacc_type (o, fields, typeinfo, pos) ...@@ -901,20 +865,16 @@ note_yacc_type (o, fields, typeinfo, pos)
do_typedef ("YYSTYPE", find_structure ("yy_union", 1), pos); do_typedef ("YYSTYPE", find_structure ("yy_union", 1), pos);
} }
static void process_gc_options PARAMS ((options_p, enum gc_used_enum, static void process_gc_options (options_p, enum gc_used_enum,
int *, int *, int *)); int *, int *, int *);
static void set_gc_used_type PARAMS ((type_p, enum gc_used_enum, type_p *)); static void set_gc_used_type (type_p, enum gc_used_enum, type_p *);
static void set_gc_used PARAMS ((pair_p)); static void set_gc_used (pair_p);
/* Handle OPT for set_gc_used_type. */ /* Handle OPT for set_gc_used_type. */
static void static void
process_gc_options (opt, level, maybe_undef, pass_param, length) process_gc_options (options_p opt, enum gc_used_enum level, int *maybe_undef,
options_p opt; int *pass_param, int *length)
enum gc_used_enum level;
int *maybe_undef;
int *pass_param;
int *length;
{ {
options_p o; options_p o;
for (o = opt; o; o = o->next) for (o = opt; o; o = o->next)
...@@ -931,10 +891,7 @@ process_gc_options (opt, level, maybe_undef, pass_param, length) ...@@ -931,10 +891,7 @@ process_gc_options (opt, level, maybe_undef, pass_param, length)
/* Set the gc_used field of T to LEVEL, and handle the types it references. */ /* Set the gc_used field of T to LEVEL, and handle the types it references. */
static void static void
set_gc_used_type (t, level, param) set_gc_used_type (type_p t, enum gc_used_enum level, type_p param[NUM_PARAM])
type_p t;
enum gc_used_enum level;
type_p param[NUM_PARAM];
{ {
if (t->gc_used >= level) if (t->gc_used >= level)
return; return;
...@@ -1009,8 +966,7 @@ set_gc_used_type (t, level, param) ...@@ -1009,8 +966,7 @@ set_gc_used_type (t, level, param)
/* Set the gc_used fields of all the types pointed to by VARIABLES. */ /* Set the gc_used fields of all the types pointed to by VARIABLES. */
static void static void
set_gc_used (variables) set_gc_used (pair_p variables)
pair_p variables;
{ {
pair_p p; pair_p p;
for (p = variables; p; p = p->next) for (p = variables; p; p = p->next)
...@@ -1040,19 +996,17 @@ static int srcdir_len = 0; ...@@ -1040,19 +996,17 @@ static int srcdir_len = 0;
#define NUM_BASE_FILES (ARRAY_SIZE (lang_dir_names) - 1) #define NUM_BASE_FILES (ARRAY_SIZE (lang_dir_names) - 1)
outf_p base_files[NUM_BASE_FILES]; outf_p base_files[NUM_BASE_FILES];
static outf_p create_file PARAMS ((const char *, const char *)); static outf_p create_file (const char *, const char *);
static const char * get_file_basename PARAMS ((const char *)); static const char * get_file_basename (const char *);
/* Create and return an outf_p for a new file for NAME, to be called /* Create and return an outf_p for a new file for NAME, to be called
ONAME. */ ONAME. */
static outf_p static outf_p
create_file (name, oname) create_file (const char *name, const char *oname)
const char *name;
const char *oname;
{ {
static const char *const hdr[] = { static const char *const hdr[] = {
" Copyright (C) 2002 Free Software Foundation, Inc.\n", " Copyright (C) 2003 Free Software Foundation, Inc.\n",
"\n", "\n",
"This file is part of GCC.\n", "This file is part of GCC.\n",
"\n", "\n",
...@@ -1118,7 +1072,7 @@ oprintf (outf_p o, const char *format, ...) ...@@ -1118,7 +1072,7 @@ oprintf (outf_p o, const char *format, ...)
/* Open the global header file and the language-specific header files. */ /* Open the global header file and the language-specific header files. */
static void static void
open_base_files () open_base_files (void)
{ {
size_t i; size_t i;
...@@ -1151,8 +1105,7 @@ open_base_files () ...@@ -1151,8 +1105,7 @@ open_base_files ()
/* Determine the pathname to F relative to $(srcdir). */ /* Determine the pathname to F relative to $(srcdir). */
static const char * static const char *
get_file_basename (f) get_file_basename (const char *f)
const char *f;
{ {
const char *basename; const char *basename;
unsigned i; unsigned i;
...@@ -1195,8 +1148,7 @@ get_file_basename (f) ...@@ -1195,8 +1148,7 @@ get_file_basename (f)
some GC roots may be missed, which is a much harder-to-debug problem. */ some GC roots may be missed, which is a much harder-to-debug problem. */
unsigned unsigned
get_base_file_bitmap (input_file) get_base_file_bitmap (const char *input_file)
const char *input_file;
{ {
const char *basename = get_file_basename (input_file); const char *basename = get_file_basename (input_file);
const char *slashpos = strchr (basename, '/'); const char *slashpos = strchr (basename, '/');
...@@ -1248,8 +1200,7 @@ get_base_file_bitmap (input_file) ...@@ -1248,8 +1200,7 @@ get_base_file_bitmap (input_file)
INPUT_FILE. */ INPUT_FILE. */
outf_p outf_p
get_output_file_with_visibility (input_file) get_output_file_with_visibility (const char *input_file)
const char *input_file;
{ {
outf_p r; outf_p r;
size_t len; size_t len;
...@@ -1313,8 +1264,7 @@ get_output_file_with_visibility (input_file) ...@@ -1313,8 +1264,7 @@ get_output_file_with_visibility (input_file)
that uses INPUT_FILE. */ that uses INPUT_FILE. */
const char * const char *
get_output_file_name (input_file) get_output_file_name (const char *input_file)
const char *input_file;
{ {
return get_output_file_with_visibility (input_file)->name; return get_output_file_with_visibility (input_file)->name;
} }
...@@ -1322,10 +1272,10 @@ get_output_file_name (input_file) ...@@ -1322,10 +1272,10 @@ get_output_file_name (input_file)
/* Copy the output to its final destination, /* Copy the output to its final destination,
but don't unnecessarily change modification times. */ but don't unnecessarily change modification times. */
static void close_output_files PARAMS ((void)); static void close_output_files (void);
static void static void
close_output_files () close_output_files (void)
{ {
outf_p of; outf_p of;
...@@ -1386,9 +1336,9 @@ struct walk_type_data; ...@@ -1386,9 +1336,9 @@ struct walk_type_data;
For misc. pointers, given the item in 'val'. For misc. pointers, given the item in 'val'.
*/ */
typedef void (*process_field_fn) typedef void (*process_field_fn)
PARAMS ((type_p f, const struct walk_type_data *p)); (type_p f, const struct walk_type_data *p);
typedef void (*func_name_fn) typedef void (*func_name_fn)
PARAMS ((type_p s, const struct walk_type_data *p)); (type_p s, const struct walk_type_data *p);
/* Parameters for write_types. */ /* Parameters for write_types. */
...@@ -1402,35 +1352,35 @@ struct write_types_data ...@@ -1402,35 +1352,35 @@ struct write_types_data
const char *comment; const char *comment;
}; };
static void output_escaped_param PARAMS ((struct walk_type_data *d, static void output_escaped_param (struct walk_type_data *d,
const char *, const char *)); const char *, const char *);
static void output_mangled_typename PARAMS ((outf_p, type_p)); static void output_mangled_typename (outf_p, type_p);
static void walk_type PARAMS ((type_p t, struct walk_type_data *d)); static void walk_type (type_p t, struct walk_type_data *d);
static void write_func_for_structure static void write_func_for_structure
PARAMS ((type_p orig_s, type_p s, type_p * param, (type_p orig_s, type_p s, type_p * param,
const struct write_types_data *wtd)); const struct write_types_data *wtd);
static void write_types_process_field static void write_types_process_field
PARAMS ((type_p f, const struct walk_type_data *d)); (type_p f, const struct walk_type_data *d);
static void write_types PARAMS ((type_p structures, static void write_types (type_p structures,
type_p param_structs, type_p param_structs,
const struct write_types_data *wtd)); const struct write_types_data *wtd);
static void write_types_local_process_field static void write_types_local_process_field
PARAMS ((type_p f, const struct walk_type_data *d)); (type_p f, const struct walk_type_data *d);
static void write_local_func_for_structure static void write_local_func_for_structure
PARAMS ((type_p orig_s, type_p s, type_p * param)); (type_p orig_s, type_p s, type_p * param);
static void write_local PARAMS ((type_p structures, static void write_local (type_p structures,
type_p param_structs)); type_p param_structs);
static void write_enum_defn PARAMS ((type_p structures, type_p param_structs)); static void write_enum_defn (type_p structures, type_p param_structs);
static int contains_scalar_p PARAMS ((type_p t)); static int contains_scalar_p (type_p t);
static void put_mangled_filename PARAMS ((outf_p , const char *)); static void put_mangled_filename (outf_p , const char *);
static void finish_root_table PARAMS ((struct flist *flp, const char *pfx, static void finish_root_table (struct flist *flp, const char *pfx,
const char *tname, const char *lastname, const char *tname, const char *lastname,
const char *name)); const char *name);
static void write_root PARAMS ((outf_p , pair_p, type_p, const char *, int, static void write_root (outf_p , pair_p, type_p, const char *, int,
struct fileloc *, const char *)); struct fileloc *, const char *);
static void write_array PARAMS ((outf_p f, pair_p v, static void write_array (outf_p f, pair_p v,
const struct write_types_data *wtd)); const struct write_types_data *wtd);
static void write_roots PARAMS ((pair_p)); static void write_roots (pair_p);
/* Parameters for walk_type. */ /* Parameters for walk_type. */
...@@ -1456,9 +1406,7 @@ struct walk_type_data ...@@ -1456,9 +1406,7 @@ struct walk_type_data
/* Print a mangled name representing T to OF. */ /* Print a mangled name representing T to OF. */
static void static void
output_mangled_typename (of, t) output_mangled_typename (outf_p of, type_p t)
outf_p of;
type_p t;
{ {
if (t == NULL) if (t == NULL)
oprintf (of, "Z"); oprintf (of, "Z");
...@@ -1499,10 +1447,8 @@ output_mangled_typename (of, t) ...@@ -1499,10 +1447,8 @@ output_mangled_typename (of, t)
print error messages. */ print error messages. */
static void static void
output_escaped_param (d, param, oname) output_escaped_param (struct walk_type_data *d, const char *param,
struct walk_type_data *d; const char *oname)
const char *param;
const char *oname;
{ {
const char *p; const char *p;
...@@ -1546,9 +1492,7 @@ output_escaped_param (d, param, oname) ...@@ -1546,9 +1492,7 @@ output_escaped_param (d, param, oname)
option). */ option). */
static void static void
walk_type (t, d) walk_type (type_p t, struct walk_type_data *d)
type_p t;
struct walk_type_data *d;
{ {
const char *length = NULL; const char *length = NULL;
const char *desc = NULL; const char *desc = NULL;
...@@ -1907,9 +1851,7 @@ walk_type (t, d) ...@@ -1907,9 +1851,7 @@ walk_type (t, d)
/* process_field routine for marking routines. */ /* process_field routine for marking routines. */
static void static void
write_types_process_field (f, d) write_types_process_field (type_p f, const struct walk_type_data *d)
type_p f;
const struct walk_type_data *d;
{ {
const struct write_types_data *wtd; const struct write_types_data *wtd;
const char *cast = d->needs_cast_p ? "(void *)" : ""; const char *cast = d->needs_cast_p ? "(void *)" : "";
...@@ -1972,11 +1914,8 @@ write_types_process_field (f, d) ...@@ -1972,11 +1914,8 @@ write_types_process_field (f, d)
*/ */
static void static void
write_func_for_structure (orig_s, s, param, wtd) write_func_for_structure (type_p orig_s, type_p s, type_p *param,
type_p orig_s; const struct write_types_data *wtd)
type_p s;
type_p * param;
const struct write_types_data *wtd;
{ {
const char *fn = s->u.s.line.file; const char *fn = s->u.s.line.file;
int i; int i;
...@@ -2102,10 +2041,8 @@ write_func_for_structure (orig_s, s, param, wtd) ...@@ -2102,10 +2041,8 @@ write_func_for_structure (orig_s, s, param, wtd)
/* Write out marker routines for STRUCTURES and PARAM_STRUCTS. */ /* Write out marker routines for STRUCTURES and PARAM_STRUCTS. */
static void static void
write_types (structures, param_structs, wtd) write_types (type_p structures, type_p param_structs,
type_p structures; const struct write_types_data *wtd)
type_p param_structs;
const struct write_types_data *wtd;
{ {
type_p s; type_p s;
...@@ -2149,7 +2086,7 @@ write_types (structures, param_structs, wtd) ...@@ -2149,7 +2086,7 @@ write_types (structures, param_structs, wtd)
/* Declare the marker procedure only once. */ /* Declare the marker procedure only once. */
oprintf (header_file, oprintf (header_file,
"extern void gt_%sx_%s PARAMS ((void *));\n", "extern void gt_%sx_%s (void *);\n",
wtd->prefix, s->u.s.tag); wtd->prefix, s->u.s.tag);
if (s->u.s.line.file == NULL) if (s->u.s.line.file == NULL)
...@@ -2178,7 +2115,7 @@ write_types (structures, param_structs, wtd) ...@@ -2178,7 +2115,7 @@ write_types (structures, param_structs, wtd)
/* Declare the marker procedure. */ /* Declare the marker procedure. */
oprintf (header_file, "extern void gt_%s_", wtd->prefix); oprintf (header_file, "extern void gt_%s_", wtd->prefix);
output_mangled_typename (header_file, s); output_mangled_typename (header_file, s);
oprintf (header_file, " PARAMS ((void *));\n"); oprintf (header_file, " (void *);\n");
if (stru->u.s.line.file == NULL) if (stru->u.s.line.file == NULL)
{ {
...@@ -2216,9 +2153,7 @@ static const struct write_types_data pch_wtd = ...@@ -2216,9 +2153,7 @@ static const struct write_types_data pch_wtd =
/* process_field routine for local pointer-walking. */ /* process_field routine for local pointer-walking. */
static void static void
write_types_local_process_field (f, d) write_types_local_process_field (type_p f, const struct walk_type_data *d)
type_p f;
const struct walk_type_data *d;
{ {
switch (f->kind) switch (f->kind)
{ {
...@@ -2248,10 +2183,7 @@ write_types_local_process_field (f, d) ...@@ -2248,10 +2183,7 @@ write_types_local_process_field (f, d)
*/ */
static void static void
write_local_func_for_structure (orig_s, s, param) write_local_func_for_structure (type_p orig_s, type_p s, type_p *param)
type_p orig_s;
type_p s;
type_p * param;
{ {
const char *fn = s->u.s.line.file; const char *fn = s->u.s.line.file;
int i; int i;
...@@ -2297,9 +2229,7 @@ write_local_func_for_structure (orig_s, s, param) ...@@ -2297,9 +2229,7 @@ write_local_func_for_structure (orig_s, s, param)
/* Write out local marker routines for STRUCTURES and PARAM_STRUCTS. */ /* Write out local marker routines for STRUCTURES and PARAM_STRUCTS. */
static void static void
write_local (structures, param_structs) write_local (type_p structures, type_p param_structs)
type_p structures;
type_p param_structs;
{ {
type_p s; type_p s;
...@@ -2339,7 +2269,7 @@ write_local (structures, param_structs) ...@@ -2339,7 +2269,7 @@ write_local (structures, param_structs)
oprintf (header_file, "extern void gt_pch_p_"); oprintf (header_file, "extern void gt_pch_p_");
output_mangled_typename (header_file, s); output_mangled_typename (header_file, s);
oprintf (header_file, oprintf (header_file,
"\n PARAMS ((void *, void *, gt_pointer_operator, void *));\n"); "\n (void *, void *, gt_pointer_operator, void *);\n");
if (s->kind == TYPE_LANG_STRUCT) if (s->kind == TYPE_LANG_STRUCT)
{ {
...@@ -2361,7 +2291,7 @@ write_local (structures, param_structs) ...@@ -2361,7 +2291,7 @@ write_local (structures, param_structs)
oprintf (header_file, "extern void gt_pch_p_"); oprintf (header_file, "extern void gt_pch_p_");
output_mangled_typename (header_file, s); output_mangled_typename (header_file, s);
oprintf (header_file, oprintf (header_file,
"\n PARAMS ((void *, void *, gt_pointer_operator, void *));\n"); "\n (void *, void *, gt_pointer_operator, void *);\n");
if (stru->u.s.line.file == NULL) if (stru->u.s.line.file == NULL)
{ {
...@@ -2384,9 +2314,7 @@ write_local (structures, param_structs) ...@@ -2384,9 +2314,7 @@ write_local (structures, param_structs)
/* Write out the 'enum' definition for gt_types_enum. */ /* Write out the 'enum' definition for gt_types_enum. */
static void static void
write_enum_defn (structures, param_structs) write_enum_defn (type_p structures, type_p param_structs)
type_p structures;
type_p param_structs;
{ {
type_p s; type_p s;
...@@ -2418,8 +2346,7 @@ write_enum_defn (structures, param_structs) ...@@ -2418,8 +2346,7 @@ write_enum_defn (structures, param_structs)
/* Might T contain any non-pointer elements? */ /* Might T contain any non-pointer elements? */
static int static int
contains_scalar_p (t) contains_scalar_p (type_p t)
type_p t;
{ {
switch (t->kind) switch (t->kind)
{ {
...@@ -2438,9 +2365,7 @@ contains_scalar_p (t) ...@@ -2438,9 +2365,7 @@ contains_scalar_p (t)
/* Mangle FN and print it to F. */ /* Mangle FN and print it to F. */
static void static void
put_mangled_filename (f, fn) put_mangled_filename (outf_p f, const char *fn)
outf_p f;
const char *fn;
{ {
const char *name = get_output_file_name (fn); const char *name = get_output_file_name (fn);
for (; *name != 0; name++) for (; *name != 0; name++)
...@@ -2455,12 +2380,8 @@ put_mangled_filename (f, fn) ...@@ -2455,12 +2380,8 @@ put_mangled_filename (f, fn)
the resulting code. */ the resulting code. */
static void static void
finish_root_table (flp, pfx, lastname, tname, name) finish_root_table (struct flist *flp, const char *pfx, const char *lastname,
struct flist *flp; const char *tname, const char *name)
const char *pfx;
const char *tname;
const char *lastname;
const char *name;
{ {
struct flist *fli2; struct flist *fli2;
...@@ -2530,14 +2451,8 @@ finish_root_table (flp, pfx, lastname, tname, name) ...@@ -2530,14 +2451,8 @@ finish_root_table (flp, pfx, lastname, tname, name)
is nonzero iff we are building the root table for hash table caches. */ is nonzero iff we are building the root table for hash table caches. */
static void static void
write_root (f, v, type, name, has_length, line, if_marked) write_root (outf_p f, pair_p v, type_p type, const char *name, int has_length,
outf_p f; struct fileloc *line, const char *if_marked)
pair_p v;
type_p type;
const char *name;
int has_length;
struct fileloc *line;
const char *if_marked;
{ {
switch (type->kind) switch (type->kind)
{ {
...@@ -2695,10 +2610,7 @@ write_root (f, v, type, name, has_length, line, if_marked) ...@@ -2695,10 +2610,7 @@ write_root (f, v, type, name, has_length, line, if_marked)
/* This generates a routine to walk an array. */ /* This generates a routine to walk an array. */
static void static void
write_array (f, v, wtd) write_array (outf_p f, pair_p v, const struct write_types_data *wtd)
outf_p f;
pair_p v;
const struct write_types_data *wtd;
{ {
struct walk_type_data d; struct walk_type_data d;
char *prevval3; char *prevval3;
...@@ -2718,7 +2630,7 @@ write_array (f, v, wtd) ...@@ -2718,7 +2630,7 @@ write_array (f, v, wtd)
{ {
oprintf (f, "static void gt_%sa_%s\n", wtd->param_prefix, v->name); oprintf (f, "static void gt_%sa_%s\n", wtd->param_prefix, v->name);
oprintf (f, oprintf (f,
" PARAMS ((void *, void *, gt_pointer_operator, void *));\n"); " (void *, void *, gt_pointer_operator, void *);\n");
oprintf (f, "static void gt_%sa_%s (this_obj, x_p, op, cookie)\n", oprintf (f, "static void gt_%sa_%s (this_obj, x_p, op, cookie)\n",
wtd->param_prefix, v->name); wtd->param_prefix, v->name);
oprintf (d.of, " void *this_obj ATTRIBUTE_UNUSED;\n"); oprintf (d.of, " void *this_obj ATTRIBUTE_UNUSED;\n");
...@@ -2733,7 +2645,7 @@ write_array (f, v, wtd) ...@@ -2733,7 +2645,7 @@ write_array (f, v, wtd)
} }
d.opt = v->opt; d.opt = v->opt;
oprintf (f, "static void gt_%sa_%s PARAMS ((void *));\n", oprintf (f, "static void gt_%sa_%s (void *);\n",
wtd->prefix, v->name); wtd->prefix, v->name);
oprintf (f, "static void\ngt_%sa_%s (x_p)\n", oprintf (f, "static void\ngt_%sa_%s (x_p)\n",
wtd->prefix, v->name); wtd->prefix, v->name);
...@@ -2749,8 +2661,7 @@ write_array (f, v, wtd) ...@@ -2749,8 +2661,7 @@ write_array (f, v, wtd)
/* Output a table describing the locations and types of VARIABLES. */ /* Output a table describing the locations and types of VARIABLES. */
static void static void
write_roots (variables) write_roots (pair_p variables)
pair_p variables;
{ {
pair_p v; pair_p v;
struct flist *flp = NULL; struct flist *flp = NULL;
...@@ -2996,11 +2907,9 @@ write_roots (variables) ...@@ -2996,11 +2907,9 @@ write_roots (variables)
} }
extern int main PARAMS ((int argc, char **argv)); extern int main (int argc, char **argv);
int int
main(argc, argv) main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
int argc ATTRIBUTE_UNUSED;
char **argv ATTRIBUTE_UNUSED;
{ {
unsigned i; unsigned i;
static struct fileloc pos = { __FILE__, __LINE__ }; static struct fileloc pos = { __FILE__, __LINE__ };
......
/* Process source files and output type information. /* Process source files and output type information.
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -111,36 +111,36 @@ extern struct fileloc lexer_line; ...@@ -111,36 +111,36 @@ extern struct fileloc lexer_line;
/* Print an error message. */ /* Print an error message. */
extern void error_at_line extern void error_at_line
PARAMS ((struct fileloc *pos, const char *msg, ...)) ATTRIBUTE_PRINTF_2; (struct fileloc *pos, const char *msg, ...) ATTRIBUTE_PRINTF_2;
/* Combines xmalloc() and vasprintf(). */ /* Combines xmalloc() and vasprintf(). */
extern int xvasprintf PARAMS ((char **, const char *, va_list)) extern int xvasprintf (char **, const char *, va_list)
ATTRIBUTE_PRINTF (2, 0); ATTRIBUTE_PRINTF (2, 0);
/* Like the above, but more convenient for quick coding. */ /* Like the above, but more convenient for quick coding. */
extern char * xasprintf PARAMS ((const char *, ...)) extern char * xasprintf (const char *, ...)
ATTRIBUTE_PRINTF_1; ATTRIBUTE_PRINTF_1;
/* Constructor routines for types. */ /* Constructor routines for types. */
extern void do_typedef PARAMS ((const char *s, type_p t, struct fileloc *pos)); extern void do_typedef (const char *s, type_p t, struct fileloc *pos);
extern type_p resolve_typedef PARAMS ((const char *s, struct fileloc *pos)); extern type_p resolve_typedef (const char *s, struct fileloc *pos);
extern void new_structure PARAMS ((const char *name, int isunion, extern void new_structure (const char *name, int isunion,
struct fileloc *pos, pair_p fields, struct fileloc *pos, pair_p fields,
options_p o)); options_p o);
extern type_p find_structure PARAMS ((const char *s, int isunion)); extern type_p find_structure (const char *s, int isunion);
extern type_p create_scalar_type PARAMS ((const char *name, size_t name_len)); extern type_p create_scalar_type (const char *name, size_t name_len);
extern type_p create_pointer PARAMS ((type_p t)); extern type_p create_pointer (type_p t);
extern type_p create_array PARAMS ((type_p t, const char *len)); extern type_p create_array (type_p t, const char *len);
extern type_p adjust_field_type PARAMS ((type_p, options_p)); extern type_p adjust_field_type (type_p, options_p);
extern void note_variable PARAMS ((const char *s, type_p t, options_p o, extern void note_variable (const char *s, type_p t, options_p o,
struct fileloc *pos)); struct fileloc *pos);
extern void note_yacc_type PARAMS ((options_p o, pair_p fields, extern void note_yacc_type (options_p o, pair_p fields,
pair_p typeinfo, struct fileloc *pos)); pair_p typeinfo, struct fileloc *pos);
/* Lexer and parser routines, most automatically generated. */ /* Lexer and parser routines, most automatically generated. */
extern int yylex PARAMS((void)); extern int yylex (void);
extern void yyerror PARAMS ((const char *)); extern void yyerror (const char *);
extern int yyparse PARAMS ((void)); extern int yyparse (void);
extern void parse_file PARAMS ((const char *name)); extern void parse_file (const char *name);
/* Output file handling. */ /* Output file handling. */
...@@ -164,8 +164,8 @@ extern outf_p header_file; ...@@ -164,8 +164,8 @@ extern outf_p header_file;
made in INPUT_FILE and is linked into every language that uses made in INPUT_FILE and is linked into every language that uses
INPUT_FILE. */ INPUT_FILE. */
extern outf_p get_output_file_with_visibility extern outf_p get_output_file_with_visibility
PARAMS ((const char *input_file)); (const char *input_file);
const char *get_output_file_name PARAMS ((const char *)); const char *get_output_file_name (const char *);
/* A list of output files suitable for definitions. There is one /* A list of output files suitable for definitions. There is one
BASE_FILES entry for each language. */ BASE_FILES entry for each language. */
...@@ -174,8 +174,8 @@ extern outf_p base_files[]; ...@@ -174,8 +174,8 @@ extern outf_p base_files[];
/* A bitmap that specifies which of BASE_FILES should be used to /* A bitmap that specifies which of BASE_FILES should be used to
output a definition that is different for each language and must be output a definition that is different for each language and must be
defined once in each language that uses INPUT_FILE. */ defined once in each language that uses INPUT_FILE. */
extern lang_bitmap get_base_file_bitmap PARAMS ((const char *input_file)); extern lang_bitmap get_base_file_bitmap (const char *input_file);
/* Print, like fprintf, to O. */ /* Print, like fprintf, to O. */
extern void oprintf PARAMS ((outf_p o, const char *S, ...)) extern void oprintf (outf_p o, const char *S, ...)
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
...@@ -149,11 +149,10 @@ static const char * const optabs[] = ...@@ -149,11 +149,10 @@ static const char * const optabs[] =
"movstr_optab[$A] = CODE_FOR_$(movstr$a$)", "movstr_optab[$A] = CODE_FOR_$(movstr$a$)",
"clrstr_optab[$A] = CODE_FOR_$(clrstr$a$)" }; "clrstr_optab[$A] = CODE_FOR_$(clrstr$a$)" };
static void gen_insn PARAMS ((rtx)); static void gen_insn (rtx);
static void static void
gen_insn (insn) gen_insn (rtx insn)
rtx insn;
{ {
const char *name = XSTR (insn, 0); const char *name = XSTR (insn, 0);
int m1 = 0, m2 = 0, op = 0; int m1 = 0, m2 = 0, op = 0;
...@@ -321,12 +320,10 @@ gen_insn (insn) ...@@ -321,12 +320,10 @@ gen_insn (insn)
printf (";\n"); printf (";\n");
} }
extern int main PARAMS ((int, char **)); extern int main (int, char **);
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
...@@ -377,8 +374,7 @@ from the machine description file `md'. */\n\n"); ...@@ -377,8 +374,7 @@ from the machine description file `md'. */\n\n");
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
...@@ -99,8 +99,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -99,8 +99,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define MAX_MAX_OPERANDS 40 #define MAX_MAX_OPERANDS 40
static int n_occurrences PARAMS ((int, const char *)); static int n_occurrences (int, const char *);
static const char *strip_whitespace PARAMS ((const char *)); static const char *strip_whitespace (const char *);
/* insns in the machine description are assigned sequential code numbers /* insns in the machine description are assigned sequential code numbers
that are used by insn-recog.c (produced by genrecog) to communicate that are used by insn-recog.c (produced by genrecog) to communicate
...@@ -173,28 +173,27 @@ struct data ...@@ -173,28 +173,27 @@ struct data
static struct data *idata, **idata_end = &idata; static struct data *idata, **idata_end = &idata;
static void output_prologue PARAMS ((void)); static void output_prologue (void);
static void output_predicate_decls PARAMS ((void)); static void output_predicate_decls (void);
static void output_operand_data PARAMS ((void)); static void output_operand_data (void);
static void output_insn_data PARAMS ((void)); static void output_insn_data (void);
static void output_get_insn_name PARAMS ((void)); static void output_get_insn_name (void);
static void scan_operands PARAMS ((struct data *, rtx, int, int)); static void scan_operands (struct data *, rtx, int, int);
static int compare_operands PARAMS ((struct operand_data *, static int compare_operands (struct operand_data *,
struct operand_data *)); struct operand_data *);
static void place_operands PARAMS ((struct data *)); static void place_operands (struct data *);
static void process_template PARAMS ((struct data *, const char *)); static void process_template (struct data *, const char *);
static void validate_insn_alternatives PARAMS ((struct data *)); static void validate_insn_alternatives (struct data *);
static void validate_insn_operands PARAMS ((struct data *)); static void validate_insn_operands (struct data *);
static void gen_insn PARAMS ((rtx, int)); static void gen_insn (rtx, int);
static void gen_peephole PARAMS ((rtx, int)); static void gen_peephole (rtx, int);
static void gen_expand PARAMS ((rtx, int)); static void gen_expand (rtx, int);
static void gen_split PARAMS ((rtx, int)); static void gen_split (rtx, int);
static void check_constraint_len PARAMS ((void)); static void check_constraint_len (void);
static int constraint_len PARAMS ((const char *, int)); static int constraint_len (const char *, int);
const char * const char *
get_insn_name (index) get_insn_name (int index)
int index;
{ {
static char buf[100]; static char buf[100];
...@@ -216,7 +215,7 @@ get_insn_name (index) ...@@ -216,7 +215,7 @@ get_insn_name (index)
} }
static void static void
output_prologue () output_prologue (void)
{ {
printf ("/* Generated automatically by the program `genoutput'\n\ printf ("/* Generated automatically by the program `genoutput'\n\
from the machine description file `md'. */\n\n"); from the machine description file `md'. */\n\n");
...@@ -251,7 +250,7 @@ output_prologue () ...@@ -251,7 +250,7 @@ output_prologue ()
struct predicate { const char *name; struct predicate *next; }; struct predicate { const char *name; struct predicate *next; };
static void static void
output_predicate_decls () output_predicate_decls (void)
{ {
struct predicate *predicates = 0; struct predicate *predicates = 0;
struct operand_data *d; struct operand_data *d;
...@@ -266,7 +265,7 @@ output_predicate_decls () ...@@ -266,7 +265,7 @@ output_predicate_decls ()
if (p == 0) if (p == 0)
{ {
printf ("extern int %s PARAMS ((rtx, enum machine_mode));\n", printf ("extern int %s (rtx, enum machine_mode);\n",
d->predicate); d->predicate);
p = (struct predicate *) xmalloc (sizeof (struct predicate)); p = (struct predicate *) xmalloc (sizeof (struct predicate));
p->name = d->predicate; p->name = d->predicate;
...@@ -284,7 +283,7 @@ output_predicate_decls () ...@@ -284,7 +283,7 @@ output_predicate_decls ()
} }
static void static void
output_operand_data () output_operand_data (void)
{ {
struct operand_data *d; struct operand_data *d;
...@@ -311,7 +310,7 @@ output_operand_data () ...@@ -311,7 +310,7 @@ output_operand_data ()
} }
static void static void
output_insn_data () output_insn_data (void)
{ {
struct data *d; struct data *d;
int name_offset = 0; int name_offset = 0;
...@@ -413,7 +412,7 @@ output_insn_data () ...@@ -413,7 +412,7 @@ output_insn_data ()
} }
static void static void
output_get_insn_name () output_get_insn_name (void)
{ {
printf ("const char *\n"); printf ("const char *\n");
printf ("get_insn_name (code)\n"); printf ("get_insn_name (code)\n");
...@@ -438,11 +437,8 @@ static int max_opno; ...@@ -438,11 +437,8 @@ static int max_opno;
static int num_dups; static int num_dups;
static void static void
scan_operands (d, part, this_address_p, this_strict_low) scan_operands (struct data *d, rtx part, int this_address_p,
struct data *d; int this_strict_low)
rtx part;
int this_address_p;
int this_strict_low;
{ {
int i, j; int i, j;
const char *format_ptr; const char *format_ptr;
...@@ -579,8 +575,7 @@ scan_operands (d, part, this_address_p, this_strict_low) ...@@ -579,8 +575,7 @@ scan_operands (d, part, this_address_p, this_strict_low)
/* Compare two operands for content equality. */ /* Compare two operands for content equality. */
static int static int
compare_operands (d0, d1) compare_operands (struct operand_data *d0, struct operand_data *d1)
struct operand_data *d0, *d1;
{ {
const char *p0, *p1; const char *p0, *p1;
...@@ -618,8 +613,7 @@ compare_operands (d0, d1) ...@@ -618,8 +613,7 @@ compare_operands (d0, d1)
find a subsequence that is the same, or allocate a new one at the end. */ find a subsequence that is the same, or allocate a new one at the end. */
static void static void
place_operands (d) place_operands (struct data *d)
struct data *d;
{ {
struct operand_data *od, *od2; struct operand_data *od, *od2;
int i; int i;
...@@ -673,9 +667,7 @@ place_operands (d) ...@@ -673,9 +667,7 @@ place_operands (d)
templates, or C code to generate the assembler code template. */ templates, or C code to generate the assembler code template. */
static void static void
process_template (d, template) process_template (struct data *d, const char *template)
struct data *d;
const char *template;
{ {
const char *cp; const char *cp;
int i; int i;
...@@ -686,7 +678,7 @@ process_template (d, template) ...@@ -686,7 +678,7 @@ process_template (d, template)
d->template = 0; d->template = 0;
d->output_format = INSN_OUTPUT_FORMAT_FUNCTION; d->output_format = INSN_OUTPUT_FORMAT_FUNCTION;
printf ("\nstatic const char *output_%d PARAMS ((rtx *, rtx));\n", printf ("\nstatic const char *output_%d (rtx *, rtx);\n",
d->code_number); d->code_number);
puts ("\nstatic const char *"); puts ("\nstatic const char *");
printf ("output_%d (operands, insn)\n", d->code_number); printf ("output_%d (operands, insn)\n", d->code_number);
...@@ -744,8 +736,7 @@ process_template (d, template) ...@@ -744,8 +736,7 @@ process_template (d, template)
/* Check insn D for consistency in number of constraint alternatives. */ /* Check insn D for consistency in number of constraint alternatives. */
static void static void
validate_insn_alternatives (d) validate_insn_alternatives (struct data *d)
struct data *d;
{ {
int n = 0, start; int n = 0, start;
...@@ -816,8 +807,7 @@ validate_insn_alternatives (d) ...@@ -816,8 +807,7 @@ validate_insn_alternatives (d)
/* Verify that there are no gaps in operand numbers for INSNs. */ /* Verify that there are no gaps in operand numbers for INSNs. */
static void static void
validate_insn_operands (d) validate_insn_operands (struct data *d)
struct data *d;
{ {
int i; int i;
...@@ -834,9 +824,7 @@ validate_insn_operands (d) ...@@ -834,9 +824,7 @@ validate_insn_operands (d)
a hairy output action, output a function for now. */ a hairy output action, output a function for now. */
static void static void
gen_insn (insn, lineno) gen_insn (rtx insn, int lineno)
rtx insn;
int lineno;
{ {
struct data *d = (struct data *) xmalloc (sizeof (struct data)); struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i; int i;
...@@ -877,9 +865,7 @@ gen_insn (insn, lineno) ...@@ -877,9 +865,7 @@ gen_insn (insn, lineno)
If the insn has a hairy output action, output it now. */ If the insn has a hairy output action, output it now. */
static void static void
gen_peephole (peep, lineno) gen_peephole (rtx peep, int lineno)
rtx peep;
int lineno;
{ {
struct data *d = (struct data *) xmalloc (sizeof (struct data)); struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i; int i;
...@@ -917,9 +903,7 @@ gen_peephole (peep, lineno) ...@@ -917,9 +903,7 @@ gen_peephole (peep, lineno)
only for the purposes of `insn_gen_function'. */ only for the purposes of `insn_gen_function'. */
static void static void
gen_expand (insn, lineno) gen_expand (rtx insn, int lineno)
rtx insn;
int lineno;
{ {
struct data *d = (struct data *) xmalloc (sizeof (struct data)); struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i; int i;
...@@ -962,9 +946,7 @@ gen_expand (insn, lineno) ...@@ -962,9 +946,7 @@ gen_expand (insn, lineno)
only for reasons of consistency and to simplify genrecog. */ only for reasons of consistency and to simplify genrecog. */
static void static void
gen_split (split, lineno) gen_split (rtx split, int lineno)
rtx split;
int lineno;
{ {
struct data *d = (struct data *) xmalloc (sizeof (struct data)); struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i; int i;
...@@ -999,12 +981,10 @@ gen_split (split, lineno) ...@@ -999,12 +981,10 @@ gen_split (split, lineno)
place_operands (d); place_operands (d);
} }
extern int main PARAMS ((int, char **)); extern int main (int, char **);
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
...@@ -1057,9 +1037,7 @@ main (argc, argv) ...@@ -1057,9 +1037,7 @@ main (argc, argv)
-1 if S is the null string. */ -1 if S is the null string. */
static int static int
n_occurrences (c, s) n_occurrences (int c, const char *s)
int c;
const char *s;
{ {
int n = 0; int n = 0;
...@@ -1076,8 +1054,7 @@ n_occurrences (c, s) ...@@ -1076,8 +1054,7 @@ n_occurrences (c, s)
Return a new string. */ Return a new string. */
static const char * static const char *
strip_whitespace (s) strip_whitespace (const char *s)
const char *s;
{ {
char *p, *q; char *p, *q;
char ch; char ch;
...@@ -1098,7 +1075,7 @@ strip_whitespace (s) ...@@ -1098,7 +1075,7 @@ strip_whitespace (s)
tampered with. This isn't bullet-proof, but it should catch tampered with. This isn't bullet-proof, but it should catch
most genuine mistakes. */ most genuine mistakes. */
static void static void
check_constraint_len () check_constraint_len (void)
{ {
const char *p; const char *p;
int d; int d;
...@@ -1110,9 +1087,7 @@ check_constraint_len () ...@@ -1110,9 +1087,7 @@ check_constraint_len ()
} }
static int static int
constraint_len (p, genoutput_default_constraint_len) constraint_len (const char *p, int genoutput_default_constraint_len)
const char *p;
int genoutput_default_constraint_len;
{ {
/* Check that we still match defaults.h . First we do a generation-time /* Check that we still match defaults.h . First we do a generation-time
check that fails if the value is not the expected one... */ check that fails if the value is not the expected one... */
......
/* Generate code from machine description to perform peephole optimizations. /* Generate code from machine description to perform peephole optimizations.
Copyright (C) 1987, 1989, 1992, 1997, 1998, Copyright (C) 1987, 1989, 1992, 1997, 1998,
1999, 2000 Free Software Foundation, Inc. 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -53,14 +53,13 @@ static int n_operands; ...@@ -53,14 +53,13 @@ static int n_operands;
static int insn_code_number = 0; static int insn_code_number = 0;
static void gen_peephole PARAMS ((rtx)); static void gen_peephole (rtx);
static void match_rtx PARAMS ((rtx, struct link *, int)); static void match_rtx (rtx, struct link *, int);
static void print_path PARAMS ((struct link *)); static void print_path (struct link *);
static void print_code PARAMS ((RTX_CODE)); static void print_code (RTX_CODE);
static void static void
gen_peephole (peep) gen_peephole (rtx peep)
rtx peep;
{ {
int ninsns = XVECLEN (peep, 0); int ninsns = XVECLEN (peep, 0);
int i; int i;
...@@ -68,9 +67,6 @@ gen_peephole (peep) ...@@ -68,9 +67,6 @@ gen_peephole (peep)
n_operands = 0; n_operands = 0;
printf (" insn = ins1;\n"); printf (" insn = ins1;\n");
#if 0
printf (" want_jump = 0;\n");
#endif
for (i = 0; i < ninsns; i++) for (i = 0; i < ninsns; i++)
{ {
...@@ -89,11 +85,6 @@ gen_peephole (peep) ...@@ -89,11 +85,6 @@ gen_peephole (peep)
insn_code_number); insn_code_number);
} }
#if 0
printf (" if (GET_CODE (insn) == JUMP_INSN)\n");
printf (" want_jump = JUMP_LABEL (insn);\n");
#endif
printf (" pat = PATTERN (insn);\n"); printf (" pat = PATTERN (insn);\n");
/* Walk the insn's pattern, remembering at all times the path /* Walk the insn's pattern, remembering at all times the path
...@@ -117,15 +108,6 @@ gen_peephole (peep) ...@@ -117,15 +108,6 @@ gen_peephole (peep)
printf (" PATTERN (ins1) = gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (%d, operands));\n", n_operands); printf (" PATTERN (ins1) = gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (%d, operands));\n", n_operands);
#if 0
printf (" if (want_jump && GET_CODE (ins1) != JUMP_INSN)\n");
printf (" {\n");
printf (" rtx insn2 = emit_jump_insn_before (PATTERN (ins1), ins1);\n");
printf (" delete_related_insns (ins1);\n");
printf (" ins1 = ins2;\n");
printf (" }\n");
#endif
/* Record this define_peephole's insn code in the insn, /* Record this define_peephole's insn code in the insn,
as if it had been recognized to match this. */ as if it had been recognized to match this. */
printf (" INSN_CODE (ins1) = %d;\n", printf (" INSN_CODE (ins1) = %d;\n",
...@@ -143,10 +125,7 @@ gen_peephole (peep) ...@@ -143,10 +125,7 @@ gen_peephole (peep)
} }
static void static void
match_rtx (x, path, fail_label) match_rtx (rtx x, struct link *path, int fail_label)
rtx x;
struct link *path;
int fail_label;
{ {
RTX_CODE code; RTX_CODE code;
int i; int i;
...@@ -343,8 +322,7 @@ match_rtx (x, path, fail_label) ...@@ -343,8 +322,7 @@ match_rtx (x, path, fail_label)
evaluate to the rtx at that point. */ evaluate to the rtx at that point. */
static void static void
print_path (path) print_path (struct link *path)
struct link *path;
{ {
if (path == 0) if (path == 0)
printf ("pat"); printf ("pat");
...@@ -363,20 +341,17 @@ print_path (path) ...@@ -363,20 +341,17 @@ print_path (path)
} }
static void static void
print_code (code) print_code (RTX_CODE code)
RTX_CODE code;
{ {
const char *p1; const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++) for (p1 = GET_RTX_NAME (code); *p1; p1++)
putchar (TOUPPER(*p1)); putchar (TOUPPER(*p1));
} }
extern int main PARAMS ((int, char **)); extern int main (int, char **);
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
...@@ -457,8 +432,7 @@ from the machine description file `md'. */\n\n"); ...@@ -457,8 +432,7 @@ from the machine description file `md'. */\n\n");
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code ATTRIBUTE_UNUSED)
int code ATTRIBUTE_UNUSED;
{ {
return NULL; return NULL;
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- some macros CODE_FOR_... giving the insn_code_number value - some macros CODE_FOR_... giving the insn_code_number value
for each of the defined standard insn names. for each of the defined standard insn names.
Copyright (C) 1987, 1991, 1995, 1998, Copyright (C) 1987, 1991, 1995, 1998,
1999, 2000, 2001 Free Software Foundation, Inc. 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -29,11 +29,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,11 +29,9 @@ Boston, MA 02111-1307, USA. */
#define NO_GENRTL_H #define NO_GENRTL_H
#include "rtl.h" #include "rtl.h"
static void output_predicate_decls PARAMS ((void));
extern int main PARAMS ((void));
static void static void
output_predicate_decls () output_predicate_decls (void)
{ {
#ifdef PREDICATE_CODES #ifdef PREDICATE_CODES
static const struct { static const struct {
...@@ -46,14 +44,14 @@ output_predicate_decls () ...@@ -46,14 +44,14 @@ output_predicate_decls ()
puts ("#ifdef RTX_CODE\n"); puts ("#ifdef RTX_CODE\n");
for (i = 0; i < ARRAY_SIZE (predicate); i++) for (i = 0; i < ARRAY_SIZE (predicate); i++)
printf ("extern int %s PARAMS ((rtx, enum machine_mode));\n", printf ("extern int %s (rtx, enum machine_mode);\n",
predicate[i].name); predicate[i].name);
puts ("\n#endif /* RTX_CODE */\n"); puts ("\n#endif /* RTX_CODE */\n");
#endif #endif
} }
int int
main () main (void)
{ {
puts ("/* Generated automatically by the program `genpreds'. */\n"); puts ("/* Generated automatically by the program `genpreds'. */\n");
puts ("#ifndef GCC_TM_PREDS_H"); puts ("#ifndef GCC_TM_PREDS_H");
......
/* Generate code from machine description to recognize rtl as insns. /* Generate code from machine description to recognize rtl as insns.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc. 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -229,96 +229,94 @@ static const char *const special_mode_pred_table[] = { ...@@ -229,96 +229,94 @@ static const char *const special_mode_pred_table[] = {
#define NUM_SPECIAL_MODE_PREDS ARRAY_SIZE (special_mode_pred_table) #define NUM_SPECIAL_MODE_PREDS ARRAY_SIZE (special_mode_pred_table)
static struct decision *new_decision static struct decision *new_decision
PARAMS ((const char *, struct decision_head *)); (const char *, struct decision_head *);
static struct decision_test *new_decision_test static struct decision_test *new_decision_test
PARAMS ((enum decision_type, struct decision_test ***)); (enum decision_type, struct decision_test ***);
static rtx find_operand static rtx find_operand
PARAMS ((rtx, int)); (rtx, int);
static rtx find_matching_operand static rtx find_matching_operand
PARAMS ((rtx, int)); (rtx, int);
static void validate_pattern static void validate_pattern
PARAMS ((rtx, rtx, rtx, int)); (rtx, rtx, rtx, int);
static struct decision *add_to_sequence static struct decision *add_to_sequence
PARAMS ((rtx, struct decision_head *, const char *, enum routine_type, int)); (rtx, struct decision_head *, const char *, enum routine_type, int);
static int maybe_both_true_2 static int maybe_both_true_2
PARAMS ((struct decision_test *, struct decision_test *)); (struct decision_test *, struct decision_test *);
static int maybe_both_true_1 static int maybe_both_true_1
PARAMS ((struct decision_test *, struct decision_test *)); (struct decision_test *, struct decision_test *);
static int maybe_both_true static int maybe_both_true
PARAMS ((struct decision *, struct decision *, int)); (struct decision *, struct decision *, int);
static int nodes_identical_1 static int nodes_identical_1
PARAMS ((struct decision_test *, struct decision_test *)); (struct decision_test *, struct decision_test *);
static int nodes_identical static int nodes_identical
PARAMS ((struct decision *, struct decision *)); (struct decision *, struct decision *);
static void merge_accept_insn static void merge_accept_insn
PARAMS ((struct decision *, struct decision *)); (struct decision *, struct decision *);
static void merge_trees static void merge_trees
PARAMS ((struct decision_head *, struct decision_head *)); (struct decision_head *, struct decision_head *);
static void factor_tests static void factor_tests
PARAMS ((struct decision_head *)); (struct decision_head *);
static void simplify_tests static void simplify_tests
PARAMS ((struct decision_head *)); (struct decision_head *);
static int break_out_subroutines static int break_out_subroutines
PARAMS ((struct decision_head *, int)); (struct decision_head *, int);
static void find_afterward static void find_afterward
PARAMS ((struct decision_head *, struct decision *)); (struct decision_head *, struct decision *);
static void change_state static void change_state
PARAMS ((const char *, const char *, struct decision *, const char *)); (const char *, const char *, struct decision *, const char *);
static void print_code static void print_code
PARAMS ((enum rtx_code)); (enum rtx_code);
static void write_afterward static void write_afterward
PARAMS ((struct decision *, struct decision *, const char *)); (struct decision *, struct decision *, const char *);
static struct decision *write_switch static struct decision *write_switch
PARAMS ((struct decision *, int)); (struct decision *, int);
static void write_cond static void write_cond
PARAMS ((struct decision_test *, int, enum routine_type)); (struct decision_test *, int, enum routine_type);
static void write_action static void write_action
PARAMS ((struct decision *, struct decision_test *, int, int, (struct decision *, struct decision_test *, int, int,
struct decision *, enum routine_type)); struct decision *, enum routine_type);
static int is_unconditional static int is_unconditional
PARAMS ((struct decision_test *, enum routine_type)); (struct decision_test *, enum routine_type);
static int write_node static int write_node
PARAMS ((struct decision *, int, enum routine_type)); (struct decision *, int, enum routine_type);
static void write_tree_1 static void write_tree_1
PARAMS ((struct decision_head *, int, enum routine_type)); (struct decision_head *, int, enum routine_type);
static void write_tree static void write_tree
PARAMS ((struct decision_head *, const char *, enum routine_type, int)); (struct decision_head *, const char *, enum routine_type, int);
static void write_subroutine static void write_subroutine
PARAMS ((struct decision_head *, enum routine_type)); (struct decision_head *, enum routine_type);
static void write_subroutines static void write_subroutines
PARAMS ((struct decision_head *, enum routine_type)); (struct decision_head *, enum routine_type);
static void write_header static void write_header
PARAMS ((void)); (void);
static struct decision_head make_insn_sequence static struct decision_head make_insn_sequence
PARAMS ((rtx, enum routine_type)); (rtx, enum routine_type);
static void process_tree static void process_tree
PARAMS ((struct decision_head *, enum routine_type)); (struct decision_head *, enum routine_type);
static void record_insn_name static void record_insn_name
PARAMS ((int, const char *)); (int, const char *);
static void debug_decision_0 static void debug_decision_0
PARAMS ((struct decision *, int, int)); (struct decision *, int, int);
static void debug_decision_1 static void debug_decision_1
PARAMS ((struct decision *, int)); (struct decision *, int);
static void debug_decision_2 static void debug_decision_2
PARAMS ((struct decision_test *)); (struct decision_test *);
extern void debug_decision extern void debug_decision
PARAMS ((struct decision *)); (struct decision *);
extern void debug_decision_list extern void debug_decision_list
PARAMS ((struct decision *)); (struct decision *);
/* Create a new node in sequence after LAST. */ /* Create a new node in sequence after LAST. */
static struct decision * static struct decision *
new_decision (position, last) new_decision (const char *position, struct decision_head *last)
const char *position;
struct decision_head *last;
{ {
struct decision *new struct decision *new
= (struct decision *) xmalloc (sizeof (struct decision)); = (struct decision *) xmalloc (sizeof (struct decision));
...@@ -335,9 +333,7 @@ new_decision (position, last) ...@@ -335,9 +333,7 @@ new_decision (position, last)
/* Create a new test and link it in at PLACE. */ /* Create a new test and link it in at PLACE. */
static struct decision_test * static struct decision_test *
new_decision_test (type, pplace) new_decision_test (enum decision_type type, struct decision_test ***pplace)
enum decision_type type;
struct decision_test ***pplace;
{ {
struct decision_test **place = *pplace; struct decision_test **place = *pplace;
struct decision_test *test; struct decision_test *test;
...@@ -356,9 +352,7 @@ new_decision_test (type, pplace) ...@@ -356,9 +352,7 @@ new_decision_test (type, pplace)
/* Search for and return operand N. */ /* Search for and return operand N. */
static rtx static rtx
find_operand (pattern, n) find_operand (rtx pattern, int n)
rtx pattern;
int n;
{ {
const char *fmt; const char *fmt;
RTX_CODE code; RTX_CODE code;
...@@ -411,9 +405,7 @@ find_operand (pattern, n) ...@@ -411,9 +405,7 @@ find_operand (pattern, n)
constraint for operand N. */ constraint for operand N. */
static rtx static rtx
find_matching_operand (pattern, n) find_matching_operand (rtx pattern, int n)
rtx pattern;
int n;
{ {
const char *fmt; const char *fmt;
RTX_CODE code; RTX_CODE code;
...@@ -466,11 +458,7 @@ find_matching_operand (pattern, n) ...@@ -466,11 +458,7 @@ find_matching_operand (pattern, n)
'+' within a context that requires in-out constraints. */ '+' within a context that requires in-out constraints. */
static void static void
validate_pattern (pattern, insn, set, set_code) validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
rtx pattern;
rtx insn;
rtx set;
int set_code;
{ {
const char *fmt; const char *fmt;
RTX_CODE code; RTX_CODE code;
...@@ -767,12 +755,8 @@ validate_pattern (pattern, insn, set, set_code) ...@@ -767,12 +755,8 @@ validate_pattern (pattern, insn, set, set_code)
A pointer to the final node in the chain is returned. */ A pointer to the final node in the chain is returned. */
static struct decision * static struct decision *
add_to_sequence (pattern, last, position, insn_type, top) add_to_sequence (rtx pattern, struct decision_head *last, const char *position,
rtx pattern; enum routine_type insn_type, int top)
struct decision_head *last;
const char *position;
enum routine_type insn_type;
int top;
{ {
RTX_CODE code; RTX_CODE code;
struct decision *this, *sub; struct decision *this, *sub;
...@@ -1062,8 +1046,7 @@ add_to_sequence (pattern, last, position, insn_type, top) ...@@ -1062,8 +1046,7 @@ add_to_sequence (pattern, last, position, insn_type, top)
Returns > 0 for "definitely both true" and < 0 for "maybe both true". */ Returns > 0 for "definitely both true" and < 0 for "maybe both true". */
static int static int
maybe_both_true_2 (d1, d2) maybe_both_true_2 (struct decision_test *d1, struct decision_test *d2)
struct decision_test *d1, *d2;
{ {
if (d1->type == d2->type) if (d1->type == d2->type)
{ {
...@@ -1173,8 +1156,7 @@ maybe_both_true_2 (d1, d2) ...@@ -1173,8 +1156,7 @@ maybe_both_true_2 (d1, d2)
Returns > 0 for "definitely both true" and < 0 for "maybe both true". */ Returns > 0 for "definitely both true" and < 0 for "maybe both true". */
static int static int
maybe_both_true_1 (d1, d2) maybe_both_true_1 (struct decision_test *d1, struct decision_test *d2)
struct decision_test *d1, *d2;
{ {
struct decision_test *t1, *t2; struct decision_test *t1, *t2;
...@@ -1208,9 +1190,8 @@ maybe_both_true_1 (d1, d2) ...@@ -1208,9 +1190,8 @@ maybe_both_true_1 (d1, d2)
recursively descend. */ recursively descend. */
static int static int
maybe_both_true (d1, d2, toplevel) maybe_both_true (struct decision *d1, struct decision *d2,
struct decision *d1, *d2; int toplevel)
int toplevel;
{ {
struct decision *p1, *p2; struct decision *p1, *p2;
int cmp; int cmp;
...@@ -1277,8 +1258,7 @@ maybe_both_true (d1, d2, toplevel) ...@@ -1277,8 +1258,7 @@ maybe_both_true (d1, d2, toplevel)
/* A subroutine of nodes_identical. Examine two tests for equivalence. */ /* A subroutine of nodes_identical. Examine two tests for equivalence. */
static int static int
nodes_identical_1 (d1, d2) nodes_identical_1 (struct decision_test *d1, struct decision_test *d2)
struct decision_test *d1, *d2;
{ {
switch (d1->type) switch (d1->type)
{ {
...@@ -1325,8 +1305,7 @@ nodes_identical_1 (d1, d2) ...@@ -1325,8 +1305,7 @@ nodes_identical_1 (d1, d2)
consider different orderings on the tests. */ consider different orderings on the tests. */
static int static int
nodes_identical (d1, d2) nodes_identical (struct decision *d1, struct decision *d2)
struct decision *d1, *d2;
{ {
struct decision_test *t1, *t2; struct decision_test *t1, *t2;
...@@ -1362,8 +1341,7 @@ nodes_identical (d1, d2) ...@@ -1362,8 +1341,7 @@ nodes_identical (d1, d2)
source machine description. */ source machine description. */
static void static void
merge_accept_insn (oldd, addd) merge_accept_insn (struct decision *oldd, struct decision *addd)
struct decision *oldd, *addd;
{ {
struct decision_test *old, *add; struct decision_test *old, *add;
...@@ -1407,8 +1385,7 @@ merge_accept_insn (oldd, addd) ...@@ -1407,8 +1385,7 @@ merge_accept_insn (oldd, addd)
/* Merge two decision trees OLDH and ADDH, modifying OLDH destructively. */ /* Merge two decision trees OLDH and ADDH, modifying OLDH destructively. */
static void static void
merge_trees (oldh, addh) merge_trees (struct decision_head *oldh, struct decision_head *addh)
struct decision_head *oldh, *addh;
{ {
struct decision *next, *add; struct decision *next, *add;
...@@ -1492,8 +1469,7 @@ merge_trees (oldh, addh) ...@@ -1492,8 +1469,7 @@ merge_trees (oldh, addh)
(depending on the test type) to emit switch statements later. */ (depending on the test type) to emit switch statements later. */
static void static void
factor_tests (head) factor_tests (struct decision_head *head)
struct decision_head *head;
{ {
struct decision *first, *next; struct decision *first, *next;
...@@ -1578,8 +1554,7 @@ factor_tests (head) ...@@ -1578,8 +1554,7 @@ factor_tests (head)
predicates, remove them. */ predicates, remove them. */
static void static void
simplify_tests (head) simplify_tests (struct decision_head *head)
struct decision_head *head;
{ {
struct decision *tree; struct decision *tree;
...@@ -1616,9 +1591,7 @@ simplify_tests (head) ...@@ -1616,9 +1591,7 @@ simplify_tests (head)
that is generated. */ that is generated. */
static int static int
break_out_subroutines (head, initial) break_out_subroutines (struct decision_head *head, int initial)
struct decision_head *head;
int initial;
{ {
int size = 0; int size = 0;
struct decision *sub; struct decision *sub;
...@@ -1638,9 +1611,7 @@ break_out_subroutines (head, initial) ...@@ -1638,9 +1611,7 @@ break_out_subroutines (head, initial)
when p is true. */ when p is true. */
static void static void
find_afterward (head, real_afterward) find_afterward (struct decision_head *head, struct decision *real_afterward)
struct decision_head *head;
struct decision *real_afterward;
{ {
struct decision *p, *q, *afterward; struct decision *p, *q, *afterward;
...@@ -1687,11 +1658,8 @@ find_afterward (head, real_afterward) ...@@ -1687,11 +1658,8 @@ find_afterward (head, real_afterward)
match multiple insns and we try to step past the end of the stream. */ match multiple insns and we try to step past the end of the stream. */
static void static void
change_state (oldpos, newpos, afterward, indent) change_state (const char *oldpos, const char *newpos,
const char *oldpos; struct decision *afterward, const char *indent)
const char *newpos;
struct decision *afterward;
const char *indent;
{ {
int odepth = strlen (oldpos); int odepth = strlen (oldpos);
int ndepth = strlen (newpos); int ndepth = strlen (newpos);
...@@ -1748,8 +1716,7 @@ change_state (oldpos, newpos, afterward, indent) ...@@ -1748,8 +1716,7 @@ change_state (oldpos, newpos, afterward, indent)
the name. */ the name. */
static void static void
print_code (code) print_code (enum rtx_code code)
enum rtx_code code;
{ {
const char *p; const char *p;
for (p = GET_RTX_NAME (code); *p; p++) for (p = GET_RTX_NAME (code); *p; p++)
...@@ -1759,10 +1726,8 @@ print_code (code) ...@@ -1759,10 +1726,8 @@ print_code (code)
/* Emit code to cross an afterward link -- change state and branch. */ /* Emit code to cross an afterward link -- change state and branch. */
static void static void
write_afterward (start, afterward, indent) write_afterward (struct decision *start, struct decision *afterward,
struct decision *start; const char *indent)
struct decision *afterward;
const char *indent;
{ {
if (!afterward || start->subroutine_number > 0) if (!afterward || start->subroutine_number > 0)
printf("%sgoto ret0;\n", indent); printf("%sgoto ret0;\n", indent);
...@@ -1777,9 +1742,7 @@ write_afterward (start, afterward, indent) ...@@ -1777,9 +1742,7 @@ write_afterward (start, afterward, indent)
nodes at START. Return the first node yet untested. */ nodes at START. Return the first node yet untested. */
static struct decision * static struct decision *
write_switch (start, depth) write_switch (struct decision *start, int depth)
struct decision *start;
int depth;
{ {
struct decision *p = start; struct decision *p = start;
enum decision_type type = p->tests->type; enum decision_type type = p->tests->type;
...@@ -1976,10 +1939,8 @@ write_switch (start, depth) ...@@ -1976,10 +1939,8 @@ write_switch (start, depth)
/* Emit code for one test. */ /* Emit code for one test. */
static void static void
write_cond (p, depth, subroutine_type) write_cond (struct decision_test *p, int depth,
struct decision_test *p; enum routine_type subroutine_type)
int depth;
enum routine_type subroutine_type;
{ {
switch (p->type) switch (p->type)
{ {
...@@ -2051,12 +2012,9 @@ write_cond (p, depth, subroutine_type) ...@@ -2051,12 +2012,9 @@ write_cond (p, depth, subroutine_type)
perform a state change. For the `accept' tests we must do more work. */ perform a state change. For the `accept' tests we must do more work. */
static void static void
write_action (p, test, depth, uncond, success, subroutine_type) write_action (struct decision *p, struct decision_test *test,
struct decision *p; int depth, int uncond, struct decision *success,
struct decision_test *test; enum routine_type subroutine_type)
int depth, uncond;
struct decision *success;
enum routine_type subroutine_type;
{ {
const char *indent; const char *indent;
int want_close = 0; int want_close = 0;
...@@ -2142,9 +2100,7 @@ write_action (p, test, depth, uncond, success, subroutine_type) ...@@ -2142,9 +2100,7 @@ write_action (p, test, depth, uncond, success, subroutine_type)
/* ??? is_unconditional is a stupid name for a tri-state function. */ /* ??? is_unconditional is a stupid name for a tri-state function. */
static int static int
is_unconditional (t, subroutine_type) is_unconditional (struct decision_test *t, enum routine_type subroutine_type)
struct decision_test *t;
enum routine_type subroutine_type;
{ {
if (t->type == DT_accept_op) if (t->type == DT_accept_op)
return 1; return 1;
...@@ -2171,10 +2127,8 @@ is_unconditional (t, subroutine_type) ...@@ -2171,10 +2127,8 @@ is_unconditional (t, subroutine_type)
Return true if there is no fallthru path. */ Return true if there is no fallthru path. */
static int static int
write_node (p, depth, subroutine_type) write_node (struct decision *p, int depth,
struct decision *p; enum routine_type subroutine_type)
int depth;
enum routine_type subroutine_type;
{ {
struct decision_test *test, *last_test; struct decision_test *test, *last_test;
int uncond; int uncond;
...@@ -2210,10 +2164,8 @@ write_node (p, depth, subroutine_type) ...@@ -2210,10 +2164,8 @@ write_node (p, depth, subroutine_type)
/* Emit code for all of the sibling nodes of HEAD. */ /* Emit code for all of the sibling nodes of HEAD. */
static void static void
write_tree_1 (head, depth, subroutine_type) write_tree_1 (struct decision_head *head, int depth,
struct decision_head *head; enum routine_type subroutine_type)
int depth;
enum routine_type subroutine_type;
{ {
struct decision *p, *next; struct decision *p, *next;
int uncond = 0; int uncond = 0;
...@@ -2246,11 +2198,8 @@ write_tree_1 (head, depth, subroutine_type) ...@@ -2246,11 +2198,8 @@ write_tree_1 (head, depth, subroutine_type)
position at the node that branched to this node. */ position at the node that branched to this node. */
static void static void
write_tree (head, prevpos, type, initial) write_tree (struct decision_head *head, const char *prevpos,
struct decision_head *head; enum routine_type type, int initial)
const char *prevpos;
enum routine_type type;
int initial;
{ {
struct decision *p = head->first; struct decision *p = head->first;
...@@ -2306,9 +2255,7 @@ write_tree (head, prevpos, type, initial) ...@@ -2306,9 +2255,7 @@ write_tree (head, prevpos, type, initial)
node TREE. */ node TREE. */
static void static void
write_subroutine (head, type) write_subroutine (struct decision_head *head, enum routine_type type)
struct decision_head *head;
enum routine_type type;
{ {
int subfunction = head->first ? head->first->subroutine_number : 0; int subfunction = head->first ? head->first->subroutine_number : 0;
const char *s_or_e; const char *s_or_e;
...@@ -2327,7 +2274,7 @@ write_subroutine (head, type) ...@@ -2327,7 +2274,7 @@ write_subroutine (head, type)
switch (type) switch (type)
{ {
case RECOG: case RECOG:
printf ("%sint recog%s PARAMS ((rtx, rtx, int *));\n", s_or_e, extension); printf ("%sint recog%s (rtx, rtx, int *);\n", s_or_e, extension);
printf ("%sint\n\ printf ("%sint\n\
recog%s (x0, insn, pnum_clobbers)\n\ recog%s (x0, insn, pnum_clobbers)\n\
rtx x0 ATTRIBUTE_UNUSED;\n\ rtx x0 ATTRIBUTE_UNUSED;\n\
...@@ -2335,14 +2282,14 @@ recog%s (x0, insn, pnum_clobbers)\n\ ...@@ -2335,14 +2282,14 @@ recog%s (x0, insn, pnum_clobbers)\n\
int *pnum_clobbers ATTRIBUTE_UNUSED;\n", s_or_e, extension); int *pnum_clobbers ATTRIBUTE_UNUSED;\n", s_or_e, extension);
break; break;
case SPLIT: case SPLIT:
printf ("%srtx split%s PARAMS ((rtx, rtx));\n", s_or_e, extension); printf ("%srtx split%s (rtx, rtx);\n", s_or_e, extension);
printf ("%srtx\n\ printf ("%srtx\n\
split%s (x0, insn)\n\ split%s (x0, insn)\n\
rtx x0 ATTRIBUTE_UNUSED;\n\ rtx x0 ATTRIBUTE_UNUSED;\n\
rtx insn ATTRIBUTE_UNUSED;\n", s_or_e, extension); rtx insn ATTRIBUTE_UNUSED;\n", s_or_e, extension);
break; break;
case PEEPHOLE2: case PEEPHOLE2:
printf ("%srtx peephole2%s PARAMS ((rtx, rtx, int *));\n", printf ("%srtx peephole2%s (rtx, rtx, int *);\n",
s_or_e, extension); s_or_e, extension);
printf ("%srtx\n\ printf ("%srtx\n\
peephole2%s (x0, insn, _pmatch_len)\n\ peephole2%s (x0, insn, _pmatch_len)\n\
...@@ -2373,9 +2320,7 @@ peephole2%s (x0, insn, _pmatch_len)\n\ ...@@ -2373,9 +2320,7 @@ peephole2%s (x0, insn, _pmatch_len)\n\
subroutines, but did not write them out. Do so now. */ subroutines, but did not write them out. Do so now. */
static void static void
write_subroutines (head, type) write_subroutines (struct decision_head *head, enum routine_type type)
struct decision_head *head;
enum routine_type type;
{ {
struct decision *p; struct decision *p;
...@@ -2390,7 +2335,7 @@ write_subroutines (head, type) ...@@ -2390,7 +2335,7 @@ write_subroutines (head, type)
/* Begin the output file. */ /* Begin the output file. */
static void static void
write_header () write_header (void)
{ {
puts ("\ puts ("\
/* Generated automatically by the program `genrecog' from the target\n\ /* Generated automatically by the program `genrecog' from the target\n\
...@@ -2452,9 +2397,7 @@ write_header () ...@@ -2452,9 +2397,7 @@ write_header ()
TYPE says what type of routine we are recognizing (RECOG or SPLIT). */ TYPE says what type of routine we are recognizing (RECOG or SPLIT). */
static struct decision_head static struct decision_head
make_insn_sequence (insn, type) make_insn_sequence (rtx insn, enum routine_type type)
rtx insn;
enum routine_type type;
{ {
rtx x; rtx x;
const char *c_test = XSTR (insn, type == RECOG ? 2 : 1); const char *c_test = XSTR (insn, type == RECOG ? 2 : 1);
...@@ -2609,12 +2552,12 @@ make_insn_sequence (insn, type) ...@@ -2609,12 +2552,12 @@ make_insn_sequence (insn, type)
case SPLIT: case SPLIT:
/* Define the subroutine we will call below and emit in genemit. */ /* Define the subroutine we will call below and emit in genemit. */
printf ("extern rtx gen_split_%d PARAMS ((rtx *));\n", next_insn_code); printf ("extern rtx gen_split_%d (rtx *);\n", next_insn_code);
break; break;
case PEEPHOLE2: case PEEPHOLE2:
/* Define the subroutine we will call below and emit in genemit. */ /* Define the subroutine we will call below and emit in genemit. */
printf ("extern rtx gen_peephole2_%d PARAMS ((rtx, rtx *));\n", printf ("extern rtx gen_peephole2_%d (rtx, rtx *);\n",
next_insn_code); next_insn_code);
break; break;
} }
...@@ -2623,9 +2566,7 @@ make_insn_sequence (insn, type) ...@@ -2623,9 +2566,7 @@ make_insn_sequence (insn, type)
} }
static void static void
process_tree (head, subroutine_type) process_tree (struct decision_head *head, enum routine_type subroutine_type)
struct decision_head *head;
enum routine_type subroutine_type;
{ {
if (head->first == NULL) if (head->first == NULL)
{ {
...@@ -2652,12 +2593,10 @@ process_tree (head, subroutine_type) ...@@ -2652,12 +2593,10 @@ process_tree (head, subroutine_type)
write_subroutine (head, subroutine_type); write_subroutine (head, subroutine_type);
} }
extern int main PARAMS ((int, char **)); extern int main (int, char **);
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
rtx desc; rtx desc;
struct decision_head recog_tree, split_tree, peephole2_tree, h; struct decision_head recog_tree, split_tree, peephole2_tree, h;
...@@ -2721,8 +2660,7 @@ main (argc, argv) ...@@ -2721,8 +2660,7 @@ main (argc, argv)
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char * const char *
get_insn_name (code) get_insn_name (int code)
int code;
{ {
if (code < insn_name_ptr_size) if (code < insn_name_ptr_size)
return insn_name_ptr[code]; return insn_name_ptr[code];
...@@ -2731,9 +2669,7 @@ get_insn_name (code) ...@@ -2731,9 +2669,7 @@ get_insn_name (code)
} }
static void static void
record_insn_name (code, name) record_insn_name (int code, const char *name)
int code;
const char *name;
{ {
static const char *last_real_name = "insn"; static const char *last_real_name = "insn";
static int last_real_code = 0; static int last_real_code = 0;
...@@ -2765,8 +2701,7 @@ record_insn_name (code, name) ...@@ -2765,8 +2701,7 @@ record_insn_name (code, name)
} }
static void static void
debug_decision_2 (test) debug_decision_2 (struct decision_test *test)
struct decision_test *test;
{ {
switch (test->type) switch (test->type)
{ {
...@@ -2823,9 +2758,7 @@ debug_decision_2 (test) ...@@ -2823,9 +2758,7 @@ debug_decision_2 (test)
} }
static void static void
debug_decision_1 (d, indent) debug_decision_1 (struct decision *d, int indent)
struct decision *d;
int indent;
{ {
int i; int i;
struct decision_test *test; struct decision_test *test;
...@@ -2858,9 +2791,7 @@ debug_decision_1 (d, indent) ...@@ -2858,9 +2791,7 @@ debug_decision_1 (d, indent)
} }
static void static void
debug_decision_0 (d, indent, maxdepth) debug_decision_0 (struct decision *d, int indent, int maxdepth)
struct decision *d;
int indent, maxdepth;
{ {
struct decision *n; struct decision *n;
int i; int i;
...@@ -2881,15 +2812,13 @@ debug_decision_0 (d, indent, maxdepth) ...@@ -2881,15 +2812,13 @@ debug_decision_0 (d, indent, maxdepth)
} }
void void
debug_decision (d) debug_decision (struct decision *d)
struct decision *d;
{ {
debug_decision_0 (d, 0, 1000000); debug_decision_0 (d, 0, 1000000);
} }
void void
debug_decision_list (d) debug_decision_list (struct decision *d)
struct decision *d;
{ {
while (d) while (d)
{ {
......
/* Support routines for the various generation passes. /* Support routines for the various generation passes.
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Copyright (C) 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -68,8 +69,8 @@ static struct queue_elem **define_cond_exec_tail = &define_cond_exec_queue; ...@@ -68,8 +69,8 @@ static struct queue_elem **define_cond_exec_tail = &define_cond_exec_queue;
static struct queue_elem *other_queue; static struct queue_elem *other_queue;
static struct queue_elem **other_tail = &other_queue; static struct queue_elem **other_tail = &other_queue;
static void queue_pattern PARAMS ((rtx, struct queue_elem ***, static void queue_pattern (rtx, struct queue_elem ***,
const char *, int)); const char *, int);
/* Current maximum length of directory names in the search path /* Current maximum length of directory names in the search path
for include files. (Altered as we get more of them.) */ for include files. (Altered as we get more of them.) */
...@@ -87,24 +88,24 @@ struct file_name_list *first_dir_md_include = 0; /* First dir to search */ ...@@ -87,24 +88,24 @@ struct file_name_list *first_dir_md_include = 0; /* First dir to search */
struct file_name_list *first_bracket_include = 0; struct file_name_list *first_bracket_include = 0;
struct file_name_list *last_dir_md_include = 0; /* Last in chain */ struct file_name_list *last_dir_md_include = 0; /* Last in chain */
static void remove_constraints PARAMS ((rtx)); static void remove_constraints (rtx);
static void process_rtx PARAMS ((rtx, int)); static void process_rtx (rtx, int);
static int is_predicable PARAMS ((struct queue_elem *)); static int is_predicable (struct queue_elem *);
static void identify_predicable_attribute PARAMS ((void)); static void identify_predicable_attribute (void);
static int n_alternatives PARAMS ((const char *)); static int n_alternatives (const char *);
static void collect_insn_data PARAMS ((rtx, int *, int *)); static void collect_insn_data (rtx, int *, int *);
static rtx alter_predicate_for_insn PARAMS ((rtx, int, int, int)); static rtx alter_predicate_for_insn (rtx, int, int, int);
static const char *alter_test_for_insn PARAMS ((struct queue_elem *, static const char *alter_test_for_insn (struct queue_elem *,
struct queue_elem *)); struct queue_elem *);
static char *shift_output_template PARAMS ((char *, const char *, int)); static char *shift_output_template (char *, const char *, int);
static const char *alter_output_for_insn PARAMS ((struct queue_elem *, static const char *alter_output_for_insn (struct queue_elem *,
struct queue_elem *, struct queue_elem *,
int, int)); int, int);
static void process_one_cond_exec PARAMS ((struct queue_elem *)); static void process_one_cond_exec (struct queue_elem *);
static void process_define_cond_exec PARAMS ((void)); static void process_define_cond_exec (void);
static void process_include PARAMS ((rtx, int)); static void process_include (rtx, int);
static char *save_string PARAMS ((const char *, int)); static char *save_string (const char *, int);
void void
message_with_line (int lineno, const char *msg, ...) message_with_line (int lineno, const char *msg, ...)
...@@ -124,9 +125,8 @@ message_with_line (int lineno, const char *msg, ...) ...@@ -124,9 +125,8 @@ message_with_line (int lineno, const char *msg, ...)
the gensupport programs. */ the gensupport programs. */
rtx rtx
gen_rtx_CONST_INT (mode, arg) gen_rtx_CONST_INT (enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; HOST_WIDE_INT arg)
HOST_WIDE_INT arg;
{ {
rtx rt = rtx_alloc (CONST_INT); rtx rt = rtx_alloc (CONST_INT);
...@@ -137,11 +137,8 @@ gen_rtx_CONST_INT (mode, arg) ...@@ -137,11 +137,8 @@ gen_rtx_CONST_INT (mode, arg)
/* Queue PATTERN on LIST_TAIL. */ /* Queue PATTERN on LIST_TAIL. */
static void static void
queue_pattern (pattern, list_tail, filename, lineno) queue_pattern (rtx pattern, struct queue_elem ***list_tail,
rtx pattern; const char *filename, int lineno)
struct queue_elem ***list_tail;
const char *filename;
int lineno;
{ {
struct queue_elem *e = (struct queue_elem *) xmalloc (sizeof (*e)); struct queue_elem *e = (struct queue_elem *) xmalloc (sizeof (*e));
e->data = pattern; e->data = pattern;
...@@ -155,8 +152,7 @@ queue_pattern (pattern, list_tail, filename, lineno) ...@@ -155,8 +152,7 @@ queue_pattern (pattern, list_tail, filename, lineno)
/* Recursively remove constraints from an rtx. */ /* Recursively remove constraints from an rtx. */
static void static void
remove_constraints (part) remove_constraints (rtx part)
rtx part;
{ {
int i, j; int i, j;
const char *format_ptr; const char *format_ptr;
...@@ -190,9 +186,7 @@ remove_constraints (part) ...@@ -190,9 +186,7 @@ remove_constraints (part)
if the include looks like (include "file"). */ if the include looks like (include "file"). */
static void static void
process_include (desc, lineno) process_include (rtx desc, int lineno)
rtx desc;
int lineno;
{ {
const char *filename = XSTR (desc, 0); const char *filename = XSTR (desc, 0);
const char *old_filename; const char *old_filename;
...@@ -268,9 +262,7 @@ process_include (desc, lineno) ...@@ -268,9 +262,7 @@ process_include (desc, lineno)
/* Process a top level rtx in some way, queueing as appropriate. */ /* Process a top level rtx in some way, queueing as appropriate. */
static void static void
process_rtx (desc, lineno) process_rtx (rtx desc, int lineno)
rtx desc;
int lineno;
{ {
switch (GET_CODE (desc)) switch (GET_CODE (desc))
{ {
...@@ -338,8 +330,7 @@ process_rtx (desc, lineno) ...@@ -338,8 +330,7 @@ process_rtx (desc, lineno)
a DEFINE_INSN. */ a DEFINE_INSN. */
static int static int
is_predicable (elem) is_predicable (struct queue_elem *elem)
struct queue_elem *elem;
{ {
rtvec vec = XVEC (elem->data, 4); rtvec vec = XVEC (elem->data, 4);
const char *value; const char *value;
...@@ -427,7 +418,7 @@ is_predicable (elem) ...@@ -427,7 +418,7 @@ is_predicable (elem)
and its default. */ and its default. */
static void static void
identify_predicable_attribute () identify_predicable_attribute (void)
{ {
struct queue_elem *elem; struct queue_elem *elem;
char *p_true, *p_false; char *p_true, *p_false;
...@@ -494,8 +485,7 @@ identify_predicable_attribute () ...@@ -494,8 +485,7 @@ identify_predicable_attribute ()
/* Return the number of alternatives in constraint S. */ /* Return the number of alternatives in constraint S. */
static int static int
n_alternatives (s) n_alternatives (const char *s)
const char *s;
{ {
int n = 1; int n = 1;
...@@ -510,9 +500,7 @@ n_alternatives (s) ...@@ -510,9 +500,7 @@ n_alternatives (s)
operands. */ operands. */
static void static void
collect_insn_data (pattern, palt, pmax) collect_insn_data (rtx pattern, int *palt, int *pmax)
rtx pattern;
int *palt, *pmax;
{ {
const char *fmt; const char *fmt;
enum rtx_code code; enum rtx_code code;
...@@ -568,9 +556,7 @@ collect_insn_data (pattern, palt, pmax) ...@@ -568,9 +556,7 @@ collect_insn_data (pattern, palt, pmax)
} }
static rtx static rtx
alter_predicate_for_insn (pattern, alt, max_op, lineno) alter_predicate_for_insn (rtx pattern, int alt, int max_op, int lineno)
rtx pattern;
int alt, max_op, lineno;
{ {
const char *fmt; const char *fmt;
enum rtx_code code; enum rtx_code code;
...@@ -659,8 +645,8 @@ alter_predicate_for_insn (pattern, alt, max_op, lineno) ...@@ -659,8 +645,8 @@ alter_predicate_for_insn (pattern, alt, max_op, lineno)
} }
static const char * static const char *
alter_test_for_insn (ce_elem, insn_elem) alter_test_for_insn (struct queue_elem *ce_elem,
struct queue_elem *ce_elem, *insn_elem; struct queue_elem *insn_elem)
{ {
const char *ce_test, *insn_test; const char *ce_test, *insn_test;
...@@ -679,10 +665,7 @@ alter_test_for_insn (ce_elem, insn_elem) ...@@ -679,10 +665,7 @@ alter_test_for_insn (ce_elem, insn_elem)
adjusted string. */ adjusted string. */
static char * static char *
shift_output_template (new, old, disp) shift_output_template (char *new, const char *old, int disp)
char *new;
const char *old;
int disp;
{ {
while (*old) while (*old)
{ {
...@@ -706,9 +689,9 @@ shift_output_template (new, old, disp) ...@@ -706,9 +689,9 @@ shift_output_template (new, old, disp)
} }
static const char * static const char *
alter_output_for_insn (ce_elem, insn_elem, alt, max_op) alter_output_for_insn (struct queue_elem *ce_elem,
struct queue_elem *ce_elem, *insn_elem; struct queue_elem *insn_elem,
int alt, max_op; int alt, int max_op)
{ {
const char *ce_out, *insn_out; const char *ce_out, *insn_out;
char *new, *p; char *new, *p;
...@@ -768,8 +751,7 @@ alter_output_for_insn (ce_elem, insn_elem, alt, max_op) ...@@ -768,8 +751,7 @@ alter_output_for_insn (ce_elem, insn_elem, alt, max_op)
/* Replicate insns as appropriate for the given DEFINE_COND_EXEC. */ /* Replicate insns as appropriate for the given DEFINE_COND_EXEC. */
static void static void
process_one_cond_exec (ce_elem) process_one_cond_exec (struct queue_elem *ce_elem)
struct queue_elem *ce_elem;
{ {
struct queue_elem *insn_elem; struct queue_elem *insn_elem;
for (insn_elem = define_insn_queue; insn_elem ; insn_elem = insn_elem->next) for (insn_elem = define_insn_queue; insn_elem ; insn_elem = insn_elem->next)
...@@ -845,7 +827,7 @@ process_one_cond_exec (ce_elem) ...@@ -845,7 +827,7 @@ process_one_cond_exec (ce_elem)
patterns appropriately. */ patterns appropriately. */
static void static void
process_define_cond_exec () process_define_cond_exec (void)
{ {
struct queue_elem *elem; struct queue_elem *elem;
...@@ -858,9 +840,7 @@ process_define_cond_exec () ...@@ -858,9 +840,7 @@ process_define_cond_exec ()
} }
static char * static char *
save_string (s, len) save_string (const char *s, int len)
const char *s;
int len;
{ {
register char *result = xmalloc (len + 1); register char *result = xmalloc (len + 1);
...@@ -873,9 +853,7 @@ save_string (s, len) ...@@ -873,9 +853,7 @@ save_string (s, len)
/* The entry point for initializing the reader. */ /* The entry point for initializing the reader. */
int int
init_md_reader_args (argc, argv) init_md_reader_args (int argc, char **argv)
int argc;
char **argv;
{ {
int i; int i;
const char *in_fname; const char *in_fname;
...@@ -928,8 +906,7 @@ init_md_reader_args (argc, argv) ...@@ -928,8 +906,7 @@ init_md_reader_args (argc, argv)
/* The entry point for initializing the reader. */ /* The entry point for initializing the reader. */
int int
init_md_reader (filename) init_md_reader (const char *filename)
const char *filename;
{ {
FILE *input_file; FILE *input_file;
int c; int c;
...@@ -987,9 +964,7 @@ init_md_reader (filename) ...@@ -987,9 +964,7 @@ init_md_reader (filename)
/* The entry point for reading a single rtx from an md file. */ /* The entry point for reading a single rtx from an md file. */
rtx rtx
read_md_rtx (lineno, seqnr) read_md_rtx (int *lineno, int *seqnr)
int *lineno;
int *seqnr;
{ {
struct queue_elem **queue, *elem; struct queue_elem **queue, *elem;
rtx desc; rtx desc;
...@@ -1052,8 +1027,7 @@ read_md_rtx (lineno, seqnr) ...@@ -1052,8 +1027,7 @@ read_md_rtx (lineno, seqnr)
/* Compute a hash function of a c_test structure, which is keyed /* Compute a hash function of a c_test structure, which is keyed
by its ->expr field. */ by its ->expr field. */
hashval_t hashval_t
hash_c_test (x) hash_c_test (const void *x)
const PTR x;
{ {
const struct c_test *a = (const struct c_test *) x; const struct c_test *a = (const struct c_test *) x;
const unsigned char *base, *s = (const unsigned char *) a->expr; const unsigned char *base, *s = (const unsigned char *) a->expr;
...@@ -1079,9 +1053,7 @@ hash_c_test (x) ...@@ -1079,9 +1053,7 @@ hash_c_test (x)
/* Compare two c_test expression structures. */ /* Compare two c_test expression structures. */
int int
cmp_c_test (x, y) cmp_c_test (const void *x, const void *y)
const PTR x;
const PTR y;
{ {
const struct c_test *a = (const struct c_test *) x; const struct c_test *a = (const struct c_test *) x;
const struct c_test *b = (const struct c_test *) y; const struct c_test *b = (const struct c_test *) y;
...@@ -1094,8 +1066,7 @@ cmp_c_test (x, y) ...@@ -1094,8 +1066,7 @@ cmp_c_test (x, y)
at compile time. Returns a tristate: 1 for known true, 0 for at compile time. Returns a tristate: 1 for known true, 0 for
known false, -1 for unknown. */ known false, -1 for unknown. */
int int
maybe_eval_c_test (expr) maybe_eval_c_test (const char *expr)
const char *expr;
{ {
const struct c_test *test; const struct c_test *test;
struct c_test dummy; struct c_test dummy;
...@@ -1117,8 +1088,7 @@ maybe_eval_c_test (expr) ...@@ -1117,8 +1088,7 @@ maybe_eval_c_test (expr)
/* Given a string, return the number of comma-separated elements in it. /* Given a string, return the number of comma-separated elements in it.
Return 0 for the null string. */ Return 0 for the null string. */
int int
n_comma_elts (s) n_comma_elts (const char *s)
const char *s;
{ {
int n; int n;
...@@ -1139,8 +1109,7 @@ n_comma_elts (s) ...@@ -1139,8 +1109,7 @@ n_comma_elts (s)
a comma and an element is ignored. */ a comma and an element is ignored. */
const char * const char *
scan_comma_elt (pstr) scan_comma_elt (const char **pstr)
const char **pstr;
{ {
const char *start; const char *start;
const char *p = *pstr; const char *p = *pstr;
......
/* Declarations for rtx-reader support for gen* routines. /* Declarations for rtx-reader support for gen* routines.
Copyright (C) 2000, 2002 Free Software Foundation, Inc. Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -24,11 +24,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -24,11 +24,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct obstack; struct obstack;
extern struct obstack *rtl_obstack; extern struct obstack *rtl_obstack;
extern int init_md_reader_args PARAMS ((int, char **)); extern int init_md_reader_args (int, char **);
extern int init_md_reader PARAMS ((const char *)); extern int init_md_reader (const char *);
extern rtx read_md_rtx PARAMS ((int *, int *)); extern rtx read_md_rtx (int *, int *);
extern void message_with_line PARAMS ((int, const char *, ...)) extern void message_with_line (int, const char *, ...)
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
/* Set this to 0 to disable automatic elision of insn patterns which /* Set this to 0 to disable automatic elision of insn patterns which
...@@ -46,7 +46,7 @@ extern const int insn_elision_unavailable; ...@@ -46,7 +46,7 @@ extern const int insn_elision_unavailable;
time, return its truth value; else return -1. The test must have time, return its truth value; else return -1. The test must have
appeared somewhere in the machine description when genconditions appeared somewhere in the machine description when genconditions
was run. */ was run. */
extern int maybe_eval_c_test PARAMS ((const char *)); extern int maybe_eval_c_test (const char *);
/* This table should not be accessed directly; use maybe_eval_c_test. */ /* This table should not be accessed directly; use maybe_eval_c_test. */
struct c_test struct c_test
...@@ -59,11 +59,11 @@ extern const struct c_test insn_conditions[]; ...@@ -59,11 +59,11 @@ extern const struct c_test insn_conditions[];
extern const size_t n_insn_conditions; extern const size_t n_insn_conditions;
#ifdef __HASHTAB_H__ #ifdef __HASHTAB_H__
extern hashval_t hash_c_test PARAMS ((const PTR)); extern hashval_t hash_c_test (const void *);
extern int cmp_c_test PARAMS ((const PTR, const PTR)); extern int cmp_c_test (const void *, const void *);
#endif #endif
extern int n_comma_elts PARAMS ((const char *)); extern int n_comma_elts (const char *);
extern const char *scan_comma_elt PARAMS ((const char **)); extern const char *scan_comma_elt (const char **);
#endif /* GCC_GENSUPPORT_H */ #endif /* GCC_GENSUPPORT_H */
/* Message translation utilities. /* Message translation utilities.
Copyright (C) 2001 Free Software Foundation, Inc. Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -32,7 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -32,7 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
terminal, so it has be set to output messages correctly. */ terminal, so it has be set to output messages correctly. */
void void
gcc_init_libintl () gcc_init_libintl (void)
{ {
#ifdef HAVE_LC_MESSAGES #ifdef HAVE_LC_MESSAGES
setlocale (LC_CTYPE, ""); setlocale (LC_CTYPE, "");
...@@ -52,8 +52,7 @@ gcc_init_libintl () ...@@ -52,8 +52,7 @@ gcc_init_libintl ()
This is for indenting subsequent output. */ This is for indenting subsequent output. */
size_t size_t
gcc_gettext_width (msgstr) gcc_gettext_width (const char *msgstr)
const char *msgstr;
{ {
size_t nwcs = mbstowcs (0, msgstr, 0); size_t nwcs = mbstowcs (0, msgstr, 0);
wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t)); wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t));
...@@ -68,8 +67,7 @@ gcc_gettext_width (msgstr) ...@@ -68,8 +67,7 @@ gcc_gettext_width (msgstr)
the length of the string. */ the length of the string. */
size_t size_t
gcc_gettext_width (msgstr) gcc_gettext_width (const char *msgstr)
const char *msgstr;
{ {
return strlen (msgstr); return strlen (msgstr);
} }
......
/* intl.h - internationalization /* intl.h - internationalization
Copyright 1998, 2001 Free Software Foundation, Inc. Copyright 1998, 2001, 2003 Free Software Foundation, Inc.
GCC is free software; you can redistribute it and/or modify GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
#endif #endif
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
extern void gcc_init_libintl PARAMS ((void)); extern void gcc_init_libintl (void);
extern size_t gcc_gettext_width PARAMS ((const char *)); extern size_t gcc_gettext_width (const char *);
#else #else
/* Stubs. */ /* Stubs. */
# undef textdomain # undef textdomain
......
/* List management for the GNU C-Compiler expander. /* List management for the GNU C-Compiler expander.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999 Free Software Foundation, Inc. 1999, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -27,7 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -27,7 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "rtl.h" #include "rtl.h"
#include "ggc.h" #include "ggc.h"
static void free_list PARAMS ((rtx *, rtx *)); static void free_list (rtx *, rtx *);
/* Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs. */ /* Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs. */
...@@ -43,8 +43,7 @@ static GTY ((deletable (""))) rtx unused_expr_list; ...@@ -43,8 +43,7 @@ static GTY ((deletable (""))) rtx unused_expr_list;
nodes of one type only. This is only called by free_EXPR_LIST_list nodes of one type only. This is only called by free_EXPR_LIST_list
and free_INSN_LIST_list. */ and free_INSN_LIST_list. */
static void static void
free_list (listp, unused_listp) free_list (rtx *listp, rtx *unused_listp)
rtx *listp, *unused_listp;
{ {
rtx link, prev_link; rtx link, prev_link;
...@@ -66,8 +65,7 @@ free_list (listp, unused_listp) ...@@ -66,8 +65,7 @@ free_list (listp, unused_listp)
node available, we'll use it, otherwise a call to gen_rtx_INSN_LIST node available, we'll use it, otherwise a call to gen_rtx_INSN_LIST
is made. */ is made. */
rtx rtx
alloc_INSN_LIST (val, next) alloc_INSN_LIST (rtx val, rtx next)
rtx val, next;
{ {
rtx r; rtx r;
...@@ -89,9 +87,7 @@ alloc_INSN_LIST (val, next) ...@@ -89,9 +87,7 @@ alloc_INSN_LIST (val, next)
node available, we'll use it, otherwise a call to gen_rtx_EXPR_LIST node available, we'll use it, otherwise a call to gen_rtx_EXPR_LIST
is made. */ is made. */
rtx rtx
alloc_EXPR_LIST (kind, val, next) alloc_EXPR_LIST (int kind, rtx val, rtx next)
int kind;
rtx val, next;
{ {
rtx r; rtx r;
...@@ -111,8 +107,7 @@ alloc_EXPR_LIST (kind, val, next) ...@@ -111,8 +107,7 @@ alloc_EXPR_LIST (kind, val, next)
/* This function will free up an entire list of EXPR_LIST nodes. */ /* This function will free up an entire list of EXPR_LIST nodes. */
void void
free_EXPR_LIST_list (listp) free_EXPR_LIST_list (rtx *listp)
rtx *listp;
{ {
if (*listp == 0) if (*listp == 0)
return; return;
...@@ -121,8 +116,7 @@ free_EXPR_LIST_list (listp) ...@@ -121,8 +116,7 @@ free_EXPR_LIST_list (listp)
/* This function will free up an entire list of INSN_LIST nodes. */ /* This function will free up an entire list of INSN_LIST nodes. */
void void
free_INSN_LIST_list (listp) free_INSN_LIST_list (rtx *listp)
rtx *listp;
{ {
if (*listp == 0) if (*listp == 0)
return; return;
...@@ -131,8 +125,7 @@ free_INSN_LIST_list (listp) ...@@ -131,8 +125,7 @@ free_INSN_LIST_list (listp)
/* This function will free up an individual EXPR_LIST node. */ /* This function will free up an individual EXPR_LIST node. */
void void
free_EXPR_LIST_node (ptr) free_EXPR_LIST_node (rtx ptr)
rtx ptr;
{ {
XEXP (ptr, 1) = unused_expr_list; XEXP (ptr, 1) = unused_expr_list;
unused_expr_list = ptr; unused_expr_list = ptr;
...@@ -140,8 +133,7 @@ free_EXPR_LIST_node (ptr) ...@@ -140,8 +133,7 @@ free_EXPR_LIST_node (ptr)
/* This function will free up an individual INSN_LIST node. */ /* This function will free up an individual INSN_LIST node. */
void void
free_INSN_LIST_node (ptr) free_INSN_LIST_node (rtx ptr)
rtx ptr;
{ {
XEXP (ptr, 1) = unused_insn_list; XEXP (ptr, 1) = unused_insn_list;
unused_insn_list = ptr; unused_insn_list = ptr;
......
/* params.c - Run-time parameters. /* params.c - Run-time parameters.
Copyright (C) 2001 Free Software Foundation, Inc. Copyright (C) 2001, 2003 Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>. Written by Mark Mitchell <mark@codesourcery.com>.
This file is part of GCC. This file is part of GCC.
...@@ -40,9 +40,7 @@ static size_t num_compiler_params; ...@@ -40,9 +40,7 @@ static size_t num_compiler_params;
/* Add the N PARAMS to the current list of compiler parameters. */ /* Add the N PARAMS to the current list of compiler parameters. */
void void
add_params (params, n) add_params (const param_info params[], size_t n)
const param_info params[];
size_t n;
{ {
/* Allocate enough space for the new parameters. */ /* Allocate enough space for the new parameters. */
compiler_params = compiler_params =
...@@ -60,9 +58,7 @@ add_params (params, n) ...@@ -60,9 +58,7 @@ add_params (params, n)
/* Set the VALUE associated with the parameter given by NAME. */ /* Set the VALUE associated with the parameter given by NAME. */
void void
set_param_value (name, value) set_param_value (const char *name, int value)
const char *name;
int value;
{ {
size_t i; size_t i;
......
/* params.h - Run-time parameters. /* params.h - Run-time parameters.
Copyright (C) 2001 Free Software Foundation, Inc. Copyright (C) 2001, 2003 Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>. Written by Mark Mitchell <mark@codesourcery.com>.
This file is part of GCC. This file is part of GCC.
...@@ -59,13 +59,11 @@ extern param_info *compiler_params; ...@@ -59,13 +59,11 @@ extern param_info *compiler_params;
/* Add the N PARAMS to the current list of compiler parameters. */ /* Add the N PARAMS to the current list of compiler parameters. */
extern void add_params extern void add_params (const param_info params[], size_t n);
PARAMS ((const param_info params[], size_t n));
/* Set the VALUE associated with the parameter given by NAME. */ /* Set the VALUE associated with the parameter given by NAME. */
extern void set_param_value extern void set_param_value (const char *name, int value);
PARAMS ((const char *name, int value));
/* The parameters in use by language-independent code. */ /* The parameters in use by language-independent code. */
......
...@@ -1735,12 +1735,12 @@ extern rtx find_use_as_address PARAMS ((rtx, rtx, HOST_WIDE_INT)); ...@@ -1735,12 +1735,12 @@ extern rtx find_use_as_address PARAMS ((rtx, rtx, HOST_WIDE_INT));
/* lists.c */ /* lists.c */
void free_EXPR_LIST_list PARAMS ((rtx *)); void free_EXPR_LIST_list (rtx *);
void free_INSN_LIST_list PARAMS ((rtx *)); void free_INSN_LIST_list (rtx *);
void free_EXPR_LIST_node PARAMS ((rtx)); void free_EXPR_LIST_node (rtx);
void free_INSN_LIST_node PARAMS ((rtx)); void free_INSN_LIST_node (rtx);
rtx alloc_INSN_LIST PARAMS ((rtx, rtx)); rtx alloc_INSN_LIST (rtx, rtx);
rtx alloc_EXPR_LIST PARAMS ((int, rtx, rtx)); rtx alloc_EXPR_LIST (int, rtx, rtx);
/* regclass.c */ /* regclass.c */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment