From 4682ae0463c9fcc254fe1c8ede9da9133a9956bc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 15 Jun 2003 15:43:32 +0200 Subject: alloc-pool.c: Convert to ISO C90 prototypes. * alloc-pool.c: Convert to ISO C90 prototypes. * alloc-pool.h: Likewise. * alias.c: Likewise. * attribs.c: Likewise. * bb-reorder.c: Likewise. * bitmap.h: Likewise. * bitmap.c: Likewise. * builtins.c: Likewise. * tree.h: Convert prototypes of attribs.c to ISO C90. * basic-block.h: Convert prototypes of bb-reorder.c to ISO C90. * rtl.h: Convert prototypes of alias.c and builtins.c to ISO C90. * expr.h: Convert prototypes of builtins.c to ISO C90. From-SVN: r67975 --- gcc/ChangeLog | 16 ++ gcc/alias.c | 239 +++++++++---------------- gcc/alloc-pool.c | 17 +- gcc/alloc-pool.h | 8 +- gcc/attribs.c | 18 +- gcc/basic-block.h | 4 +- gcc/bb-reorder.c | 82 +++------ gcc/bitmap.c | 104 ++++------- gcc/bitmap.h | 35 ++-- gcc/builtins.c | 510 ++++++++++++++++++------------------------------------ gcc/expr.h | 36 ++-- gcc/rtl.h | 41 +++-- gcc/tree.h | 6 +- 13 files changed, 404 insertions(+), 712 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79f01d3..56d5426 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2003-06-15 Andreas Jaeger + + * alloc-pool.c: Convert to ISO C90 prototypes. + * alloc-pool.h: Likewise. + * alias.c: Likewise. + * attribs.c: Likewise. + * bb-reorder.c: Likewise. + * bitmap.h: Likewise. + * bitmap.c: Likewise. + * builtins.c: Likewise. + + * tree.h: Convert prototypes of attribs.c to ISO C90. + * basic-block.h: Convert prototypes of bb-reorder.c to ISO C90. + * rtl.h: Convert prototypes of alias.c and builtins.c to ISO C90. + * expr.h: Convert prototypes of builtins.c to ISO C90. + 2003-06-15 Roger Sayle * config/i386/i386.md (expsf2, expdf2, expxf2): New patterns to diff --git a/gcc/alias.c b/gcc/alias.c index 6a73d64..a7a5118 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -92,35 +92,34 @@ typedef struct alias_set_entry int has_zero_child; } *alias_set_entry; -static int rtx_equal_for_memref_p PARAMS ((rtx, rtx)); -static rtx find_symbolic_term PARAMS ((rtx)); -rtx get_addr PARAMS ((rtx)); -static int memrefs_conflict_p PARAMS ((int, rtx, int, rtx, - HOST_WIDE_INT)); -static void record_set PARAMS ((rtx, rtx, void *)); -static int base_alias_check PARAMS ((rtx, rtx, enum machine_mode, - enum machine_mode)); -static rtx find_base_value PARAMS ((rtx)); -static int mems_in_disjoint_alias_sets_p PARAMS ((rtx, rtx)); -static int insert_subset_children PARAMS ((splay_tree_node, void*)); -static tree find_base_decl PARAMS ((tree)); -static alias_set_entry get_alias_set_entry PARAMS ((HOST_WIDE_INT)); -static rtx fixed_scalar_and_varying_struct_p PARAMS ((rtx, rtx, rtx, rtx, - int (*) (rtx, int))); -static int aliases_everything_p PARAMS ((rtx)); -static bool nonoverlapping_component_refs_p PARAMS ((tree, tree)); -static tree decl_for_component_ref PARAMS ((tree)); -static rtx adjust_offset_for_component_ref PARAMS ((tree, rtx)); -static int nonoverlapping_memrefs_p PARAMS ((rtx, rtx)); -static int write_dependence_p PARAMS ((rtx, rtx, int)); - -static int nonlocal_mentioned_p_1 PARAMS ((rtx *, void *)); -static int nonlocal_mentioned_p PARAMS ((rtx)); -static int nonlocal_referenced_p_1 PARAMS ((rtx *, void *)); -static int nonlocal_referenced_p PARAMS ((rtx)); -static int nonlocal_set_p_1 PARAMS ((rtx *, void *)); -static int nonlocal_set_p PARAMS ((rtx)); -static void memory_modified_1 PARAMS ((rtx, rtx, void *)); +static int rtx_equal_for_memref_p (rtx, rtx); +static rtx find_symbolic_term (rtx); +rtx get_addr (rtx); +static int memrefs_conflict_p (int, rtx, int, rtx, HOST_WIDE_INT); +static void record_set (rtx, rtx, void *); +static int base_alias_check (rtx, rtx, enum machine_mode, + enum machine_mode); +static rtx find_base_value (rtx); +static int mems_in_disjoint_alias_sets_p (rtx, rtx); +static int insert_subset_children (splay_tree_node, void*); +static tree find_base_decl (tree); +static alias_set_entry get_alias_set_entry (HOST_WIDE_INT); +static rtx fixed_scalar_and_varying_struct_p (rtx, rtx, rtx, rtx, + int (*) (rtx, int)); +static int aliases_everything_p (rtx); +static bool nonoverlapping_component_refs_p (tree, tree); +static tree decl_for_component_ref (tree); +static rtx adjust_offset_for_component_ref (tree, rtx); +static int nonoverlapping_memrefs_p (rtx, rtx); +static int write_dependence_p (rtx, rtx, int); + +static int nonlocal_mentioned_p_1 (rtx *, void *); +static int nonlocal_mentioned_p (rtx); +static int nonlocal_referenced_p_1 (rtx *, void *); +static int nonlocal_referenced_p (rtx); +static int nonlocal_set_p_1 (rtx *, void *); +static int nonlocal_set_p (rtx); +static void memory_modified_1 (rtx, rtx, void *); /* Set up all info needed to perform alias analysis on memory references. */ @@ -213,8 +212,7 @@ static splay_tree alias_sets; such an entry, or NULL otherwise. */ static alias_set_entry -get_alias_set_entry (alias_set) - HOST_WIDE_INT alias_set; +get_alias_set_entry (HOST_WIDE_INT alias_set) { splay_tree_node sn = splay_tree_lookup (alias_sets, (splay_tree_key) alias_set); @@ -226,9 +224,7 @@ get_alias_set_entry (alias_set) the two MEMs cannot alias each other. */ static int -mems_in_disjoint_alias_sets_p (mem1, mem2) - rtx mem1; - rtx mem2; +mems_in_disjoint_alias_sets_p (rtx mem1, rtx mem2) { #ifdef ENABLE_CHECKING /* Perform a basic sanity check. Namely, that there are no alias sets @@ -250,9 +246,7 @@ mems_in_disjoint_alias_sets_p (mem1, mem2) record_alias_subset via splay_tree_foreach. */ static int -insert_subset_children (node, data) - splay_tree_node node; - void *data; +insert_subset_children (splay_tree_node node, void *data) { splay_tree_insert ((splay_tree) data, node->key, node->value); @@ -262,8 +256,7 @@ insert_subset_children (node, data) /* Return 1 if the two specified alias sets may conflict. */ int -alias_sets_conflict_p (set1, set2) - HOST_WIDE_INT set1, set2; +alias_sets_conflict_p (HOST_WIDE_INT set1, HOST_WIDE_INT set2) { alias_set_entry ase; @@ -300,8 +293,7 @@ alias_sets_conflict_p (set1, set2) contain readonly fields, return true as well. */ int -readonly_fields_p (type) - tree type; +readonly_fields_p (tree type) { tree field; @@ -324,8 +316,7 @@ readonly_fields_p (type) NULL_TREE, it means we know nothing about the storage. */ int -objects_must_conflict_p (t1, t2) - tree t1, t2; +objects_must_conflict_p (tree t1, tree t2) { /* If neither has a type specified, we don't know if they'll conflict because we may be using them to store objects of various types, for @@ -364,8 +355,7 @@ objects_must_conflict_p (t1, t2) NULL_TREE is returned. */ static tree -find_base_decl (t) - tree t; +find_base_decl (tree t) { tree d0, d1, d2; @@ -421,8 +411,7 @@ find_base_decl (t) get_inner_reference in T are such that we can address the object in T. */ int -can_address_p (t) - tree t; +can_address_p (tree t) { /* If we're at the end, it is vacuously addressable. */ if (! handled_component_p (t)) @@ -454,8 +443,7 @@ can_address_p (t) expression. Call language-specific routine for help, if needed. */ HOST_WIDE_INT -get_alias_set (t) - tree t; +get_alias_set (tree t) { HOST_WIDE_INT set; @@ -605,7 +593,7 @@ get_alias_set (t) /* Return a brand-new alias set. */ HOST_WIDE_INT -new_alias_set () +new_alias_set (void) { static HOST_WIDE_INT last_alias_set; @@ -625,9 +613,7 @@ new_alias_set () subset of alias set zero. */ void -record_alias_subset (superset, subset) - HOST_WIDE_INT superset; - HOST_WIDE_INT subset; +record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset) { alias_set_entry superset_entry; alias_set_entry subset_entry; @@ -684,8 +670,7 @@ record_alias_subset (superset, subset) function if the individual component aren't addressable. */ void -record_component_aliases (type) - tree type; +record_component_aliases (tree type) { HOST_WIDE_INT superset = get_alias_set (type); tree field; @@ -732,7 +717,7 @@ record_component_aliases (type) spill area. */ HOST_WIDE_INT -get_varargs_alias_set () +get_varargs_alias_set (void) { static HOST_WIDE_INT set = -1; @@ -746,7 +731,7 @@ get_varargs_alias_set () save areas. */ HOST_WIDE_INT -get_frame_alias_set () +get_frame_alias_set (void) { static HOST_WIDE_INT set = -1; @@ -759,8 +744,7 @@ get_frame_alias_set () /* Inside SRC, the source of a SET, find a base address. */ static rtx -find_base_value (src) - rtx src; +find_base_value (rtx src) { unsigned int regno; @@ -930,9 +914,7 @@ static char *reg_seen; static int unique_id; static void -record_set (dest, set, data) - rtx dest, set; - void *data ATTRIBUTE_UNUSED; +record_set (rtx dest, rtx set, void *data ATTRIBUTE_UNUSED) { unsigned regno; rtx src; @@ -1040,10 +1022,7 @@ record_set (dest, set, data) are different. */ void -record_base_value (regno, val, invariant) - unsigned int regno; - rtx val; - int invariant; +record_base_value (unsigned int regno, rtx val, int invariant) { if (regno >= reg_base_value_size) return; @@ -1068,8 +1047,7 @@ record_base_value (regno, val, invariant) changes the offset. */ void -clear_reg_alias_info (reg) - rtx reg; +clear_reg_alias_info (rtx reg) { unsigned int regno = REGNO (reg); @@ -1083,8 +1061,7 @@ clear_reg_alias_info (reg) whose address is the SYMBOL_REF is returned.) */ rtx -canon_rtx (x) - rtx x; +canon_rtx (rtx x) { /* Recursively look for equivalences. */ if (GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER @@ -1123,8 +1100,7 @@ canon_rtx (x) different numbers are, in fact, equivalent. */ static int -rtx_equal_for_memref_p (x, y) - rtx x, y; +rtx_equal_for_memref_p (rtx x, rtx y) { int i; int j; @@ -1175,7 +1151,7 @@ rtx_equal_for_memref_p (x, y) case ADDRESSOF: return (XINT (x, 1) == XINT (y, 1) && rtx_equal_for_memref_p (XEXP (x, 0), - XEXP (y, 0))); + XEXP (y, 0))); default: break; @@ -1203,13 +1179,13 @@ rtx_equal_for_memref_p (x, y) else if (GET_RTX_CLASS (code) == '<' || GET_RTX_CLASS (code) == '2') { return (rtx_equal_for_memref_p (canon_rtx (XEXP (x, 0)), - canon_rtx (XEXP (y, 0))) + canon_rtx (XEXP (y, 0))) && rtx_equal_for_memref_p (canon_rtx (XEXP (x, 1)), canon_rtx (XEXP (y, 1)))); } else if (GET_RTX_CLASS (code) == '1') return rtx_equal_for_memref_p (canon_rtx (XEXP (x, 0)), - canon_rtx (XEXP (y, 0))); + canon_rtx (XEXP (y, 0))); /* Compare the elements. If any pair of corresponding elements fail to match, return 0 for the whole things. @@ -1268,8 +1244,7 @@ rtx_equal_for_memref_p (x, y) X and return it, or return 0 if none found. */ static rtx -find_symbolic_term (x) - rtx x; +find_symbolic_term (rtx x) { int i; enum rtx_code code; @@ -1299,8 +1274,7 @@ find_symbolic_term (x) } rtx -find_base_term (x) - rtx x; +find_base_term (rtx x) { cselib_val *val; struct elt_loc_list *l; @@ -1432,9 +1406,8 @@ find_base_term (x) objects, 1 if they might be pointers to the same object. */ static int -base_alias_check (x, y, x_mode, y_mode) - rtx x, y; - enum machine_mode x_mode, y_mode; +base_alias_check (rtx x, rtx y, enum machine_mode x_mode, + enum machine_mode y_mode) { rtx x_base = find_base_term (x); rtx y_base = find_base_term (y); @@ -1513,8 +1486,7 @@ base_alias_check (x, y, x_mode, y_mode) a more useful rtx. */ rtx -get_addr (x) - rtx x; +get_addr (rtx x) { cselib_val *v; struct elt_loc_list *l; @@ -1538,10 +1510,7 @@ get_addr (x) is not modified by the memory reference then ADDR is returned. */ rtx -addr_side_effect_eval (addr, size, n_refs) - rtx addr; - int size; - int n_refs; +addr_side_effect_eval (rtx addr, int size, int n_refs) { int offset = 0; @@ -1593,10 +1562,7 @@ addr_side_effect_eval (addr, size, n_refs) local variables had their addresses taken, but that's too hard now. */ static int -memrefs_conflict_p (xsize, x, ysize, y, c) - rtx x, y; - int xsize, ysize; - HOST_WIDE_INT c; +memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) { if (GET_CODE (x) == VALUE) x = get_addr (x); @@ -1816,9 +1782,7 @@ memrefs_conflict_p (xsize, x, ysize, y, c) only be a dependence here if both reads are volatile. */ int -read_dependence (mem, x) - rtx mem; - rtx x; +read_dependence (rtx mem, rtx x) { return MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem); } @@ -1832,10 +1796,9 @@ read_dependence (mem, x) MEM1_ADDR and MEM2_ADDR are the addresses of MEM1 and MEM2. */ static rtx -fixed_scalar_and_varying_struct_p (mem1, mem2, mem1_addr, mem2_addr, varies_p) - rtx mem1, mem2; - rtx mem1_addr, mem2_addr; - int (*varies_p) PARAMS ((rtx, int)); +fixed_scalar_and_varying_struct_p (rtx mem1, rtx mem2, rtx mem1_addr, + rtx mem2_addr, + int (*varies_p) (rtx, int)) { if (! flag_strict_aliasing) return NULL_RTX; @@ -1859,8 +1822,7 @@ fixed_scalar_and_varying_struct_p (mem1, mem2, mem1_addr, mem2_addr, varies_p) indicates that it might well alias *anything*. */ static int -aliases_everything_p (mem) - rtx mem; +aliases_everything_p (rtx mem) { if (GET_CODE (XEXP (mem, 0)) == AND) /* If the address is an AND, its very hard to know at what it is @@ -1874,8 +1836,7 @@ aliases_everything_p (mem) overlap for any pair of objects. */ static bool -nonoverlapping_component_refs_p (x, y) - tree x, y; +nonoverlapping_component_refs_p (tree x, tree y) { tree fieldx, fieldy, typex, typey, orig_y; @@ -1931,8 +1892,7 @@ nonoverlapping_component_refs_p (x, y) /* Look at the bottom of the COMPONENT_REF list for a DECL, and return it. */ static tree -decl_for_component_ref (x) - tree x; +decl_for_component_ref (tree x) { do { @@ -1947,9 +1907,7 @@ decl_for_component_ref (x) offset of the field reference. */ static rtx -adjust_offset_for_component_ref (x, offset) - tree x; - rtx offset; +adjust_offset_for_component_ref (tree x, rtx offset) { HOST_WIDE_INT ioffset; @@ -1978,8 +1936,7 @@ adjust_offset_for_component_ref (x, offset) X and Y and they do not overlap. */ static int -nonoverlapping_memrefs_p (x, y) - rtx x, y; +nonoverlapping_memrefs_p (rtx x, rtx y) { tree exprx = MEM_EXPR (x), expry = MEM_EXPR (y); rtx rtlx, rtly; @@ -2105,11 +2062,8 @@ nonoverlapping_memrefs_p (x, y) /* True dependence: X is read after store in MEM takes place. */ int -true_dependence (mem, mem_mode, x, varies) - rtx mem; - enum machine_mode mem_mode; - rtx x; - int (*varies) PARAMS ((rtx, int)); +true_dependence (rtx mem, enum machine_mode mem_mode, rtx x, + int (*varies) (rtx, int)) { rtx x_addr, mem_addr; rtx base; @@ -2189,10 +2143,8 @@ true_dependence (mem, mem_mode, x, varies) this value prior to canonicalizing. */ int -canon_true_dependence (mem, mem_mode, mem_addr, x, varies) - rtx mem, mem_addr, x; - enum machine_mode mem_mode; - int (*varies) PARAMS ((rtx, int)); +canon_true_dependence (rtx mem, enum machine_mode mem_mode, rtx mem_addr, + rtx x, int (*varies) (rtx, int)) { rtx x_addr; @@ -2253,10 +2205,7 @@ canon_true_dependence (mem, mem_mode, mem_addr, x, varies) (or, if WRITEP is nonzero, a write to) MEM. */ static int -write_dependence_p (mem, x, writep) - rtx mem; - rtx x; - int writep; +write_dependence_p (rtx mem, rtx x, int writep) { rtx x_addr, mem_addr; rtx fixed_scalar; @@ -2322,9 +2271,7 @@ write_dependence_p (mem, x, writep) /* Anti dependence: X is written after read in MEM takes place. */ int -anti_dependence (mem, x) - rtx mem; - rtx x; +anti_dependence (rtx mem, rtx x) { return write_dependence_p (mem, x, /*writep=*/0); } @@ -2332,9 +2279,7 @@ anti_dependence (mem, x) /* Output dependence: X is written after store in MEM takes place. */ int -output_dependence (mem, x) - rtx mem; - rtx x; +output_dependence (rtx mem, rtx x) { return write_dependence_p (mem, x, /*writep=*/1); } @@ -2343,9 +2288,7 @@ output_dependence (mem, x) something which is not local to the function and is not constant. */ static int -nonlocal_mentioned_p_1 (loc, data) - rtx *loc; - void *data ATTRIBUTE_UNUSED; +nonlocal_mentioned_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) { rtx x = *loc; rtx base; @@ -2443,8 +2386,7 @@ nonlocal_mentioned_p_1 (loc, data) local to the function and is not constant. */ static int -nonlocal_mentioned_p (x) - rtx x; +nonlocal_mentioned_p (rtx x) { if (INSN_P (x)) { @@ -2467,9 +2409,7 @@ nonlocal_mentioned_p (x) something which is not local to the function and is not constant. */ static int -nonlocal_referenced_p_1 (loc, data) - rtx *loc; - void *data ATTRIBUTE_UNUSED; +nonlocal_referenced_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) { rtx x = *loc; @@ -2540,8 +2480,7 @@ nonlocal_referenced_p_1 (loc, data) local to the function and is not constant. */ static int -nonlocal_referenced_p (x) - rtx x; +nonlocal_referenced_p (rtx x) { if (INSN_P (x)) { @@ -2564,9 +2503,7 @@ nonlocal_referenced_p (x) something which is not local to the function and is not constant. */ static int -nonlocal_set_p_1 (loc, data) - rtx *loc; - void *data ATTRIBUTE_UNUSED; +nonlocal_set_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) { rtx x = *loc; @@ -2619,8 +2556,7 @@ nonlocal_set_p_1 (loc, data) local to the function and is not constant. */ static int -nonlocal_set_p (x) - rtx x; +nonlocal_set_p (rtx x) { if (INSN_P (x)) { @@ -2642,7 +2578,7 @@ nonlocal_set_p (x) /* Mark the function if it is pure or constant. */ void -mark_constant_function () +mark_constant_function (void) { rtx insn; int nonlocal_memory_referenced; @@ -2697,7 +2633,7 @@ mark_constant_function () void -init_alias_once () +init_alias_once (void) { int i; @@ -2731,9 +2667,7 @@ init_alias_once () to be memory reference. */ static bool memory_modified; static void -memory_modified_1 (x, pat, data) - rtx x, pat ATTRIBUTE_UNUSED; - void *data; +memory_modified_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data) { if (GET_CODE (x) == MEM) { @@ -2746,8 +2680,7 @@ memory_modified_1 (x, pat, data) /* Return true when INSN possibly modify memory contents of MEM (ie address can be modified). */ bool -memory_modified_in_insn_p (mem, insn) - rtx mem, insn; +memory_modified_in_insn_p (rtx mem, rtx insn) { if (!INSN_P (insn)) return false; @@ -2760,7 +2693,7 @@ memory_modified_in_insn_p (mem, insn) array. */ void -init_alias_analysis () +init_alias_analysis (void) { int maxreg = max_reg_num (); int changed, pass; @@ -2979,7 +2912,7 @@ init_alias_analysis () } void -end_alias_analysis () +end_alias_analysis (void) { free (reg_known_value + FIRST_PSEUDO_REGISTER); reg_known_value = 0; diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c index 87b05cc..e247b14 100644 --- a/gcc/alloc-pool.c +++ b/gcc/alloc-pool.c @@ -30,7 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA special abort includes one or both. toplev.h gets too few files, system.h gets too many. */ -extern void fancy_abort PARAMS ((const char *, int, const char *)) +extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__) @@ -80,10 +80,7 @@ static ALLOC_POOL_ID_TYPE last_id; allocate. */ alloc_pool -create_alloc_pool (name, size, num) - const char *name; - size_t size; - size_t num; +create_alloc_pool (const char *name, size_t size, size_t num) { alloc_pool pool; size_t pool_size, header_size; @@ -143,8 +140,7 @@ create_alloc_pool (name, size, num) /* Free all memory allocated for the given memory pool. */ void -free_alloc_pool (pool) - alloc_pool pool; +free_alloc_pool (alloc_pool pool) { alloc_pool_list block, next_block; @@ -166,8 +162,7 @@ free_alloc_pool (pool) /* Allocates one element from the pool specified. */ void * -pool_alloc (pool) - alloc_pool pool; +pool_alloc (alloc_pool pool) { alloc_pool_list header; char *block; @@ -225,9 +220,7 @@ pool_alloc (pool) /* Puts PTR back on POOL's free list. */ void -pool_free (pool, ptr) - alloc_pool pool; - void *ptr; +pool_free (alloc_pool pool, void *ptr) { alloc_pool_list header; diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h index 0310caf..48d0172 100644 --- a/gcc/alloc-pool.h +++ b/gcc/alloc-pool.h @@ -47,8 +47,8 @@ typedef struct alloc_pool_def } *alloc_pool; -extern alloc_pool create_alloc_pool PARAMS ((const char *, size_t, size_t)); -extern void free_alloc_pool PARAMS ((alloc_pool)); -extern void *pool_alloc PARAMS ((alloc_pool)); -extern void pool_free PARAMS ((alloc_pool, void *)); +extern alloc_pool create_alloc_pool (const char *, size_t, size_t); +extern void free_alloc_pool (alloc_pool); +extern void *pool_alloc (alloc_pool); +extern void pool_free (alloc_pool, void *); #endif diff --git a/gcc/attribs.c b/gcc/attribs.c index 313ebbf..6ddacb1 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -1,6 +1,6 @@ /* Functions dealing with attribute handling, used by most front ends. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002 Free Software Foundation, Inc. + 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "target.h" #include "langhooks.h" -static void init_attributes PARAMS ((void)); +static void init_attributes (void); /* Table of the tables of attributes (common, language, format, machine) searched. */ @@ -53,7 +53,7 @@ static const struct attribute_spec empty_attribute_table[] = if --enable-checking. */ static void -init_attributes () +init_attributes (void) { size_t i; @@ -141,9 +141,7 @@ init_attributes () and ATTR_FLAG_BUILT_IN set. */ tree -decl_attributes (node, attributes, flags) - tree *node, attributes; - int flags; +decl_attributes (tree *node, tree attributes, int flags) { tree a; tree returned_attrs = NULL_TREE; @@ -317,9 +315,7 @@ decl_attributes (node, attributes, flags) resulting attributes together the way decl_attributes expects them. */ void -split_specs_attrs (specs_attrs, declspecs, prefix_attributes) - tree specs_attrs; - tree *declspecs, *prefix_attributes; +split_specs_attrs (tree specs_attrs, tree *declspecs, tree *prefix_attributes) { tree t, s, a, next, specs, attrs; @@ -394,8 +390,7 @@ split_specs_attrs (specs_attrs, declspecs, prefix_attributes) A warning is issued for every ignored attribute. */ tree -strip_attrs (specs_attrs) - tree specs_attrs; +strip_attrs (tree specs_attrs) { tree specs, attrs; @@ -410,4 +405,3 @@ strip_attrs (specs_attrs) return specs; } - diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 252774e..9e57f19 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -542,7 +542,6 @@ extern bool probably_never_executed_bb_p PARAMS ((basic_block)); /* In flow.c */ extern void init_flow PARAMS ((void)); -extern void reorder_basic_blocks PARAMS ((void)); extern void dump_bb PARAMS ((basic_block, FILE *)); extern void debug_bb PARAMS ((basic_block)); extern basic_block debug_bb_n PARAMS ((int)); @@ -619,6 +618,9 @@ extern rtx hoist_insn_to_edge PARAMS ((rtx, edge, rtx, rtx)); extern bool inside_basic_block_p PARAMS ((rtx)); extern bool control_flow_insn_p PARAMS ((rtx)); +/* In bb-reorder.c */ +extern void reorder_basic_blocks (void); + /* In dominance.c */ enum cdi_direction diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 312021b..7d221c6 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -141,29 +141,24 @@ int max_entry_frequency; gcov_type max_entry_count; /* Local function prototypes. */ -static void find_traces PARAMS ((int *, struct trace *)); -static basic_block rotate_loop PARAMS ((edge, struct trace *, int)); -static void mark_bb_visited PARAMS ((basic_block, int)); -static void find_traces_1_round PARAMS ((int, int, gcov_type, - struct trace *, int *, int, - fibheap_t *)); -static basic_block copy_bb PARAMS ((basic_block, edge, - basic_block, int)); -static fibheapkey_t bb_to_key PARAMS ((basic_block)); -static bool better_edge_p PARAMS ((basic_block, edge, int, int, - int, int)); -static void connect_traces PARAMS ((int, struct trace *)); -static bool copy_bb_p PARAMS ((basic_block, int)); -static int get_uncond_jump_length PARAMS ((void)); +static void find_traces (int *, struct trace *); +static basic_block rotate_loop (edge, struct trace *, int); +static void mark_bb_visited (basic_block, int); +static void find_traces_1_round (int, int, gcov_type, struct trace *, int *, + int, fibheap_t *); +static basic_block copy_bb (basic_block, edge, basic_block, int); +static fibheapkey_t bb_to_key (basic_block); +static bool better_edge_p (basic_block, edge, int, int, int, int); +static void connect_traces (int, struct trace *); +static bool copy_bb_p (basic_block, int); +static int get_uncond_jump_length (void); /* Find the traces for Software Trace Cache. Chain each trace through RBI()->next. Store the number of traces to N_TRACES and description of traces to TRACES. */ static void -find_traces (n_traces, traces) - int *n_traces; - struct trace *traces; +find_traces (int *n_traces, struct trace *traces) { int i; edge e; @@ -222,10 +217,7 @@ find_traces (n_traces, traces) (with sequential number TRACE_N). */ static basic_block -rotate_loop (back_edge, trace, trace_n) - edge back_edge; - struct trace *trace; - int trace_n; +rotate_loop (edge back_edge, struct trace *trace, int trace_n) { basic_block bb; @@ -339,9 +331,7 @@ rotate_loop (back_edge, trace, trace_n) /* This function marks BB that it was visited in trace number TRACE. */ static void -mark_bb_visited (bb, trace) - basic_block bb; - int trace; +mark_bb_visited (basic_block bb, int trace) { RBI (bb)->visited = trace; if (bbd[bb->index].heap) @@ -361,15 +351,9 @@ mark_bb_visited (bb, trace) *HEAP and stores starting points for the next round into new *HEAP. */ static void -find_traces_1_round (branch_th, exec_th, count_th, traces, n_traces, round, - heap) - int branch_th; - int exec_th; - gcov_type count_th; - struct trace *traces; - int *n_traces; - int round; - fibheap_t *heap; +find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, + struct trace *traces, int *n_traces, int round, + fibheap_t *heap) { /* Heap for discarded basic blocks which are possible starting points for the next round. */ @@ -664,11 +648,7 @@ find_traces_1_round (branch_th, exec_th, count_th, traces, n_traces, round, (TRACE is a number of trace which OLD_BB is duplicated to). */ static basic_block -copy_bb (old_bb, e, bb, trace) - basic_block old_bb; - edge e; - basic_block bb; - int trace; +copy_bb (basic_block old_bb, edge e, basic_block bb, int trace) { basic_block new_bb; @@ -716,8 +696,7 @@ copy_bb (old_bb, e, bb, trace) /* Compute and return the key (for the heap) of the basic block BB. */ static fibheapkey_t -bb_to_key (bb) - basic_block bb; +bb_to_key (basic_block bb) { edge e; @@ -755,13 +734,8 @@ bb_to_key (bb) BEST_PROB; similarly for frequency. */ static bool -better_edge_p (bb, e, prob, freq, best_prob, best_freq) - basic_block bb; - edge e; - int prob; - int freq; - int best_prob; - int best_freq; +better_edge_p (basic_block bb, edge e, int prob, int freq, int best_prob, + int best_freq) { bool is_better_edge; @@ -798,9 +772,7 @@ better_edge_p (bb, e, prob, freq, best_prob, best_freq) /* Connect traces in array TRACES, N_TRACES is the count of traces. */ static void -connect_traces (n_traces, traces) - int n_traces; - struct trace *traces; +connect_traces (int n_traces, struct trace *traces) { int i; bool *connected; @@ -1022,9 +994,7 @@ connect_traces (n_traces, traces) when code size is allowed to grow by duplication. */ static bool -copy_bb_p (bb, code_may_grow) - basic_block bb; - int code_may_grow; +copy_bb_p (basic_block bb, int code_may_grow) { int size = 0; int max_size = uncond_jump_length; @@ -1063,7 +1033,7 @@ copy_bb_p (bb, code_may_grow) /* Return the length of unconditional jump instruction. */ static int -get_uncond_jump_length () +get_uncond_jump_length (void) { rtx label, jump; int length; @@ -1081,7 +1051,7 @@ get_uncond_jump_length () /* Reorder basic blocks. The main entry point to this file. */ void -reorder_basic_blocks () +reorder_basic_blocks (void) { int n_traces; int i; @@ -1100,7 +1070,7 @@ reorder_basic_blocks () /* We are estimating the lenght of uncond jump insn only once since the code for getting the insn lenght always returns the minimal length now. */ - if (uncond_jump_length == 0) + if (uncond_jump_length == 0) uncond_jump_length = get_uncond_jump_length (); /* We need to know some information for each basic block. */ diff --git a/gcc/bitmap.c b/gcc/bitmap.c index f631543..f03f3e2 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -46,18 +46,16 @@ bitmap_element bitmap_zero_bits; /* An element of all zero bits. */ static bitmap_element *bitmap_free; /* Freelist of bitmap elements. */ static GTY((deletable (""))) bitmap_element *bitmap_ggc_free; -static void bitmap_elem_to_freelist PARAMS ((bitmap, bitmap_element *)); -static void bitmap_element_free PARAMS ((bitmap, bitmap_element *)); -static bitmap_element *bitmap_element_allocate PARAMS ((bitmap)); -static int bitmap_element_zerop PARAMS ((bitmap_element *)); -static void bitmap_element_link PARAMS ((bitmap, bitmap_element *)); -static bitmap_element *bitmap_find_bit PARAMS ((bitmap, unsigned int)); +static void bitmap_elem_to_freelist (bitmap, bitmap_element *); +static void bitmap_element_free (bitmap, bitmap_element *); +static bitmap_element *bitmap_element_allocate (bitmap); +static int bitmap_element_zerop (bitmap_element *); +static void bitmap_element_link (bitmap, bitmap_element *); +static bitmap_element *bitmap_find_bit (bitmap, unsigned int); /* Add ELEM to the appropriate freelist. */ static INLINE void -bitmap_elem_to_freelist (head, elt) - bitmap head; - bitmap_element *elt; +bitmap_elem_to_freelist (bitmap head, bitmap_element *elt) { if (head->using_obstack) { @@ -75,9 +73,7 @@ bitmap_elem_to_freelist (head, elt) bitmap_obstack, "free" actually means "put onto the freelist". */ static INLINE void -bitmap_element_free (head, elt) - bitmap head; - bitmap_element *elt; +bitmap_element_free (bitmap head, bitmap_element *elt) { bitmap_element *next = elt->next; bitmap_element *prev = elt->prev; @@ -105,8 +101,7 @@ bitmap_element_free (head, elt) /* Allocate a bitmap element. The bits are cleared, but nothing else is. */ static INLINE bitmap_element * -bitmap_element_allocate (head) - bitmap head; +bitmap_element_allocate (bitmap head) { bitmap_element *element; @@ -159,7 +154,7 @@ bitmap_element_allocate (head) /* Release any memory allocated by bitmaps. */ void -bitmap_release_memory () +bitmap_release_memory (void) { bitmap_free = 0; if (bitmap_obstack_init) @@ -172,8 +167,7 @@ bitmap_release_memory () /* Return nonzero if all bits in an element are zero. */ static INLINE int -bitmap_element_zerop (element) - bitmap_element *element; +bitmap_element_zerop (bitmap_element *element) { #if BITMAP_ELEMENT_WORDS == 2 return (element->bits[0] | element->bits[1]) == 0; @@ -191,9 +185,7 @@ bitmap_element_zerop (element) /* Link the bitmap element into the current bitmap linked list. */ static INLINE void -bitmap_element_link (head, element) - bitmap head; - bitmap_element *element; +bitmap_element_link (bitmap head, bitmap_element *element) { unsigned int indx = element->indx; bitmap_element *ptr; @@ -248,8 +240,7 @@ bitmap_element_link (head, element) /* Clear a bitmap by freeing the linked list. */ INLINE void -bitmap_clear (head) - bitmap head; +bitmap_clear (bitmap head) { bitmap_element *element, *next; @@ -265,9 +256,7 @@ bitmap_clear (head) /* Copy a bitmap to another bitmap. */ void -bitmap_copy (to, from) - bitmap to; - bitmap from; +bitmap_copy (bitmap to, bitmap from) { bitmap_element *from_ptr, *to_ptr = 0; #if BITMAP_ELEMENT_WORDS != 2 @@ -316,9 +305,7 @@ bitmap_copy (to, from) faster. */ static INLINE bitmap_element * -bitmap_find_bit (head, bit) - bitmap head; - unsigned int bit; +bitmap_find_bit (bitmap head, unsigned int bit) { bitmap_element *element; unsigned int indx = bit / BITMAP_ELEMENT_ALL_BITS; @@ -352,9 +339,7 @@ bitmap_find_bit (head, bit) /* Clear a single bit in a bitmap. */ void -bitmap_clear_bit (head, bit) - bitmap head; - int bit; +bitmap_clear_bit (bitmap head, int bit) { bitmap_element *ptr = bitmap_find_bit (head, bit); @@ -373,9 +358,7 @@ bitmap_clear_bit (head, bit) /* Set a single bit in a bitmap. */ void -bitmap_set_bit (head, bit) - bitmap head; - int bit; +bitmap_set_bit (bitmap head, int bit) { bitmap_element *ptr = bitmap_find_bit (head, bit); unsigned word_num = bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS; @@ -396,9 +379,7 @@ bitmap_set_bit (head, bit) /* Return whether a bit is set within a bitmap. */ int -bitmap_bit_p (head, bit) - bitmap head; - int bit; +bitmap_bit_p (bitmap head, int bit) { bitmap_element *ptr; unsigned bit_num; @@ -418,8 +399,7 @@ bitmap_bit_p (head, bit) if the bitmap is empty. */ int -bitmap_first_set_bit (a) - bitmap a; +bitmap_first_set_bit (bitmap a) { bitmap_element *ptr = a->first; BITMAP_WORD word; @@ -471,8 +451,7 @@ bitmap_first_set_bit (a) if the bitmap is empty. */ int -bitmap_last_set_bit (a) - bitmap a; +bitmap_last_set_bit (bitmap a) { bitmap_element *ptr = a->first; BITMAP_WORD word; @@ -524,11 +503,8 @@ bitmap_last_set_bit (a) a specific bit manipulation. Return true if TO changes. */ int -bitmap_operation (to, from1, from2, operation) - bitmap to; - bitmap from1; - bitmap from2; - enum bitmap_bits operation; +bitmap_operation (bitmap to, bitmap from1, bitmap from2, + enum bitmap_bits operation) { #define HIGHEST_INDEX (unsigned int) ~0 @@ -687,14 +663,12 @@ bitmap_operation (to, from1, from2, operation) /* Return true if two bitmaps are identical. */ int -bitmap_equal_p (a, b) - bitmap a; - bitmap b; +bitmap_equal_p (bitmap a, bitmap b) { bitmap_head c; int ret; - memset (&c, 0, sizeof (c)); + memset (&c, 0, sizeof (c)); ret = ! bitmap_operation (&c, a, b, BITMAP_XOR); bitmap_clear (&c); @@ -705,10 +679,7 @@ bitmap_equal_p (a, b) bitmap FROM2. */ void -bitmap_ior_and_compl (to, from1, from2) - bitmap to; - bitmap from1; - bitmap from2; +bitmap_ior_and_compl (bitmap to, bitmap from1, bitmap from2) { bitmap_head tmp; @@ -721,11 +692,7 @@ bitmap_ior_and_compl (to, from1, from2) } int -bitmap_union_of_diff (dst, a, b, c) - bitmap dst; - bitmap a; - bitmap b; - bitmap c; +bitmap_union_of_diff (bitmap dst, bitmap a, bitmap b, bitmap c) { bitmap_head tmp; int changed; @@ -743,13 +710,11 @@ bitmap_union_of_diff (dst, a, b, c) /* Initialize a bitmap header. */ bitmap -bitmap_initialize (head, using_obstack) - bitmap head; - int using_obstack; +bitmap_initialize (bitmap head, int using_obstack) { if (head == NULL && ! using_obstack) head = ggc_alloc (sizeof (*head)); - + head->first = head->current = 0; head->using_obstack = using_obstack; @@ -759,9 +724,7 @@ bitmap_initialize (head, using_obstack) /* Debugging function to print out the contents of a bitmap. */ void -debug_bitmap_file (file, head) - FILE *file; - bitmap head; +debug_bitmap_file (FILE *file, bitmap head) { bitmap_element *ptr; @@ -806,8 +769,7 @@ debug_bitmap_file (file, head) of a bitmap. */ void -debug_bitmap (head) - bitmap head; +debug_bitmap (bitmap head) { debug_bitmap_file (stdout, head); } @@ -816,11 +778,7 @@ debug_bitmap (head) it does not print anything but the bits. */ void -bitmap_print (file, head, prefix, suffix) - FILE *file; - bitmap head; - const char *prefix; - const char *suffix; +bitmap_print (FILE *file, bitmap head, const char *prefix, const char *suffix) { const char *comma = ""; int i; diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 85f8239..7b85f45 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -79,53 +79,52 @@ enum bitmap_bits { extern bitmap_element bitmap_zero_bits; /* Zero bitmap element */ /* Clear a bitmap by freeing up the linked list. */ -extern void bitmap_clear PARAMS ((bitmap)); +extern void bitmap_clear (bitmap); /* Copy a bitmap to another bitmap. */ -extern void bitmap_copy PARAMS ((bitmap, bitmap)); +extern void bitmap_copy (bitmap, bitmap); /* True if two bitmaps are identical. */ -extern int bitmap_equal_p PARAMS ((bitmap, bitmap)); +extern int bitmap_equal_p (bitmap, bitmap); /* Perform an operation on two bitmaps, yielding a third. */ -extern int bitmap_operation PARAMS ((bitmap, bitmap, bitmap, enum bitmap_bits)); +extern int bitmap_operation (bitmap, bitmap, bitmap, enum bitmap_bits); /* `or' into one bitmap the `and' of a second bitmap witih the complement of a third. */ -extern void bitmap_ior_and_compl PARAMS ((bitmap, bitmap, bitmap)); +extern void bitmap_ior_and_compl (bitmap, bitmap, bitmap); /* Clear a single register in a register set. */ -extern void bitmap_clear_bit PARAMS ((bitmap, int)); +extern void bitmap_clear_bit (bitmap, int); /* Set a single register in a register set. */ -extern void bitmap_set_bit PARAMS ((bitmap, int)); +extern void bitmap_set_bit (bitmap, int); /* Return true if a register is set in a register set. */ -extern int bitmap_bit_p PARAMS ((bitmap, int)); +extern int bitmap_bit_p (bitmap, int); /* Debug functions to print a bitmap linked list. */ -extern void debug_bitmap PARAMS ((bitmap)); -extern void debug_bitmap_file PARAMS ((FILE *, bitmap)); +extern void debug_bitmap (bitmap); +extern void debug_bitmap_file (FILE *, bitmap); /* Print a bitmap */ -extern void bitmap_print PARAMS ((FILE *, bitmap, const char *, const char *)); +extern void bitmap_print (FILE *, bitmap, const char *, const char *); /* Initialize a bitmap header. If HEAD is NULL, a new header will be allocated. USING_OBSTACK indicates how elements should be allocated. */ -extern bitmap bitmap_initialize PARAMS ((bitmap head, - int using_obstack)); +extern bitmap bitmap_initialize (bitmap head, int using_obstack); /* Release all memory used by the bitmap obstack. */ -extern void bitmap_release_memory PARAMS ((void)); +extern void bitmap_release_memory (void); /* A few compatibility/functions macros for compatibility with sbitmaps */ #define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n") #define bitmap_zero(a) bitmap_clear (a) #define bitmap_a_or_b(a,b,c) bitmap_operation (a, b, c, BITMAP_IOR) #define bitmap_a_and_b(a,b,c) bitmap_operation (a, b, c, BITMAP_AND) -extern int bitmap_union_of_diff PARAMS((bitmap, bitmap, bitmap, bitmap)); -extern int bitmap_first_set_bit PARAMS((bitmap)); -extern int bitmap_last_set_bit PARAMS((bitmap)); +extern int bitmap_union_of_diff (bitmap, bitmap, bitmap, bitmap); +extern int bitmap_first_set_bit (bitmap); +extern int bitmap_last_set_bit (bitmap); /* Allocate a bitmap with oballoc. */ #define BITMAP_OBSTACK_ALLOC(OBSTACK) \ @@ -249,7 +248,7 @@ do { \ ptr2_ = ptr2_->next; \ \ tmp2_ = ((ptr2_ != 0 && ptr2_->indx == ptr1_->indx) \ - ? ptr2_ : &bitmap_zero_bits); \ + ? ptr2_ : &bitmap_zero_bits); \ \ for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ { \ diff --git a/gcc/builtins.c b/gcc/builtins.c index c6528d7..8379749 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -84,106 +84,82 @@ static bool builtin_dconsts_init = 0; static REAL_VALUE_TYPE dconstpi; static REAL_VALUE_TYPE dconste; -static int get_pointer_alignment PARAMS ((tree, unsigned int)); -static tree c_strlen PARAMS ((tree)); -static const char *c_getstr PARAMS ((tree)); -static rtx c_readstr PARAMS ((const char *, - enum machine_mode)); -static int target_char_cast PARAMS ((tree, char *)); -static rtx get_memory_rtx PARAMS ((tree)); -static int apply_args_size PARAMS ((void)); -static int apply_result_size PARAMS ((void)); +static int get_pointer_alignment (tree, unsigned int); +static tree c_strlen (tree); +static const char *c_getstr (tree); +static rtx c_readstr (const char *, enum machine_mode); +static int target_char_cast (tree, char *); +static rtx get_memory_rtx (tree); +static int apply_args_size (void); +static int apply_result_size (void); #if defined (HAVE_untyped_call) || defined (HAVE_untyped_return) -static rtx result_vector PARAMS ((int, rtx)); +static rtx result_vector (int, rtx); #endif -static rtx expand_builtin_setjmp PARAMS ((tree, rtx)); -static void expand_builtin_prefetch PARAMS ((tree)); -static rtx expand_builtin_apply_args PARAMS ((void)); -static rtx expand_builtin_apply_args_1 PARAMS ((void)); -static rtx expand_builtin_apply PARAMS ((rtx, rtx, rtx)); -static void expand_builtin_return PARAMS ((rtx)); -static enum type_class type_to_class PARAMS ((tree)); -static rtx expand_builtin_classify_type PARAMS ((tree)); -static void expand_errno_check PARAMS ((tree, rtx)); -static rtx expand_builtin_mathfn PARAMS ((tree, rtx, rtx)); -static rtx expand_builtin_mathfn_2 PARAMS ((tree, rtx, rtx)); -static rtx expand_builtin_constant_p PARAMS ((tree, enum machine_mode)); -static rtx expand_builtin_args_info PARAMS ((tree)); -static rtx expand_builtin_next_arg PARAMS ((tree)); -static rtx expand_builtin_va_start PARAMS ((tree)); -static rtx expand_builtin_va_end PARAMS ((tree)); -static rtx expand_builtin_va_copy PARAMS ((tree)); -static rtx expand_builtin_memcmp PARAMS ((tree, tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strcmp PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strncmp PARAMS ((tree, rtx, - enum machine_mode)); -static rtx builtin_memcpy_read_str PARAMS ((PTR, HOST_WIDE_INT, - enum machine_mode)); -static rtx expand_builtin_strcat PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strncat PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strspn PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strcspn PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_memcpy PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_mempcpy PARAMS ((tree, rtx, - enum machine_mode, int)); -static rtx expand_builtin_memmove PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_bcopy PARAMS ((tree)); -static rtx expand_builtin_strcpy PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_stpcpy PARAMS ((tree, rtx, - enum machine_mode)); -static rtx builtin_strncpy_read_str PARAMS ((PTR, HOST_WIDE_INT, - enum machine_mode)); -static rtx expand_builtin_strncpy PARAMS ((tree, rtx, - enum machine_mode)); -static rtx builtin_memset_read_str PARAMS ((PTR, HOST_WIDE_INT, - enum machine_mode)); -static rtx builtin_memset_gen_str PARAMS ((PTR, HOST_WIDE_INT, - enum machine_mode)); -static rtx expand_builtin_memset PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_bzero PARAMS ((tree)); -static rtx expand_builtin_strlen PARAMS ((tree, rtx, enum machine_mode)); -static rtx expand_builtin_strstr PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strpbrk PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strchr PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_strrchr PARAMS ((tree, rtx, - enum machine_mode)); -static rtx expand_builtin_alloca PARAMS ((tree, rtx)); -static rtx expand_builtin_unop PARAMS ((enum machine_mode, - tree, rtx, rtx, optab)); -static rtx expand_builtin_frame_address PARAMS ((tree, tree)); -static rtx expand_builtin_fputs PARAMS ((tree, int, int)); -static tree stabilize_va_list PARAMS ((tree, int)); -static rtx expand_builtin_expect PARAMS ((tree, rtx)); -static tree fold_builtin_constant_p PARAMS ((tree)); -static tree fold_builtin_classify_type PARAMS ((tree)); -static tree fold_builtin_inf PARAMS ((tree, int)); -static tree fold_builtin_nan PARAMS ((tree, tree, int)); -static int validate_arglist PARAMS ((tree, ...)); -static tree fold_trunc_transparent_mathfn PARAMS ((tree)); -static bool readonly_data_expr PARAMS ((tree)); -static rtx expand_builtin_fabs PARAMS ((tree, rtx, rtx)); -static rtx expand_builtin_cabs PARAMS ((tree, rtx)); -static void init_builtin_dconsts PARAMS ((void)); -static tree fold_builtin_cabs PARAMS ((tree, tree, tree)); +static rtx expand_builtin_setjmp (tree, rtx); +static void expand_builtin_prefetch (tree); +static rtx expand_builtin_apply_args (void); +static rtx expand_builtin_apply_args_1 (void); +static rtx expand_builtin_apply (rtx, rtx, rtx); +static void expand_builtin_return (rtx); +static enum type_class type_to_class (tree); +static rtx expand_builtin_classify_type (tree); +static void expand_errno_check (tree, rtx); +static rtx expand_builtin_mathfn (tree, rtx, rtx); +static rtx expand_builtin_mathfn_2 (tree, rtx, rtx); +static rtx expand_builtin_constant_p (tree, enum machine_mode); +static rtx expand_builtin_args_info (tree); +static rtx expand_builtin_next_arg (tree); +static rtx expand_builtin_va_start (tree); +static rtx expand_builtin_va_end (tree); +static rtx expand_builtin_va_copy (tree); +static rtx expand_builtin_memcmp (tree, tree, rtx, enum machine_mode); +static rtx expand_builtin_strcmp (tree, rtx, enum machine_mode); +static rtx expand_builtin_strncmp (tree, rtx, enum machine_mode); +static rtx builtin_memcpy_read_str (void *, HOST_WIDE_INT, enum machine_mode); +static rtx expand_builtin_strcat (tree, rtx, enum machine_mode); +static rtx expand_builtin_strncat (tree, rtx, enum machine_mode); +static rtx expand_builtin_strspn (tree, rtx, enum machine_mode); +static rtx expand_builtin_strcspn (tree, rtx, enum machine_mode); +static rtx expand_builtin_memcpy (tree, rtx, enum machine_mode); +static rtx expand_builtin_mempcpy (tree, rtx, enum machine_mode, int); +static rtx expand_builtin_memmove (tree, rtx, enum machine_mode); +static rtx expand_builtin_bcopy (tree); +static rtx expand_builtin_strcpy (tree, rtx, enum machine_mode); +static rtx expand_builtin_stpcpy (tree, rtx, enum machine_mode); +static rtx builtin_strncpy_read_str (void *, HOST_WIDE_INT, enum machine_mode); +static rtx expand_builtin_strncpy (tree, rtx, enum machine_mode); +static rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode); +static rtx builtin_memset_gen_str (void *, HOST_WIDE_INT, enum machine_mode); +static rtx expand_builtin_memset (tree, rtx, enum machine_mode); +static rtx expand_builtin_bzero (tree); +static rtx expand_builtin_strlen (tree, rtx, enum machine_mode); +static rtx expand_builtin_strstr (tree, rtx, enum machine_mode); +static rtx expand_builtin_strpbrk (tree, rtx, enum machine_mode); +static rtx expand_builtin_strchr (tree, rtx, enum machine_mode); +static rtx expand_builtin_strrchr (tree, rtx, enum machine_mode); +static rtx expand_builtin_alloca (tree, rtx); +static rtx expand_builtin_unop (enum machine_mode, tree, rtx, rtx, optab); +static rtx expand_builtin_frame_address (tree, tree); +static rtx expand_builtin_fputs (tree, int, int); +static tree stabilize_va_list (tree, int); +static rtx expand_builtin_expect (tree, rtx); +static tree fold_builtin_constant_p (tree); +static tree fold_builtin_classify_type (tree); +static tree fold_builtin_inf (tree, int); +static tree fold_builtin_nan (tree, tree, int); +static int validate_arglist (tree, ...); +static tree fold_trunc_transparent_mathfn (tree); +static bool readonly_data_expr (tree); +static rtx expand_builtin_fabs (tree, rtx, rtx); +static rtx expand_builtin_cabs (tree, rtx); +static void init_builtin_dconsts (void); +static tree fold_builtin_cabs (tree, tree, tree); /* Initialize mathematical constants for constant folding builtins. These constants need to be given to at least 160 bits precision. */ static void -init_builtin_dconsts () +init_builtin_dconsts (void) { real_from_string (&dconstpi, "3.1415926535897932384626433832795028841971693993751058209749445923078"); @@ -192,7 +168,7 @@ init_builtin_dconsts () builtin_dconsts_init = true; } - + /* Return the alignment in bits of EXP, a pointer valued expression. But don't return more than MAX_ALIGN no matter what. The alignment returned is, by default, the alignment of the thing that @@ -202,9 +178,7 @@ init_builtin_dconsts () expression is actually pointing at an object whose alignment is tighter. */ static int -get_pointer_alignment (exp, max_align) - tree exp; - unsigned int max_align; +get_pointer_alignment (tree exp, unsigned int max_align) { unsigned int align, inner; @@ -273,8 +247,7 @@ get_pointer_alignment (exp, max_align) arrays with initializers, so neither can we do so here. */ static tree -c_strlen (src) - tree src; +c_strlen (tree src) { tree offset_node; HOST_WIDE_INT offset; @@ -339,8 +312,7 @@ c_strlen (src) or sum of string constant and integer constant. */ static const char * -c_getstr (src) - tree src; +c_getstr (tree src) { tree offset_node; @@ -361,9 +333,7 @@ c_getstr (src) GET_MODE_BITSIZE (MODE) bits from string constant STR. */ static rtx -c_readstr (str, mode) - const char *str; - enum machine_mode mode; +c_readstr (const char *str, enum machine_mode mode) { HOST_WIDE_INT c[2]; HOST_WIDE_INT ch; @@ -397,9 +367,7 @@ c_readstr (str, mode) P. */ static int -target_char_cast (cst, p) - tree cst; - char *p; +target_char_cast (tree cst, char *p) { unsigned HOST_WIDE_INT val, hostval; @@ -427,10 +395,8 @@ target_char_cast (cst, p) address located within it (depending on FNDECL_CODE). */ rtx -expand_builtin_return_addr (fndecl_code, count, tem) - enum built_in_function fndecl_code; - int count; - rtx tem; +expand_builtin_return_addr (enum built_in_function fndecl_code, int count, + rtx tem) { int i; @@ -490,9 +456,7 @@ static HOST_WIDE_INT setjmp_alias_set = -1; handling code. */ void -expand_builtin_setjmp_setup (buf_addr, receiver_label) - rtx buf_addr; - rtx receiver_label; +expand_builtin_setjmp_setup (rtx buf_addr, rtx receiver_label) { enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); rtx stack_save; @@ -553,8 +517,7 @@ expand_builtin_setjmp_setup (buf_addr, receiver_label) This is used directly by sjlj exception handling code. */ void -expand_builtin_setjmp_receiver (receiver_label) - rtx receiver_label ATTRIBUTE_UNUSED; +expand_builtin_setjmp_receiver (rtx receiver_label ATTRIBUTE_UNUSED) { /* Clobber the FP when we get here, so we have to make sure it's marked as used by this function. */ @@ -626,9 +589,7 @@ expand_builtin_setjmp_receiver (receiver_label) them. */ static rtx -expand_builtin_setjmp (arglist, target) - tree arglist; - rtx target; +expand_builtin_setjmp (tree arglist, rtx target) { rtx buf_addr, next_lab, cont_lab; @@ -679,8 +640,7 @@ expand_builtin_setjmp (arglist, target) them. */ void -expand_builtin_longjmp (buf_addr, value) - rtx buf_addr, value; +expand_builtin_longjmp (rtx buf_addr, rtx value) { rtx fp, lab, stack, insn, last; enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); @@ -769,8 +729,7 @@ expand_builtin_longjmp (buf_addr, value) effects. */ static void -expand_builtin_prefetch (arglist) - tree arglist; +expand_builtin_prefetch (tree arglist) { tree arg0, arg1, arg2; rtx op0, op1, op2; @@ -856,8 +815,7 @@ expand_builtin_prefetch (arglist) to be used to be used in a string instruction (cmpstrsi, movstrsi, ..). */ static rtx -get_memory_rtx (exp) - tree exp; +get_memory_rtx (tree exp) { rtx addr = expand_expr (exp, NULL_RTX, ptr_mode, EXPAND_SUM); rtx mem; @@ -919,8 +877,7 @@ static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER]; needed in objc-act.c. */ int -apply_args_register_offset (regno) - int regno; +apply_args_register_offset (int regno) { apply_args_size (); @@ -936,7 +893,7 @@ apply_args_register_offset (regno) and initialize apply_args_mode. */ static int -apply_args_size () +apply_args_size (void) { static int size = -1; int align; @@ -1016,7 +973,7 @@ apply_args_size () and initialize apply_result_mode. */ static int -apply_result_size () +apply_result_size (void) { static int size = -1; int align, regno; @@ -1092,9 +1049,7 @@ apply_result_size () restore the values. */ static rtx -result_vector (savep, result) - int savep; - rtx result; +result_vector (int savep, rtx result) { int regno, size, align, nelts; enum machine_mode mode; @@ -1123,7 +1078,7 @@ result_vector (savep, result) arguments as were passed to the current function. */ static rtx -expand_builtin_apply_args_1 () +expand_builtin_apply_args_1 (void) { rtx registers; int size, align, regno; @@ -1180,7 +1135,7 @@ expand_builtin_apply_args_1 () saved. */ static rtx -expand_builtin_apply_args () +expand_builtin_apply_args (void) { /* Don't do __builtin_apply_args more than once in a function. Save the result of the first call and reuse it. */ @@ -1215,8 +1170,7 @@ expand_builtin_apply_args () untyped return of whatever value was returned by the given function. */ static rtx -expand_builtin_apply (function, arguments, argsize) - rtx function, arguments, argsize; +expand_builtin_apply (rtx function, rtx arguments, rtx argsize) { int size, align, regno; enum machine_mode mode; @@ -1371,8 +1325,7 @@ expand_builtin_apply (function, arguments, argsize) /* Perform an untyped return. */ static void -expand_builtin_return (result) - rtx result; +expand_builtin_return (rtx result) { int size, align, regno; enum machine_mode mode; @@ -1425,8 +1378,7 @@ expand_builtin_return (result) /* Used by expand_builtin_classify_type and fold_builtin_classify_type. */ static enum type_class -type_to_class (type) - tree type; +type_to_class (tree type) { switch (TREE_CODE (type)) { @@ -1458,8 +1410,7 @@ type_to_class (type) ARGLIST. */ static rtx -expand_builtin_classify_type (arglist) - tree arglist; +expand_builtin_classify_type (tree arglist) { if (arglist != 0) return GEN_INT (type_to_class (TREE_TYPE (TREE_VALUE (arglist)))); @@ -1469,9 +1420,7 @@ expand_builtin_classify_type (arglist) /* Expand expression EXP, which is a call to __builtin_constant_p. */ static rtx -expand_builtin_constant_p (arglist, target_mode) - tree arglist; - enum machine_mode target_mode; +expand_builtin_constant_p (tree arglist, enum machine_mode target_mode) { rtx tmp; @@ -1493,9 +1442,7 @@ expand_builtin_constant_p (arglist, target_mode) /* Return mathematic function equivalent to FN but operating directly on TYPE, if available. */ tree -mathfn_built_in (type, fn) - tree type; - enum built_in_function fn; +mathfn_built_in (tree type, enum built_in_function fn) { enum built_in_function fcode = NOT_BUILT_IN; if (TYPE_MODE (type) == TYPE_MODE (double_type_node)) @@ -1704,9 +1651,7 @@ mathfn_built_in (type, fn) errno to EDOM. */ static void -expand_errno_check (exp, target) - tree exp; - rtx target; +expand_errno_check (tree exp, rtx target) { rtx lab; @@ -1750,9 +1695,7 @@ expand_errno_check (exp, target) SUBTARGET may be used as the target for computing one of EXP's operands. */ static rtx -expand_builtin_mathfn (exp, target, subtarget) - tree exp; - rtx target, subtarget; +expand_builtin_mathfn (tree exp, rtx target, rtx subtarget) { optab builtin_optab; rtx op0, insns; @@ -1867,9 +1810,7 @@ expand_builtin_mathfn (exp, target, subtarget) operands. */ static rtx -expand_builtin_mathfn_2 (exp, target, subtarget) - tree exp; - rtx target, subtarget; +expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget) { optab builtin_optab; rtx op0, op1, insns; @@ -1962,10 +1903,8 @@ expand_builtin_mathfn_2 (exp, target, subtarget) try to get the result in TARGET, if convenient. */ static rtx -expand_builtin_strlen (arglist, target, target_mode) - tree arglist; - rtx target; - enum machine_mode target_mode; +expand_builtin_strlen (tree arglist, rtx target, + enum machine_mode target_mode) { if (!validate_arglist (arglist, POINTER_TYPE, VOID_TYPE)) return 0; @@ -2061,10 +2000,7 @@ expand_builtin_strlen (arglist, target, target_mode) in TARGET, if convenient (and in mode MODE if that's convenient). */ static rtx -expand_builtin_strstr (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strstr (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -2117,10 +2053,7 @@ expand_builtin_strstr (arglist, target, mode) in TARGET, if convenient (and in mode MODE if that's convenient). */ static rtx -expand_builtin_strchr (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strchr (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) return 0; @@ -2163,10 +2096,7 @@ expand_builtin_strchr (arglist, target, mode) in TARGET, if convenient (and in mode MODE if that's convenient). */ static rtx -expand_builtin_strrchr (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strrchr (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) return 0; @@ -2217,10 +2147,7 @@ expand_builtin_strrchr (arglist, target, mode) in TARGET, if convenient (and in mode MODE if that's convenient). */ static rtx -expand_builtin_strpbrk (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strpbrk (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -2279,10 +2206,8 @@ expand_builtin_strpbrk (arglist, target, mode) constant. */ static rtx -builtin_memcpy_read_str (data, offset, mode) - PTR data; - HOST_WIDE_INT offset; - enum machine_mode mode; +builtin_memcpy_read_str (void *data, HOST_WIDE_INT offset, + enum machine_mode mode) { const char *str = (const char *) data; @@ -2299,10 +2224,7 @@ builtin_memcpy_read_str (data, offset, mode) otherwise try to get the result in TARGET, if convenient (and in mode MODE if that's convenient). */ static rtx -expand_builtin_memcpy (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_memcpy (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) @@ -2388,11 +2310,8 @@ expand_builtin_memcpy (arglist, target, mode) stpcpy. */ static rtx -expand_builtin_mempcpy (arglist, target, mode, endp) - tree arglist; - rtx target; - enum machine_mode mode; - int endp; +expand_builtin_mempcpy (tree arglist, rtx target, enum machine_mode mode, + int endp) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) @@ -2488,10 +2407,7 @@ expand_builtin_mempcpy (arglist, target, mode, endp) if we failed the caller should emit a normal call. */ static rtx -expand_builtin_memmove (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_memmove (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) @@ -2543,8 +2459,7 @@ expand_builtin_memmove (arglist, target, mode) if we failed the caller should emit a normal call. */ static rtx -expand_builtin_bcopy (arglist) - tree arglist; +expand_builtin_bcopy (tree arglist) { tree src, dest, size, newarglist; @@ -2574,10 +2489,7 @@ expand_builtin_bcopy (arglist) convenient). */ static rtx -expand_builtin_strcpy (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strcpy (tree arglist, rtx target, enum machine_mode mode) { tree fn, len; @@ -2604,10 +2516,7 @@ expand_builtin_strcpy (arglist, target, mode) mode MODE if that's convenient). */ static rtx -expand_builtin_stpcpy (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_stpcpy (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -2647,10 +2556,8 @@ expand_builtin_stpcpy (arglist, target, mode) constant. */ static rtx -builtin_strncpy_read_str (data, offset, mode) - PTR data; - HOST_WIDE_INT offset; - enum machine_mode mode; +builtin_strncpy_read_str (void *data, HOST_WIDE_INT offset, + enum machine_mode mode) { const char *str = (const char *) data; @@ -2664,10 +2571,7 @@ builtin_strncpy_read_str (data, offset, mode) if we failed the caller should emit a normal call. */ static rtx -expand_builtin_strncpy (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strncpy (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) @@ -2743,10 +2647,8 @@ expand_builtin_strncpy (arglist, target, mode) constant. */ static rtx -builtin_memset_read_str (data, offset, mode) - PTR data; - HOST_WIDE_INT offset ATTRIBUTE_UNUSED; - enum machine_mode mode; +builtin_memset_read_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED, + enum machine_mode mode) { const char *c = (const char *) data; char *p = alloca (GET_MODE_SIZE (mode)); @@ -2762,10 +2664,8 @@ builtin_memset_read_str (data, offset, mode) 4 bytes wide, return the RTL for 0x01010101*data. */ static rtx -builtin_memset_gen_str (data, offset, mode) - PTR data; - HOST_WIDE_INT offset ATTRIBUTE_UNUSED; - enum machine_mode mode; +builtin_memset_gen_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED, + enum machine_mode mode) { rtx target, coeff; size_t size; @@ -2790,10 +2690,7 @@ builtin_memset_gen_str (data, offset, mode) convenient). */ static rtx -expand_builtin_memset (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_memset (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, INTEGER_TYPE, INTEGER_TYPE, VOID_TYPE)) @@ -2904,8 +2801,7 @@ expand_builtin_memset (arglist, target, mode) if we failed the caller should emit a normal call. */ static rtx -expand_builtin_bzero (arglist) - tree arglist; +expand_builtin_bzero (tree arglist) { tree dest, size, newarglist; @@ -2933,11 +2829,8 @@ expand_builtin_bzero (arglist) TARGET, if convenient (and in mode MODE, if that's convenient). */ static rtx -expand_builtin_memcmp (exp, arglist, target, mode) - tree exp ATTRIBUTE_UNUSED; - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_memcmp (tree exp ATTRIBUTE_UNUSED, tree arglist, rtx target, + enum machine_mode mode) { tree arg1, arg2, len; const char *p1, *p2; @@ -3058,10 +2951,7 @@ expand_builtin_memcmp (exp, arglist, target, mode) the result in TARGET, if convenient. */ static rtx -expand_builtin_strcmp (exp, target, mode) - tree exp; - rtx target; - enum machine_mode mode; +expand_builtin_strcmp (tree exp, rtx target, enum machine_mode mode) { tree arglist = TREE_OPERAND (exp, 1); tree arg1, arg2; @@ -3189,10 +3079,7 @@ expand_builtin_strcmp (exp, target, mode) the result in TARGET, if convenient. */ static rtx -expand_builtin_strncmp (exp, target, mode) - tree exp; - rtx target; - enum machine_mode mode; +expand_builtin_strncmp (tree exp, rtx target, enum machine_mode mode) { tree arglist = TREE_OPERAND (exp, 1); tree arg1, arg2, arg3; @@ -3342,10 +3229,7 @@ expand_builtin_strncmp (exp, target, mode) otherwise try to get the result in TARGET, if convenient. */ static rtx -expand_builtin_strcat (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strcat (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -3368,10 +3252,7 @@ expand_builtin_strcat (arglist, target, mode) otherwise try to get the result in TARGET, if convenient. */ static rtx -expand_builtin_strncat (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strncat (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) @@ -3420,10 +3301,7 @@ expand_builtin_strncat (arglist, target, mode) otherwise try to get the result in TARGET, if convenient. */ static rtx -expand_builtin_strspn (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strspn (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -3457,10 +3335,7 @@ expand_builtin_strspn (arglist, target, mode) otherwise try to get the result in TARGET, if convenient. */ static rtx -expand_builtin_strcspn (arglist, target, mode) - tree arglist; - rtx target; - enum machine_mode mode; +expand_builtin_strcspn (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, VOID_TYPE)) return 0; @@ -3507,7 +3382,7 @@ expand_builtin_strcspn (arglist, target, mode) if that's convenient. */ rtx -expand_builtin_saveregs () +expand_builtin_saveregs (void) { rtx val, seq; @@ -3558,8 +3433,7 @@ expand_builtin_saveregs () is controlled by the definition of CUMULATIVE_ARGS. */ static rtx -expand_builtin_args_info (arglist) - tree arglist; +expand_builtin_args_info (tree arglist) { int nwords = sizeof (CUMULATIVE_ARGS) / sizeof (int); int *word_ptr = (int *) ¤t_function_args_info; @@ -3590,8 +3464,7 @@ expand_builtin_args_info (arglist) /* Expand ARGLIST, from a call to __builtin_next_arg. */ static rtx -expand_builtin_next_arg (arglist) - tree arglist; +expand_builtin_next_arg (tree arglist) { tree fntype = TREE_TYPE (current_function_decl); @@ -3635,9 +3508,7 @@ expand_builtin_next_arg (arglist) from multiple evaluations. */ static tree -stabilize_va_list (valist, needs_lvalue) - tree valist; - int needs_lvalue; +stabilize_va_list (tree valist, int needs_lvalue) { if (TREE_CODE (va_list_type_node) == ARRAY_TYPE) { @@ -3684,9 +3555,7 @@ stabilize_va_list (valist, needs_lvalue) the variable. */ void -std_expand_builtin_va_start (valist, nextarg) - tree valist; - rtx nextarg; +std_expand_builtin_va_start (tree valist, rtx nextarg) { tree t; @@ -3700,8 +3569,7 @@ std_expand_builtin_va_start (valist, nextarg) /* Expand ARGLIST, from a call to __builtin_va_start. */ static rtx -expand_builtin_va_start (arglist) - tree arglist; +expand_builtin_va_start (tree arglist) { rtx nextarg; tree chain, valist; @@ -3727,8 +3595,7 @@ expand_builtin_va_start (arglist) current (padded) address and increment by the (padded) size. */ rtx -std_expand_builtin_va_arg (valist, type) - tree valist, type; +std_expand_builtin_va_arg (tree valist, tree type) { tree addr_tree, t, type_size = NULL; tree align, alignm1; @@ -3786,8 +3653,7 @@ std_expand_builtin_va_arg (valist, type) a very special sort of operator. */ rtx -expand_builtin_va_arg (valist, type) - tree valist, type; +expand_builtin_va_arg (tree valist, tree type) { rtx addr, result; tree promoted_type, want_va_type, have_va_type; @@ -3887,8 +3753,7 @@ expand_builtin_va_arg (valist, type) /* Expand ARGLIST, from a call to __builtin_va_end. */ static rtx -expand_builtin_va_end (arglist) - tree arglist; +expand_builtin_va_end (tree arglist) { tree valist = TREE_VALUE (arglist); @@ -3910,8 +3775,7 @@ expand_builtin_va_end (arglist) nastiness of array-type va_list types. */ static rtx -expand_builtin_va_copy (arglist) - tree arglist; +expand_builtin_va_copy (tree arglist) { tree dst, src, t; @@ -3964,8 +3828,7 @@ expand_builtin_va_copy (arglist) __builtin_return_address. */ static rtx -expand_builtin_frame_address (fndecl, arglist) - tree fndecl, arglist; +expand_builtin_frame_address (tree fndecl, tree arglist) { /* The argument must be a nonnegative integer constant. It counts the number of frames to scan up the stack. @@ -4014,9 +3877,7 @@ expand_builtin_frame_address (fndecl, arglist) the result in TARGET, if convenient. */ static rtx -expand_builtin_alloca (arglist, target) - tree arglist; - rtx target; +expand_builtin_alloca (tree arglist, rtx target) { rtx op0; rtx result; @@ -4044,11 +3905,8 @@ expand_builtin_alloca (arglist, target) SUBTARGET may be used as the target for computing one of EXP's operands. */ static rtx -expand_builtin_unop (target_mode, arglist, target, subtarget, op_optab) - enum machine_mode target_mode; - tree arglist; - rtx target, subtarget; - optab op_optab; +expand_builtin_unop (enum machine_mode target_mode, tree arglist, rtx target, + rtx subtarget, optab op_optab) { rtx op0; if (!validate_arglist (arglist, INTEGER_TYPE, VOID_TYPE)) @@ -4070,10 +3928,7 @@ expand_builtin_unop (target_mode, arglist, target, subtarget, op_optab) long, we attempt to transform this call into __builtin_fputc(). */ static rtx -expand_builtin_fputs (arglist, ignore, unlocked) - tree arglist; - int ignore; - int unlocked; +expand_builtin_fputs (tree arglist, int ignore, int unlocked) { tree len, fn; tree fn_fputc = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTC_UNLOCKED] @@ -4154,9 +4009,7 @@ expand_builtin_fputs (arglist, ignore, unlocked) a non-jump context. */ static rtx -expand_builtin_expect (arglist, target) - tree arglist; - rtx target; +expand_builtin_expect (tree arglist, rtx target) { tree exp, c; rtx note, rtx_c; @@ -4200,10 +4053,7 @@ expand_builtin_expect (arglist, target) based on the test being 0/1. */ rtx -expand_builtin_expect_jump (exp, if_false_label, if_true_label) - tree exp; - rtx if_false_label; - rtx if_true_label; +expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label) { tree arglist = TREE_OPERAND (exp, 1); tree arg0 = TREE_VALUE (arglist); @@ -4314,7 +4164,7 @@ expand_builtin_expect_jump (exp, if_false_label, if_true_label) } void -expand_builtin_trap () +expand_builtin_trap (void) { #ifdef HAVE_trap if (HAVE_trap) @@ -4332,9 +4182,7 @@ expand_builtin_trap () the operand. */ static rtx -expand_builtin_fabs (arglist, target, subtarget) - tree arglist; - rtx target, subtarget; +expand_builtin_fabs (tree arglist, rtx target, rtx subtarget) { enum machine_mode mode; tree arg; @@ -4355,9 +4203,7 @@ expand_builtin_fabs (arglist, target, subtarget) in target. */ static rtx -expand_builtin_cabs (arglist, target) - tree arglist; - rtx target; +expand_builtin_cabs (tree arglist, rtx target) { enum machine_mode mode; tree arg; @@ -4383,12 +4229,8 @@ expand_builtin_cabs (arglist, target) IGNORE is nonzero if the value is to be ignored. */ rtx -expand_builtin (exp, target, subtarget, mode, ignore) - tree exp; - rtx target; - rtx subtarget; - enum machine_mode mode; - int ignore; +expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, + int ignore) { tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree arglist = TREE_OPERAND (exp, 1); @@ -4963,10 +4805,9 @@ expand_builtin (exp, target, subtarget, mode, ignore) taking a single real argument, then the return value is the DECL_FUNCTION_CODE of the call, e.g. BUILT_IN_SQRT. Otherwise the return value is END_BUILTINS. */ - + enum built_in_function -builtin_mathfn_code (t) - tree t; +builtin_mathfn_code (tree t) { tree fndecl, arglist; @@ -5013,8 +4854,7 @@ builtin_mathfn_code (t) constant. ARGLIST is the argument list of the call. */ static tree -fold_builtin_constant_p (arglist) - tree arglist; +fold_builtin_constant_p (tree arglist) { if (arglist == 0) return 0; @@ -5054,8 +4894,7 @@ fold_builtin_constant_p (arglist) /* Fold a call to __builtin_classify_type. */ static tree -fold_builtin_classify_type (arglist) - tree arglist; +fold_builtin_classify_type (tree arglist) { if (arglist == 0) return build_int_2 (no_type_class, 0); @@ -5066,9 +4905,7 @@ fold_builtin_classify_type (arglist) /* Fold a call to __builtin_inf or __builtin_huge_val. */ static tree -fold_builtin_inf (type, warn) - tree type; - int warn; +fold_builtin_inf (tree type, int warn) { REAL_VALUE_TYPE real; @@ -5082,9 +4919,7 @@ fold_builtin_inf (type, warn) /* Fold a call to __builtin_nan or __builtin_nans. */ static tree -fold_builtin_nan (arglist, type, quiet) - tree arglist, type; - int quiet; +fold_builtin_nan (tree arglist, tree type, int quiet) { REAL_VALUE_TYPE real; const char *str; @@ -5105,8 +4940,7 @@ fold_builtin_nan (arglist, type, quiet) across (for instance floor((double)f) == (double)floorf (f). Do the transformation. */ static tree -fold_trunc_transparent_mathfn (exp) - tree exp; +fold_trunc_transparent_mathfn (tree exp) { tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree arglist = TREE_OPERAND (exp, 1); @@ -5136,8 +4970,7 @@ fold_trunc_transparent_mathfn (exp) type. Return NULL_TREE if no simplification can be made. */ static tree -fold_builtin_cabs (fndecl, arglist, type) - tree fndecl, arglist, type; +fold_builtin_cabs (tree fndecl, tree arglist, tree type) { tree arg; @@ -5221,8 +5054,7 @@ fold_builtin_cabs (fndecl, arglist, type) the CALL_EXPR of a call to a builtin function. */ tree -fold_builtin (exp) - tree exp; +fold_builtin (tree exp) { tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree arglist = TREE_OPERAND (exp, 1); @@ -5699,8 +5531,7 @@ fold_builtin (exp) /* Conveniently construct a function call expression. */ tree -build_function_call_expr (fn, arglist) - tree fn, arglist; +build_function_call_expr (tree fn, tree arglist) { tree call_expr; @@ -5722,7 +5553,7 @@ validate_arglist (tree arglist, ...) enum tree_code code; int res = 0; va_list ap; - + va_start (ap, arglist); do @@ -5763,19 +5594,18 @@ validate_arglist (tree arglist, ...) /* Default version of target-specific builtin setup that does nothing. */ void -default_init_builtins () +default_init_builtins (void) { } /* Default target-specific builtin expander that does nothing. */ rtx -default_expand_builtin (exp, target, subtarget, mode, ignore) - tree exp ATTRIBUTE_UNUSED; - rtx target ATTRIBUTE_UNUSED; - rtx subtarget ATTRIBUTE_UNUSED; - enum machine_mode mode ATTRIBUTE_UNUSED; - int ignore ATTRIBUTE_UNUSED; +default_expand_builtin (tree exp ATTRIBUTE_UNUSED, + rtx target ATTRIBUTE_UNUSED, + rtx subtarget ATTRIBUTE_UNUSED, + enum machine_mode mode ATTRIBUTE_UNUSED, + int ignore ATTRIBUTE_UNUSED) { return NULL_RTX; } @@ -5783,7 +5613,7 @@ default_expand_builtin (exp, target, subtarget, mode, ignore) /* Instantiate all remaining CONSTANT_P_RTX nodes. */ void -purge_builtin_constant_p () +purge_builtin_constant_p (void) { rtx insn, set, arg, new, note; diff --git a/gcc/expr.h b/gcc/expr.h index 1e50320..394d947 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -352,25 +352,23 @@ extern rtx get_condition PARAMS ((rtx, rtx *)); extern rtx gen_cond_trap PARAMS ((enum rtx_code, rtx, rtx, rtx)); /* Functions from builtins.c: */ -extern rtx expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); -extern void std_expand_builtin_va_start PARAMS ((tree, rtx)); -extern rtx std_expand_builtin_va_arg PARAMS ((tree, tree)); -extern rtx expand_builtin_va_arg PARAMS ((tree, tree)); -extern void default_init_builtins PARAMS ((void)); -extern rtx default_expand_builtin PARAMS ((tree, rtx, rtx, - enum machine_mode, int)); -extern void expand_builtin_setjmp_setup PARAMS ((rtx, rtx)); -extern void expand_builtin_setjmp_receiver PARAMS ((rtx)); -extern void expand_builtin_longjmp PARAMS ((rtx, rtx)); -extern rtx expand_builtin_saveregs PARAMS ((void)); -extern void expand_builtin_trap PARAMS ((void)); -extern HOST_WIDE_INT get_varargs_alias_set PARAMS ((void)); -extern HOST_WIDE_INT get_frame_alias_set PARAMS ((void)); -extern void record_base_value PARAMS ((unsigned int, rtx, int)); -extern void record_alias_subset PARAMS ((HOST_WIDE_INT, - HOST_WIDE_INT)); -extern HOST_WIDE_INT new_alias_set PARAMS ((void)); -extern int can_address_p PARAMS ((tree)); +extern rtx expand_builtin (tree, rtx, rtx, enum machine_mode, int); +extern void std_expand_builtin_va_start (tree, rtx); +extern rtx std_expand_builtin_va_arg (tree, tree); +extern rtx expand_builtin_va_arg (tree, tree); +extern void default_init_builtins (void); +extern rtx default_expand_builtin (tree, rtx, rtx, enum machine_mode, int); +extern void expand_builtin_setjmp_setup (rtx, rtx); +extern void expand_builtin_setjmp_receiver (rtx); +extern void expand_builtin_longjmp (rtx, rtx); +extern rtx expand_builtin_saveregs (void); +extern void expand_builtin_trap (void); +extern HOST_WIDE_INT get_varargs_alias_set (void); +extern HOST_WIDE_INT get_frame_alias_set (void); +extern void record_base_value (unsigned int, rtx, int); +extern void record_alias_subset (HOST_WIDE_INT, HOST_WIDE_INT); +extern HOST_WIDE_INT new_alias_set (void); +extern int can_address_p (tree); /* Functions from expr.c: */ diff --git a/gcc/rtl.h b/gcc/rtl.h index 2b40dc9..b7d8745 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1406,8 +1406,8 @@ extern int ceil_log2 PARAMS ((unsigned HOST_WIDE_INT)); #define plus_constant(X, C) plus_constant_wide ((X), (HOST_WIDE_INT) (C)) /* In builtins.c */ -extern rtx expand_builtin_expect_jump PARAMS ((tree, rtx, rtx)); -extern void purge_builtin_constant_p PARAMS ((void)); +extern rtx expand_builtin_expect_jump (tree, rtx, rtx); +extern void purge_builtin_constant_p (void); /* In explow.c */ extern void set_stack_check_libfunc PARAMS ((rtx)); @@ -1558,8 +1558,8 @@ extern rtx prev_cc0_setter PARAMS ((rtx)); /* In cfglayout.c */ extern tree choose_inner_scope PARAMS ((tree, tree)); -extern int insn_line PARAMS ((rtx)); -extern const char * insn_file PARAMS ((rtx)); +extern int insn_line PARAMS ((rtx)); +extern const char * insn_file PARAMS ((rtx)); extern int prologue_locator, epilogue_locator; /* In jump.c */ @@ -2320,23 +2320,22 @@ extern void fancy_abort PARAMS ((const char *, int, const char *)) #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__) /* In alias.c */ -extern void clear_reg_alias_info PARAMS ((rtx)); -extern rtx canon_rtx PARAMS ((rtx)); -extern int true_dependence PARAMS ((rtx, enum machine_mode, rtx, - int (*)(rtx, int))); -extern rtx get_addr PARAMS ((rtx)); -extern int canon_true_dependence PARAMS ((rtx, enum machine_mode, rtx, - rtx, int (*)(rtx, int))); -extern int read_dependence PARAMS ((rtx, rtx)); -extern int anti_dependence PARAMS ((rtx, rtx)); -extern int output_dependence PARAMS ((rtx, rtx)); -extern void mark_constant_function PARAMS ((void)); -extern void init_alias_once PARAMS ((void)); -extern void init_alias_analysis PARAMS ((void)); -extern void end_alias_analysis PARAMS ((void)); -extern rtx addr_side_effect_eval PARAMS ((rtx, int, int)); -extern bool memory_modified_in_insn_p PARAMS ((rtx, rtx)); -extern rtx find_base_term PARAMS ((rtx)); +extern void clear_reg_alias_info (rtx); +extern rtx canon_rtx (rtx); +extern int true_dependence (rtx, enum machine_mode, rtx, int (*)(rtx, int)); +extern rtx get_addr (rtx); +extern int canon_true_dependence (rtx, enum machine_mode, rtx, rtx, + int (*)(rtx, int)); +extern int read_dependence (rtx, rtx); +extern int anti_dependence (rtx, rtx); +extern int output_dependence (rtx, rtx); +extern void mark_constant_function (void); +extern void init_alias_once (void); +extern void init_alias_analysis (void); +extern void end_alias_analysis (void); +extern rtx addr_side_effect_eval (rtx, int, int); +extern bool memory_modified_in_insn_p (rtx, rtx); +extern rtx find_base_term (rtx); /* In sibcall.c */ typedef enum { diff --git a/gcc/tree.h b/gcc/tree.h index 51d0f2c..aeee9d9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2199,11 +2199,11 @@ extern void default_register_cpp_builtins PARAMS ((struct cpp_reader *)); /* Split a list of declspecs and attributes into two. */ -extern void split_specs_attrs PARAMS ((tree, tree *, tree *)); +extern void split_specs_attrs (tree, tree *, tree *); /* Strip attributes from a list of combined specs and attrs. */ -extern tree strip_attrs PARAMS ((tree)); +extern tree strip_attrs (tree); /* Return 1 if an attribute and its arguments are valid for a decl or type. */ @@ -2892,7 +2892,7 @@ extern bool alloca_call_p PARAMS ((tree)); from tree.h. Depending on these flags, some attributes may be returned to be applied at a later stage (for example, to apply a decl attribute to the declaration rather than to its type). */ -extern tree decl_attributes PARAMS ((tree *, tree, int)); +extern tree decl_attributes (tree *, tree, int); /* In integrate.c */ extern void save_for_inline PARAMS ((tree)); -- cgit v1.1