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>
* 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.c (CONTIN): Removed empty macro.
......
/* 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.
......@@ -105,8 +106,7 @@ internal_error (const char *format, ...)
version if for the gen* programs and so needn't handle subdirectories. */
const char *
trim_filename (name)
const char *name;
trim_filename (const char *name)
{
static const char this_file[] = __FILE__;
const char *p = name, *q = this_file;
......@@ -130,10 +130,7 @@ trim_filename (name)
This file is used only by build programs, so we're not as polite as
the version in diagnostic.c. */
void
fancy_abort (file, line, func)
const char *file;
int line;
const char *func;
fancy_abort (const char *file, int line, const char *func)
{
internal_error ("abort in %s, at %s:%d", func, file, line);
}
/* 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.
......@@ -29,12 +30,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_ERRORS_H
#define GCC_ERRORS_H
extern void warning PARAMS ((const char *, ...));
extern void error PARAMS ((const char *, ...));
extern void fatal PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN;
extern void internal_error PARAMS ((const char *, ...)) ATTRIBUTE_NORETURN;
extern const char *trim_filename PARAMS ((const char *));
extern void fancy_abort PARAMS ((const char *, int, const char *))
extern void warning (const char *, ...);
extern void error (const char *, ...);
extern void fatal (const char *, ...) ATTRIBUTE_NORETURN;
extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN;
extern const char *trim_filename (const char *);
extern void fancy_abort (const char *, int, const char *)
ATTRIBUTE_NORETURN;
extern int have_error;
......
/* gen-protos.c - massages a list of prototypes, for use by fixproto.
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
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. */
int verbose = 0;
const char *progname;
static void add_hash PARAMS ((const char *));
static int parse_fn_proto PARAMS ((char *, char *, struct fn_decl *));
static void add_hash (const char *);
static int parse_fn_proto (char *, char *, struct fn_decl *);
#define HASH_SIZE 2503 /* a prime */
int hash_tab[HASH_SIZE];
......@@ -35,8 +35,7 @@ int next_index;
int collisions;
static void
add_hash (fname)
const char *fname;
add_hash (const char *fname)
{
int i, i0;
......@@ -67,9 +66,7 @@ add_hash (fname)
The fields of FN point to the input string. */
static int
parse_fn_proto (start, end, fn)
char *start, *end;
struct fn_decl *fn;
parse_fn_proto (char *start, char *end, struct fn_decl *fn)
{
char *ptr;
int param_nesting = 1;
......@@ -131,12 +128,8 @@ parse_fn_proto (start, end, fn)
return 1;
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc ATTRIBUTE_UNUSED;
char **argv;
main (int argc, char **argv)
{
FILE *inf = stdin;
FILE *outf = stdout;
......@@ -144,6 +137,9 @@ main (argc, argv)
sstring linebuf;
struct fn_decl fn_decl;
if (argc <= 1)
fatal ("no input file name");
i = strlen (argv[0]);
while (i > 0 && argv[0][i-1] != '/') --i;
progname = &argv[0][i];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* 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.
......@@ -32,20 +33,16 @@ static const char *const tree_codes[] = {
(char*) 0
};
static void usage PARAMS ((void));
static void usage (void);
static void
usage ()
usage (void)
{
fputs ("Usage: gencheck\n", stderr);
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv ATTRIBUTE_UNUSED;
main (int argc, char **argv ATTRIBUTE_UNUSED)
{
int i;
......
......@@ -2,7 +2,7 @@
- some macros CODE_FOR_... giving the insn_code_number value
for each of the defined standard insn names.
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.
......@@ -30,12 +30,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "errors.h"
#include "gensupport.h"
static void gen_insn PARAMS ((rtx, int));
static void
gen_insn (insn, code)
rtx insn;
int code;
gen_insn (rtx insn, int code)
{
const char *name = XSTR (insn, 0);
int truth = maybe_eval_c_test (XSTR (insn, 2));
......@@ -52,12 +48,8 @@ gen_insn (insn, code)
}
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
......@@ -111,8 +103,7 @@ enum insn_code {");
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
return NULL;
}
/* 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.
......@@ -40,20 +40,17 @@ static int saw_eh_return;
static htab_t condition_table;
static void add_condition PARAMS ((const char *));
static void write_header PARAMS ((void));
static void write_conditions PARAMS ((void));
static int write_one_condition PARAMS ((PTR *, PTR));
extern int main PARAMS ((int, char **));
static void add_condition (const char *);
static void write_header (void);
static void write_conditions (void);
static int write_one_condition (void **, void *);
/* Record the C test expression EXPR in the condition_table.
Duplicates clobber previous entries, which leaks memory, but
we don't care for this application. */
static void
add_condition (expr)
const char *expr;
add_condition (const char *expr)
{
struct c_test *test;
......@@ -69,7 +66,7 @@ add_condition (expr)
/* Generate the header for insn-conditions.c. */
static void
write_header ()
write_header (void)
{
puts ("\
/* Generated automatically by the program `genconditions' from the target\n\
......@@ -122,7 +119,7 @@ write_header ()
extern rtx insn;\n\
extern rtx ins1;\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 ("\
/* 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");
MAYBE_EVAL (! optimize_size && ! TARGET_READ_MODIFY_WRITE) }, */
static int
write_one_condition (slot, dummy)
PTR *slot;
PTR dummy ATTRIBUTE_UNUSED;
write_one_condition (void **slot, void *dummy ATTRIBUTE_UNUSED)
{
const struct c_test *test = * (const struct c_test **) slot;
const char *p;
......@@ -167,7 +162,7 @@ write_one_condition (slot, dummy)
/* Write out the complete conditions table, its size, and a flag
indicating that gensupport.c can now do insn elision. */
static void
write_conditions ()
write_conditions (void)
{
puts ("\
/* This table lists each condition found in the machine description.\n\
......@@ -186,9 +181,7 @@ const struct c_test insn_conditions[] = {");
}
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
int pattern_lineno; /* not used */
......
/* Generate from machine description:
- some #define configuration flags.
Copyright (C) 1987, 1991, 1997, 1998,
1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1987, 1991, 1997, 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -50,12 +50,12 @@ static int max_insns_per_peep2;
static int clobbers_seen_this_insn;
static int dup_operands_seen_this_insn;
static void walk_insn_part PARAMS ((rtx, int, int));
static void gen_insn PARAMS ((rtx));
static void gen_expand PARAMS ((rtx));
static void gen_split PARAMS ((rtx));
static void gen_peephole PARAMS ((rtx));
static void gen_peephole2 PARAMS ((rtx));
static void walk_insn_part (rtx, int, int);
static void gen_insn (rtx);
static void gen_expand (rtx);
static void gen_split (rtx);
static void gen_peephole (rtx);
static void gen_peephole2 (rtx);
/* 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.
......@@ -64,10 +64,7 @@ static void gen_peephole2 PARAMS ((rtx));
of a SET whose destination is not (pc). */
static void
walk_insn_part (part, recog_p, non_pc_set_src)
rtx part;
int recog_p;
int non_pc_set_src;
walk_insn_part (rtx part, int recog_p, int non_pc_set_src)
{
int i, j;
RTX_CODE code;
......@@ -171,8 +168,7 @@ walk_insn_part (part, recog_p, non_pc_set_src)
}
static void
gen_insn (insn)
rtx insn;
gen_insn (rtx insn)
{
int i;
......@@ -192,8 +188,7 @@ gen_insn (insn)
/* Similar but scan a define_expand. */
static void
gen_expand (insn)
rtx insn;
gen_expand (rtx insn)
{
int i;
......@@ -219,8 +214,7 @@ gen_expand (insn)
/* Similar but scan a define_split. */
static void
gen_split (split)
rtx split;
gen_split (rtx split)
{
int i;
......@@ -234,8 +228,7 @@ gen_split (split)
}
static void
gen_peephole (peep)
rtx peep;
gen_peephole (rtx peep)
{
int i;
......@@ -246,8 +239,7 @@ gen_peephole (peep)
}
static void
gen_peephole2 (peep)
rtx peep;
gen_peephole2 (rtx peep)
{
int i, n;
......@@ -265,12 +257,8 @@ gen_peephole2 (peep)
max_insns_per_peep2 = n;
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
......@@ -379,8 +367,7 @@ main (argc, argv)
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
return NULL;
}
......@@ -2,8 +2,8 @@
a series of #define statements, one for each constant named in
a (define_constants ...) pattern.
Copyright (C) 1987, 1991, 1995, 1998,
1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1987, 1991, 1995, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -34,16 +34,13 @@ Boston, MA 02111-1307, USA. */
#include "errors.h"
#include "gensupport.h"
static int print_md_constant PARAMS ((void **, void *));
extern int main PARAMS ((int, char **));
static int print_md_constant (void **, void *);
/* Called via traverse_md_constants; emit a #define for
the current constant definition. */
static int
print_md_constant (slot, info)
void **slot;
void *info;
print_md_constant (void **slot, void *info)
{
struct md_constant *def = *slot;
FILE *file = info;
......@@ -53,9 +50,7 @@ print_md_constant (slot, info)
}
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
int dummy1, dummy2;
rtx desc;
......
/* Generate code from machine description to emit insns as rtl.
Copyright (C) 1987, 1988, 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -57,22 +57,21 @@ struct clobber_ent
struct clobber_ent *next;
};
static void max_operand_1 PARAMS ((rtx));
static int max_operand_vec PARAMS ((rtx, int));
static void print_code PARAMS ((RTX_CODE));
static void gen_exp PARAMS ((rtx, enum rtx_code, char *));
static void gen_insn PARAMS ((rtx, int));
static void gen_expand PARAMS ((rtx));
static void gen_split PARAMS ((rtx));
static void output_add_clobbers PARAMS ((void));
static void output_added_clobbers_hard_reg_p PARAMS ((void));
static void gen_rtx_scratch PARAMS ((rtx, enum rtx_code));
static void output_peephole2_scratches PARAMS ((rtx));
static void max_operand_1 (rtx);
static int max_operand_vec (rtx, int);
static void print_code (RTX_CODE);
static void gen_exp (rtx, enum rtx_code, char *);
static void gen_insn (rtx, int);
static void gen_expand (rtx);
static void gen_split (rtx);
static void output_add_clobbers (void);
static void output_added_clobbers_hard_reg_p (void);
static void gen_rtx_scratch (rtx, enum rtx_code);
static void output_peephole2_scratches (rtx);
static void
max_operand_1 (x)
rtx x;
max_operand_1 (rtx x)
{
RTX_CODE code;
int i;
......@@ -112,9 +111,7 @@ max_operand_1 (x)
}
static int
max_operand_vec (insn, arg)
rtx insn;
int arg;
max_operand_vec (rtx insn, int arg)
{
int len = XVECLEN (insn, arg);
int i;
......@@ -130,8 +127,7 @@ max_operand_vec (insn, arg)
}
static void
print_code (code)
RTX_CODE code;
print_code (RTX_CODE code)
{
const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++)
......@@ -139,9 +135,7 @@ print_code (code)
}
static void
gen_rtx_scratch (x, subroutine_type)
rtx x;
enum rtx_code subroutine_type;
gen_rtx_scratch (rtx x, enum rtx_code subroutine_type)
{
if (subroutine_type == DEFINE_PEEPHOLE2)
{
......@@ -157,10 +151,7 @@ gen_rtx_scratch (x, subroutine_type)
substituting any operand references appearing within. */
static void
gen_exp (x, subroutine_type, used)
rtx x;
enum rtx_code subroutine_type;
char *used;
gen_exp (rtx x, enum rtx_code subroutine_type, char *used)
{
RTX_CODE code;
int i;
......@@ -299,9 +290,7 @@ gen_exp (x, subroutine_type, used)
/* Generate the `gen_...' function for a DEFINE_INSN. */
static void
gen_insn (insn, lineno)
rtx insn;
int lineno;
gen_insn (rtx insn, int lineno)
{
int operands;
int i;
......@@ -432,8 +421,7 @@ gen_insn (insn, lineno)
/* Generate the `gen_...' function for a DEFINE_EXPAND. */
static void
gen_expand (expand)
rtx expand;
gen_expand (rtx expand)
{
int operands;
int i;
......@@ -569,8 +557,7 @@ gen_expand (expand)
/* Like gen_expand, but generates insns resulting from splitting SPLIT. */
static void
gen_split (split)
rtx split;
gen_split (rtx split)
{
int i;
int operands;
......@@ -596,7 +583,7 @@ gen_split (split)
/* Output the prototype, function name and argument declarations. */
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);
printf ("rtx\ngen_%s_%d (curr_insn, operands)\n",
name, insn_code_number);
......@@ -605,7 +592,7 @@ gen_split (split)
}
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 *operands%s;\n", unused);
}
......@@ -724,7 +711,7 @@ output_add_clobbers ()
hard reg and 0 if they just clobber SCRATCH. */
static void
output_added_clobbers_hard_reg_p ()
output_added_clobbers_hard_reg_p (void)
{
struct clobber_pat *clobber;
struct clobber_ent *ent;
......@@ -761,8 +748,7 @@ output_added_clobbers_hard_reg_p ()
scratch registers used by the peephole2 pattern in SPLIT. */
static void
output_peephole2_scratches (split)
rtx split;
output_peephole2_scratches (rtx split)
{
int i;
int insn_nr = 0;
......@@ -800,12 +786,8 @@ output_peephole2_scratches (split)
}
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
......@@ -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. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
return NULL;
}
/* Generate code from machine description to extract operands from insn as rtl.
Copyright (C) 1987, 1991, 1992, 1993, 1997, 1998,
1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1987, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -95,14 +95,13 @@ static int dupnums[MAX_DUP_OPERANDS];
static struct code_ptr *peepholes;
static void gen_insn PARAMS ((rtx));
static void walk_rtx PARAMS ((rtx, const char *));
static void print_path PARAMS ((const char *));
static void record_insn_name PARAMS ((int, const char *));
static void gen_insn (rtx);
static void walk_rtx (rtx, const char *);
static void print_path (const char *);
static void record_insn_name (int, const char *);
static void
gen_insn (insn)
rtx insn;
gen_insn (rtx insn)
{
int i;
struct extraction *p;
......@@ -181,9 +180,7 @@ gen_insn (insn)
}
static void
walk_rtx (x, path)
rtx x;
const char *path;
walk_rtx (rtx x, const char *path)
{
RTX_CODE code;
int i;
......@@ -306,8 +303,7 @@ walk_rtx (x, path)
evaluate to the rtx at that point. */
static void
print_path (path)
const char *path;
print_path (const char *path)
{
int len = strlen (path);
int i;
......@@ -346,12 +342,9 @@ print_path (path)
}
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
int i;
......
......@@ -2,7 +2,7 @@
- some flags HAVE_... saying which simple standard instructions are
available for this machine.
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.
......@@ -40,17 +40,16 @@ static int max_id_len;
/* Max operand encountered in a scan over some insn. */
static int max_opno;
static void max_operand_1 PARAMS ((rtx));
static int num_operands PARAMS ((rtx));
static void gen_proto PARAMS ((rtx));
static void gen_macro PARAMS ((const char *, int, int));
static void gen_insn PARAMS ((rtx));
static void max_operand_1 (rtx);
static int num_operands (rtx);
static void gen_proto (rtx);
static void gen_macro (const char *, int, int);
static void gen_insn (rtx);
/* Count the number of match_operand's found. */
static void
max_operand_1 (x)
rtx x;
max_operand_1 (rtx x)
{
RTX_CODE code;
int i;
......@@ -82,8 +81,7 @@ max_operand_1 (x)
}
static int
num_operands (insn)
rtx insn;
num_operands (rtx insn)
{
int len = XVECLEN (insn, 1);
int i;
......@@ -100,9 +98,7 @@ num_operands (insn)
of arguments it takes. Any missing arguments are assumed to be at
the end. */
static void
gen_macro (name, real, expect)
const char *name;
int real, expect;
gen_macro (const char *name, int real, int expect)
{
int i;
......@@ -131,8 +127,7 @@ gen_macro (name, real, expect)
does nothing. */
static void
gen_proto (insn)
rtx insn;
gen_proto (rtx insn)
{
int num = num_operands (insn);
int i;
......@@ -159,9 +154,9 @@ gen_proto (insn)
}
if (truth != 0)
printf ("extern rtx gen_%-*s PARAMS ((", max_id_len, name);
printf ("extern rtx gen_%-*s (", max_id_len, name);
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)
fputs ("void", stdout);
......@@ -173,7 +168,7 @@ gen_proto (insn)
fputs ("rtx", stdout);
}
puts ("));");
puts (");");
/* Some back ends want to take the address of generator functions,
so we cannot simply use #define for these dummy definitions. */
......@@ -197,8 +192,7 @@ gen_proto (insn)
}
static void
gen_insn (insn)
rtx insn;
gen_insn (rtx insn)
{
const char *name = XSTR (insn, 0);
const char *p;
......@@ -238,12 +232,8 @@ gen_insn (insn)
obstack_grow (&obstack, &insn, sizeof (rtx));
}
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
rtx dummy;
......@@ -299,8 +289,7 @@ main (argc, argv)
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
return NULL;
}
/* 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.
......@@ -44,24 +45,23 @@ static const struct rtx_definition defs[] =
static const char *formats[NUM_RTX_CODE];
static const char *type_from_format PARAMS ((int));
static const char *accessor_from_format PARAMS ((int));
static int special_format PARAMS ((const char *));
static int special_rtx PARAMS ((int));
static int excluded_rtx PARAMS ((int));
static void find_formats PARAMS ((void));
static void gendecl PARAMS ((const char *));
static void genmacro PARAMS ((int));
static void gendef PARAMS ((const char *));
static void genlegend PARAMS ((void));
static void genheader PARAMS ((void));
static void gencode PARAMS ((void));
static const char *type_from_format (int);
static const char *accessor_from_format (int);
static int special_format (const char *);
static int special_rtx (int);
static int excluded_rtx (int);
static void find_formats (void);
static void gendecl (const char *);
static void genmacro (int);
static void gendef (const char *);
static void genlegend (void);
static void genheader (void);
static void gencode (void);
/* Decode a format letter into a C type string. */
static const char *
type_from_format (c)
int c;
type_from_format (int c)
{
switch (c)
{
......@@ -93,8 +93,7 @@ type_from_format (c)
/* Decode a format letter into the proper accessor function. */
static const char *
accessor_from_format (c)
int c;
accessor_from_format (int c)
{
switch (c)
{
......@@ -131,8 +130,7 @@ accessor_from_format (c)
the list of formats we write routines to create. */
static int
special_format (fmt)
const char *fmt;
special_format (const char *fmt)
{
return (strchr (fmt, '*') != 0
|| strchr (fmt, 'V') != 0
......@@ -145,8 +143,7 @@ special_format (fmt)
is a wrapper in emit-rtl.c). */
static int
special_rtx (idx)
int idx;
special_rtx (int idx)
{
return (strcmp (defs[idx].enumname, "CONST_INT") == 0
|| strcmp (defs[idx].enumname, "REG") == 0
......@@ -160,8 +157,7 @@ special_rtx (idx)
cannot have the obvious interface). */
static int
excluded_rtx (idx)
int idx;
excluded_rtx (int idx)
{
return (strcmp (defs[idx].enumname, "CONST_DOUBLE") == 0);
}
......@@ -169,7 +165,7 @@ excluded_rtx (idx)
/* Place a list of all format specifiers we use into the array FORMAT. */
static void
find_formats ()
find_formats (void)
{
int i;
......@@ -192,13 +188,12 @@ find_formats ()
/* Write the declarations for the routine to allocate RTL with FORMAT. */
static void
gendecl (format)
const char *format;
gendecl (const char *format)
{
const char *p;
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");
/* Write each parameter that is needed and start a new line when the line
......@@ -216,15 +211,14 @@ gendecl (format)
pos += ourlen;
}
printf ("));\n");
printf (");\n");
}
/* Generate macros to generate RTL of code IDX using the functions we
write. */
static void
genmacro (idx)
int idx;
genmacro (int idx)
{
const char *p;
int i;
......@@ -257,8 +251,7 @@ genmacro (idx)
format is FORMAT. */
static void
gendef (format)
const char *format;
gendef (const char *format)
{
const char *p;
int i, j;
......@@ -298,7 +291,7 @@ gendef (format)
/* Generate the documentation header for files we write. */
static void
genlegend ()
genlegend (void)
{
puts ("/* Generated automatically by gengenrtl from rtl.def. */\n");
}
......@@ -306,7 +299,7 @@ genlegend ()
/* Generate the text of the header file we make, genrtl.h. */
static void
genheader ()
genheader (void)
{
int i;
const char **fmt;
......@@ -329,7 +322,7 @@ genheader ()
/* Generate the text of the code file we write, genrtl.c. */
static void
gencode ()
gencode (void)
{
const char **fmt;
......@@ -348,12 +341,9 @@ gencode ()
/* 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
genrtl.c file. */
extern int main PARAMS ((int, char **));
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
find_formats ();
genlegend ();
......
/* 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.
......@@ -111,36 +111,36 @@ extern struct fileloc lexer_line;
/* Print an error message. */
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(). */
extern int xvasprintf PARAMS ((char **, const char *, va_list))
extern int xvasprintf (char **, const char *, va_list)
ATTRIBUTE_PRINTF (2, 0);
/* Like the above, but more convenient for quick coding. */
extern char * xasprintf PARAMS ((const char *, ...))
extern char * xasprintf (const char *, ...)
ATTRIBUTE_PRINTF_1;
/* Constructor routines for types. */
extern void do_typedef PARAMS ((const char *s, type_p t, struct fileloc *pos));
extern type_p resolve_typedef PARAMS ((const char *s, struct fileloc *pos));
extern void new_structure PARAMS ((const char *name, int isunion,
extern void do_typedef (const char *s, type_p t, struct fileloc *pos);
extern type_p resolve_typedef (const char *s, struct fileloc *pos);
extern void new_structure (const char *name, int isunion,
struct fileloc *pos, pair_p fields,
options_p o));
extern type_p find_structure PARAMS ((const char *s, int isunion));
extern type_p create_scalar_type PARAMS ((const char *name, size_t name_len));
extern type_p create_pointer PARAMS ((type_p t));
extern type_p create_array PARAMS ((type_p t, const char *len));
extern type_p adjust_field_type PARAMS ((type_p, options_p));
extern void note_variable PARAMS ((const char *s, type_p t, options_p o,
struct fileloc *pos));
extern void note_yacc_type PARAMS ((options_p o, pair_p fields,
pair_p typeinfo, struct fileloc *pos));
options_p o);
extern type_p find_structure (const char *s, int isunion);
extern type_p create_scalar_type (const char *name, size_t name_len);
extern type_p create_pointer (type_p t);
extern type_p create_array (type_p t, const char *len);
extern type_p adjust_field_type (type_p, options_p);
extern void note_variable (const char *s, type_p t, options_p o,
struct fileloc *pos);
extern void note_yacc_type (options_p o, pair_p fields,
pair_p typeinfo, struct fileloc *pos);
/* Lexer and parser routines, most automatically generated. */
extern int yylex PARAMS((void));
extern void yyerror PARAMS ((const char *));
extern int yyparse PARAMS ((void));
extern void parse_file PARAMS ((const char *name));
extern int yylex (void);
extern void yyerror (const char *);
extern int yyparse (void);
extern void parse_file (const char *name);
/* Output file handling. */
......@@ -164,8 +164,8 @@ extern outf_p header_file;
made in INPUT_FILE and is linked into every language that uses
INPUT_FILE. */
extern outf_p get_output_file_with_visibility
PARAMS ((const char *input_file));
const char *get_output_file_name PARAMS ((const char *));
(const char *input_file);
const char *get_output_file_name (const char *);
/* A list of output files suitable for definitions. There is one
BASE_FILES entry for each language. */
......@@ -174,8 +174,8 @@ extern outf_p base_files[];
/* A bitmap that specifies which of BASE_FILES should be used to
output a definition that is different for each language and must be
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. */
extern void oprintf PARAMS ((outf_p o, const char *S, ...))
extern void oprintf (outf_p o, const char *S, ...)
ATTRIBUTE_PRINTF_2;
......@@ -149,11 +149,10 @@ static const char * const optabs[] =
"movstr_optab[$A] = CODE_FOR_$(movstr$a$)",
"clrstr_optab[$A] = CODE_FOR_$(clrstr$a$)" };
static void gen_insn PARAMS ((rtx));
static void gen_insn (rtx);
static void
gen_insn (insn)
rtx insn;
gen_insn (rtx insn)
{
const char *name = XSTR (insn, 0);
int m1 = 0, m2 = 0, op = 0;
......@@ -321,12 +320,10 @@ gen_insn (insn)
printf (";\n");
}
extern int main PARAMS ((int, char **));
extern int main (int, char **);
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
......@@ -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. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
return NULL;
}
......@@ -99,8 +99,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define MAX_MAX_OPERANDS 40
static int n_occurrences PARAMS ((int, const char *));
static const char *strip_whitespace PARAMS ((const char *));
static int n_occurrences (int, const char *);
static const char *strip_whitespace (const char *);
/* insns in the machine description are assigned sequential code numbers
that are used by insn-recog.c (produced by genrecog) to communicate
......@@ -173,28 +173,27 @@ struct data
static struct data *idata, **idata_end = &idata;
static void output_prologue PARAMS ((void));
static void output_predicate_decls PARAMS ((void));
static void output_operand_data PARAMS ((void));
static void output_insn_data PARAMS ((void));
static void output_get_insn_name PARAMS ((void));
static void scan_operands PARAMS ((struct data *, rtx, int, int));
static int compare_operands PARAMS ((struct operand_data *,
struct operand_data *));
static void place_operands PARAMS ((struct data *));
static void process_template PARAMS ((struct data *, const char *));
static void validate_insn_alternatives PARAMS ((struct data *));
static void validate_insn_operands PARAMS ((struct data *));
static void gen_insn PARAMS ((rtx, int));
static void gen_peephole PARAMS ((rtx, int));
static void gen_expand PARAMS ((rtx, int));
static void gen_split PARAMS ((rtx, int));
static void check_constraint_len PARAMS ((void));
static int constraint_len PARAMS ((const char *, int));
static void output_prologue (void);
static void output_predicate_decls (void);
static void output_operand_data (void);
static void output_insn_data (void);
static void output_get_insn_name (void);
static void scan_operands (struct data *, rtx, int, int);
static int compare_operands (struct operand_data *,
struct operand_data *);
static void place_operands (struct data *);
static void process_template (struct data *, const char *);
static void validate_insn_alternatives (struct data *);
static void validate_insn_operands (struct data *);
static void gen_insn (rtx, int);
static void gen_peephole (rtx, int);
static void gen_expand (rtx, int);
static void gen_split (rtx, int);
static void check_constraint_len (void);
static int constraint_len (const char *, int);
const char *
get_insn_name (index)
int index;
get_insn_name (int index)
{
static char buf[100];
......@@ -216,7 +215,7 @@ get_insn_name (index)
}
static void
output_prologue ()
output_prologue (void)
{
printf ("/* Generated automatically by the program `genoutput'\n\
from the machine description file `md'. */\n\n");
......@@ -251,7 +250,7 @@ output_prologue ()
struct predicate { const char *name; struct predicate *next; };
static void
output_predicate_decls ()
output_predicate_decls (void)
{
struct predicate *predicates = 0;
struct operand_data *d;
......@@ -266,7 +265,7 @@ output_predicate_decls ()
if (p == 0)
{
printf ("extern int %s PARAMS ((rtx, enum machine_mode));\n",
printf ("extern int %s (rtx, enum machine_mode);\n",
d->predicate);
p = (struct predicate *) xmalloc (sizeof (struct predicate));
p->name = d->predicate;
......@@ -284,7 +283,7 @@ output_predicate_decls ()
}
static void
output_operand_data ()
output_operand_data (void)
{
struct operand_data *d;
......@@ -311,7 +310,7 @@ output_operand_data ()
}
static void
output_insn_data ()
output_insn_data (void)
{
struct data *d;
int name_offset = 0;
......@@ -413,7 +412,7 @@ output_insn_data ()
}
static void
output_get_insn_name ()
output_get_insn_name (void)
{
printf ("const char *\n");
printf ("get_insn_name (code)\n");
......@@ -438,11 +437,8 @@ static int max_opno;
static int num_dups;
static void
scan_operands (d, part, this_address_p, this_strict_low)
struct data *d;
rtx part;
int this_address_p;
int this_strict_low;
scan_operands (struct data *d, rtx part, int this_address_p,
int this_strict_low)
{
int i, j;
const char *format_ptr;
......@@ -579,8 +575,7 @@ scan_operands (d, part, this_address_p, this_strict_low)
/* Compare two operands for content equality. */
static int
compare_operands (d0, d1)
struct operand_data *d0, *d1;
compare_operands (struct operand_data *d0, struct operand_data *d1)
{
const char *p0, *p1;
......@@ -618,8 +613,7 @@ compare_operands (d0, d1)
find a subsequence that is the same, or allocate a new one at the end. */
static void
place_operands (d)
struct data *d;
place_operands (struct data *d)
{
struct operand_data *od, *od2;
int i;
......@@ -673,9 +667,7 @@ place_operands (d)
templates, or C code to generate the assembler code template. */
static void
process_template (d, template)
struct data *d;
const char *template;
process_template (struct data *d, const char *template)
{
const char *cp;
int i;
......@@ -686,7 +678,7 @@ process_template (d, template)
d->template = 0;
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);
puts ("\nstatic const char *");
printf ("output_%d (operands, insn)\n", d->code_number);
......@@ -744,8 +736,7 @@ process_template (d, template)
/* Check insn D for consistency in number of constraint alternatives. */
static void
validate_insn_alternatives (d)
struct data *d;
validate_insn_alternatives (struct data *d)
{
int n = 0, start;
......@@ -816,8 +807,7 @@ validate_insn_alternatives (d)
/* Verify that there are no gaps in operand numbers for INSNs. */
static void
validate_insn_operands (d)
struct data *d;
validate_insn_operands (struct data *d)
{
int i;
......@@ -834,9 +824,7 @@ validate_insn_operands (d)
a hairy output action, output a function for now. */
static void
gen_insn (insn, lineno)
rtx insn;
int lineno;
gen_insn (rtx insn, int lineno)
{
struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i;
......@@ -877,9 +865,7 @@ gen_insn (insn, lineno)
If the insn has a hairy output action, output it now. */
static void
gen_peephole (peep, lineno)
rtx peep;
int lineno;
gen_peephole (rtx peep, int lineno)
{
struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i;
......@@ -917,9 +903,7 @@ gen_peephole (peep, lineno)
only for the purposes of `insn_gen_function'. */
static void
gen_expand (insn, lineno)
rtx insn;
int lineno;
gen_expand (rtx insn, int lineno)
{
struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i;
......@@ -962,9 +946,7 @@ gen_expand (insn, lineno)
only for reasons of consistency and to simplify genrecog. */
static void
gen_split (split, lineno)
rtx split;
int lineno;
gen_split (rtx split, int lineno)
{
struct data *d = (struct data *) xmalloc (sizeof (struct data));
int i;
......@@ -999,12 +981,10 @@ gen_split (split, lineno)
place_operands (d);
}
extern int main PARAMS ((int, char **));
extern int main (int, char **);
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
......@@ -1057,9 +1037,7 @@ main (argc, argv)
-1 if S is the null string. */
static int
n_occurrences (c, s)
int c;
const char *s;
n_occurrences (int c, const char *s)
{
int n = 0;
......@@ -1076,8 +1054,7 @@ n_occurrences (c, s)
Return a new string. */
static const char *
strip_whitespace (s)
const char *s;
strip_whitespace (const char *s)
{
char *p, *q;
char ch;
......@@ -1098,7 +1075,7 @@ strip_whitespace (s)
tampered with. This isn't bullet-proof, but it should catch
most genuine mistakes. */
static void
check_constraint_len ()
check_constraint_len (void)
{
const char *p;
int d;
......@@ -1110,9 +1087,7 @@ check_constraint_len ()
}
static int
constraint_len (p, genoutput_default_constraint_len)
const char *p;
int genoutput_default_constraint_len;
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 fails if the value is not the expected one... */
......
/* Generate code from machine description to perform peephole optimizations.
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.
......@@ -53,14 +53,13 @@ static int n_operands;
static int insn_code_number = 0;
static void gen_peephole PARAMS ((rtx));
static void match_rtx PARAMS ((rtx, struct link *, int));
static void print_path PARAMS ((struct link *));
static void print_code PARAMS ((RTX_CODE));
static void gen_peephole (rtx);
static void match_rtx (rtx, struct link *, int);
static void print_path (struct link *);
static void print_code (RTX_CODE);
static void
gen_peephole (peep)
rtx peep;
gen_peephole (rtx peep)
{
int ninsns = XVECLEN (peep, 0);
int i;
......@@ -68,9 +67,6 @@ gen_peephole (peep)
n_operands = 0;
printf (" insn = ins1;\n");
#if 0
printf (" want_jump = 0;\n");
#endif
for (i = 0; i < ninsns; i++)
{
......@@ -89,11 +85,6 @@ gen_peephole (peep)
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");
/* Walk the insn's pattern, remembering at all times the path
......@@ -117,15 +108,6 @@ gen_peephole (peep)
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,
as if it had been recognized to match this. */
printf (" INSN_CODE (ins1) = %d;\n",
......@@ -143,10 +125,7 @@ gen_peephole (peep)
}
static void
match_rtx (x, path, fail_label)
rtx x;
struct link *path;
int fail_label;
match_rtx (rtx x, struct link *path, int fail_label)
{
RTX_CODE code;
int i;
......@@ -343,8 +322,7 @@ match_rtx (x, path, fail_label)
evaluate to the rtx at that point. */
static void
print_path (path)
struct link *path;
print_path (struct link *path)
{
if (path == 0)
printf ("pat");
......@@ -363,20 +341,17 @@ print_path (path)
}
static void
print_code (code)
RTX_CODE code;
print_code (RTX_CODE code)
{
const char *p1;
for (p1 = GET_RTX_NAME (code); *p1; p1++)
putchar (TOUPPER(*p1));
}
extern int main PARAMS ((int, char **));
extern int main (int, char **);
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
rtx desc;
......@@ -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. */
const char *
get_insn_name (code)
int code ATTRIBUTE_UNUSED;
get_insn_name (int code ATTRIBUTE_UNUSED)
{
return NULL;
}
......@@ -2,7 +2,7 @@
- some macros CODE_FOR_... giving the insn_code_number value
for each of the defined standard insn names.
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.
......@@ -29,11 +29,9 @@ Boston, MA 02111-1307, USA. */
#define NO_GENRTL_H
#include "rtl.h"
static void output_predicate_decls PARAMS ((void));
extern int main PARAMS ((void));
static void
output_predicate_decls ()
output_predicate_decls (void)
{
#ifdef PREDICATE_CODES
static const struct {
......@@ -46,14 +44,14 @@ output_predicate_decls ()
puts ("#ifdef RTX_CODE\n");
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);
puts ("\n#endif /* RTX_CODE */\n");
#endif
}
int
main ()
main (void)
{
puts ("/* Generated automatically by the program `genpreds'. */\n");
puts ("#ifndef GCC_TM_PREDS_H");
......
/* 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.
......@@ -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_tail = &other_queue;
static void queue_pattern PARAMS ((rtx, struct queue_elem ***,
const char *, int));
static void queue_pattern (rtx, struct queue_elem ***,
const char *, int);
/* Current maximum length of directory names in the search path
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 */
struct file_name_list *first_bracket_include = 0;
struct file_name_list *last_dir_md_include = 0; /* Last in chain */
static void remove_constraints PARAMS ((rtx));
static void process_rtx PARAMS ((rtx, int));
static int is_predicable PARAMS ((struct queue_elem *));
static void identify_predicable_attribute PARAMS ((void));
static int n_alternatives PARAMS ((const char *));
static void collect_insn_data PARAMS ((rtx, int *, int *));
static rtx alter_predicate_for_insn PARAMS ((rtx, int, int, int));
static const char *alter_test_for_insn PARAMS ((struct queue_elem *,
struct queue_elem *));
static char *shift_output_template PARAMS ((char *, const char *, int));
static const char *alter_output_for_insn PARAMS ((struct queue_elem *,
static void remove_constraints (rtx);
static void process_rtx (rtx, int);
static int is_predicable (struct queue_elem *);
static void identify_predicable_attribute (void);
static int n_alternatives (const char *);
static void collect_insn_data (rtx, int *, int *);
static rtx alter_predicate_for_insn (rtx, int, int, int);
static const char *alter_test_for_insn (struct queue_elem *,
struct queue_elem *);
static char *shift_output_template (char *, const char *, int);
static const char *alter_output_for_insn (struct queue_elem *,
struct queue_elem *,
int, int));
static void process_one_cond_exec PARAMS ((struct queue_elem *));
static void process_define_cond_exec PARAMS ((void));
static void process_include PARAMS ((rtx, int));
static char *save_string PARAMS ((const char *, int));
int, int);
static void process_one_cond_exec (struct queue_elem *);
static void process_define_cond_exec (void);
static void process_include (rtx, int);
static char *save_string (const char *, int);
void
message_with_line (int lineno, const char *msg, ...)
......@@ -124,9 +125,8 @@ message_with_line (int lineno, const char *msg, ...)
the gensupport programs. */
rtx
gen_rtx_CONST_INT (mode, arg)
enum machine_mode mode ATTRIBUTE_UNUSED;
HOST_WIDE_INT arg;
gen_rtx_CONST_INT (enum machine_mode mode ATTRIBUTE_UNUSED,
HOST_WIDE_INT arg)
{
rtx rt = rtx_alloc (CONST_INT);
......@@ -137,11 +137,8 @@ gen_rtx_CONST_INT (mode, arg)
/* Queue PATTERN on LIST_TAIL. */
static void
queue_pattern (pattern, list_tail, filename, lineno)
rtx pattern;
struct queue_elem ***list_tail;
const char *filename;
int lineno;
queue_pattern (rtx pattern, struct queue_elem ***list_tail,
const char *filename, int lineno)
{
struct queue_elem *e = (struct queue_elem *) xmalloc (sizeof (*e));
e->data = pattern;
......@@ -155,8 +152,7 @@ queue_pattern (pattern, list_tail, filename, lineno)
/* Recursively remove constraints from an rtx. */
static void
remove_constraints (part)
rtx part;
remove_constraints (rtx part)
{
int i, j;
const char *format_ptr;
......@@ -190,9 +186,7 @@ remove_constraints (part)
if the include looks like (include "file"). */
static void
process_include (desc, lineno)
rtx desc;
int lineno;
process_include (rtx desc, int lineno)
{
const char *filename = XSTR (desc, 0);
const char *old_filename;
......@@ -268,9 +262,7 @@ process_include (desc, lineno)
/* Process a top level rtx in some way, queueing as appropriate. */
static void
process_rtx (desc, lineno)
rtx desc;
int lineno;
process_rtx (rtx desc, int lineno)
{
switch (GET_CODE (desc))
{
......@@ -338,8 +330,7 @@ process_rtx (desc, lineno)
a DEFINE_INSN. */
static int
is_predicable (elem)
struct queue_elem *elem;
is_predicable (struct queue_elem *elem)
{
rtvec vec = XVEC (elem->data, 4);
const char *value;
......@@ -427,7 +418,7 @@ is_predicable (elem)
and its default. */
static void
identify_predicable_attribute ()
identify_predicable_attribute (void)
{
struct queue_elem *elem;
char *p_true, *p_false;
......@@ -494,8 +485,7 @@ identify_predicable_attribute ()
/* Return the number of alternatives in constraint S. */
static int
n_alternatives (s)
const char *s;
n_alternatives (const char *s)
{
int n = 1;
......@@ -510,9 +500,7 @@ n_alternatives (s)
operands. */
static void
collect_insn_data (pattern, palt, pmax)
rtx pattern;
int *palt, *pmax;
collect_insn_data (rtx pattern, int *palt, int *pmax)
{
const char *fmt;
enum rtx_code code;
......@@ -568,9 +556,7 @@ collect_insn_data (pattern, palt, pmax)
}
static rtx
alter_predicate_for_insn (pattern, alt, max_op, lineno)
rtx pattern;
int alt, max_op, lineno;
alter_predicate_for_insn (rtx pattern, int alt, int max_op, int lineno)
{
const char *fmt;
enum rtx_code code;
......@@ -659,8 +645,8 @@ alter_predicate_for_insn (pattern, alt, max_op, lineno)
}
static const char *
alter_test_for_insn (ce_elem, insn_elem)
struct queue_elem *ce_elem, *insn_elem;
alter_test_for_insn (struct queue_elem *ce_elem,
struct queue_elem *insn_elem)
{
const char *ce_test, *insn_test;
......@@ -679,10 +665,7 @@ alter_test_for_insn (ce_elem, insn_elem)
adjusted string. */
static char *
shift_output_template (new, old, disp)
char *new;
const char *old;
int disp;
shift_output_template (char *new, const char *old, int disp)
{
while (*old)
{
......@@ -706,9 +689,9 @@ shift_output_template (new, old, disp)
}
static const char *
alter_output_for_insn (ce_elem, insn_elem, alt, max_op)
struct queue_elem *ce_elem, *insn_elem;
int alt, max_op;
alter_output_for_insn (struct queue_elem *ce_elem,
struct queue_elem *insn_elem,
int alt, int max_op)
{
const char *ce_out, *insn_out;
char *new, *p;
......@@ -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. */
static void
process_one_cond_exec (ce_elem)
struct queue_elem *ce_elem;
process_one_cond_exec (struct queue_elem *ce_elem)
{
struct queue_elem *insn_elem;
for (insn_elem = define_insn_queue; insn_elem ; insn_elem = insn_elem->next)
......@@ -845,7 +827,7 @@ process_one_cond_exec (ce_elem)
patterns appropriately. */
static void
process_define_cond_exec ()
process_define_cond_exec (void)
{
struct queue_elem *elem;
......@@ -858,9 +840,7 @@ process_define_cond_exec ()
}
static char *
save_string (s, len)
const char *s;
int len;
save_string (const char *s, int len)
{
register char *result = xmalloc (len + 1);
......@@ -873,9 +853,7 @@ save_string (s, len)
/* The entry point for initializing the reader. */
int
init_md_reader_args (argc, argv)
int argc;
char **argv;
init_md_reader_args (int argc, char **argv)
{
int i;
const char *in_fname;
......@@ -928,8 +906,7 @@ init_md_reader_args (argc, argv)
/* The entry point for initializing the reader. */
int
init_md_reader (filename)
const char *filename;
init_md_reader (const char *filename)
{
FILE *input_file;
int c;
......@@ -987,9 +964,7 @@ init_md_reader (filename)
/* The entry point for reading a single rtx from an md file. */
rtx
read_md_rtx (lineno, seqnr)
int *lineno;
int *seqnr;
read_md_rtx (int *lineno, int *seqnr)
{
struct queue_elem **queue, *elem;
rtx desc;
......@@ -1052,8 +1027,7 @@ read_md_rtx (lineno, seqnr)
/* Compute a hash function of a c_test structure, which is keyed
by its ->expr field. */
hashval_t
hash_c_test (x)
const PTR x;
hash_c_test (const void *x)
{
const struct c_test *a = (const struct c_test *) x;
const unsigned char *base, *s = (const unsigned char *) a->expr;
......@@ -1079,9 +1053,7 @@ hash_c_test (x)
/* Compare two c_test expression structures. */
int
cmp_c_test (x, y)
const PTR x;
const PTR y;
cmp_c_test (const void *x, const void *y)
{
const struct c_test *a = (const struct c_test *) x;
const struct c_test *b = (const struct c_test *) y;
......@@ -1094,8 +1066,7 @@ cmp_c_test (x, y)
at compile time. Returns a tristate: 1 for known true, 0 for
known false, -1 for unknown. */
int
maybe_eval_c_test (expr)
const char *expr;
maybe_eval_c_test (const char *expr)
{
const struct c_test *test;
struct c_test dummy;
......@@ -1117,8 +1088,7 @@ maybe_eval_c_test (expr)
/* Given a string, return the number of comma-separated elements in it.
Return 0 for the null string. */
int
n_comma_elts (s)
const char *s;
n_comma_elts (const char *s)
{
int n;
......@@ -1139,8 +1109,7 @@ n_comma_elts (s)
a comma and an element is ignored. */
const char *
scan_comma_elt (pstr)
const char **pstr;
scan_comma_elt (const char **pstr)
{
const char *start;
const char *p = *pstr;
......
/* 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.
......@@ -24,11 +24,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct obstack;
extern struct obstack *rtl_obstack;
extern int init_md_reader_args PARAMS ((int, char **));
extern int init_md_reader PARAMS ((const char *));
extern rtx read_md_rtx PARAMS ((int *, int *));
extern int init_md_reader_args (int, char **);
extern int init_md_reader (const char *);
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;
/* Set this to 0 to disable automatic elision of insn patterns which
......@@ -46,7 +46,7 @@ extern const int insn_elision_unavailable;
time, return its truth value; else return -1. The test must have
appeared somewhere in the machine description when genconditions
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. */
struct c_test
......@@ -59,11 +59,11 @@ extern const struct c_test insn_conditions[];
extern const size_t n_insn_conditions;
#ifdef __HASHTAB_H__
extern hashval_t hash_c_test PARAMS ((const PTR));
extern int cmp_c_test PARAMS ((const PTR, const PTR));
extern hashval_t hash_c_test (const void *);
extern int cmp_c_test (const void *, const void *);
#endif
extern int n_comma_elts PARAMS ((const char *));
extern const char *scan_comma_elt PARAMS ((const char **));
extern int n_comma_elts (const char *);
extern const char *scan_comma_elt (const char **);
#endif /* GCC_GENSUPPORT_H */
/* Message translation utilities.
Copyright (C) 2001 Free Software Foundation, Inc.
Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -32,7 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
terminal, so it has be set to output messages correctly. */
void
gcc_init_libintl ()
gcc_init_libintl (void)
{
#ifdef HAVE_LC_MESSAGES
setlocale (LC_CTYPE, "");
......@@ -52,8 +52,7 @@ gcc_init_libintl ()
This is for indenting subsequent output. */
size_t
gcc_gettext_width (msgstr)
const char *msgstr;
gcc_gettext_width (const char *msgstr)
{
size_t nwcs = mbstowcs (0, msgstr, 0);
wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t));
......@@ -68,8 +67,7 @@ gcc_gettext_width (msgstr)
the length of the string. */
size_t
gcc_gettext_width (msgstr)
const char *msgstr;
gcc_gettext_width (const char *msgstr)
{
return strlen (msgstr);
}
......
/* 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
it under the terms of the GNU General Public License as published by
......@@ -38,8 +38,8 @@
#endif
#ifdef ENABLE_NLS
extern void gcc_init_libintl PARAMS ((void));
extern size_t gcc_gettext_width PARAMS ((const char *));
extern void gcc_init_libintl (void);
extern size_t gcc_gettext_width (const char *);
#else
/* Stubs. */
# undef textdomain
......
/* List management for the GNU C-Compiler expander.
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.
......@@ -27,7 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "rtl.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. */
......@@ -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
and free_INSN_LIST_list. */
static void
free_list (listp, unused_listp)
rtx *listp, *unused_listp;
free_list (rtx *listp, rtx *unused_listp)
{
rtx link, prev_link;
......@@ -66,8 +65,7 @@ free_list (listp, unused_listp)
node available, we'll use it, otherwise a call to gen_rtx_INSN_LIST
is made. */
rtx
alloc_INSN_LIST (val, next)
rtx val, next;
alloc_INSN_LIST (rtx val, rtx next)
{
rtx r;
......@@ -89,9 +87,7 @@ alloc_INSN_LIST (val, next)
node available, we'll use it, otherwise a call to gen_rtx_EXPR_LIST
is made. */
rtx
alloc_EXPR_LIST (kind, val, next)
int kind;
rtx val, next;
alloc_EXPR_LIST (int kind, rtx val, rtx next)
{
rtx r;
......@@ -111,8 +107,7 @@ alloc_EXPR_LIST (kind, val, next)
/* This function will free up an entire list of EXPR_LIST nodes. */
void
free_EXPR_LIST_list (listp)
rtx *listp;
free_EXPR_LIST_list (rtx *listp)
{
if (*listp == 0)
return;
......@@ -121,8 +116,7 @@ free_EXPR_LIST_list (listp)
/* This function will free up an entire list of INSN_LIST nodes. */
void
free_INSN_LIST_list (listp)
rtx *listp;
free_INSN_LIST_list (rtx *listp)
{
if (*listp == 0)
return;
......@@ -131,8 +125,7 @@ free_INSN_LIST_list (listp)
/* This function will free up an individual EXPR_LIST node. */
void
free_EXPR_LIST_node (ptr)
rtx ptr;
free_EXPR_LIST_node (rtx ptr)
{
XEXP (ptr, 1) = unused_expr_list;
unused_expr_list = ptr;
......@@ -140,8 +133,7 @@ free_EXPR_LIST_node (ptr)
/* This function will free up an individual INSN_LIST node. */
void
free_INSN_LIST_node (ptr)
rtx ptr;
free_INSN_LIST_node (rtx ptr)
{
XEXP (ptr, 1) = unused_insn_list;
unused_insn_list = ptr;
......
/* 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>.
This file is part of GCC.
......@@ -40,9 +40,7 @@ static size_t num_compiler_params;
/* Add the N PARAMS to the current list of compiler parameters. */
void
add_params (params, n)
const param_info params[];
size_t n;
add_params (const param_info params[], size_t n)
{
/* Allocate enough space for the new parameters. */
compiler_params =
......@@ -60,9 +58,7 @@ add_params (params, n)
/* Set the VALUE associated with the parameter given by NAME. */
void
set_param_value (name, value)
const char *name;
int value;
set_param_value (const char *name, int value)
{
size_t i;
......
/* 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>.
This file is part of GCC.
......@@ -59,13 +59,11 @@ extern param_info *compiler_params;
/* Add the N PARAMS to the current list of compiler parameters. */
extern void add_params
PARAMS ((const param_info params[], size_t n));
extern void add_params (const param_info params[], size_t n);
/* Set the VALUE associated with the parameter given by NAME. */
extern void set_param_value
PARAMS ((const char *name, int value));
extern void set_param_value (const char *name, int value);
/* The parameters in use by language-independent code. */
......
......@@ -1735,12 +1735,12 @@ extern rtx find_use_as_address PARAMS ((rtx, rtx, HOST_WIDE_INT));
/* lists.c */
void free_EXPR_LIST_list PARAMS ((rtx *));
void free_INSN_LIST_list PARAMS ((rtx *));
void free_EXPR_LIST_node PARAMS ((rtx));
void free_INSN_LIST_node PARAMS ((rtx));
rtx alloc_INSN_LIST PARAMS ((rtx, rtx));
rtx alloc_EXPR_LIST PARAMS ((int, rtx, rtx));
void free_EXPR_LIST_list (rtx *);
void free_INSN_LIST_list (rtx *);
void free_EXPR_LIST_node (rtx);
void free_INSN_LIST_node (rtx);
rtx alloc_INSN_LIST (rtx, rtx);
rtx alloc_EXPR_LIST (int, rtx, rtx);
/* 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