From 16610927c0514cc262acd29ca95824175ca27bc6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 1 Jun 2003 18:02:11 +0200 Subject: [PATCH] genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code. * 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. From-SVN: r67298 --- gcc/genattrtab.c | 783 +++++++++++++++-------------------------------- 1 file changed, 248 insertions(+), 535 deletions(-) diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index f757a4d96fe..86bf972f972 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -1,6 +1,6 @@ /* Generate code from machine description to compute values of attributes. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2002 Free Software Foundation, Inc. + 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) This file is part of GCC. @@ -370,103 +370,97 @@ int optimize = 0; rtx global_rtl[GR_MAX]; rtx pic_offset_table_rtx; -static void attr_hash_add_rtx PARAMS ((int, rtx)); -static void attr_hash_add_string PARAMS ((int, char *)); -static rtx attr_rtx PARAMS ((enum rtx_code, ...)); -static rtx attr_rtx_1 PARAMS ((enum rtx_code, va_list)); -static char *attr_string PARAMS ((const char *, int)); -static rtx check_attr_value PARAMS ((rtx, struct attr_desc *)); -static rtx convert_set_attr_alternative PARAMS ((rtx, struct insn_def *)); -static rtx convert_set_attr PARAMS ((rtx, struct insn_def *)); -static void check_defs PARAMS ((void)); -#if 0 -static rtx convert_const_symbol_ref PARAMS ((rtx, struct attr_desc *)); -#endif -static rtx make_canonical PARAMS ((struct attr_desc *, rtx)); -static struct attr_value *get_attr_value PARAMS ((rtx, struct attr_desc *, int)); -static rtx copy_rtx_unchanging PARAMS ((rtx)); -static rtx copy_boolean PARAMS ((rtx)); -static void expand_delays PARAMS ((void)); -static rtx operate_exp PARAMS ((enum operator, rtx, rtx)); -static void expand_units PARAMS ((void)); -static rtx simplify_knowing PARAMS ((rtx, rtx)); -static rtx encode_units_mask PARAMS ((rtx)); -static void fill_attr PARAMS ((struct attr_desc *)); -static rtx substitute_address PARAMS ((rtx, rtx (*) (rtx), rtx (*) (rtx))); -static void make_length_attrs PARAMS ((void)); -static rtx identity_fn PARAMS ((rtx)); -static rtx zero_fn PARAMS ((rtx)); -static rtx one_fn PARAMS ((rtx)); -static rtx max_fn PARAMS ((rtx)); -static void write_length_unit_log PARAMS ((void)); -static rtx simplify_cond PARAMS ((rtx, int, int)); -#if 0 -static rtx simplify_by_alternatives PARAMS ((rtx, int, int)); -#endif -static rtx simplify_by_exploding PARAMS ((rtx)); -static int find_and_mark_used_attributes PARAMS ((rtx, rtx *, int *)); -static void unmark_used_attributes PARAMS ((rtx, struct dimension *, int)); -static int add_values_to_cover PARAMS ((struct dimension *)); -static int increment_current_value PARAMS ((struct dimension *, int)); -static rtx test_for_current_value PARAMS ((struct dimension *, int)); -static rtx simplify_with_current_value PARAMS ((rtx, struct dimension *, int)); -static rtx simplify_with_current_value_aux PARAMS ((rtx)); -static void clear_struct_flag PARAMS ((rtx)); -static int count_sub_rtxs PARAMS ((rtx, int)); -static void remove_insn_ent PARAMS ((struct attr_value *, struct insn_ent *)); -static void insert_insn_ent PARAMS ((struct attr_value *, struct insn_ent *)); -static rtx insert_right_side PARAMS ((enum rtx_code, rtx, rtx, int, int)); -static rtx make_alternative_compare PARAMS ((int)); -static int compute_alternative_mask PARAMS ((rtx, enum rtx_code)); -static rtx evaluate_eq_attr PARAMS ((rtx, rtx, int, int)); -static rtx simplify_and_tree PARAMS ((rtx, rtx *, int, int)); -static rtx simplify_or_tree PARAMS ((rtx, rtx *, int, int)); -static rtx simplify_test_exp PARAMS ((rtx, int, int)); -static rtx simplify_test_exp_in_temp PARAMS ((rtx, int, int)); -static void optimize_attrs PARAMS ((void)); -static void gen_attr PARAMS ((rtx, int)); -static int count_alternatives PARAMS ((rtx)); -static int compares_alternatives_p PARAMS ((rtx)); -static int contained_in_p PARAMS ((rtx, rtx)); -static void gen_insn PARAMS ((rtx, int)); -static void gen_delay PARAMS ((rtx, int)); -static void gen_unit PARAMS ((rtx, int)); -static void write_test_expr PARAMS ((rtx, int)); -static int max_attr_value PARAMS ((rtx, int*)); -static int or_attr_value PARAMS ((rtx, int*)); -static void walk_attr_value PARAMS ((rtx)); -static void write_attr_get PARAMS ((struct attr_desc *)); -static rtx eliminate_known_true PARAMS ((rtx, rtx, int, int)); -static void write_attr_set PARAMS ((struct attr_desc *, int, rtx, - const char *, const char *, rtx, - int, int)); -static void write_attr_case PARAMS ((struct attr_desc *, struct attr_value *, - int, const char *, const char *, int, rtx)); -static void write_unit_name PARAMS ((const char *, int, const char *)); -static void write_attr_valueq PARAMS ((struct attr_desc *, const char *)); -static void write_attr_value PARAMS ((struct attr_desc *, rtx)); -static void write_upcase PARAMS ((const char *)); -static void write_indent PARAMS ((int)); -static void write_eligible_delay PARAMS ((const char *)); -static void write_function_unit_info PARAMS ((void)); -static void write_complex_function PARAMS ((struct function_unit *, const char *, - const char *)); -static int write_expr_attr_cache PARAMS ((rtx, struct attr_desc *)); -static void write_toplevel_expr PARAMS ((rtx)); -static void write_const_num_delay_slots PARAMS ((void)); -static char *next_comma_elt PARAMS ((const char **)); -static struct attr_desc *find_attr PARAMS ((const char *, int)); -static struct attr_value *find_most_used PARAMS ((struct attr_desc *)); -static rtx find_single_value PARAMS ((struct attr_desc *)); -static void extend_range PARAMS ((struct range *, int, int)); -static rtx attr_eq PARAMS ((const char *, const char *)); -static const char *attr_numeral PARAMS ((int)); -static int attr_equal_p PARAMS ((rtx, rtx)); -static rtx attr_copy_rtx PARAMS ((rtx)); -static int attr_rtx_cost PARAMS ((rtx)); +static void attr_hash_add_rtx (int, rtx); +static void attr_hash_add_string (int, char *); +static rtx attr_rtx (enum rtx_code, ...); +static rtx attr_rtx_1 (enum rtx_code, va_list); +static char *attr_string (const char *, int); +static rtx check_attr_value (rtx, struct attr_desc *); +static rtx convert_set_attr_alternative (rtx, struct insn_def *); +static rtx convert_set_attr (rtx, struct insn_def *); +static void check_defs (void); +static rtx make_canonical (struct attr_desc *, rtx); +static struct attr_value *get_attr_value (rtx, struct attr_desc *, int); +static rtx copy_rtx_unchanging (rtx); +static rtx copy_boolean (rtx); +static void expand_delays (void); +static rtx operate_exp (enum operator, rtx, rtx); +static void expand_units (void); +static rtx simplify_knowing (rtx, rtx); +static rtx encode_units_mask (rtx); +static void fill_attr (struct attr_desc *); +static rtx substitute_address (rtx, rtx (*) (rtx), rtx (*) (rtx)); +static void make_length_attrs (void); +static rtx identity_fn (rtx); +static rtx zero_fn (rtx); +static rtx one_fn (rtx); +static rtx max_fn (rtx); +static void write_length_unit_log (void); +static rtx simplify_cond (rtx, int, int); +static rtx simplify_by_exploding (rtx); +static int find_and_mark_used_attributes (rtx, rtx *, int *); +static void unmark_used_attributes (rtx, struct dimension *, int); +static int add_values_to_cover (struct dimension *); +static int increment_current_value (struct dimension *, int); +static rtx test_for_current_value (struct dimension *, int); +static rtx simplify_with_current_value (rtx, struct dimension *, int); +static rtx simplify_with_current_value_aux (rtx); +static void clear_struct_flag (rtx); +static int count_sub_rtxs (rtx, int); +static void remove_insn_ent (struct attr_value *, struct insn_ent *); +static void insert_insn_ent (struct attr_value *, struct insn_ent *); +static rtx insert_right_side (enum rtx_code, rtx, rtx, int, int); +static rtx make_alternative_compare (int); +static int compute_alternative_mask (rtx, enum rtx_code); +static rtx evaluate_eq_attr (rtx, rtx, int, int); +static rtx simplify_and_tree (rtx, rtx *, int, int); +static rtx simplify_or_tree (rtx, rtx *, int, int); +static rtx simplify_test_exp (rtx, int, int); +static rtx simplify_test_exp_in_temp (rtx, int, int); +static void optimize_attrs (void); +static void gen_attr (rtx, int); +static int count_alternatives (rtx); +static int compares_alternatives_p (rtx); +static int contained_in_p (rtx, rtx); +static void gen_insn (rtx, int); +static void gen_delay (rtx, int); +static void gen_unit (rtx, int); +static void write_test_expr (rtx, int); +static int max_attr_value (rtx, int*); +static int or_attr_value (rtx, int*); +static void walk_attr_value (rtx); +static void write_attr_get (struct attr_desc *); +static rtx eliminate_known_true (rtx, rtx, int, int); +static void write_attr_set (struct attr_desc *, int, rtx, + const char *, const char *, rtx, + int, int); +static void write_attr_case (struct attr_desc *, struct attr_value *, + int, const char *, const char *, int, rtx); +static void write_unit_name (const char *, int, const char *); +static void write_attr_valueq (struct attr_desc *, const char *); +static void write_attr_value (struct attr_desc *, rtx); +static void write_upcase (const char *); +static void write_indent (int); +static void write_eligible_delay (const char *); +static void write_function_unit_info (void); +static void write_complex_function (struct function_unit *, const char *, + const char *); +static int write_expr_attr_cache (rtx, struct attr_desc *); +static void write_toplevel_expr (rtx); +static void write_const_num_delay_slots (void); +static char *next_comma_elt (const char **); +static struct attr_desc *find_attr (const char *, int); +static struct attr_value *find_most_used (struct attr_desc *); +static rtx find_single_value (struct attr_desc *); +static void extend_range (struct range *, int, int); +static rtx attr_eq (const char *, const char *); +static const char *attr_numeral (int); +static int attr_equal_p (rtx, rtx); +static rtx attr_copy_rtx (rtx); +static int attr_rtx_cost (rtx); #define oballoc(size) obstack_alloc (hash_obstack, size) - + /* Hash table for sharing RTL and strings. */ /* Each hash table slot is a bucket containing a chain of these structures. @@ -501,9 +495,7 @@ struct attr_hash *attr_hash_table[RTL_HASH_SIZE]; /* Add an entry to the hash table for RTL with hash code HASHCODE. */ static void -attr_hash_add_rtx (hashcode, rtl) - int hashcode; - rtx rtl; +attr_hash_add_rtx (int hashcode, rtx rtl) { struct attr_hash *h; @@ -518,9 +510,7 @@ attr_hash_add_rtx (hashcode, rtl) /* Add an entry to the hash table for STRING with hash code HASHCODE. */ static void -attr_hash_add_string (hashcode, str) - int hashcode; - char *str; +attr_hash_add_string (int hashcode, char *str) { struct attr_hash *h; @@ -543,9 +533,7 @@ attr_hash_add_string (hashcode, str) rtx attr_rtx (code, [element1, ..., elementn]) */ static rtx -attr_rtx_1 (code, p) - enum rtx_code code; - va_list p; +attr_rtx_1 (enum rtx_code code, va_list p) { rtx rt_val = NULL_RTX;/* RTX to return to caller... */ int hashcode; @@ -723,7 +711,7 @@ attr_rtx (enum rtx_code code, ...) { rtx result; va_list p; - + va_start (p, code); result = attr_rtx_1 (code, p); va_end (p); @@ -740,9 +728,9 @@ attr_printf (unsigned int len, const char *fmt, ...) { char str[256]; va_list p; - + va_start (p, fmt); - + if (len > sizeof str - 1) /* Leave room for \0. */ abort (); @@ -753,16 +741,14 @@ attr_printf (unsigned int len, const char *fmt, ...) } static rtx -attr_eq (name, value) - const char *name, *value; +attr_eq (const char *name, const char *value) { return attr_rtx (EQ_ATTR, attr_string (name, strlen (name)), attr_string (value, strlen (value))); } static const char * -attr_numeral (n) - int n; +attr_numeral (int n) { return XSTR (make_numeric_value (n), 0); } @@ -771,9 +757,7 @@ attr_numeral (n) to be null terminated) with LEN bytes. */ static char * -attr_string (str, len) - const char *str; - int len; +attr_string (const char *str, int len) { struct attr_hash *h; int hashcode; @@ -807,20 +791,18 @@ attr_string (str, len) then they can't be equal unless they are the same object. */ static int -attr_equal_p (x, y) - rtx x, y; +attr_equal_p (rtx x, rtx y) { return (x == y || (! (ATTR_PERMANENT_P (x) && ATTR_PERMANENT_P (y)) && rtx_equal_p (x, y))); } - + /* Copy an attribute value expression, descending to all depths, but not copying any permanent hashed subexpressions. */ static rtx -attr_copy_rtx (orig) - rtx orig; +attr_copy_rtx (rtx orig) { rtx copy; int i, j; @@ -900,7 +882,7 @@ attr_copy_rtx (orig) } return copy; } - + /* Given a test expression for an attribute, ensure it is validly formed. IS_CONST indicates whether the expression is constant for each compiler run (a constant expression may not test any particular insn). @@ -916,10 +898,7 @@ attr_copy_rtx (orig) Return the new expression, if any. */ rtx -check_attr_test (exp, is_const, lineno) - rtx exp; - int is_const; - int lineno; +check_attr_test (rtx exp, int is_const, int lineno) { struct attr_desc *attr; struct attr_value *av; @@ -1057,7 +1036,7 @@ check_attr_test (exp, is_const, lineno) return exp; } - + /* Given an expression, ensure that it is validly formed and that all named attribute values are valid for the given attribute. Issue a fatal error if not. If no attribute is specified, assume a numeric attribute. @@ -1065,9 +1044,7 @@ check_attr_test (exp, is_const, lineno) Return a perhaps modified replacement expression for the value. */ static rtx -check_attr_value (exp, attr) - rtx exp; - struct attr_desc *attr; +check_attr_value (rtx exp, struct attr_desc *attr) { struct attr_value *av; const char *p; @@ -1233,14 +1210,12 @@ check_attr_value (exp, attr) return exp; } - + /* Given an SET_ATTR_ALTERNATIVE expression, convert to the canonical SET. It becomes a COND with each test being (eq_attr "alternative "n") */ static rtx -convert_set_attr_alternative (exp, id) - rtx exp; - struct insn_def *id; +convert_set_attr_alternative (rtx exp, struct insn_def *id) { int num_alt = id->num_alternatives; rtx condexp; @@ -1272,14 +1247,12 @@ convert_set_attr_alternative (exp, id) return attr_rtx (SET, attr_rtx (ATTR, XSTR (exp, 0)), condexp); } - + /* Given a SET_ATTR, convert to the appropriate SET. If a comma-separated list of values is given, convert to SET_ATTR_ALTERNATIVE first. */ static rtx -convert_set_attr (exp, id) - rtx exp; - struct insn_def *id; +convert_set_attr (rtx exp, struct insn_def *id) { rtx newexp; const char *name_ptr; @@ -1305,13 +1278,13 @@ convert_set_attr (exp, id) return convert_set_attr_alternative (newexp, id); } - + /* Scan all definitions, checking for validity. Also, convert any SET_ATTR and SET_ATTR_ALTERNATIVE expressions to the corresponding SET expressions. */ static void -check_defs () +check_defs (void) { struct insn_def *id; struct attr_desc *attr; @@ -1367,68 +1340,14 @@ check_defs () } } } - -#if 0 -/* Given a constant SYMBOL_REF expression, convert to a COND that - explicitly tests each enumerated value. */ -static rtx -convert_const_symbol_ref (exp, attr) - rtx exp; - struct attr_desc *attr; -{ - rtx condexp; - struct attr_value *av; - int i; - int num_alt = 0; - - for (av = attr->first_value; av; av = av->next) - num_alt++; - - /* Make a COND with all tests but the last, and in the original order. - Select the last value via the default. Note that the attr values - are constructed in reverse order. */ - - condexp = rtx_alloc (COND); - XVEC (condexp, 0) = rtvec_alloc ((num_alt - 1) * 2); - av = attr->first_value; - XEXP (condexp, 1) = av->value; - - for (i = num_alt - 2; av = av->next, i >= 0; i--) - { - char *p, *string; - rtx value; - - string = p = (char *) oballoc (2 - + strlen (attr->name) - + strlen (XSTR (av->value, 0))); - strcpy (p, attr->name); - strcat (p, "_"); - strcat (p, XSTR (av->value, 0)); - for (; *p != '\0'; p++) - *p = TOUPPER (*p); - - value = attr_rtx (SYMBOL_REF, string); - ATTR_IND_SIMPLIFIED_P (value) = 1; - - XVECEXP (condexp, 0, 2 * i) = attr_rtx (EQ, exp, value); - - XVECEXP (condexp, 0, 2 * i + 1) = av->value; - } - - return condexp; -} -#endif - /* Given a valid expression for an attribute value, remove any IF_THEN_ELSE expressions by converting them into a COND. This removes cases from this program. Also, replace an attribute value of "*" with the default attribute value. */ static rtx -make_canonical (attr, exp) - struct attr_desc *attr; - rtx exp; +make_canonical (struct attr_desc *attr, rtx exp) { int i; rtx newexp; @@ -1456,21 +1375,8 @@ make_canonical (attr, exp) This makes the COND something that won't be considered an arbitrary expression by walk_attr_value. */ ATTR_IND_SIMPLIFIED_P (exp) = 1; -#if 0 - /* ??? Why do we do this? With attribute values { A B C D E }, this - tends to generate (!(x==A) && !(x==B) && !(x==C) && !(x==D)) rather - than (x==E). */ - exp = convert_const_symbol_ref (exp, attr); - ATTR_IND_SIMPLIFIED_P (exp) = 1; - exp = check_attr_value (exp, attr); - /* Goto COND case since this is now a COND. Note that while the - new expression is rescanned, all symbol_ref notes are marked as - unchanging. */ - goto cond; -#else exp = check_attr_value (exp, attr); break; -#endif case IF_THEN_ELSE: newexp = rtx_alloc (COND); @@ -1514,15 +1420,14 @@ make_canonical (attr, exp) } static rtx -copy_boolean (exp) - rtx exp; +copy_boolean (rtx exp) { if (GET_CODE (exp) == AND || GET_CODE (exp) == IOR) return attr_rtx (GET_CODE (exp), copy_boolean (XEXP (exp, 0)), copy_boolean (XEXP (exp, 1))); return exp; } - + /* Given a value and an attribute description, return a `struct attr_value *' that represents that value. This is either an existing structure, if the value has been previously encountered, or a newly-created structure. @@ -1533,10 +1438,7 @@ copy_boolean (exp) alternatives. */ static struct attr_value * -get_attr_value (value, attr, insn_code) - rtx value; - struct attr_desc *attr; - int insn_code; +get_attr_value (rtx value, struct attr_desc *attr, int insn_code) { struct attr_value *av; int num_alt = 0; @@ -1566,7 +1468,7 @@ get_attr_value (value, attr, insn_code) return av; } - + /* After all DEFINE_DELAYs have been read in, create internal attributes to generate the required routines. @@ -1582,7 +1484,7 @@ get_attr_value (value, attr, insn_code) information needed to handle delay slots. */ static void -expand_delays () +expand_delays (void) { struct delay_desc *delay; rtx condexp; @@ -1664,7 +1566,7 @@ expand_delays () } } } - + /* This function is given a left and right side expression and an operator. Each side is a conditional expression, each alternative of which has a numerical value. The function returns another conditional expression @@ -1674,9 +1576,7 @@ expand_delays () Since this is called early, it must also support IF_THEN_ELSE. */ static rtx -operate_exp (op, left, right) - enum operator op; - rtx left, right; +operate_exp (enum operator op, rtx left, rtx right) { int left_value, right_value; rtx newexp; @@ -1836,7 +1736,7 @@ operate_exp (op, left, right) /* NOTREACHED */ return NULL; } - + /* Once all attributes and DEFINE_FUNCTION_UNITs have been read, we construct a number of attributes. @@ -1870,7 +1770,7 @@ operate_exp (op, left, right) half gives the maximum value. */ static void -expand_units () +expand_units (void) { struct function_unit *unit, **unit_num; struct function_unit_op *op, **op_array, ***unit_ops; @@ -2231,8 +2131,7 @@ expand_units () /* Simplify EXP given KNOWN_TRUE. */ static rtx -simplify_knowing (exp, known_true) - rtx exp, known_true; +simplify_knowing (rtx exp, rtx known_true) { if (GET_CODE (exp) != CONST_STRING) { @@ -2254,8 +2153,7 @@ simplify_knowing (exp, known_true) and only one unit is used or the one's complement of the bitmask. */ static rtx -encode_units_mask (x) - rtx x; +encode_units_mask (rtx x) { int i; int j; @@ -2316,14 +2214,13 @@ encode_units_mask (x) } return x; } - + /* Once all attributes and insns have been read and checked, we construct for each attribute value a list of all the insns that have that value for the attribute. */ static void -fill_attr (attr) - struct attr_desc *attr; +fill_attr (struct attr_desc *attr) { struct attr_value *av; struct insn_ent *ie; @@ -2358,7 +2255,7 @@ fill_attr (attr) insert_insn_ent (av, ie); } } - + /* Given an expression EXP, see if it is a COND or IF_THEN_ELSE that has a test that checks relative positions of insns (uses MATCH_DUP or PC). If so, replace it with what is obtained by passing the expression to @@ -2367,10 +2264,8 @@ fill_attr (attr) return the value returned by NO_ADDRESS_FN applied to EXP. */ static rtx -substitute_address (exp, no_address_fn, address_fn) - rtx exp; - rtx (*no_address_fn) PARAMS ((rtx)); - rtx (*address_fn) PARAMS ((rtx)); +substitute_address (rtx exp, rtx (*no_address_fn) (rtx), + rtx (*address_fn) (rtx)) { int i; rtx newexp; @@ -2420,7 +2315,7 @@ substitute_address (exp, no_address_fn, address_fn) return (*no_address_fn) (exp); } - + /* Make new attributes from the `length' attribute. The following are made, each corresponding to a function called from `shorten_branches' or `get_attr_length': @@ -2441,13 +2336,13 @@ substitute_address (exp, no_address_fn, address_fn) */ static void -make_length_attrs () +make_length_attrs (void) { static const char *const new_names[] = {"*insn_default_length", "*insn_variable_length_p", "*insn_current_length"}; - static rtx (*const no_address_fn[]) PARAMS ((rtx)) = {identity_fn, zero_fn, zero_fn}; - static rtx (*const address_fn[]) PARAMS ((rtx)) = {max_fn, one_fn, identity_fn}; + static rtx (*const no_address_fn[]) (rtx) = {identity_fn, zero_fn, zero_fn}; + static rtx (*const address_fn[]) (rtx) = {max_fn, one_fn, identity_fn}; size_t i; struct attr_desc *length_attr, *new_attr; struct attr_value *av, *new_av; @@ -2491,36 +2386,32 @@ make_length_attrs () /* Utility functions called from above routine. */ static rtx -identity_fn (exp) - rtx exp; +identity_fn (rtx exp) { return exp; } static rtx -zero_fn (exp) - rtx exp ATTRIBUTE_UNUSED; +zero_fn (rtx exp ATTRIBUTE_UNUSED) { return make_numeric_value (0); } static rtx -one_fn (exp) - rtx exp ATTRIBUTE_UNUSED; +one_fn (rtx exp ATTRIBUTE_UNUSED) { return make_numeric_value (1); } static rtx -max_fn (exp) - rtx exp; +max_fn (rtx exp) { int unknown; return make_numeric_value (max_attr_value (exp, &unknown)); } static void -write_length_unit_log () +write_length_unit_log (void) { struct attr_desc *length_attr = find_attr ("length", 0); struct attr_value *av; @@ -2545,7 +2436,7 @@ write_length_unit_log () } printf ("int length_unit_log = %u;\n", length_unit_log); } - + /* Take a COND expression and see if any of the conditions in it can be simplified. If any are known true or known false for the particular insn code, the COND can be further simplified. @@ -2555,9 +2446,7 @@ write_length_unit_log () We do not modify EXP; rather, we make and return a new rtx. */ static rtx -simplify_cond (exp, insn_code, insn_index) - rtx exp; - int insn_code, insn_index; +simplify_cond (rtx exp, int insn_code, int insn_index) { int i, j; /* We store the desired contents here, @@ -2668,13 +2557,11 @@ simplify_cond (exp, insn_code, insn_index) free (tests); return ret; } - + /* Remove an insn entry from an attribute value. */ static void -remove_insn_ent (av, ie) - struct attr_value *av; - struct insn_ent *ie; +remove_insn_ent (struct attr_value *av, struct insn_ent *ie) { struct insn_ent *previe; @@ -2697,9 +2584,7 @@ remove_insn_ent (av, ie) /* Insert an insn entry in an attribute value list. */ static void -insert_insn_ent (av, ie) - struct attr_value *av; - struct insn_ent *ie; +insert_insn_ent (struct attr_value *av, struct insn_ent *ie) { ie->next = av->first_insn; av->first_insn = ie; @@ -2709,7 +2594,7 @@ insert_insn_ent (av, ie) num_insn_ents++; } - + /* This is a utility routine to take an expression that is a tree of either AND or IOR expressions and insert a new term. The new term will be inserted at the right side of the first node whose code does not match @@ -2720,11 +2605,7 @@ insert_insn_ent (av, ie) If the `term' is itself a tree, all its leaves will be inserted. */ static rtx -insert_right_side (code, exp, term, insn_code, insn_index) - enum rtx_code code; - rtx exp; - rtx term; - int insn_code, insn_index; +insert_right_side (enum rtx_code code, rtx exp, rtx term, int insn_code, int insn_index) { rtx newexp; @@ -2776,7 +2657,7 @@ insert_right_side (code, exp, term, insn_code, insn_index) return simplify_test_exp_in_temp (newexp, insn_code, insn_index); } - + /* If we have an expression which AND's a bunch of (not (eq_attrq "alternative" "n")) terms, we may have covered all or all but one of the possible alternatives. @@ -2786,9 +2667,7 @@ insert_right_side (code, exp, term, insn_code, insn_index) bitmask indicating which alternatives are mentioned within EXP. */ static int -compute_alternative_mask (exp, code) - rtx exp; - enum rtx_code code; +compute_alternative_mask (rtx exp, enum rtx_code code) { const char *string; if (GET_CODE (exp) == code) @@ -2816,8 +2695,7 @@ compute_alternative_mask (exp, code) attribute with the value represented by that bit. */ static rtx -make_alternative_compare (mask) - int mask; +make_alternative_compare (int mask) { rtx newexp; int i; @@ -2831,7 +2709,7 @@ make_alternative_compare (mask) return newexp; } - + /* If we are processing an (eq_attr "attr" "value") test, we find the value of "attr" for this insn code. From that value, we can compute a test showing when the EQ_ATTR will be true. This routine performs that @@ -2842,10 +2720,7 @@ make_alternative_compare (mask) for the insn corresponding to INSN_CODE and INSN_INDEX. */ static rtx -evaluate_eq_attr (exp, value, insn_code, insn_index) - rtx exp; - rtx value; - int insn_code, insn_index; +evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index) { rtx orexp, andexp; rtx right; @@ -2950,7 +2825,7 @@ evaluate_eq_attr (exp, value, insn_code, insn_index) else return newexp; } - + /* This routine is called when an AND of a term with a tree of AND's is encountered. If the term or its complement is present in the tree, it can be replaced with TRUE or FALSE, respectively. @@ -2966,10 +2841,7 @@ evaluate_eq_attr (exp, value, insn_code, insn_index) the term. */ static rtx -simplify_and_tree (exp, pterm, insn_code, insn_index) - rtx exp; - rtx *pterm; - int insn_code, insn_index; +simplify_and_tree (rtx exp, rtx *pterm, int insn_code, int insn_index) { rtx left, right; rtx newexp; @@ -3081,14 +2953,11 @@ simplify_and_tree (exp, pterm, insn_code, insn_index) return exp; } - + /* Similar to `simplify_and_tree', but for IOR trees. */ static rtx -simplify_or_tree (exp, pterm, insn_code, insn_index) - rtx exp; - rtx *pterm; - int insn_code, insn_index; +simplify_or_tree (rtx exp, rtx *pterm, int insn_code, int insn_index) { rtx left, right; rtx newexp; @@ -3151,11 +3020,11 @@ simplify_or_tree (exp, pterm, insn_code, insn_index) return exp; } + /* Compute approximate cost of the expression. Used to decide whether expression is cheap enough for inline. */ static int -attr_rtx_cost (x) - rtx x; +attr_rtx_cost (rtx x) { int cost = 0; enum rtx_code code; @@ -3198,16 +3067,13 @@ attr_rtx_cost (x) } return cost; } - /* Simplify test expression and use temporary obstack in order to avoid memory bloat. Use ATTR_IND_SIMPLIFIED to avoid unnecessary simplifications and avoid unnecessary copying if possible. */ static rtx -simplify_test_exp_in_temp (exp, insn_code, insn_index) - rtx exp; - int insn_code, insn_index; +simplify_test_exp_in_temp (rtx exp, int insn_code, int insn_index) { rtx x; struct obstack *old; @@ -3232,9 +3098,7 @@ simplify_test_exp_in_temp (exp, insn_code, insn_index) it occurs here! */ static rtx -simplify_test_exp (exp, insn_code, insn_index) - rtx exp; - int insn_code, insn_index; +simplify_test_exp (rtx exp, int insn_code, int insn_index) { rtx left, right; struct attr_desc *attr; @@ -3499,13 +3363,13 @@ simplify_test_exp (exp, insn_code, insn_index) return newexp; } - + /* Optimize the attribute lists by seeing if we can determine conditional values from the known values of other attributes. This will save subroutine calls during the compilation. */ static void -optimize_attrs () +optimize_attrs (void) { struct attr_desc *attr; struct attr_value *av; @@ -3578,13 +3442,6 @@ optimize_attrs () continue; rtl_obstack = temp_obstack; -#if 0 /* This was intended as a speed up, but it was slower. */ - if (insn_n_alternatives[ie->insn_code] > 6 - && count_sub_rtxs (av->value, 200) >= 200) - newexp = simplify_by_alternatives (av->value, ie->insn_code, - ie->insn_index); - else -#endif newexp = av->value; while (GET_CODE (newexp) == COND) { @@ -3611,46 +3468,12 @@ optimize_attrs () free (insn_code_values - 2); } -#if 0 -static rtx -simplify_by_alternatives (exp, insn_code, insn_index) - rtx exp; - int insn_code, insn_index; -{ - int i; - int len = insn_n_alternatives[insn_code]; - rtx newexp = rtx_alloc (COND); - rtx ultimate; - - XVEC (newexp, 0) = rtvec_alloc (len * 2); - - /* It will not matter what value we use as the default value - of the new COND, since that default will never be used. - Choose something of the right type. */ - for (ultimate = exp; GET_CODE (ultimate) == COND;) - ultimate = XEXP (ultimate, 1); - XEXP (newexp, 1) = ultimate; - - for (i = 0; i < insn_n_alternatives[insn_code]; i++) - { - current_alternative_string = attr_numeral (i); - XVECEXP (newexp, 0, i * 2) = make_alternative_compare (1 << i); - XVECEXP (newexp, 0, i * 2 + 1) - = simplify_cond (exp, insn_code, insn_index); - } - - current_alternative_string = 0; - return simplify_cond (newexp, insn_code, insn_index); -} -#endif - /* If EXP is a suitable expression, reorganize it by constructing an equivalent expression that is a COND with the tests being all combinations of attribute values and the values being simple constants. */ static rtx -simplify_by_exploding (exp) - rtx exp; +simplify_by_exploding (rtx exp) { rtx list = 0, link, condexp, defval = NULL_RTX; struct dimension *space; @@ -3772,7 +3595,7 @@ simplify_by_exploding (exp) /* Give up if nothing is constant. */ if (num_marks == 0) ret = exp; - + /* If all values are the default, use that. */ else if (total == most_tests) ret = defval; @@ -3804,9 +3627,7 @@ simplify_by_exploding (exp) tests have known value. */ static int -find_and_mark_used_attributes (exp, terms, nterms) - rtx exp, *terms; - int *nterms; +find_and_mark_used_attributes (rtx exp, rtx *terms, int *nterms) { int i; @@ -3857,10 +3678,7 @@ find_and_mark_used_attributes (exp, terms, nterms) in the values of the NDIM-dimensional attribute space SPACE. */ static void -unmark_used_attributes (list, space, ndim) - rtx list; - struct dimension *space; - int ndim; +unmark_used_attributes (rtx list, struct dimension *space, int ndim) { rtx link, exp; int i; @@ -3880,8 +3698,7 @@ unmark_used_attributes (list, space, ndim) are tested. Return the updated number of values. */ static int -add_values_to_cover (dim) - struct dimension *dim; +add_values_to_cover (struct dimension *dim) { struct attr_value *av; rtx exp, link, *prev; @@ -3945,9 +3762,7 @@ add_values_to_cover (dim) and return FALSE if the increment overflowed. */ static int -increment_current_value (space, ndim) - struct dimension *space; - int ndim; +increment_current_value (struct dimension *space, int ndim) { int i; @@ -3965,9 +3780,7 @@ increment_current_value (space, ndim) NDIM-dimensional attribute space SPACE. */ static rtx -test_for_current_value (space, ndim) - struct dimension *space; - int ndim; +test_for_current_value (struct dimension *space, int ndim) { int i; rtx exp = true_rtx; @@ -3985,10 +3798,7 @@ test_for_current_value (space, ndim) known EQ_ATTR expressions are set to FALSE. */ static rtx -simplify_with_current_value (exp, space, ndim) - rtx exp; - struct dimension *space; - int ndim; +simplify_with_current_value (rtx exp, struct dimension *space, int ndim) { int i; rtx x; @@ -4018,8 +3828,7 @@ simplify_with_current_value (exp, space, ndim) all EQ_ATTR expressions. */ static rtx -simplify_with_current_value_aux (exp) - rtx exp; +simplify_with_current_value_aux (rtx exp) { int i; rtx cond; @@ -4093,12 +3902,11 @@ simplify_with_current_value_aux (exp) abort (); } } - + /* Clear the ATTR_CURR_SIMPLIFIED_P flag in EXP and its subexpressions. */ static void -clear_struct_flag (x) - rtx x; +clear_struct_flag (rtx x) { int i; int j; @@ -4155,9 +3963,7 @@ clear_struct_flag (x) But if we count more than MAX objects, stop counting. */ static int -count_sub_rtxs (x, max) - rtx x; - int max; +count_sub_rtxs (rtx x, int max) { int i; int j; @@ -4211,13 +4017,11 @@ count_sub_rtxs (x, max) return total; } - + /* Create table entries for DEFINE_ATTR. */ static void -gen_attr (exp, lineno) - rtx exp; - int lineno; +gen_attr (rtx exp, int lineno) { struct attr_desc *attr; struct attr_value *av; @@ -4279,14 +4083,13 @@ gen_attr (exp, lineno) XEXP (exp, 2) = check_attr_value (XEXP (exp, 2), attr); attr->default_val = get_attr_value (XEXP (exp, 2), attr, -2); } - + /* Given a pattern for DEFINE_PEEPHOLE or DEFINE_INSN, return the number of alternatives in the constraints. Assume all MATCH_OPERANDs have the same number of alternatives as this should be checked elsewhere. */ static int -count_alternatives (exp) - rtx exp; +count_alternatives (rtx exp) { int i, j, n; const char *fmt; @@ -4318,13 +4121,12 @@ count_alternatives (exp) return 0; } - + /* Returns nonzero if the given expression contains an EQ_ATTR with the `alternative' attribute. */ static int -compares_alternatives_p (exp) - rtx exp; +compares_alternatives_p (rtx exp) { int i, j; const char *fmt; @@ -4351,13 +4153,11 @@ compares_alternatives_p (exp) return 0; } - + /* Returns nonzero is INNER is contained in EXP. */ static int -contained_in_p (inner, exp) - rtx inner; - rtx exp; +contained_in_p (rtx inner, rtx exp) { int i, j; const char *fmt; @@ -4384,13 +4184,11 @@ contained_in_p (inner, exp) return 0; } - + /* Process DEFINE_PEEPHOLE, DEFINE_INSN, and DEFINE_ASM_ATTRIBUTES. */ static void -gen_insn (exp, lineno) - rtx exp; - int lineno; +gen_insn (rtx exp, int lineno) { struct insn_def *id; @@ -4432,14 +4230,12 @@ gen_insn (exp, lineno) abort (); } } - + /* Process a DEFINE_DELAY. Validate the vector length, check if annul true or annul false is specified, and make a `struct delay_desc'. */ static void -gen_delay (def, lineno) - rtx def; - int lineno; +gen_delay (rtx def, int lineno) { struct delay_desc *delay; int i; @@ -4467,7 +4263,7 @@ gen_delay (def, lineno) delay->lineno = lineno; delays = delay; } - + /* Process a DEFINE_FUNCTION_UNIT. This gives information about a function unit contained in the CPU. @@ -4475,9 +4271,7 @@ gen_delay (def, lineno) with information used later by `expand_unit'. */ static void -gen_unit (def, lineno) - rtx def; - int lineno; +gen_unit (rtx def, int lineno) { struct function_unit *unit; struct function_unit_op *op; @@ -4558,7 +4352,7 @@ gen_unit (def, lineno) which insns are used by the function unit. */ unit->condexp = insert_right_side (IOR, unit->condexp, op->condexp, -2, -2); } - + /* Given a piece of RTX, print a C expression to test its truth value. We use AND and IOR both for logical and bit-wise operations, so interpret them as logical unless they are inside a comparison expression. @@ -4568,9 +4362,7 @@ gen_unit (def, lineno) a cached local variable instead of calling a function. */ static void -write_test_expr (exp, flags) - rtx exp; - int flags; +write_test_expr (rtx exp, int flags) { int comparison_operator = 0; RTX_CODE code; @@ -4810,14 +4602,12 @@ write_test_expr (exp, flags) printf (")"); } - + /* Given an attribute value, return the maximum CONST_STRING argument encountered. Set *UNKNOWNP and return INT_MAX if the value is unknown. */ static int -max_attr_value (exp, unknownp) - rtx exp; - int *unknownp; +max_attr_value (rtx exp, int *unknownp) { int current_max; int i, n; @@ -4859,9 +4649,7 @@ max_attr_value (exp, unknownp) if the numeric value is not known. */ static int -or_attr_value (exp, unknownp) - rtx exp; - int *unknownp; +or_attr_value (rtx exp, int *unknownp) { int current_or; int i; @@ -4891,7 +4679,7 @@ or_attr_value (exp, unknownp) return current_or; } - + /* Scan an attribute value, possibly a conditional, and record what actions will be required to do any conditional tests in it. @@ -4903,8 +4691,7 @@ or_attr_value (exp, unknownp) */ static void -walk_attr_value (exp) - rtx exp; +walk_attr_value (rtx exp) { int i, j; const char *fmt; @@ -4966,12 +4753,11 @@ walk_attr_value (exp) break; } } - + /* Write out a function to obtain the attribute for a given INSN. */ static void -write_attr_get (attr) - struct attr_desc *attr; +write_attr_get (struct attr_desc *attr) { struct attr_value *av, *common_av; @@ -4989,9 +4775,9 @@ write_attr_get (attr) /* If the attribute name starts with a star, the remainder is the name of the subroutine to use, instead of `get_attr_...'. */ if (attr->name[0] == '*') - printf ("%s PARAMS ((rtx));\n", &attr->name[1]); + printf ("%s (rtx);\n", &attr->name[1]); else - printf ("get_attr_%s PARAMS ((%s));\n", attr->name, + printf ("get_attr_%s (%s);\n", attr->name, (attr->is_const ? "void" : "rtx")); /* Write out start of function, then all values with explicit `case' lines, @@ -5058,17 +4844,14 @@ write_attr_get (attr) printf (" }\n}\n\n"); } } - + /* Given an AND tree of known true terms (because we are inside an `if' with that as the condition or are in an `else' clause) and an expression, replace any known true terms with TRUE. Use `simplify_and_tree' to do the bulk of the work. */ static rtx -eliminate_known_true (known_true, exp, insn_code, insn_index) - rtx known_true; - rtx exp; - int insn_code, insn_index; +eliminate_known_true (rtx known_true, rtx exp, int insn_code, int insn_index) { rtx term; @@ -5089,22 +4872,16 @@ eliminate_known_true (known_true, exp, insn_code, insn_index) return exp; } - + /* Write out a series of tests and assignment statements to perform tests and sets of an attribute value. We are passed an indentation amount and prefix and suffix strings to write around each attribute value (e.g., "return" and ";"). */ static void -write_attr_set (attr, indent, value, prefix, suffix, known_true, - insn_code, insn_index) - struct attr_desc *attr; - int indent; - rtx value; - const char *prefix; - const char *suffix; - rtx known_true; - int insn_code, insn_index; +write_attr_set (struct attr_desc *attr, int indent, rtx value, + const char *prefix, const char *suffix, rtx known_true, + int insn_code, int insn_index) { if (GET_CODE (value) == COND) { @@ -5187,18 +4964,13 @@ write_attr_set (attr, indent, value, prefix, suffix, known_true, printf ("%s\n", suffix); } } - + /* Write out the computation for one attribute value. */ static void -write_attr_case (attr, av, write_case_lines, prefix, suffix, indent, - known_true) - struct attr_desc *attr; - struct attr_value *av; - int write_case_lines; - const char *prefix, *suffix; - int indent; - rtx known_true; +write_attr_case (struct attr_desc *attr, struct attr_value *av, + int write_case_lines, const char *prefix, const char *suffix, + int indent, rtx known_true) { struct insn_ent *ie; @@ -5258,13 +5030,11 @@ write_attr_case (attr, av, write_case_lines, prefix, suffix, indent, } printf ("\n"); } - + /* Search for uses of non-const attributes and write code to cache them. */ static int -write_expr_attr_cache (p, attr) - rtx p; - struct attr_desc *attr; +write_expr_attr_cache (rtx p, struct attr_desc *attr) { const char *fmt; int i, ie, j, je; @@ -5313,8 +5083,7 @@ write_expr_attr_cache (p, attr) expressions to cater to older compilers. */ static void -write_toplevel_expr (p) - rtx p; +write_toplevel_expr (rtx p) { struct attr_desc *attr; int i; @@ -5342,14 +5111,11 @@ write_toplevel_expr (p) write_test_expr (p, 3); printf (";\n"); } - + /* Utilities to write names in various forms. */ static void -write_unit_name (prefix, num, suffix) - const char *prefix; - int num; - const char *suffix; +write_unit_name (const char *prefix, int num, const char *suffix) { struct function_unit *unit; @@ -5364,9 +5130,7 @@ write_unit_name (prefix, num, suffix) } static void -write_attr_valueq (attr, s) - struct attr_desc *attr; - const char *s; +write_attr_valueq (struct attr_desc *attr, const char *s) { if (attr->is_numeric) { @@ -5411,9 +5175,7 @@ write_attr_valueq (attr, s) } static void -write_attr_value (attr, value) - struct attr_desc *attr; - rtx value; +write_attr_value (struct attr_desc *attr, rtx value) { int op; @@ -5469,8 +5231,7 @@ write_attr_value (attr, value) } static void -write_upcase (str) - const char *str; +write_upcase (const char *str) { while (*str) { @@ -5481,8 +5242,7 @@ write_upcase (str) } static void -write_indent (indent) - int indent; +write_indent (int indent) { for (; indent > 8; indent -= 8) printf ("\t"); @@ -5490,7 +5250,7 @@ write_indent (indent) for (; indent; indent--) printf (" "); } - + /* Write a subroutine that is given an insn that requires a delay slot, a delay slot ordinal, and a candidate insn. It returns nonzero if the candidate can be placed in the specified delay slot of the insn. @@ -5504,8 +5264,7 @@ write_indent (indent) or "annul_false"). */ static void -write_eligible_delay (kind) - const char *kind; +write_eligible_delay (const char *kind) { struct delay_desc *delay; int max_slots; @@ -5621,12 +5380,12 @@ write_eligible_delay (kind) printf ("}\n\n"); } - + /* Write routines to compute conflict cost for function units. Then write a table describing the available function units. */ static void -write_function_unit_info () +write_function_unit_info (void) { struct function_unit *unit; int i; @@ -5697,9 +5456,9 @@ write_function_unit_info () } static void -write_complex_function (unit, name, connection) - struct function_unit *unit; - const char *name, *connection; +write_complex_function (struct function_unit *unit, + const char *name, + const char *connection) { struct attr_desc *case_attr, *attr; struct attr_value *av, *common_av; @@ -5708,7 +5467,7 @@ write_complex_function (unit, name, connection) int using_case; int i; - printf ("static int %s_unit_%s PARAMS ((rtx, rtx));\n", unit->name, name); + printf ("static int %s_unit_%s (rtx, rtx);\n", unit->name, name); printf ("static int\n"); printf ("%s_unit_%s (executing_insn, candidate_insn)\n", unit->name, name); printf (" rtx executing_insn;\n"); @@ -5789,7 +5548,7 @@ write_complex_function (unit, name, connection) printf (" default:\n abort ();\n"); printf (" }\n}\n\n"); } - + /* This page contains miscellaneous utility routines. */ /* Given a pointer to a (char *), return a malloc'ed string containing the @@ -5797,8 +5556,7 @@ write_complex_function (unit, name, connection) scanned, or the end-of-string. Return NULL if at end of string. */ static char * -next_comma_elt (pstr) - const char **pstr; +next_comma_elt (const char **pstr) { const char *start; @@ -5814,9 +5572,7 @@ next_comma_elt (pstr) is nonzero, build a new attribute, if one does not exist. */ static struct attr_desc * -find_attr (name, create) - const char *name; - int create; +find_attr (const char *name, int create) { struct attr_desc *attr; int index; @@ -5853,10 +5609,7 @@ find_attr (name, create) /* Create internal attribute with the given default value. */ void -make_internal_attr (name, value, special) - const char *name; - rtx value; - int special; +make_internal_attr (const char *name, rtx value, int special) { struct attr_desc *attr; @@ -5877,8 +5630,7 @@ make_internal_attr (name, value, special) /* Find the most used value of an attribute. */ static struct attr_value * -find_most_used (attr) - struct attr_desc *attr; +find_most_used (struct attr_desc *attr) { struct attr_value *av; struct attr_value *most_used; @@ -5898,8 +5650,7 @@ find_most_used (attr) return NULL. */ static rtx -find_single_value (attr) - struct attr_desc *attr; +find_single_value (struct attr_desc *attr) { struct attr_value *av; rtx unique_value; @@ -5920,8 +5671,7 @@ find_single_value (attr) /* Return (attr_value "n") */ rtx -make_numeric_value (n) - int n; +make_numeric_value (int n) { static rtx int_values[20]; rtx exp; @@ -5941,12 +5691,9 @@ make_numeric_value (n) return exp; } - + static void -extend_range (range, min, max) - struct range *range; - int min; - int max; +extend_range (struct range *range, int min, int max) { if (range->min > min) range->min = min; @@ -5955,49 +5702,20 @@ extend_range (range, min, max) } static rtx -copy_rtx_unchanging (orig) - rtx orig; +copy_rtx_unchanging (rtx orig) { -#if 0 - rtx copy; - RTX_CODE code; -#endif - if (ATTR_IND_SIMPLIFIED_P (orig) || ATTR_CURR_SIMPLIFIED_P (orig)) return orig; ATTR_CURR_SIMPLIFIED_P (orig) = 1; return orig; - -#if 0 - code = GET_CODE (orig); - switch (code) - { - case CONST_INT: - case CONST_DOUBLE: - case SYMBOL_REF: - case CODE_LABEL: - return orig; - - default: - break; - } - - copy = rtx_alloc (code); - PUT_MODE (copy, GET_MODE (orig)); - ATTR_IND_SIMPLIFIED_P (copy) = 1; - - memcpy (&XEXP (copy, 0), &XEXP (orig, 0), - GET_RTX_LENGTH (GET_CODE (copy)) * sizeof (rtx)); - return copy; -#endif } /* Determine if an insn has a constant number of delay slots, i.e., the number of delay slots is not a function of the length of the insn. */ static void -write_const_num_delay_slots () +write_const_num_delay_slots (void) { struct attr_desc *attr = find_attr ("*num_delay_slots", 0); struct attr_value *av; @@ -6029,13 +5747,9 @@ write_const_num_delay_slots () printf (" }\n}\n\n"); } } - -extern int main PARAMS ((int, char **)); int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { rtx desc; struct attr_desc *attr; @@ -6101,47 +5815,47 @@ from the machine description file `md'. */\n\n"); case DEFINE_CPU_UNIT: gen_cpu_unit (desc); break; - + case DEFINE_QUERY_CPU_UNIT: gen_query_cpu_unit (desc); break; - + case DEFINE_BYPASS: gen_bypass (desc); break; - + case EXCLUSION_SET: gen_excl_set (desc); break; - + case PRESENCE_SET: gen_presence_set (desc); break; - + case FINAL_PRESENCE_SET: gen_final_presence_set (desc); break; - + case ABSENCE_SET: gen_absence_set (desc); break; - + case FINAL_ABSENCE_SET: gen_final_absence_set (desc); break; - + case DEFINE_AUTOMATON: gen_automaton (desc); break; - + case AUTOMATA_OPTION: gen_automata_option (desc); break; - + case DEFINE_RESERVATION: gen_reserv (desc); break; - + case DEFINE_INSN_RESERVATION: gen_insn_reserv (desc); break; @@ -6286,8 +6000,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; }