diff options
author | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-01 15:59:10 +0000 |
---|---|---|
committer | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-01 15:59:10 +0000 |
commit | 1a97be37b9acd218052a467f7b1a26d3be1154f9 (patch) | |
tree | 1ed2af1b719c9ea42b10268e89af837f6cc20554 /gcc/genextract.c | |
parent | 157ed81477280b70dd98c8ffdec26b827d15bdfa (diff) | |
download | gcc-1a97be37b9acd218052a467f7b1a26d3be1154f9.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67296 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genextract.c')
-rw-r--r-- | gcc/genextract.c | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/gcc/genextract.c b/gcc/genextract.c index e80fd202d3f..e63c26288af 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -1,6 +1,6 @@ /* 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. @@ -31,7 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* This structure contains all the information needed to describe one - set of extractions methods. Each method may be used by more than + set of extractions methods. Each method may be used by more than one pattern if the operands are in the same place. The string for each operand describes that path to the operand and @@ -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; @@ -222,11 +219,11 @@ walk_rtx (x, path) duplocs[dup_count] = xstrdup (path); dupnums[dup_count] = XINT (x, 0); dup_count++; - + newpath = (char *) xmalloc (depth + 2); strcpy (newpath, path); newpath[depth + 1] = 0; - + for (i = XVECLEN (x, 1) - 1; i >= 0; i--) { newpath[depth] = (code == MATCH_OP_DUP ? '0' : 'a') + i; @@ -234,7 +231,7 @@ walk_rtx (x, path) } free (newpath); return; - + case MATCH_OPERATOR: oplocs[XINT (x, 0)] = xstrdup (path); op_count = MAX (op_count, XINT (x, 0) + 1); @@ -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; @@ -332,7 +328,7 @@ print_path (path) else abort (); } - + printf ("pat"); for (i = 0; i < len; 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; @@ -458,7 +451,7 @@ from the machine description file `md'. */\n\n"); else printf (" case %d:\n", i); } - + for (i = 0; i < p->op_count; i++) { if (p->oplocs[i] == 0) @@ -522,7 +515,7 @@ record_insn_name (code, name) new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512); insn_name_ptr = (char **) xrealloc (insn_name_ptr, sizeof(char *) * new_size); - memset (insn_name_ptr + insn_name_ptr_size, 0, + memset (insn_name_ptr + insn_name_ptr_size, 0, sizeof(char *) * (new_size - insn_name_ptr_size)); insn_name_ptr_size = new_size; } @@ -537,6 +530,6 @@ record_insn_name (code, name) last_real_name = new = xstrdup (name); last_real_code = code; } - + insn_name_ptr[code] = new; -} +} |