Commit 2e1eedd6 by Andreas Jaeger Committed by Andreas Jaeger

unroll.c: Convert prototypes to ISO C90.

	* unroll.c: Convert prototypes to ISO C90.
	* varasm.c: Likewise.
	* varray.c: Likewise.
	* varray.h: Likewise.
	* vmsdbgout.c: Likewise.
	* xcoffout.c: Likewise.
	* xcoffout.h: Likewise.

From-SVN: r69007
parent dd486eb2
2003-07-06 Andreas Jaeger <aj@suse.de>
* unroll.c: Likewise.
* varasm.c: Likewise.
* varray.c: Likewise.
* varray.h: Likewise.
* vmsdbgout.c: Likewise.
* xcoffout.c: Likewise.
* xcoffout.h: Likewise.
2003-07-06 Nathan Sidwell <nathan@codesourcery.com> 2003-07-06 Nathan Sidwell <nathan@codesourcery.com>
* gcov-io.h: Add a local time stamp. * gcov-io.h: Add a local time stamp.
......
/* Try to unroll loops, and split induction variables. /* Try to unroll loops, and split induction variables.
Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
2002, 2003
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by James E. Wilson, Cygnus Support/UC Berkeley. Contributed by James E. Wilson, Cygnus Support/UC Berkeley.
...@@ -196,28 +197,26 @@ static int *splittable_regs_updates; ...@@ -196,28 +197,26 @@ static int *splittable_regs_updates;
/* Forward declarations. */ /* Forward declarations. */
static rtx simplify_cmp_and_jump_insns PARAMS ((enum rtx_code, static rtx simplify_cmp_and_jump_insns (enum rtx_code, enum machine_mode,
enum machine_mode, rtx, rtx, rtx);
rtx, rtx, rtx)); static void init_reg_map (struct inline_remap *, int);
static void init_reg_map PARAMS ((struct inline_remap *, int)); static rtx calculate_giv_inc (rtx, rtx, unsigned int);
static rtx calculate_giv_inc PARAMS ((rtx, rtx, unsigned int)); static rtx initial_reg_note_copy (rtx, struct inline_remap *);
static rtx initial_reg_note_copy PARAMS ((rtx, struct inline_remap *)); static void final_reg_note_copy (rtx *, struct inline_remap *);
static void final_reg_note_copy PARAMS ((rtx *, struct inline_remap *)); static void copy_loop_body (struct loop *, rtx, rtx,
static void copy_loop_body PARAMS ((struct loop *, rtx, rtx, struct inline_remap *, rtx, int,
struct inline_remap *, rtx, int, enum unroll_types, rtx, rtx, rtx, rtx);
enum unroll_types, rtx, rtx, rtx, rtx)); static int find_splittable_regs (const struct loop *, enum unroll_types,
static int find_splittable_regs PARAMS ((const struct loop *, int);
enum unroll_types, int)); static int find_splittable_givs (const struct loop *, struct iv_class *,
static int find_splittable_givs PARAMS ((const struct loop *, enum unroll_types, rtx, int);
struct iv_class *, enum unroll_types, static int reg_dead_after_loop (const struct loop *, rtx);
rtx, int)); static rtx fold_rtx_mult_add (rtx, rtx, rtx, enum machine_mode);
static int reg_dead_after_loop PARAMS ((const struct loop *, rtx)); static rtx remap_split_bivs (struct loop *, rtx);
static rtx fold_rtx_mult_add PARAMS ((rtx, rtx, rtx, enum machine_mode)); static rtx find_common_reg_term (rtx, rtx);
static rtx remap_split_bivs PARAMS ((struct loop *, rtx)); static rtx subtract_reg_term (rtx, rtx);
static rtx find_common_reg_term PARAMS ((rtx, rtx)); static rtx loop_find_equiv_value (const struct loop *, rtx);
static rtx subtract_reg_term PARAMS ((rtx, rtx)); static rtx ujump_to_loop_cont (rtx, rtx);
static rtx loop_find_equiv_value PARAMS ((const struct loop *, rtx));
static rtx ujump_to_loop_cont PARAMS ((rtx, rtx));
/* Try to unroll one loop and split induction variables in the loop. /* Try to unroll one loop and split induction variables in the loop.
...@@ -229,10 +228,7 @@ static rtx ujump_to_loop_cont PARAMS ((rtx, rtx)); ...@@ -229,10 +228,7 @@ static rtx ujump_to_loop_cont PARAMS ((rtx, rtx));
in loop.c. */ in loop.c. */
void void
unroll_loop (loop, insn_count, strength_reduce_p) unroll_loop (struct loop *loop, int insn_count, int strength_reduce_p)
struct loop *loop;
int insn_count;
int strength_reduce_p;
{ {
struct loop_info *loop_info = LOOP_INFO (loop); struct loop_info *loop_info = LOOP_INFO (loop);
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
...@@ -1332,16 +1328,14 @@ unroll_loop (loop, insn_count, strength_reduce_p) ...@@ -1332,16 +1328,14 @@ unroll_loop (loop, insn_count, strength_reduce_p)
free (map); free (map);
} }
/* A helper function for unroll_loop. Emit a compare and branch to /* A helper function for unroll_loop. Emit a compare and branch to
satisfy (CMP OP1 OP2), but pass this through the simplifier first. satisfy (CMP OP1 OP2), but pass this through the simplifier first.
If the branch turned out to be conditional, return it, otherwise If the branch turned out to be conditional, return it, otherwise
return NULL. */ return NULL. */
static rtx static rtx
simplify_cmp_and_jump_insns (code, mode, op0, op1, label) simplify_cmp_and_jump_insns (enum rtx_code code, enum machine_mode mode,
enum rtx_code code; rtx op0, rtx op1, rtx label)
enum machine_mode mode;
rtx op0, op1, label;
{ {
rtx t, insn; rtx t, insn;
...@@ -1387,10 +1381,9 @@ simplify_cmp_and_jump_insns (code, mode, op0, op1, label) ...@@ -1387,10 +1381,9 @@ simplify_cmp_and_jump_insns (code, mode, op0, op1, label)
reflected in RTX_COST. */ reflected in RTX_COST. */
int int
precondition_loop_p (loop, initial_value, final_value, increment, mode) precondition_loop_p (const struct loop *loop, rtx *initial_value,
const struct loop *loop; rtx *final_value, rtx *increment,
rtx *initial_value, *final_value, *increment; enum machine_mode *mode)
enum machine_mode *mode;
{ {
rtx loop_start = loop->start; rtx loop_start = loop->start;
struct loop_info *loop_info = LOOP_INFO (loop); struct loop_info *loop_info = LOOP_INFO (loop);
...@@ -1547,9 +1540,7 @@ precondition_loop_p (loop, initial_value, final_value, increment, mode) ...@@ -1547,9 +1540,7 @@ precondition_loop_p (loop, initial_value, final_value, increment, mode)
modes. */ modes. */
static void static void
init_reg_map (map, maxregnum) init_reg_map (struct inline_remap *map, int maxregnum)
struct inline_remap *map;
int maxregnum;
{ {
int i; int i;
...@@ -1574,9 +1565,7 @@ init_reg_map (map, maxregnum) ...@@ -1574,9 +1565,7 @@ init_reg_map (map, maxregnum)
The return value is the amount that the giv is incremented by. */ The return value is the amount that the giv is incremented by. */
static rtx static rtx
calculate_giv_inc (pattern, src_insn, regno) calculate_giv_inc (rtx pattern, rtx src_insn, unsigned int regno)
rtx pattern, src_insn;
unsigned int regno;
{ {
rtx increment; rtx increment;
rtx increment_total = 0; rtx increment_total = 0;
...@@ -1697,9 +1686,7 @@ calculate_giv_inc (pattern, src_insn, regno) ...@@ -1697,9 +1686,7 @@ calculate_giv_inc (pattern, src_insn, regno)
the reg_map entries can change during copying. */ the reg_map entries can change during copying. */
static rtx static rtx
initial_reg_note_copy (notes, map) initial_reg_note_copy (rtx notes, struct inline_remap *map)
rtx notes;
struct inline_remap *map;
{ {
rtx copy; rtx copy;
...@@ -1725,9 +1712,7 @@ initial_reg_note_copy (notes, map) ...@@ -1725,9 +1712,7 @@ initial_reg_note_copy (notes, map)
/* Fixup insn references in copied REG_NOTES. */ /* Fixup insn references in copied REG_NOTES. */
static void static void
final_reg_note_copy (notesp, map) final_reg_note_copy (rtx *notesp, struct inline_remap *map)
rtx *notesp;
struct inline_remap *map;
{ {
while (*notesp) while (*notesp)
{ {
...@@ -1757,16 +1742,11 @@ final_reg_note_copy (notesp, map) ...@@ -1757,16 +1742,11 @@ final_reg_note_copy (notesp, map)
This is very similar to a loop in expand_inline_function. */ This is very similar to a loop in expand_inline_function. */
static void static void
copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration, copy_loop_body (struct loop *loop, rtx copy_start, rtx copy_end,
unroll_type, start_label, loop_end, insert_before, struct inline_remap *map, rtx exit_label,
copy_notes_from) int last_iteration, enum unroll_types unroll_type,
struct loop *loop; rtx start_label, rtx loop_end, rtx insert_before,
rtx copy_start, copy_end; rtx copy_notes_from)
struct inline_remap *map;
rtx exit_label;
int last_iteration;
enum unroll_types unroll_type;
rtx start_label, loop_end, insert_before, copy_notes_from;
{ {
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
rtx insn, pattern; rtx insn, pattern;
...@@ -2326,8 +2306,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration, ...@@ -2326,8 +2306,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
won't fit in the immediate field of a PLUS insns. */ won't fit in the immediate field of a PLUS insns. */
void void
emit_unrolled_add (dest_reg, src_reg, increment) emit_unrolled_add (rtx dest_reg, rtx src_reg, rtx increment)
rtx dest_reg, src_reg, increment;
{ {
rtx result; rtx result;
...@@ -2347,9 +2326,7 @@ emit_unrolled_add (dest_reg, src_reg, increment) ...@@ -2347,9 +2326,7 @@ emit_unrolled_add (dest_reg, src_reg, increment)
and uses a negligible amount of CPU time on average. */ and uses a negligible amount of CPU time on average. */
int int
back_branch_in_range_p (loop, insn) back_branch_in_range_p (const struct loop *loop, rtx insn)
const struct loop *loop;
rtx insn;
{ {
rtx p, q, target_insn; rtx p, q, target_insn;
rtx loop_start = loop->start; rtx loop_start = loop->start;
...@@ -2395,9 +2372,7 @@ back_branch_in_range_p (loop, insn) ...@@ -2395,9 +2372,7 @@ back_branch_in_range_p (loop, insn)
value of giv's. */ value of giv's. */
static rtx static rtx
fold_rtx_mult_add (mult1, mult2, add1, mode) fold_rtx_mult_add (rtx mult1, rtx mult2, rtx add1, enum machine_mode mode)
rtx mult1, mult2, add1;
enum machine_mode mode;
{ {
rtx temp, mult_res; rtx temp, mult_res;
rtx result; rtx result;
...@@ -2444,8 +2419,7 @@ fold_rtx_mult_add (mult1, mult2, add1, mode) ...@@ -2444,8 +2419,7 @@ fold_rtx_mult_add (mult1, mult2, add1, mode)
if it can be calculated. Otherwise, returns 0. */ if it can be calculated. Otherwise, returns 0. */
rtx rtx
biv_total_increment (bl) biv_total_increment (const struct iv_class *bl)
const struct iv_class *bl;
{ {
struct induction *v; struct induction *v;
rtx result; rtx result;
...@@ -2496,10 +2470,8 @@ biv_total_increment (bl) ...@@ -2496,10 +2470,8 @@ biv_total_increment (bl)
times, since multiplies by small integers (1,2,3,4) are very cheap. */ times, since multiplies by small integers (1,2,3,4) are very cheap. */
static int static int
find_splittable_regs (loop, unroll_type, unroll_number) find_splittable_regs (const struct loop *loop,
const struct loop *loop; enum unroll_types unroll_type, int unroll_number)
enum unroll_types unroll_type;
int unroll_number;
{ {
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
struct iv_class *bl; struct iv_class *bl;
...@@ -2655,12 +2627,9 @@ find_splittable_regs (loop, unroll_type, unroll_number) ...@@ -2655,12 +2627,9 @@ find_splittable_regs (loop, unroll_type, unroll_number)
Return the number of instructions that set splittable registers. */ Return the number of instructions that set splittable registers. */
static int static int
find_splittable_givs (loop, bl, unroll_type, increment, unroll_number) find_splittable_givs (const struct loop *loop, struct iv_class *bl,
const struct loop *loop; enum unroll_types unroll_type, rtx increment,
struct iv_class *bl; int unroll_number ATTRIBUTE_UNUSED)
enum unroll_types unroll_type;
rtx increment;
int unroll_number ATTRIBUTE_UNUSED;
{ {
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
struct induction *v, *v2; struct induction *v, *v2;
...@@ -2894,9 +2863,7 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number) ...@@ -2894,9 +2863,7 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
it can search past if statements and other similar structures. */ it can search past if statements and other similar structures. */
static int static int
reg_dead_after_loop (loop, reg) reg_dead_after_loop (const struct loop *loop, rtx reg)
const struct loop *loop;
rtx reg;
{ {
rtx insn, label; rtx insn, label;
enum rtx_code code; enum rtx_code code;
...@@ -2966,9 +2933,7 @@ reg_dead_after_loop (loop, reg) ...@@ -2966,9 +2933,7 @@ reg_dead_after_loop (loop, reg)
the end of the loop. If we can do it, return that value. */ the end of the loop. If we can do it, return that value. */
rtx rtx
final_biv_value (loop, bl) final_biv_value (const struct loop *loop, struct iv_class *bl)
const struct loop *loop;
struct iv_class *bl;
{ {
unsigned HOST_WIDE_INT n_iterations = LOOP_INFO (loop)->n_iterations; unsigned HOST_WIDE_INT n_iterations = LOOP_INFO (loop)->n_iterations;
rtx increment, tem; rtx increment, tem;
...@@ -3040,9 +3005,7 @@ final_biv_value (loop, bl) ...@@ -3040,9 +3005,7 @@ final_biv_value (loop, bl)
the end of the loop. If we can do it, return that value. */ the end of the loop. If we can do it, return that value. */
rtx rtx
final_giv_value (loop, v) final_giv_value (const struct loop *loop, struct induction *v)
const struct loop *loop;
struct induction *v;
{ {
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
struct iv_class *bl; struct iv_class *bl;
...@@ -3169,9 +3132,7 @@ final_giv_value (loop, v) ...@@ -3169,9 +3132,7 @@ final_giv_value (loop, v)
the SET_SRC of REG. */ the SET_SRC of REG. */
static rtx static rtx
loop_find_equiv_value (loop, reg) loop_find_equiv_value (const struct loop *loop, rtx reg)
const struct loop *loop;
rtx reg;
{ {
rtx loop_start = loop->start; rtx loop_start = loop->start;
rtx insn, set; rtx insn, set;
...@@ -3224,8 +3185,7 @@ loop_find_equiv_value (loop, reg) ...@@ -3224,8 +3185,7 @@ loop_find_equiv_value (loop, reg)
the proper form. */ the proper form. */
static rtx static rtx
subtract_reg_term (op, reg) subtract_reg_term (rtx op, rtx reg)
rtx op, reg;
{ {
if (op == reg) if (op == reg)
return const0_rtx; return const0_rtx;
...@@ -3245,8 +3205,7 @@ subtract_reg_term (op, reg) ...@@ -3245,8 +3205,7 @@ subtract_reg_term (op, reg)
REG or a PLUS of a REG. */ REG or a PLUS of a REG. */
static rtx static rtx
find_common_reg_term (op0, op1) find_common_reg_term (rtx op0, rtx op1)
rtx op0, op1;
{ {
if ((GET_CODE (op0) == REG || GET_CODE (op0) == PLUS) if ((GET_CODE (op0) == REG || GET_CODE (op0) == PLUS)
&& (GET_CODE (op1) == REG || GET_CODE (op1) == PLUS)) && (GET_CODE (op1) == REG || GET_CODE (op1) == PLUS))
...@@ -3282,8 +3241,7 @@ find_common_reg_term (op0, op1) ...@@ -3282,8 +3241,7 @@ find_common_reg_term (op0, op1)
be calculated, otherwise returns zero. */ be calculated, otherwise returns zero. */
unsigned HOST_WIDE_INT unsigned HOST_WIDE_INT
loop_iterations (loop) loop_iterations (struct loop *loop)
struct loop *loop;
{ {
struct loop_info *loop_info = LOOP_INFO (loop); struct loop_info *loop_info = LOOP_INFO (loop);
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
...@@ -3911,9 +3869,7 @@ loop_iterations (loop) ...@@ -3911,9 +3869,7 @@ loop_iterations (loop)
copying. */ copying. */
static rtx static rtx
remap_split_bivs (loop, x) remap_split_bivs (struct loop *loop, rtx x)
struct loop *loop;
rtx x;
{ {
struct loop_ivs *ivs = LOOP_IVS (loop); struct loop_ivs *ivs = LOOP_IVS (loop);
enum rtx_code code; enum rtx_code code;
...@@ -3981,12 +3937,8 @@ remap_split_bivs (loop, x) ...@@ -3981,12 +3937,8 @@ remap_split_bivs (loop, x)
must dominate LAST_UID. */ must dominate LAST_UID. */
int int
set_dominates_use (regno, first_uid, last_uid, copy_start, copy_end) set_dominates_use (int regno, int first_uid, int last_uid, rtx copy_start,
int regno; rtx copy_end)
int first_uid;
int last_uid;
rtx copy_start;
rtx copy_end;
{ {
int passed_jump = 0; int passed_jump = 0;
rtx p = NEXT_INSN (copy_start); rtx p = NEXT_INSN (copy_start);
...@@ -4033,9 +3985,7 @@ set_dominates_use (regno, first_uid, last_uid, copy_start, copy_end) ...@@ -4033,9 +3985,7 @@ set_dominates_use (regno, first_uid, last_uid, copy_start, copy_end)
deleted so that we execute the single iteration. */ deleted so that we execute the single iteration. */
static rtx static rtx
ujump_to_loop_cont (loop_start, loop_cont) ujump_to_loop_cont (rtx loop_start, rtx loop_cont)
rtx loop_start;
rtx loop_cont;
{ {
rtx x, label, label_ref; rtx x, label, label_ref;
......
...@@ -140,51 +140,48 @@ tree last_assemble_variable_decl; ...@@ -140,51 +140,48 @@ tree last_assemble_variable_decl;
static HOST_WIDE_INT const_alias_set; static HOST_WIDE_INT const_alias_set;
static const char *strip_reg_name PARAMS ((const char *)); static const char *strip_reg_name (const char *);
static int contains_pointers_p PARAMS ((tree)); static int contains_pointers_p (tree);
static void decode_addr_const PARAMS ((tree, struct addr_const *)); static void decode_addr_const (tree, struct addr_const *);
static hashval_t const_desc_hash PARAMS ((const void *)); static hashval_t const_desc_hash (const void *);
static int const_desc_eq PARAMS ((const void *, const void *)); static int const_desc_eq (const void *, const void *);
static hashval_t const_hash_1 PARAMS ((const tree)); static hashval_t const_hash_1 (const tree);
static int compare_constant PARAMS ((const tree, const tree)); static int compare_constant (const tree, const tree);
static tree copy_constant PARAMS ((tree)); static tree copy_constant (tree);
static void output_constant_def_contents PARAMS ((rtx)); static void output_constant_def_contents (rtx);
static void decode_rtx_const PARAMS ((enum machine_mode, rtx, static void decode_rtx_const (enum machine_mode, rtx, struct rtx_const *);
struct rtx_const *)); static unsigned int const_hash_rtx (enum machine_mode, rtx);
static unsigned int const_hash_rtx PARAMS ((enum machine_mode, rtx)); static int compare_constant_rtx (enum machine_mode, rtx,
static int compare_constant_rtx struct constant_descriptor_rtx *);
PARAMS ((enum machine_mode, rtx, struct constant_descriptor_rtx *));
static struct constant_descriptor_rtx * record_constant_rtx static struct constant_descriptor_rtx * record_constant_rtx
PARAMS ((enum machine_mode, rtx)); (enum machine_mode, rtx);
static struct pool_constant *find_pool_constant PARAMS ((struct function *, rtx)); static struct pool_constant *find_pool_constant (struct function *, rtx);
static void mark_constant_pool PARAMS ((void)); static void mark_constant_pool (void);
static void mark_constants PARAMS ((rtx)); static void mark_constants (rtx);
static int mark_constant PARAMS ((rtx *current_rtx, void *data)); static int mark_constant (rtx *current_rtx, void *data);
static int output_addressed_constants PARAMS ((tree)); static int output_addressed_constants (tree);
static unsigned HOST_WIDE_INT array_size_for_constructor PARAMS ((tree)); static unsigned HOST_WIDE_INT array_size_for_constructor (tree);
static unsigned min_align PARAMS ((unsigned, unsigned)); static unsigned min_align (unsigned, unsigned);
static void output_constructor PARAMS ((tree, unsigned HOST_WIDE_INT, static void output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int);
unsigned int)); static void globalize_decl (tree);
static void globalize_decl PARAMS ((tree)); static void maybe_assemble_visibility (tree);
static void maybe_assemble_visibility PARAMS ((tree)); static int in_named_entry_eq (const void *, const void *);
static int in_named_entry_eq PARAMS ((const void *, const void *)); static hashval_t in_named_entry_hash (const void *);
static hashval_t in_named_entry_hash PARAMS ((const void *));
#ifdef ASM_OUTPUT_BSS #ifdef ASM_OUTPUT_BSS
static void asm_output_bss PARAMS ((FILE *, tree, const char *, static void asm_output_bss (FILE *, tree, const char *,
unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT);
unsigned HOST_WIDE_INT));
#endif #endif
#ifdef BSS_SECTION_ASM_OP #ifdef BSS_SECTION_ASM_OP
#ifdef ASM_OUTPUT_ALIGNED_BSS #ifdef ASM_OUTPUT_ALIGNED_BSS
static void asm_output_aligned_bss static void asm_output_aligned_bss (FILE *, tree, const char *,
PARAMS ((FILE *, tree, const char *, unsigned HOST_WIDE_INT, int)
unsigned HOST_WIDE_INT, int)) ATTRIBUTE_UNUSED; ATTRIBUTE_UNUSED;
#endif #endif
#endif /* BSS_SECTION_ASM_OP */ #endif /* BSS_SECTION_ASM_OP */
static bool asm_emit_uninitialised PARAMS ((tree, const char*, static bool asm_emit_uninitialised (tree, const char*,
unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT)); unsigned HOST_WIDE_INT);
static void mark_weak PARAMS ((tree)); static void mark_weak (tree);
enum in_section { no_section, in_text, in_data, in_named enum in_section { no_section, in_text, in_data, in_named
#ifdef BSS_SECTION_ASM_OP #ifdef BSS_SECTION_ASM_OP
...@@ -234,7 +231,7 @@ EXTRA_SECTION_FUNCTIONS ...@@ -234,7 +231,7 @@ EXTRA_SECTION_FUNCTIONS
/* Tell assembler to switch to text section. */ /* Tell assembler to switch to text section. */
void void
text_section () text_section (void)
{ {
if (in_section != in_text) if (in_section != in_text)
{ {
...@@ -250,7 +247,7 @@ text_section () ...@@ -250,7 +247,7 @@ text_section ()
/* Tell assembler to switch to data section. */ /* Tell assembler to switch to data section. */
void void
data_section () data_section (void)
{ {
if (in_section != in_data) if (in_section != in_data)
{ {
...@@ -272,7 +269,7 @@ data_section () ...@@ -272,7 +269,7 @@ data_section ()
the text section. */ the text section. */
void void
readonly_data_section () readonly_data_section (void)
{ {
#ifdef READONLY_DATA_SECTION #ifdef READONLY_DATA_SECTION
READONLY_DATA_SECTION (); /* Note this can call data_section. */ READONLY_DATA_SECTION (); /* Note this can call data_section. */
...@@ -293,7 +290,7 @@ readonly_data_section () ...@@ -293,7 +290,7 @@ readonly_data_section ()
/* Determine if we're in the text section. */ /* Determine if we're in the text section. */
int int
in_text_section () in_text_section (void)
{ {
return in_section == in_text; return in_section == in_text;
} }
...@@ -301,7 +298,7 @@ in_text_section () ...@@ -301,7 +298,7 @@ in_text_section ()
/* Determine if we're in the data section. */ /* Determine if we're in the data section. */
int int
in_data_section () in_data_section (void)
{ {
return in_section == in_data; return in_section == in_data;
} }
...@@ -309,9 +306,7 @@ in_data_section () ...@@ -309,9 +306,7 @@ in_data_section ()
/* Helper routines for maintaining in_named_htab. */ /* Helper routines for maintaining in_named_htab. */
static int static int
in_named_entry_eq (p1, p2) in_named_entry_eq (const void *p1, const void *p2)
const void *p1;
const void *p2;
{ {
const struct in_named_entry *old = p1; const struct in_named_entry *old = p1;
const char *new = p2; const char *new = p2;
...@@ -320,8 +315,7 @@ in_named_entry_eq (p1, p2) ...@@ -320,8 +315,7 @@ in_named_entry_eq (p1, p2)
} }
static hashval_t static hashval_t
in_named_entry_hash (p) in_named_entry_hash (const void *p)
const void *p;
{ {
const struct in_named_entry *old = p; const struct in_named_entry *old = p;
return htab_hash_string (old->name); return htab_hash_string (old->name);
...@@ -333,8 +327,7 @@ in_named_entry_hash (p) ...@@ -333,8 +327,7 @@ in_named_entry_hash (p)
has not been seen. */ has not been seen. */
unsigned int unsigned int
get_named_section_flags (section) get_named_section_flags (const char *section)
const char *section;
{ {
struct in_named_entry **slot; struct in_named_entry **slot;
...@@ -350,8 +343,7 @@ get_named_section_flags (section) ...@@ -350,8 +343,7 @@ get_named_section_flags (section)
section will return false. */ section will return false. */
bool bool
named_section_first_declaration (name) named_section_first_declaration (const char *name)
const char *name;
{ {
struct in_named_entry **slot; struct in_named_entry **slot;
...@@ -374,9 +366,7 @@ named_section_first_declaration (name) ...@@ -374,9 +366,7 @@ named_section_first_declaration (name)
different set of flags, return false. */ different set of flags, return false. */
bool bool
set_named_section_flags (section, flags) set_named_section_flags (const char *section, unsigned int flags)
const char *section;
unsigned int flags;
{ {
struct in_named_entry **slot, *entry; struct in_named_entry **slot, *entry;
...@@ -402,9 +392,7 @@ set_named_section_flags (section, flags) ...@@ -402,9 +392,7 @@ set_named_section_flags (section, flags)
/* Tell assembler to change to section NAME with attributes FLAGS. */ /* Tell assembler to change to section NAME with attributes FLAGS. */
void void
named_section_flags (name, flags) named_section_flags (const char *name, unsigned int flags)
const char *name;
unsigned int flags;
{ {
if (in_section != in_named || strcmp (name, in_named_name) != 0) if (in_section != in_named || strcmp (name, in_named_name) != 0)
{ {
...@@ -429,10 +417,7 @@ named_section_flags (name, flags) ...@@ -429,10 +417,7 @@ named_section_flags (name, flags)
If RELOC is 1, the initializer for DECL contains relocs. */ If RELOC is 1, the initializer for DECL contains relocs. */
void void
named_section (decl, name, reloc) named_section (tree decl, const char *name, int reloc)
tree decl;
const char *name;
int reloc;
{ {
unsigned int flags; unsigned int flags;
...@@ -461,10 +446,8 @@ named_section (decl, name, reloc) ...@@ -461,10 +446,8 @@ named_section (decl, name, reloc)
/* If required, set DECL_SECTION_NAME to a unique name. */ /* If required, set DECL_SECTION_NAME to a unique name. */
void void
resolve_unique_section (decl, reloc, flag_function_or_data_sections) resolve_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED,
tree decl; int flag_function_or_data_sections)
int reloc ATTRIBUTE_UNUSED;
int flag_function_or_data_sections;
{ {
if (DECL_SECTION_NAME (decl) == NULL_TREE if (DECL_SECTION_NAME (decl) == NULL_TREE
&& targetm.have_named_sections && targetm.have_named_sections
...@@ -478,7 +461,7 @@ resolve_unique_section (decl, reloc, flag_function_or_data_sections) ...@@ -478,7 +461,7 @@ resolve_unique_section (decl, reloc, flag_function_or_data_sections)
/* Tell the assembler to switch to the bss section. */ /* Tell the assembler to switch to the bss section. */
void void
bss_section () bss_section (void)
{ {
if (in_section != in_bss) if (in_section != in_bss)
{ {
...@@ -501,11 +484,10 @@ bss_section () ...@@ -501,11 +484,10 @@ bss_section ()
support is localized here. */ support is localized here. */
static void static void
asm_output_bss (file, decl, name, size, rounded) asm_output_bss (FILE *file, tree decl ATTRIBUTE_UNUSED,
FILE *file; const char *name,
tree decl ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT size ATTRIBUTE_UNUSED,
const char *name; unsigned HOST_WIDE_INT rounded)
unsigned HOST_WIDE_INT size ATTRIBUTE_UNUSED, rounded;
{ {
(*targetm.asm_out.globalize_label) (file, name); (*targetm.asm_out.globalize_label) (file, name);
bss_section (); bss_section ();
...@@ -529,12 +511,9 @@ asm_output_bss (file, decl, name, size, rounded) ...@@ -529,12 +511,9 @@ asm_output_bss (file, decl, name, size, rounded)
support is localized here. */ support is localized here. */
static void static void
asm_output_aligned_bss (file, decl, name, size, align) asm_output_aligned_bss (FILE *file, tree decl ATTRIBUTE_UNUSED,
FILE *file; const char *name, unsigned HOST_WIDE_INT size,
tree decl ATTRIBUTE_UNUSED; int align)
const char *name;
unsigned HOST_WIDE_INT size;
int align;
{ {
bss_section (); bss_section ();
ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT)); ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
...@@ -559,8 +538,7 @@ asm_output_aligned_bss (file, decl, name, size, align) ...@@ -559,8 +538,7 @@ asm_output_aligned_bss (file, decl, name, size, align)
safer to handle it. */ safer to handle it. */
void void
function_section (decl) function_section (tree decl)
tree decl;
{ {
if (decl != NULL_TREE if (decl != NULL_TREE
&& DECL_SECTION_NAME (decl) != NULL_TREE) && DECL_SECTION_NAME (decl) != NULL_TREE)
...@@ -573,9 +551,7 @@ function_section (decl) ...@@ -573,9 +551,7 @@ function_section (decl)
argument to SELECT_SECTION. */ argument to SELECT_SECTION. */
void void
variable_section (decl, reloc) variable_section (tree decl, int reloc)
tree decl;
int reloc;
{ {
if (IN_NAMED_SECTION (decl)) if (IN_NAMED_SECTION (decl))
named_section (decl, NULL, reloc); named_section (decl, NULL, reloc);
...@@ -586,10 +562,9 @@ variable_section (decl, reloc) ...@@ -586,10 +562,9 @@ variable_section (decl, reloc)
/* Tell assembler to switch to the section for string merging. */ /* Tell assembler to switch to the section for string merging. */
void void
mergeable_string_section (decl, align, flags) mergeable_string_section (tree decl ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED,
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; unsigned int flags ATTRIBUTE_UNUSED)
unsigned int flags ATTRIBUTE_UNUSED;
{ {
#ifdef HAVE_GAS_SHF_MERGE #ifdef HAVE_GAS_SHF_MERGE
if (flag_merge_constants if (flag_merge_constants
...@@ -661,10 +636,9 @@ mergeable_string_section (decl, align, flags) ...@@ -661,10 +636,9 @@ mergeable_string_section (decl, align, flags)
/* Tell assembler to switch to the section for constant merging. */ /* Tell assembler to switch to the section for constant merging. */
void void
mergeable_constant_section (mode, align, flags) mergeable_constant_section (enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED,
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; unsigned int flags ATTRIBUTE_UNUSED)
unsigned int flags ATTRIBUTE_UNUSED;
{ {
#ifdef HAVE_GAS_SHF_MERGE #ifdef HAVE_GAS_SHF_MERGE
unsigned int modesize = GET_MODE_BITSIZE (mode); unsigned int modesize = GET_MODE_BITSIZE (mode);
...@@ -691,8 +665,7 @@ mergeable_constant_section (mode, align, flags) ...@@ -691,8 +665,7 @@ mergeable_constant_section (mode, align, flags)
/* Given NAME, a putative register name, discard any customary prefixes. */ /* Given NAME, a putative register name, discard any customary prefixes. */
static const char * static const char *
strip_reg_name (name) strip_reg_name (const char *name)
const char *name;
{ {
#ifdef REGISTER_PREFIX #ifdef REGISTER_PREFIX
if (!strncmp (name, REGISTER_PREFIX, strlen (REGISTER_PREFIX))) if (!strncmp (name, REGISTER_PREFIX, strlen (REGISTER_PREFIX)))
...@@ -712,8 +685,7 @@ strip_reg_name (name) ...@@ -712,8 +685,7 @@ strip_reg_name (name)
Prefixes such as % are optional. */ Prefixes such as % are optional. */
int int
decode_reg_name (asmspec) decode_reg_name (const char *asmspec)
const char *asmspec;
{ {
if (asmspec != 0) if (asmspec != 0)
{ {
...@@ -776,9 +748,7 @@ decode_reg_name (asmspec) ...@@ -776,9 +748,7 @@ decode_reg_name (asmspec)
This is never called for PARM_DECL nodes. */ This is never called for PARM_DECL nodes. */
void void
make_decl_rtl (decl, asmspec) make_decl_rtl (tree decl, const char *asmspec)
tree decl;
const char *asmspec;
{ {
int top_level = (DECL_CONTEXT (decl) == NULL_TREE); int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
const char *name = 0; const char *name = 0;
...@@ -931,7 +901,7 @@ make_decl_rtl (decl, asmspec) ...@@ -931,7 +901,7 @@ make_decl_rtl (decl, asmspec)
x = gen_rtx_SYMBOL_REF (Pmode, name); x = gen_rtx_SYMBOL_REF (Pmode, name);
SYMBOL_REF_WEAK (x) = DECL_WEAK (decl); SYMBOL_REF_WEAK (x) = DECL_WEAK (decl);
SYMBOL_REF_DECL (x) = decl; SYMBOL_REF_DECL (x) = decl;
x = gen_rtx_MEM (DECL_MODE (decl), x); x = gen_rtx_MEM (DECL_MODE (decl), x);
if (TREE_CODE (decl) != FUNCTION_DECL) if (TREE_CODE (decl) != FUNCTION_DECL)
set_mem_attributes (x, decl, 1); set_mem_attributes (x, decl, 1);
...@@ -948,8 +918,7 @@ make_decl_rtl (decl, asmspec) ...@@ -948,8 +918,7 @@ make_decl_rtl (decl, asmspec)
Use this only for static variables. */ Use this only for static variables. */
void void
make_var_volatile (var) make_var_volatile (tree var)
tree var;
{ {
if (GET_CODE (DECL_RTL (var)) != MEM) if (GET_CODE (DECL_RTL (var)) != MEM)
abort (); abort ();
...@@ -961,8 +930,7 @@ make_var_volatile (var) ...@@ -961,8 +930,7 @@ make_var_volatile (var)
for an `asm' keyword used between functions. */ for an `asm' keyword used between functions. */
void void
assemble_asm (string) assemble_asm (tree string)
tree string;
{ {
app_enable (); app_enable ();
...@@ -977,9 +945,7 @@ assemble_asm (string) ...@@ -977,9 +945,7 @@ assemble_asm (string)
between 0 and MAX_INIT_PRIORITY. */ between 0 and MAX_INIT_PRIORITY. */
void void
default_stabs_asm_out_destructor (symbol, priority) default_stabs_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
rtx symbol;
int priority ATTRIBUTE_UNUSED;
{ {
/* Tell GNU LD that this is part of the static destructor set. /* Tell GNU LD that this is part of the static destructor set.
This will work for any system that uses stabs, most usefully This will work for any system that uses stabs, most usefully
...@@ -990,9 +956,7 @@ default_stabs_asm_out_destructor (symbol, priority) ...@@ -990,9 +956,7 @@ default_stabs_asm_out_destructor (symbol, priority)
} }
void void
default_named_section_asm_out_destructor (symbol, priority) default_named_section_asm_out_destructor (rtx symbol, int priority)
rtx symbol;
int priority;
{ {
const char *section = ".dtors"; const char *section = ".dtors";
char buf[16]; char buf[16];
...@@ -1015,7 +979,7 @@ default_named_section_asm_out_destructor (symbol, priority) ...@@ -1015,7 +979,7 @@ default_named_section_asm_out_destructor (symbol, priority)
#ifdef DTORS_SECTION_ASM_OP #ifdef DTORS_SECTION_ASM_OP
void void
dtors_section () dtors_section (void)
{ {
if (in_section != in_dtors) if (in_section != in_dtors)
{ {
...@@ -1026,9 +990,8 @@ dtors_section () ...@@ -1026,9 +990,8 @@ dtors_section ()
} }
void void
default_dtor_section_asm_out_destructor (symbol, priority) default_dtor_section_asm_out_destructor (rtx symbol,
rtx symbol; int priority ATTRIBUTE_UNUSED)
int priority ATTRIBUTE_UNUSED;
{ {
dtors_section (); dtors_section ();
assemble_align (POINTER_SIZE); assemble_align (POINTER_SIZE);
...@@ -1039,9 +1002,7 @@ default_dtor_section_asm_out_destructor (symbol, priority) ...@@ -1039,9 +1002,7 @@ default_dtor_section_asm_out_destructor (symbol, priority)
/* Likewise for global constructors. */ /* Likewise for global constructors. */
void void
default_stabs_asm_out_constructor (symbol, priority) default_stabs_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
rtx symbol;
int priority ATTRIBUTE_UNUSED;
{ {
/* Tell GNU LD that this is part of the static destructor set. /* Tell GNU LD that this is part of the static destructor set.
This will work for any system that uses stabs, most usefully This will work for any system that uses stabs, most usefully
...@@ -1052,9 +1013,7 @@ default_stabs_asm_out_constructor (symbol, priority) ...@@ -1052,9 +1013,7 @@ default_stabs_asm_out_constructor (symbol, priority)
} }
void void
default_named_section_asm_out_constructor (symbol, priority) default_named_section_asm_out_constructor (rtx symbol, int priority)
rtx symbol;
int priority;
{ {
const char *section = ".ctors"; const char *section = ".ctors";
char buf[16]; char buf[16];
...@@ -1077,7 +1036,7 @@ default_named_section_asm_out_constructor (symbol, priority) ...@@ -1077,7 +1036,7 @@ default_named_section_asm_out_constructor (symbol, priority)
#ifdef CTORS_SECTION_ASM_OP #ifdef CTORS_SECTION_ASM_OP
void void
ctors_section () ctors_section (void)
{ {
if (in_section != in_ctors) if (in_section != in_ctors)
{ {
...@@ -1088,9 +1047,8 @@ ctors_section () ...@@ -1088,9 +1047,8 @@ ctors_section ()
} }
void void
default_ctor_section_asm_out_constructor (symbol, priority) default_ctor_section_asm_out_constructor (rtx symbol,
rtx symbol; int priority ATTRIBUTE_UNUSED)
int priority ATTRIBUTE_UNUSED;
{ {
ctors_section (); ctors_section ();
assemble_align (POINTER_SIZE); assemble_align (POINTER_SIZE);
...@@ -1114,9 +1072,7 @@ default_ctor_section_asm_out_constructor (symbol, priority) ...@@ -1114,9 +1072,7 @@ default_ctor_section_asm_out_constructor (symbol, priority)
constant pool data. */ constant pool data. */
void void
assemble_start_function (decl, fnname) assemble_start_function (tree decl, const char *fnname)
tree decl;
const char *fnname;
{ {
int align; int align;
...@@ -1195,9 +1151,7 @@ assemble_start_function (decl, fnname) ...@@ -1195,9 +1151,7 @@ assemble_start_function (decl, fnname)
function. DECL describes the function. NAME is the function's name. */ function. DECL describes the function. NAME is the function's name. */
void void
assemble_end_function (decl, fnname) assemble_end_function (tree decl, const char *fnname)
tree decl;
const char *fnname;
{ {
#ifdef ASM_DECLARE_FUNCTION_SIZE #ifdef ASM_DECLARE_FUNCTION_SIZE
ASM_DECLARE_FUNCTION_SIZE (asm_out_file, fnname, decl); ASM_DECLARE_FUNCTION_SIZE (asm_out_file, fnname, decl);
...@@ -1212,8 +1166,7 @@ assemble_end_function (decl, fnname) ...@@ -1212,8 +1166,7 @@ assemble_end_function (decl, fnname)
/* Assemble code to leave SIZE bytes of zeros. */ /* Assemble code to leave SIZE bytes of zeros. */
void void
assemble_zeros (size) assemble_zeros (unsigned HOST_WIDE_INT size)
unsigned HOST_WIDE_INT size;
{ {
/* Do no output if -fsyntax-only. */ /* Do no output if -fsyntax-only. */
if (flag_syntax_only) if (flag_syntax_only)
...@@ -1237,8 +1190,7 @@ assemble_zeros (size) ...@@ -1237,8 +1190,7 @@ assemble_zeros (size)
/* Assemble an alignment pseudo op for an ALIGN-bit boundary. */ /* Assemble an alignment pseudo op for an ALIGN-bit boundary. */
void void
assemble_align (align) assemble_align (int align)
int align;
{ {
if (align > BITS_PER_UNIT) if (align > BITS_PER_UNIT)
{ {
...@@ -1249,9 +1201,7 @@ assemble_align (align) ...@@ -1249,9 +1201,7 @@ assemble_align (align)
/* Assemble a string constant with the specified C string as contents. */ /* Assemble a string constant with the specified C string as contents. */
void void
assemble_string (p, size) assemble_string (const char *p, int size)
const char *p;
int size;
{ {
int pos = 0; int pos = 0;
int maximum = 2000; int maximum = 2000;
...@@ -1311,11 +1261,9 @@ assemble_string (p, size) ...@@ -1311,11 +1261,9 @@ assemble_string (p, size)
#endif #endif
static bool static bool
asm_emit_uninitialised (decl, name, size, rounded) asm_emit_uninitialised (tree decl, const char *name,
tree decl; unsigned HOST_WIDE_INT size ATTRIBUTE_UNUSED,
const char *name; unsigned HOST_WIDE_INT rounded ATTRIBUTE_UNUSED)
unsigned HOST_WIDE_INT size ATTRIBUTE_UNUSED;
unsigned HOST_WIDE_INT rounded ATTRIBUTE_UNUSED;
{ {
enum enum
{ {
...@@ -1398,11 +1346,8 @@ asm_emit_uninitialised (decl, name, size, rounded) ...@@ -1398,11 +1346,8 @@ asm_emit_uninitialised (decl, name, size, rounded)
initial value (that will be done by the caller). */ initial value (that will be done by the caller). */
void void
assemble_variable (decl, top_level, at_end, dont_output_data) assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
tree decl; int at_end ATTRIBUTE_UNUSED, int dont_output_data)
int top_level ATTRIBUTE_UNUSED;
int at_end ATTRIBUTE_UNUSED;
int dont_output_data;
{ {
const char *name; const char *name;
unsigned int align; unsigned int align;
...@@ -1638,8 +1583,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data) ...@@ -1638,8 +1583,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
/* Return 1 if type TYPE contains any pointers. */ /* Return 1 if type TYPE contains any pointers. */
static int static int
contains_pointers_p (type) contains_pointers_p (tree type)
tree type;
{ {
switch (TREE_CODE (type)) switch (TREE_CODE (type))
{ {
...@@ -1677,8 +1621,7 @@ contains_pointers_p (type) ...@@ -1677,8 +1621,7 @@ contains_pointers_p (type)
Do nothing if DECL is not external. */ Do nothing if DECL is not external. */
void void
assemble_external (decl) assemble_external (tree decl ATTRIBUTE_UNUSED)
tree decl ATTRIBUTE_UNUSED;
{ {
/* Because most platforms do not define ASM_OUTPUT_EXTERNAL, the /* Because most platforms do not define ASM_OUTPUT_EXTERNAL, the
main body of this code is only rarely exercised. To provide some main body of this code is only rarely exercised. To provide some
...@@ -1706,8 +1649,7 @@ assemble_external (decl) ...@@ -1706,8 +1649,7 @@ assemble_external (decl)
/* Similar, for calling a library function FUN. */ /* Similar, for calling a library function FUN. */
void void
assemble_external_libcall (fun) assemble_external_libcall (rtx fun ATTRIBUTE_UNUSED)
rtx fun ATTRIBUTE_UNUSED;
{ {
#ifdef ASM_OUTPUT_EXTERNAL_LIBCALL #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
/* Declare library function name external when first used, if nec. */ /* Declare library function name external when first used, if nec. */
...@@ -1722,16 +1664,14 @@ assemble_external_libcall (fun) ...@@ -1722,16 +1664,14 @@ assemble_external_libcall (fun)
/* Assemble a label named NAME. */ /* Assemble a label named NAME. */
void void
assemble_label (name) assemble_label (const char *name)
const char *name;
{ {
ASM_OUTPUT_LABEL (asm_out_file, name); ASM_OUTPUT_LABEL (asm_out_file, name);
} }
/* Set the symbol_referenced flag for ID and notify callgraph code. */ /* Set the symbol_referenced flag for ID and notify callgraph code. */
void void
mark_referenced (id) mark_referenced (tree id)
tree id;
{ {
if (!TREE_SYMBOL_REFERENCED (id)) if (!TREE_SYMBOL_REFERENCED (id))
{ {
...@@ -1759,9 +1699,7 @@ mark_referenced (id) ...@@ -1759,9 +1699,7 @@ mark_referenced (id)
Many macros in the tm file are defined to call this function. */ Many macros in the tm file are defined to call this function. */
void void
assemble_name (file, name) assemble_name (FILE *file, const char *name)
FILE *file;
const char *name;
{ {
const char *real_name; const char *real_name;
tree id; tree id;
...@@ -1782,8 +1720,7 @@ assemble_name (file, name) ...@@ -1782,8 +1720,7 @@ assemble_name (file, name)
and return an RTX to refer to its address. */ and return an RTX to refer to its address. */
rtx rtx
assemble_static_space (size) assemble_static_space (unsigned HOST_WIDE_INT size)
unsigned HOST_WIDE_INT size;
{ {
char name[12]; char name[12];
const char *namestring; const char *namestring;
...@@ -1829,7 +1766,7 @@ assemble_static_space (size) ...@@ -1829,7 +1766,7 @@ assemble_static_space (size)
#ifdef TRAMPOLINE_TEMPLATE #ifdef TRAMPOLINE_TEMPLATE
rtx rtx
assemble_trampoline_template () assemble_trampoline_template (void)
{ {
char label[256]; char label[256];
const char *name; const char *name;
...@@ -1868,8 +1805,7 @@ assemble_trampoline_template () ...@@ -1868,8 +1805,7 @@ assemble_trampoline_template ()
that may be assumed after adding the two together. */ that may be assumed after adding the two together. */
static inline unsigned static inline unsigned
min_align (a, b) min_align (unsigned int a, unsigned int b)
unsigned int a, b;
{ {
return (a | b) & -(a | b); return (a | b) & -(a | b);
} }
...@@ -1883,9 +1819,7 @@ min_align (a, b) ...@@ -1883,9 +1819,7 @@ min_align (a, b)
be followed immediately by the object's initial value. */ be followed immediately by the object's initial value. */
const char * const char *
integer_asm_op (size, aligned_p) integer_asm_op (int size, int aligned_p)
int size;
int aligned_p;
{ {
struct asm_int_op *ops; struct asm_int_op *ops;
...@@ -1915,9 +1849,7 @@ integer_asm_op (size, aligned_p) ...@@ -1915,9 +1849,7 @@ integer_asm_op (size, aligned_p)
start of the line, followed immediately by the value of X. */ start of the line, followed immediately by the value of X. */
void void
assemble_integer_with_op (op, x) assemble_integer_with_op (const char *op, rtx x)
const char *op;
rtx x;
{ {
fputs (op, asm_out_file); fputs (op, asm_out_file);
output_addr_const (asm_out_file, x); output_addr_const (asm_out_file, x);
...@@ -1927,10 +1859,9 @@ assemble_integer_with_op (op, x) ...@@ -1927,10 +1859,9 @@ assemble_integer_with_op (op, x)
/* The default implementation of the asm_out.integer target hook. */ /* The default implementation of the asm_out.integer target hook. */
bool bool
default_assemble_integer (x, size, aligned_p) default_assemble_integer (rtx x ATTRIBUTE_UNUSED,
rtx x ATTRIBUTE_UNUSED; unsigned int size ATTRIBUTE_UNUSED,
unsigned int size ATTRIBUTE_UNUSED; int aligned_p ATTRIBUTE_UNUSED)
int aligned_p ATTRIBUTE_UNUSED;
{ {
const char *op = integer_asm_op (size, aligned_p); const char *op = integer_asm_op (size, aligned_p);
return op && (assemble_integer_with_op (op, x), true); return op && (assemble_integer_with_op (op, x), true);
...@@ -1942,11 +1873,7 @@ default_assemble_integer (x, size, aligned_p) ...@@ -1942,11 +1873,7 @@ default_assemble_integer (x, size, aligned_p)
the constant. */ the constant. */
bool bool
assemble_integer (x, size, align, force) assemble_integer (rtx x, unsigned int size, unsigned int align, int force)
rtx x;
unsigned int size;
unsigned int align;
int force;
{ {
int aligned_p; int aligned_p;
...@@ -1991,10 +1918,7 @@ assemble_integer (x, size, align, force) ...@@ -1991,10 +1918,7 @@ assemble_integer (x, size, align, force)
} }
void void
assemble_real (d, mode, align) assemble_real (REAL_VALUE_TYPE d, enum machine_mode mode, unsigned int align)
REAL_VALUE_TYPE d;
enum machine_mode mode;
unsigned int align;
{ {
long data[4]; long data[4];
long l; long l;
...@@ -2083,9 +2007,7 @@ struct addr_const GTY(()) ...@@ -2083,9 +2007,7 @@ struct addr_const GTY(())
}; };
static void static void
decode_addr_const (exp, value) decode_addr_const (tree exp, struct addr_const *value)
tree exp;
struct addr_const *value;
{ {
tree target = TREE_OPERAND (exp, 0); tree target = TREE_OPERAND (exp, 0);
int offset = 0; int offset = 0;
...@@ -2189,22 +2111,19 @@ struct constant_descriptor_tree GTY(()) ...@@ -2189,22 +2111,19 @@ struct constant_descriptor_tree GTY(())
static GTY((param_is (struct constant_descriptor_tree))) static GTY((param_is (struct constant_descriptor_tree)))
htab_t const_desc_htab; htab_t const_desc_htab;
static struct constant_descriptor_tree * build_constant_desc PARAMS ((tree)); static struct constant_descriptor_tree * build_constant_desc (tree);
static void maybe_output_constant_def_contents static void maybe_output_constant_def_contents (struct constant_descriptor_tree *, int);
PARAMS ((struct constant_descriptor_tree *, int));
/* Compute a hash code for a constant expression. */ /* Compute a hash code for a constant expression. */
static hashval_t static hashval_t
const_desc_hash (ptr) const_desc_hash (const void *ptr)
const void *ptr;
{ {
return const_hash_1 (((struct constant_descriptor_tree *)ptr)->value); return const_hash_1 (((struct constant_descriptor_tree *)ptr)->value);
} }
static hashval_t static hashval_t
const_hash_1 (exp) const_hash_1 (const tree exp)
const tree exp;
{ {
const char *p; const char *p;
hashval_t hi; hashval_t hi;
...@@ -2303,9 +2222,7 @@ const_hash_1 (exp) ...@@ -2303,9 +2222,7 @@ const_hash_1 (exp)
/* Wrapper of compare_constant, for the htab interface. */ /* Wrapper of compare_constant, for the htab interface. */
static int static int
const_desc_eq (p1, p2) const_desc_eq (const void *p1, const void *p2)
const void *p1;
const void *p2;
{ {
return compare_constant (((struct constant_descriptor_tree *)p1)->value, return compare_constant (((struct constant_descriptor_tree *)p1)->value,
((struct constant_descriptor_tree *)p2)->value); ((struct constant_descriptor_tree *)p2)->value);
...@@ -2315,9 +2232,7 @@ const_desc_eq (p1, p2) ...@@ -2315,9 +2232,7 @@ const_desc_eq (p1, p2)
the same bit pattern on output. */ the same bit pattern on output. */
static int static int
compare_constant (t1, t2) compare_constant (const tree t1, const tree t2)
const tree t1;
const tree t2;
{ {
enum tree_code typecode; enum tree_code typecode;
...@@ -2469,8 +2384,7 @@ compare_constant (t1, t2) ...@@ -2469,8 +2384,7 @@ compare_constant (t1, t2)
handles the same types of nodes that compare_constant handles. */ handles the same types of nodes that compare_constant handles. */
static tree static tree
copy_constant (exp) copy_constant (tree exp)
tree exp;
{ {
switch (TREE_CODE (exp)) switch (TREE_CODE (exp))
{ {
...@@ -2542,8 +2456,7 @@ copy_constant (exp) ...@@ -2542,8 +2456,7 @@ copy_constant (exp)
Caller is responsible for updating the hash table. */ Caller is responsible for updating the hash table. */
static struct constant_descriptor_tree * static struct constant_descriptor_tree *
build_constant_desc (exp) build_constant_desc (tree exp)
tree exp;
{ {
rtx symbol; rtx symbol;
rtx rtl; rtx rtl;
...@@ -2596,9 +2509,7 @@ build_constant_desc (exp) ...@@ -2596,9 +2509,7 @@ build_constant_desc (exp)
The const_hash_table records which constants already have label strings. */ The const_hash_table records which constants already have label strings. */
rtx rtx
output_constant_def (exp, defer) output_constant_def (tree exp, int defer)
tree exp;
int defer;
{ {
struct constant_descriptor_tree *desc; struct constant_descriptor_tree *desc;
struct constant_descriptor_tree key; struct constant_descriptor_tree key;
...@@ -2623,9 +2534,8 @@ output_constant_def (exp, defer) ...@@ -2623,9 +2534,8 @@ output_constant_def (exp, defer)
/* Subroutine of output_constant_def: Decide whether or not we need to /* Subroutine of output_constant_def: Decide whether or not we need to
output the constant DESC now, and if so, do it. */ output the constant DESC now, and if so, do it. */
static void static void
maybe_output_constant_def_contents (desc, defer) maybe_output_constant_def_contents (struct constant_descriptor_tree *desc,
struct constant_descriptor_tree *desc; int defer)
int defer;
{ {
rtx symbol = XEXP (desc->rtl, 0); rtx symbol = XEXP (desc->rtl, 0);
tree exp = desc->value; tree exp = desc->value;
...@@ -2657,8 +2567,7 @@ maybe_output_constant_def_contents (desc, defer) ...@@ -2657,8 +2567,7 @@ maybe_output_constant_def_contents (desc, defer)
/* We must output the constant data referred to by SYMBOL; do so. */ /* We must output the constant data referred to by SYMBOL; do so. */
static void static void
output_constant_def_contents (symbol) output_constant_def_contents (rtx symbol)
rtx symbol;
{ {
tree exp = SYMBOL_REF_DECL (symbol); tree exp = SYMBOL_REF_DECL (symbol);
const char *label = XSTR (symbol, 0); const char *label = XSTR (symbol, 0);
...@@ -2703,7 +2612,7 @@ output_constant_def_contents (symbol) ...@@ -2703,7 +2612,7 @@ output_constant_def_contents (symbol)
inserted by the RTL inliner into a different function. The inserted by the RTL inliner into a different function. The
current function's deferred constant count must be incremented. */ current function's deferred constant count must be incremented. */
void void
notice_rtl_inlining_of_deferred_constant () notice_rtl_inlining_of_deferred_constant (void)
{ {
n_deferred_constants++; n_deferred_constants++;
} }
...@@ -2751,8 +2660,7 @@ struct pool_constant GTY(()) ...@@ -2751,8 +2660,7 @@ struct pool_constant GTY(())
/* Initialize constant pool hashing for a new function. */ /* Initialize constant pool hashing for a new function. */
void void
init_varasm_status (f) init_varasm_status (struct function *f)
struct function *f;
{ {
struct varasm_status *p; struct varasm_status *p;
p = (struct varasm_status *) ggc_alloc (sizeof (struct varasm_status)); p = (struct varasm_status *) ggc_alloc (sizeof (struct varasm_status));
...@@ -2777,10 +2685,7 @@ init_varasm_status (f) ...@@ -2777,10 +2685,7 @@ init_varasm_status (f)
They are stored into VALUE. */ They are stored into VALUE. */
static void static void
decode_rtx_const (mode, x, value) decode_rtx_const (enum machine_mode mode, rtx x, struct rtx_const *value)
enum machine_mode mode;
rtx x;
struct rtx_const *value;
{ {
/* Clear the whole structure, including any gaps. */ /* Clear the whole structure, including any gaps. */
memset (value, 0, sizeof (struct rtx_const)); memset (value, 0, sizeof (struct rtx_const));
...@@ -2958,8 +2863,7 @@ decode_rtx_const (mode, x, value) ...@@ -2958,8 +2863,7 @@ decode_rtx_const (mode, x, value)
include the same symbol. */ include the same symbol. */
rtx rtx
simplify_subtraction (x) simplify_subtraction (rtx x)
rtx x;
{ {
struct rtx_const val0, val1; struct rtx_const val0, val1;
...@@ -2978,9 +2882,7 @@ simplify_subtraction (x) ...@@ -2978,9 +2882,7 @@ simplify_subtraction (x)
/* Compute a hash code for a constant RTL expression. */ /* Compute a hash code for a constant RTL expression. */
static unsigned int static unsigned int
const_hash_rtx (mode, x) const_hash_rtx (enum machine_mode mode, rtx x)
enum machine_mode mode;
rtx x;
{ {
union { union {
struct rtx_const value; struct rtx_const value;
...@@ -3004,10 +2906,8 @@ const_hash_rtx (mode, x) ...@@ -3004,10 +2906,8 @@ const_hash_rtx (mode, x)
Return 1 if DESC describes a constant with the same value as X. */ Return 1 if DESC describes a constant with the same value as X. */
static int static int
compare_constant_rtx (mode, x, desc) compare_constant_rtx (enum machine_mode mode, rtx x,
enum machine_mode mode; struct constant_descriptor_rtx *desc)
rtx x;
struct constant_descriptor_rtx *desc;
{ {
struct rtx_const value; struct rtx_const value;
...@@ -3021,9 +2921,7 @@ compare_constant_rtx (mode, x, desc) ...@@ -3021,9 +2921,7 @@ compare_constant_rtx (mode, x, desc)
It is up to the caller to enter the descriptor in the hash table. */ It is up to the caller to enter the descriptor in the hash table. */
static struct constant_descriptor_rtx * static struct constant_descriptor_rtx *
record_constant_rtx (mode, x) record_constant_rtx (enum machine_mode mode, rtx x)
enum machine_mode mode;
rtx x;
{ {
struct constant_descriptor_rtx *ptr; struct constant_descriptor_rtx *ptr;
...@@ -3037,8 +2935,7 @@ record_constant_rtx (mode, x) ...@@ -3037,8 +2935,7 @@ record_constant_rtx (mode, x)
this constant has been placed. Return 0 if it not has been placed yet. */ this constant has been placed. Return 0 if it not has been placed yet. */
rtx rtx
mem_for_const_double (x) mem_for_const_double (rtx x)
rtx x;
{ {
enum machine_mode mode = GET_MODE (x); enum machine_mode mode = GET_MODE (x);
struct constant_descriptor_rtx *desc; struct constant_descriptor_rtx *desc;
...@@ -3055,9 +2952,7 @@ mem_for_const_double (x) ...@@ -3055,9 +2952,7 @@ mem_for_const_double (x)
and return a MEM rtx to refer to it in memory. */ and return a MEM rtx to refer to it in memory. */
rtx rtx
force_const_mem (mode, x) force_const_mem (enum machine_mode mode, rtx x)
enum machine_mode mode;
rtx x;
{ {
int hash; int hash;
struct constant_descriptor_rtx *desc; struct constant_descriptor_rtx *desc;
...@@ -3150,9 +3045,7 @@ force_const_mem (mode, x) ...@@ -3150,9 +3045,7 @@ force_const_mem (mode, x)
the corresponding pool_constant structure. */ the corresponding pool_constant structure. */
static struct pool_constant * static struct pool_constant *
find_pool_constant (f, addr) find_pool_constant (struct function *f, rtx addr)
struct function *f;
rtx addr;
{ {
struct pool_constant *pool; struct pool_constant *pool;
const char *label = XSTR (addr, 0); const char *label = XSTR (addr, 0);
...@@ -3168,8 +3061,7 @@ find_pool_constant (f, addr) ...@@ -3168,8 +3061,7 @@ find_pool_constant (f, addr)
/* Given a constant pool SYMBOL_REF, return the corresponding constant. */ /* Given a constant pool SYMBOL_REF, return the corresponding constant. */
rtx rtx
get_pool_constant (addr) get_pool_constant (rtx addr)
rtx addr;
{ {
return (find_pool_constant (cfun, addr))->constant; return (find_pool_constant (cfun, addr))->constant;
} }
...@@ -3178,9 +3070,7 @@ get_pool_constant (addr) ...@@ -3178,9 +3070,7 @@ get_pool_constant (addr)
and whether it has been output or not. */ and whether it has been output or not. */
rtx rtx
get_pool_constant_mark (addr, pmarked) get_pool_constant_mark (rtx addr, bool *pmarked)
rtx addr;
bool *pmarked;
{ {
struct pool_constant *pool = find_pool_constant (cfun, addr); struct pool_constant *pool = find_pool_constant (cfun, addr);
*pmarked = (pool->mark != 0); *pmarked = (pool->mark != 0);
...@@ -3190,9 +3080,7 @@ get_pool_constant_mark (addr, pmarked) ...@@ -3190,9 +3080,7 @@ get_pool_constant_mark (addr, pmarked)
/* Likewise, but for the constant pool of a specific function. */ /* Likewise, but for the constant pool of a specific function. */
rtx rtx
get_pool_constant_for_function (f, addr) get_pool_constant_for_function (struct function *f, rtx addr)
struct function *f;
rtx addr;
{ {
return (find_pool_constant (f, addr))->constant; return (find_pool_constant (f, addr))->constant;
} }
...@@ -3200,16 +3088,13 @@ get_pool_constant_for_function (f, addr) ...@@ -3200,16 +3088,13 @@ get_pool_constant_for_function (f, addr)
/* Similar, return the mode. */ /* Similar, return the mode. */
enum machine_mode enum machine_mode
get_pool_mode (addr) get_pool_mode (rtx addr)
rtx addr;
{ {
return (find_pool_constant (cfun, addr))->mode; return (find_pool_constant (cfun, addr))->mode;
} }
enum machine_mode enum machine_mode
get_pool_mode_for_function (f, addr) get_pool_mode_for_function (struct function *f, rtx addr)
struct function *f;
rtx addr;
{ {
return (find_pool_constant (f, addr))->mode; return (find_pool_constant (f, addr))->mode;
} }
...@@ -3217,8 +3102,7 @@ get_pool_mode_for_function (f, addr) ...@@ -3217,8 +3102,7 @@ get_pool_mode_for_function (f, addr)
/* Similar, return the offset in the constant pool. */ /* Similar, return the offset in the constant pool. */
int int
get_pool_offset (addr) get_pool_offset (rtx addr)
rtx addr;
{ {
return (find_pool_constant (cfun, addr))->offset; return (find_pool_constant (cfun, addr))->offset;
} }
...@@ -3226,7 +3110,7 @@ get_pool_offset (addr) ...@@ -3226,7 +3110,7 @@ get_pool_offset (addr)
/* Return the size of the constant pool. */ /* Return the size of the constant pool. */
int int
get_pool_size () get_pool_size (void)
{ {
return pool_offset; return pool_offset;
} }
...@@ -3234,9 +3118,8 @@ get_pool_size () ...@@ -3234,9 +3118,8 @@ get_pool_size ()
/* Write all the constants in the constant pool. */ /* Write all the constants in the constant pool. */
void void
output_constant_pool (fnname, fndecl) output_constant_pool (const char *fnname ATTRIBUTE_UNUSED,
const char *fnname ATTRIBUTE_UNUSED; tree fndecl ATTRIBUTE_UNUSED)
tree fndecl ATTRIBUTE_UNUSED;
{ {
struct pool_constant *pool; struct pool_constant *pool;
rtx x; rtx x;
...@@ -3390,7 +3273,7 @@ output_constant_pool (fnname, fndecl) ...@@ -3390,7 +3273,7 @@ output_constant_pool (fnname, fndecl)
deferred constants which have indeed been used. */ deferred constants which have indeed been used. */
static void static void
mark_constant_pool () mark_constant_pool (void)
{ {
rtx insn; rtx insn;
rtx link; rtx link;
...@@ -3423,8 +3306,7 @@ mark_constant_pool () ...@@ -3423,8 +3306,7 @@ mark_constant_pool ()
deferred strings that are used. */ deferred strings that are used. */
static void static void
mark_constants (x) mark_constants (rtx x)
rtx x;
{ {
int i; int i;
const char *format_ptr; const char *format_ptr;
...@@ -3488,9 +3370,7 @@ mark_constants (x) ...@@ -3488,9 +3370,7 @@ mark_constants (x)
be used with for_each_rtx to mark all SYMBOL_REFs in an rtx. */ be used with for_each_rtx to mark all SYMBOL_REFs in an rtx. */
static int static int
mark_constant (current_rtx, data) mark_constant (rtx *current_rtx, void *data ATTRIBUTE_UNUSED)
rtx *current_rtx;
void *data ATTRIBUTE_UNUSED;
{ {
rtx x = *current_rtx; rtx x = *current_rtx;
...@@ -3528,8 +3408,7 @@ mark_constant (current_rtx, data) ...@@ -3528,8 +3408,7 @@ mark_constant (current_rtx, data)
Indicate whether an ADDR_EXPR has been encountered. */ Indicate whether an ADDR_EXPR has been encountered. */
static int static int
output_addressed_constants (exp) output_addressed_constants (tree exp)
tree exp;
{ {
int reloc = 0, reloc2; int reloc = 0, reloc2;
tree tem; tree tem;
...@@ -3604,9 +3483,7 @@ output_addressed_constants (exp) ...@@ -3604,9 +3483,7 @@ output_addressed_constants (exp)
arithmetic-combinations of integers. */ arithmetic-combinations of integers. */
tree tree
initializer_constant_valid_p (value, endtype) initializer_constant_valid_p (tree value, tree endtype)
tree value;
tree endtype;
{ {
/* Give the front-end a chance to convert VALUE to something that /* Give the front-end a chance to convert VALUE to something that
looks more like a constant to the back-end. */ looks more like a constant to the back-end. */
...@@ -3813,10 +3690,7 @@ initializer_constant_valid_p (value, endtype) ...@@ -3813,10 +3690,7 @@ initializer_constant_valid_p (value, endtype)
ALIGN is the alignment of the data in bits. */ ALIGN is the alignment of the data in bits. */
void void
output_constant (exp, size, align) output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
tree exp;
unsigned HOST_WIDE_INT size;
unsigned int align;
{ {
enum tree_code code; enum tree_code code;
unsigned HOST_WIDE_INT thissize; unsigned HOST_WIDE_INT thissize;
...@@ -3965,8 +3839,7 @@ output_constant (exp, size, align) ...@@ -3965,8 +3839,7 @@ output_constant (exp, size, align)
type with an unspecified upper bound. */ type with an unspecified upper bound. */
static unsigned HOST_WIDE_INT static unsigned HOST_WIDE_INT
array_size_for_constructor (val) array_size_for_constructor (tree val)
tree val;
{ {
tree max_index, i; tree max_index, i;
...@@ -4006,10 +3879,8 @@ array_size_for_constructor (val) ...@@ -4006,10 +3879,8 @@ array_size_for_constructor (val)
Generate at least SIZE bytes, padding if necessary. */ Generate at least SIZE bytes, padding if necessary. */
static void static void
output_constructor (exp, size, align) output_constructor (tree exp, unsigned HOST_WIDE_INT size,
tree exp; unsigned int align)
unsigned HOST_WIDE_INT size;
unsigned int align;
{ {
tree type = TREE_TYPE (exp); tree type = TREE_TYPE (exp);
tree link, field = 0; tree link, field = 0;
...@@ -4315,8 +4186,7 @@ static GTY(()) tree weak_decls; ...@@ -4315,8 +4186,7 @@ static GTY(()) tree weak_decls;
/* Mark DECL as weak. */ /* Mark DECL as weak. */
static void static void
mark_weak (decl) mark_weak (tree decl)
tree decl;
{ {
DECL_WEAK (decl) = 1; DECL_WEAK (decl) = 1;
...@@ -4330,9 +4200,7 @@ mark_weak (decl) ...@@ -4330,9 +4200,7 @@ mark_weak (decl)
/* Merge weak status between NEWDECL and OLDDECL. */ /* Merge weak status between NEWDECL and OLDDECL. */
void void
merge_weak (newdecl, olddecl) merge_weak (tree newdecl, tree olddecl)
tree newdecl;
tree olddecl;
{ {
if (DECL_WEAK (newdecl) == DECL_WEAK (olddecl)) if (DECL_WEAK (newdecl) == DECL_WEAK (olddecl))
return; return;
...@@ -4386,8 +4254,7 @@ merge_weak (newdecl, olddecl) ...@@ -4386,8 +4254,7 @@ merge_weak (newdecl, olddecl)
/* Declare DECL to be a weak symbol. */ /* Declare DECL to be a weak symbol. */
void void
declare_weak (decl) declare_weak (tree decl)
tree decl;
{ {
if (! TREE_PUBLIC (decl)) if (! TREE_PUBLIC (decl))
error_with_decl (decl, "weak declaration of `%s' must be public"); error_with_decl (decl, "weak declaration of `%s' must be public");
...@@ -4407,7 +4274,7 @@ declare_weak (decl) ...@@ -4407,7 +4274,7 @@ declare_weak (decl)
/* Emit any pending weak declarations. */ /* Emit any pending weak declarations. */
void void
weak_finish () weak_finish (void)
{ {
tree t; tree t;
...@@ -4439,8 +4306,7 @@ weak_finish () ...@@ -4439,8 +4306,7 @@ weak_finish ()
/* Emit the assembly bits to indicate that DECL is globally visible. */ /* Emit the assembly bits to indicate that DECL is globally visible. */
static void static void
globalize_decl (decl) globalize_decl (tree decl)
tree decl;
{ {
const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
...@@ -4475,8 +4341,7 @@ globalize_decl (decl) ...@@ -4475,8 +4341,7 @@ globalize_decl (decl)
the symbol for TARGET. */ the symbol for TARGET. */
void void
assemble_alias (decl, target) assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED)
tree decl, target ATTRIBUTE_UNUSED;
{ {
const char *name; const char *name;
...@@ -4524,9 +4389,7 @@ assemble_alias (decl, target) ...@@ -4524,9 +4389,7 @@ assemble_alias (decl, target)
the visibility type VIS, which must not be VISIBILITY_DEFAULT. */ the visibility type VIS, which must not be VISIBILITY_DEFAULT. */
void void
default_assemble_visibility (decl, vis) default_assemble_visibility (tree decl, int vis)
tree decl;
int vis;
{ {
static const char * const visibility_types[] = { static const char * const visibility_types[] = {
NULL, "internal", "hidden", "protected" NULL, "internal", "hidden", "protected"
...@@ -4549,8 +4412,7 @@ default_assemble_visibility (decl, vis) ...@@ -4549,8 +4412,7 @@ default_assemble_visibility (decl, vis)
/* A helper function to call assemble_visibility when needed for a decl. */ /* A helper function to call assemble_visibility when needed for a decl. */
static void static void
maybe_assemble_visibility (decl) maybe_assemble_visibility (tree decl)
tree decl;
{ {
enum symbol_visibility vis = decl_visibility (decl); enum symbol_visibility vis = decl_visibility (decl);
...@@ -4564,7 +4426,7 @@ maybe_assemble_visibility (decl) ...@@ -4564,7 +4426,7 @@ maybe_assemble_visibility (decl)
a target-specific mechanism for having duplicates discarded. */ a target-specific mechanism for having duplicates discarded. */
int int
supports_one_only () supports_one_only (void)
{ {
if (SUPPORTS_ONE_ONLY) if (SUPPORTS_ONE_ONLY)
return 1; return 1;
...@@ -4575,8 +4437,7 @@ supports_one_only () ...@@ -4575,8 +4437,7 @@ supports_one_only ()
translation units without generating a linker error. */ translation units without generating a linker error. */
void void
make_decl_one_only (decl) make_decl_one_only (tree decl)
tree decl;
{ {
if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL) if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL)
abort (); abort ();
...@@ -4600,7 +4461,7 @@ make_decl_one_only (decl) ...@@ -4600,7 +4461,7 @@ make_decl_one_only (decl)
} }
void void
init_varasm_once () init_varasm_once (void)
{ {
in_named_htab = htab_create_ggc (31, in_named_entry_hash, in_named_htab = htab_create_ggc (31, in_named_entry_hash,
in_named_entry_eq, NULL); in_named_entry_eq, NULL);
...@@ -4611,8 +4472,7 @@ init_varasm_once () ...@@ -4611,8 +4472,7 @@ init_varasm_once ()
} }
enum tls_model enum tls_model
decl_tls_model (decl) decl_tls_model (tree decl)
tree decl;
{ {
enum tls_model kind; enum tls_model kind;
tree attr = lookup_attribute ("tls_model", DECL_ATTRIBUTES (decl)); tree attr = lookup_attribute ("tls_model", DECL_ATTRIBUTES (decl));
...@@ -4657,8 +4517,7 @@ decl_tls_model (decl) ...@@ -4657,8 +4517,7 @@ decl_tls_model (decl)
} }
enum symbol_visibility enum symbol_visibility
decl_visibility (decl) decl_visibility (tree decl)
tree decl;
{ {
tree attr = lookup_attribute ("visibility", DECL_ATTRIBUTES (decl)); tree attr = lookup_attribute ("visibility", DECL_ATTRIBUTES (decl));
...@@ -4689,20 +4548,14 @@ decl_visibility (decl) ...@@ -4689,20 +4548,14 @@ decl_visibility (decl)
read-only for a const data decl, and writable for a non-const data decl. */ read-only for a const data decl, and writable for a non-const data decl. */
unsigned int unsigned int
default_section_type_flags (decl, name, reloc) default_section_type_flags (tree decl, const char *name, int reloc)
tree decl;
const char *name;
int reloc;
{ {
return default_section_type_flags_1 (decl, name, reloc, flag_pic); return default_section_type_flags_1 (decl, name, reloc, flag_pic);
} }
unsigned int unsigned int
default_section_type_flags_1 (decl, name, reloc, shlib) default_section_type_flags_1 (tree decl, const char *name, int reloc,
tree decl; int shlib)
const char *name;
int reloc;
int shlib;
{ {
unsigned int flags; unsigned int flags;
...@@ -4753,9 +4606,8 @@ default_section_type_flags_1 (decl, name, reloc, shlib) ...@@ -4753,9 +4606,8 @@ default_section_type_flags_1 (decl, name, reloc, shlib)
Four variants for common object file formats. */ Four variants for common object file formats. */
void void
default_no_named_section (name, flags) default_no_named_section (const char *name ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED; unsigned int flags ATTRIBUTE_UNUSED)
unsigned int flags ATTRIBUTE_UNUSED;
{ {
/* Some object formats don't support named sections at all. The /* Some object formats don't support named sections at all. The
front-end should already have flagged this as an error. */ front-end should already have flagged this as an error. */
...@@ -4763,9 +4615,7 @@ default_no_named_section (name, flags) ...@@ -4763,9 +4615,7 @@ default_no_named_section (name, flags)
} }
void void
default_elf_asm_named_section (name, flags) default_elf_asm_named_section (const char *name, unsigned int flags)
const char *name;
unsigned int flags;
{ {
char flagchars[10], *f = flagchars; char flagchars[10], *f = flagchars;
...@@ -4812,9 +4662,7 @@ default_elf_asm_named_section (name, flags) ...@@ -4812,9 +4662,7 @@ default_elf_asm_named_section (name, flags)
} }
void void
default_coff_asm_named_section (name, flags) default_coff_asm_named_section (const char *name, unsigned int flags)
const char *name;
unsigned int flags;
{ {
char flagchars[8], *f = flagchars; char flagchars[8], *f = flagchars;
...@@ -4828,9 +4676,7 @@ default_coff_asm_named_section (name, flags) ...@@ -4828,9 +4676,7 @@ default_coff_asm_named_section (name, flags)
} }
void void
default_pe_asm_named_section (name, flags) default_pe_asm_named_section (const char *name, unsigned int flags)
const char *name;
unsigned int flags;
{ {
default_coff_asm_named_section (name, flags); default_coff_asm_named_section (name, flags);
...@@ -4848,9 +4694,7 @@ default_pe_asm_named_section (name, flags) ...@@ -4848,9 +4694,7 @@ default_pe_asm_named_section (name, flags)
from SYMBOL is used in all classes derived from SYMBOL. */ from SYMBOL is used in all classes derived from SYMBOL. */
void void
assemble_vtable_entry (symbol, offset) assemble_vtable_entry (rtx symbol, HOST_WIDE_INT offset)
rtx symbol;
HOST_WIDE_INT offset;
{ {
fputs ("\t.vtable_entry ", asm_out_file); fputs ("\t.vtable_entry ", asm_out_file);
output_addr_const (asm_out_file, symbol); output_addr_const (asm_out_file, symbol);
...@@ -4861,8 +4705,7 @@ assemble_vtable_entry (symbol, offset) ...@@ -4861,8 +4705,7 @@ assemble_vtable_entry (symbol, offset)
that the vtable symbol CHILD is derived from the vtable symbol PARENT. */ that the vtable symbol CHILD is derived from the vtable symbol PARENT. */
void void
assemble_vtable_inherit (child, parent) assemble_vtable_inherit (rtx child, rtx parent)
rtx child, parent;
{ {
fputs ("\t.vtable_inherit ", asm_out_file); fputs ("\t.vtable_inherit ", asm_out_file);
output_addr_const (asm_out_file, child); output_addr_const (asm_out_file, child);
...@@ -4874,10 +4717,8 @@ assemble_vtable_inherit (child, parent) ...@@ -4874,10 +4717,8 @@ assemble_vtable_inherit (child, parent)
/* The lame default section selector. */ /* The lame default section selector. */
void void
default_select_section (decl, reloc, align) default_select_section (tree decl, int reloc,
tree decl; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
int reloc;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{ {
bool readonly = false; bool readonly = false;
...@@ -4943,13 +4784,10 @@ enum section_category ...@@ -4943,13 +4784,10 @@ enum section_category
}; };
static enum section_category static enum section_category
categorize_decl_for_section PARAMS ((tree, int, int)); categorize_decl_for_section (tree, int, int);
static enum section_category static enum section_category
categorize_decl_for_section (decl, reloc, shlib) categorize_decl_for_section (tree decl, int reloc, int shlib)
tree decl;
int reloc;
int shlib;
{ {
enum section_category ret; enum section_category ret;
...@@ -5028,18 +4866,13 @@ categorize_decl_for_section (decl, reloc, shlib) ...@@ -5028,18 +4866,13 @@ categorize_decl_for_section (decl, reloc, shlib)
} }
bool bool
decl_readonly_section (decl, reloc) decl_readonly_section (tree decl, int reloc)
tree decl;
int reloc;
{ {
return decl_readonly_section_1 (decl, reloc, flag_pic); return decl_readonly_section_1 (decl, reloc, flag_pic);
} }
bool bool
decl_readonly_section_1 (decl, reloc, shlib) decl_readonly_section_1 (tree decl, int reloc, int shlib)
tree decl;
int reloc;
int shlib;
{ {
switch (categorize_decl_for_section (decl, reloc, shlib)) switch (categorize_decl_for_section (decl, reloc, shlib))
{ {
...@@ -5059,20 +4892,15 @@ decl_readonly_section_1 (decl, reloc, shlib) ...@@ -5059,20 +4892,15 @@ decl_readonly_section_1 (decl, reloc, shlib)
/* Select a section based on the above categorization. */ /* Select a section based on the above categorization. */
void void
default_elf_select_section (decl, reloc, align) default_elf_select_section (tree decl, int reloc,
tree decl; unsigned HOST_WIDE_INT align)
int reloc;
unsigned HOST_WIDE_INT align;
{ {
default_elf_select_section_1 (decl, reloc, align, flag_pic); default_elf_select_section_1 (decl, reloc, align, flag_pic);
} }
void void
default_elf_select_section_1 (decl, reloc, align, shlib) default_elf_select_section_1 (tree decl, int reloc,
tree decl; unsigned HOST_WIDE_INT align, int shlib)
int reloc;
unsigned HOST_WIDE_INT align;
int shlib;
{ {
switch (categorize_decl_for_section (decl, reloc, shlib)) switch (categorize_decl_for_section (decl, reloc, shlib))
{ {
...@@ -5137,18 +4965,13 @@ default_elf_select_section_1 (decl, reloc, align, shlib) ...@@ -5137,18 +4965,13 @@ default_elf_select_section_1 (decl, reloc, align, shlib)
categorization performed above. */ categorization performed above. */
void void
default_unique_section (decl, reloc) default_unique_section (tree decl, int reloc)
tree decl;
int reloc;
{ {
default_unique_section_1 (decl, reloc, flag_pic); default_unique_section_1 (decl, reloc, flag_pic);
} }
void void
default_unique_section_1 (decl, reloc, shlib) default_unique_section_1 (tree decl, int reloc, int shlib)
tree decl;
int reloc;
int shlib;
{ {
bool one_only = DECL_ONE_ONLY (decl); bool one_only = DECL_ONE_ONLY (decl);
const char *prefix, *name; const char *prefix, *name;
...@@ -5208,10 +5031,9 @@ default_unique_section_1 (decl, reloc, shlib) ...@@ -5208,10 +5031,9 @@ default_unique_section_1 (decl, reloc, shlib)
} }
void void
default_select_rtx_section (mode, x, align) default_select_rtx_section (enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; rtx x,
rtx x; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{ {
if (flag_pic) if (flag_pic)
switch (GET_CODE (x)) switch (GET_CODE (x))
...@@ -5230,10 +5052,8 @@ default_select_rtx_section (mode, x, align) ...@@ -5230,10 +5052,8 @@ default_select_rtx_section (mode, x, align)
} }
void void
default_elf_select_rtx_section (mode, x, align) default_elf_select_rtx_section (enum machine_mode mode, rtx x,
enum machine_mode mode; unsigned HOST_WIDE_INT align)
rtx x;
unsigned HOST_WIDE_INT align;
{ {
/* ??? Handle small data here somehow. */ /* ??? Handle small data here somehow. */
...@@ -5259,10 +5079,7 @@ default_elf_select_rtx_section (mode, x, align) ...@@ -5259,10 +5079,7 @@ default_elf_select_rtx_section (mode, x, align)
/* Set the generally applicable flags on the SYMBOL_REF for EXP. */ /* Set the generally applicable flags on the SYMBOL_REF for EXP. */
void void
default_encode_section_info (decl, rtl, first) default_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
tree decl;
rtx rtl;
int first ATTRIBUTE_UNUSED;
{ {
rtx symbol; rtx symbol;
int flags; int flags;
...@@ -5296,8 +5113,7 @@ default_encode_section_info (decl, rtl, first) ...@@ -5296,8 +5113,7 @@ default_encode_section_info (decl, rtl, first)
do anything but discard the '*' marker. */ do anything but discard the '*' marker. */
const char * const char *
default_strip_name_encoding (str) default_strip_name_encoding (const char *str)
const char *str;
{ {
return str + (*str == '*'); return str + (*str == '*');
} }
...@@ -5306,16 +5122,13 @@ default_strip_name_encoding (str) ...@@ -5306,16 +5122,13 @@ default_strip_name_encoding (str)
wrt cross-module name binding. */ wrt cross-module name binding. */
bool bool
default_binds_local_p (exp) default_binds_local_p (tree exp)
tree exp;
{ {
return default_binds_local_p_1 (exp, flag_shlib); return default_binds_local_p_1 (exp, flag_shlib);
} }
bool bool
default_binds_local_p_1 (exp, shlib) default_binds_local_p_1 (tree exp, int shlib)
tree exp;
int shlib;
{ {
bool local_p; bool local_p;
...@@ -5355,8 +5168,7 @@ default_binds_local_p_1 (exp, shlib) ...@@ -5355,8 +5168,7 @@ default_binds_local_p_1 (exp, shlib)
/* Determine whether or not a pointer mode is valid. Assume defaults /* Determine whether or not a pointer mode is valid. Assume defaults
of ptr_mode or Pmode - can be overridden. */ of ptr_mode or Pmode - can be overridden. */
bool bool
default_valid_pointer_mode (mode) default_valid_pointer_mode (enum machine_mode mode)
enum machine_mode mode;
{ {
return (mode == ptr_mode || mode == Pmode); return (mode == ptr_mode || mode == Pmode);
} }
...@@ -5366,24 +5178,20 @@ default_valid_pointer_mode (mode) ...@@ -5366,24 +5178,20 @@ default_valid_pointer_mode (mode)
globalize a label. */ globalize a label. */
#ifdef GLOBAL_ASM_OP #ifdef GLOBAL_ASM_OP
void void
default_globalize_label (stream, name) default_globalize_label (FILE * stream, const char *name)
FILE * stream;
const char *name;
{ {
fputs (GLOBAL_ASM_OP, stream); fputs (GLOBAL_ASM_OP, stream);
assemble_name (stream, name); assemble_name (stream, name);
putc ('\n', stream); putc ('\n', stream);
} }
#endif /* GLOBAL_ASM_OP */ #endif /* GLOBAL_ASM_OP */
/* This is how to output an internal numbered label where PREFIX is /* This is how to output an internal numbered label where PREFIX is
the class of label and LABELNO is the number within the class. */ the class of label and LABELNO is the number within the class. */
void void
default_internal_label (stream, prefix, labelno) default_internal_label (FILE *stream, const char *prefix,
FILE *stream; unsigned long labelno)
const char *prefix;
unsigned long labelno;
{ {
char *const buf = alloca (40 + strlen (prefix)); char *const buf = alloca (40 + strlen (prefix));
ASM_GENERATE_INTERNAL_LABEL (buf, prefix, labelno); ASM_GENERATE_INTERNAL_LABEL (buf, prefix, labelno);
...@@ -5393,7 +5201,7 @@ default_internal_label (stream, prefix, labelno) ...@@ -5393,7 +5201,7 @@ default_internal_label (stream, prefix, labelno)
/* This is the default behavior at the beginning of a file. It's /* This is the default behavior at the beginning of a file. It's
controlled by two other target-hook toggles. */ controlled by two other target-hook toggles. */
void void
default_file_start () default_file_start (void)
{ {
if (targetm.file_start_app_off && !flag_verbose_asm) if (targetm.file_start_app_off && !flag_verbose_asm)
fputs (ASM_APP_OFF, asm_out_file); fputs (ASM_APP_OFF, asm_out_file);
...@@ -5407,7 +5215,7 @@ default_file_start () ...@@ -5407,7 +5215,7 @@ default_file_start ()
not this object file needs an executable stack. This is primarily not this object file needs an executable stack. This is primarily
a GNU extension to ELF but could be used on other targets. */ a GNU extension to ELF but could be used on other targets. */
void void
file_end_indicate_exec_stack () file_end_indicate_exec_stack (void)
{ {
unsigned int flags = SECTION_DEBUG; unsigned int flags = SECTION_DEBUG;
if (trampolines_created) if (trampolines_created)
......
/* Virtual array support. /* Virtual array support.
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Solutions. Contributed by Cygnus Solutions.
This file is part of GCC. This file is part of GCC.
...@@ -61,10 +62,8 @@ static const struct { ...@@ -61,10 +62,8 @@ static const struct {
/* Allocate a virtual array with NUM_ELEMENT elements, each of which is /* Allocate a virtual array with NUM_ELEMENT elements, each of which is
ELEMENT_SIZE bytes long, named NAME. Array elements are zeroed. */ ELEMENT_SIZE bytes long, named NAME. Array elements are zeroed. */
varray_type varray_type
varray_init (num_elements, element_kind, name) varray_init (size_t num_elements, enum varray_data_enum element_kind,
size_t num_elements; const char *name)
enum varray_data_enum element_kind;
const char *name;
{ {
size_t data_size = num_elements * element[element_kind].size; size_t data_size = num_elements * element[element_kind].size;
varray_type ptr; varray_type ptr;
...@@ -83,9 +82,7 @@ varray_init (num_elements, element_kind, name) ...@@ -83,9 +82,7 @@ varray_init (num_elements, element_kind, name)
/* Grow/shrink the virtual array VA to N elements. Zero any new elements /* Grow/shrink the virtual array VA to N elements. Zero any new elements
allocated. */ allocated. */
varray_type varray_type
varray_grow (va, n) varray_grow (varray_type va, size_t n)
varray_type va;
size_t n;
{ {
size_t old_elements = va->num_elements; size_t old_elements = va->num_elements;
...@@ -109,8 +106,7 @@ varray_grow (va, n) ...@@ -109,8 +106,7 @@ varray_grow (va, n)
/* Reset a varray to its original state. */ /* Reset a varray to its original state. */
void void
varray_clear (va) varray_clear (varray_type va)
varray_type va;
{ {
size_t data_size = element[va->type].size * va->num_elements; size_t data_size = element[va->type].size * va->num_elements;
...@@ -122,19 +118,15 @@ varray_clear (va) ...@@ -122,19 +118,15 @@ varray_clear (va)
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007) #if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
extern void error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1; extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
void void
varray_check_failed (va, n, file, line, function) varray_check_failed (varray_type va, size_t n, const char *file, int line,
varray_type va; const char *function)
size_t n;
const char *file;
int line;
const char *function;
{ {
internal_error ("virtual array %s[%lu]: element %lu out of bounds in %s, at %s:%d", internal_error ("virtual array %s[%lu]: element %lu out of bounds in %s, at %s:%d",
va->name, (unsigned long) va->num_elements, (unsigned long) n, va->name, (unsigned long) va->num_elements, (unsigned long) n,
function, trim_filename (file), line); function, trim_filename (file), line;
} }
#endif #endif
/* Virtual array support. /* Virtual array support.
Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Solutions. Contributed by Cygnus Solutions.
This file is part of GCC. This file is part of GCC.
...@@ -56,7 +57,7 @@ struct const_equiv_data GTY(()) { ...@@ -56,7 +57,7 @@ struct const_equiv_data GTY(()) {
unsigned age; unsigned age;
}; };
/* Enum indicating what the varray contains. /* Enum indicating what the varray contains.
If this is changed, `element' in varray.c needs to be updated. */ If this is changed, `element' in varray.c needs to be updated. */
enum varray_data_enum { enum varray_data_enum {
...@@ -120,7 +121,7 @@ typedef union varray_data_tag GTY (()) { ...@@ -120,7 +121,7 @@ typedef union varray_data_tag GTY (()) {
struct reg_info_def *GTY ((length ("%0.num_elements"), skip (""), struct reg_info_def *GTY ((length ("%0.num_elements"), skip (""),
tag ("VARRAY_DATA_REG"))) reg[1]; tag ("VARRAY_DATA_REG"))) reg[1];
struct const_equiv_data GTY ((length ("%0.num_elements"), struct const_equiv_data GTY ((length ("%0.num_elements"),
tag ("VARRAY_DATA_CONST_EQUIV"))) const_equiv[1]; tag ("VARRAY_DATA_CONST_EQUIV"))) const_equiv[1];
struct basic_block_def *GTY ((length ("%0.num_elements"), skip (""), struct basic_block_def *GTY ((length ("%0.num_elements"), skip (""),
tag ("VARRAY_DATA_BB"))) bb[1]; tag ("VARRAY_DATA_BB"))) bb[1];
struct elt_list *GTY ((length ("%0.num_elements"), struct elt_list *GTY ((length ("%0.num_elements"),
...@@ -134,15 +135,14 @@ struct varray_head_tag GTY(()) { ...@@ -134,15 +135,14 @@ struct varray_head_tag GTY(()) {
using VARRAY_PUSH/VARRAY_POP. */ using VARRAY_PUSH/VARRAY_POP. */
enum varray_data_enum type; /* The kind of elements in the varray. */ enum varray_data_enum type; /* The kind of elements in the varray. */
const char *name; /* name of the varray for reporting errors */ const char *name; /* name of the varray for reporting errors */
varray_data GTY ((desc ("%0.type"))) data; /* The data elements follow, varray_data GTY ((desc ("%0.type"))) data; /* The data elements follow,
must be last. */ must be last. */
}; };
typedef struct varray_head_tag *varray_type; typedef struct varray_head_tag *varray_type;
/* Allocate a virtual array with NUM elements, each of which is SIZE bytes /* Allocate a virtual array with NUM elements, each of which is SIZE bytes
long, named NAME. Array elements are zeroed. */ long, named NAME. Array elements are zeroed. */
extern varray_type varray_init PARAMS ((size_t, enum varray_data_enum, extern varray_type varray_init (size_t, enum varray_data_enum, const char *);
const char *));
#define VARRAY_CHAR_INIT(va, num, name) \ #define VARRAY_CHAR_INIT(va, num, name) \
va = varray_init (num, VARRAY_DATA_C, name) va = varray_init (num, VARRAY_DATA_C, name)
...@@ -210,7 +210,7 @@ extern varray_type varray_init PARAMS ((size_t, enum varray_data_enum, ...@@ -210,7 +210,7 @@ extern varray_type varray_init PARAMS ((size_t, enum varray_data_enum,
do { if (vp) { free (vp); vp = (varray_type) 0; } } while (0) do { if (vp) { free (vp); vp = (varray_type) 0; } } while (0)
/* Grow/shrink the virtual array VA to N elements. */ /* Grow/shrink the virtual array VA to N elements. */
extern varray_type varray_grow PARAMS ((varray_type, size_t)); extern varray_type varray_grow (varray_type, size_t);
#define VARRAY_GROW(VA, N) ((VA) = varray_grow (VA, N)) #define VARRAY_GROW(VA, N) ((VA) = varray_grow (VA, N))
...@@ -221,16 +221,15 @@ extern varray_type varray_grow PARAMS ((varray_type, size_t)); ...@@ -221,16 +221,15 @@ extern varray_type varray_grow PARAMS ((varray_type, size_t));
#define VARRAY_CLEAR(VA) varray_clear(VA) #define VARRAY_CLEAR(VA) varray_clear(VA)
extern void varray_clear PARAMS ((varray_type)); extern void varray_clear (varray_type);
/* Check for VARRAY_xxx macros being in bound. */ /* Check for VARRAY_xxx macros being in bound. */
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007) #if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
extern void varray_check_failed PARAMS ((varray_type, size_t, extern void varray_check_failed (varray_type, size_t, const char *, int,
const char *, int, const char *) ATTRIBUTE_NORETURN;
const char *)) ATTRIBUTE_NORETURN;
#define VARRAY_CHECK(VA, N, T) __extension__ \ #define VARRAY_CHECK(VA, N, T) __extension__ \
(*({ varray_type const _va = (VA); \ (*({ varray_type const _va = (VA); \
const size_t _n = (N); \ const size_t _n = (N); \
if (_n >= _va->num_elements) \ if (_n >= _va->num_elements) \
varray_check_failed (_va, _n, __FILE__, __LINE__, __FUNCTION__); \ varray_check_failed (_va, _n, __FILE__, __LINE__, __FUNCTION__); \
&_va->data.T[_n]; })) &_va->data.T[_n]; }))
......
/* Output VMS debug format symbol table information from GCC. /* Output VMS debug format symbol table information from GCC.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc. 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Douglas B. Rupp (rupp@gnat.com). Contributed by Douglas B. Rupp (rupp@gnat.com).
This file is part of GCC. This file is part of GCC.
...@@ -128,44 +128,43 @@ static unsigned int line_info_table_in_use; ...@@ -128,44 +128,43 @@ static unsigned int line_info_table_in_use;
#define LINE_INFO_TABLE_INCREMENT 1024 #define LINE_INFO_TABLE_INCREMENT 1024
/* Forward declarations for functions defined in this file. */ /* Forward declarations for functions defined in this file. */
static char *full_name PARAMS ((const char *)); static char *full_name (const char *);
static unsigned int lookup_filename PARAMS ((const char *)); static unsigned int lookup_filename (const char *);
static void addr_const_to_string PARAMS ((char *, rtx)); static void addr_const_to_string (char *, rtx);
static int write_debug_header PARAMS ((DST_HEADER *, const char *, int)); static int write_debug_header (DST_HEADER *, const char *, int);
static int write_debug_addr PARAMS ((char *, const char *, int)); static int write_debug_addr (char *, const char *, int);
static int write_debug_data1 PARAMS ((unsigned int, const char *, int)); static int write_debug_data1 (unsigned int, const char *, int);
static int write_debug_data2 PARAMS ((unsigned int, const char *, int)); static int write_debug_data2 (unsigned int, const char *, int);
static int write_debug_data4 PARAMS ((unsigned long, const char *, int)); static int write_debug_data4 (unsigned long, const char *, int);
static int write_debug_data8 PARAMS ((unsigned long long, const char *, static int write_debug_data8 (unsigned long long, const char *, int);
int)); static int write_debug_delta4 (char *, char *, const char *, int);
static int write_debug_delta4 PARAMS ((char *, char *, const char *, int)); static int write_debug_string (char *, const char *, int);
static int write_debug_string PARAMS ((char *, const char *, int)); static int write_modbeg (int);
static int write_modbeg PARAMS ((int)); static int write_modend (int);
static int write_modend PARAMS ((int)); static int write_rtnbeg (int, int);
static int write_rtnbeg PARAMS ((int, int)); static int write_rtnend (int, int);
static int write_rtnend PARAMS ((int, int)); static int write_pclines (int);
static int write_pclines PARAMS ((int)); static int write_srccorr (int, dst_file_info_entry, int);
static int write_srccorr PARAMS ((int, dst_file_info_entry, int)); static int write_srccorrs (int);
static int write_srccorrs PARAMS ((int));
static void vmsdbgout_init (const char *);
static void vmsdbgout_init PARAMS ((const char *)); static void vmsdbgout_finish (const char *);
static void vmsdbgout_finish PARAMS ((const char *)); static void vmsdbgout_define (unsigned int, const char *);
static void vmsdbgout_define PARAMS ((unsigned int, const char *)); static void vmsdbgout_undef (unsigned int, const char *);
static void vmsdbgout_undef PARAMS ((unsigned int, const char *)); static void vmsdbgout_start_source_file (unsigned int, const char *);
static void vmsdbgout_start_source_file PARAMS ((unsigned int, const char *)); static void vmsdbgout_end_source_file (unsigned int);
static void vmsdbgout_end_source_file PARAMS ((unsigned int)); static void vmsdbgout_begin_block (unsigned int, unsigned int);
static void vmsdbgout_begin_block PARAMS ((unsigned int, unsigned int)); static void vmsdbgout_end_block (unsigned int, unsigned int);
static void vmsdbgout_end_block PARAMS ((unsigned int, unsigned int)); static bool vmsdbgout_ignore_block (tree);
static bool vmsdbgout_ignore_block PARAMS ((tree)); static void vmsdbgout_source_line (unsigned int, const char *);
static void vmsdbgout_source_line PARAMS ((unsigned int, const char *)); static void vmsdbgout_begin_prologue (unsigned int, const char *);
static void vmsdbgout_begin_prologue PARAMS ((unsigned int, const char *)); static void vmsdbgout_end_prologue (unsigned int, const char *);
static void vmsdbgout_end_prologue PARAMS ((unsigned int, const char *)); static void vmsdbgout_end_function (unsigned int);
static void vmsdbgout_end_function PARAMS ((unsigned int)); static void vmsdbgout_end_epilogue (unsigned int, const char *);
static void vmsdbgout_end_epilogue PARAMS ((unsigned int, const char *)); static void vmsdbgout_begin_function (tree);
static void vmsdbgout_begin_function PARAMS ((tree)); static void vmsdbgout_decl (tree);
static void vmsdbgout_decl PARAMS ((tree)); static void vmsdbgout_global_decl (tree);
static void vmsdbgout_global_decl PARAMS ((tree)); static void vmsdbgout_abstract_function (tree);
static void vmsdbgout_abstract_function PARAMS ((tree));
/* The debug hooks structure. */ /* The debug hooks structure. */
...@@ -382,7 +381,7 @@ static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES]; ...@@ -382,7 +381,7 @@ static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES];
macro has the same effect as ASM_OUTPUT_LABELREF, but copies to macro has the same effect as ASM_OUTPUT_LABELREF, but copies to
a string rather than writing to a file. */ a string rather than writing to a file. */
#ifndef ASM_NAME_TO_STRING #ifndef ASM_NAME_TO_STRING
#define ASM_NAME_TO_STRING(STR, NAME) \ #define ASM_NAME_TO_STRING(STR, NAME) \
do \ do \
{ \ { \
if ((NAME)[0] == '*') \ if ((NAME)[0] == '*') \
...@@ -403,9 +402,7 @@ static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES]; ...@@ -403,9 +402,7 @@ static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES];
directly, because it writes to a file. */ directly, because it writes to a file. */
static void static void
addr_const_to_string (str, x) addr_const_to_string (char *str, rtx x)
char *str;
rtx x;
{ {
char buf1[256]; char buf1[256];
char buf2[256]; char buf2[256];
...@@ -533,10 +530,7 @@ restart: ...@@ -533,10 +530,7 @@ restart:
nonzero. */ nonzero. */
static int static int
write_debug_header (header, comment, dosizeonly) write_debug_header (DST_HEADER *header, const char *comment, int dosizeonly)
DST_HEADER *header;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -565,10 +559,7 @@ write_debug_header (header, comment, dosizeonly) ...@@ -565,10 +559,7 @@ write_debug_header (header, comment, dosizeonly)
nonzero. */ nonzero. */
static int static int
write_debug_addr (symbol, comment, dosizeonly) write_debug_addr (char *symbol, const char *comment, int dosizeonly)
char *symbol;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -586,10 +577,7 @@ write_debug_addr (symbol, comment, dosizeonly) ...@@ -586,10 +577,7 @@ write_debug_addr (symbol, comment, dosizeonly)
nonzero. */ nonzero. */
static int static int
write_debug_data1 (data1, comment, dosizeonly) write_debug_data1 (unsigned int data1, const char *comment, int dosizeonly)
unsigned int data1;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -607,10 +595,7 @@ write_debug_data1 (data1, comment, dosizeonly) ...@@ -607,10 +595,7 @@ write_debug_data1 (data1, comment, dosizeonly)
nonzero. */ nonzero. */
static int static int
write_debug_data2 (data2, comment, dosizeonly) write_debug_data2 (unsigned int data2, const char *comment, int dosizeonly)
unsigned int data2;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -627,10 +612,7 @@ write_debug_data2 (data2, comment, dosizeonly) ...@@ -627,10 +612,7 @@ write_debug_data2 (data2, comment, dosizeonly)
Return the data size. Just return the size if DOSIZEONLY is nonzero. */ Return the data size. Just return the size if DOSIZEONLY is nonzero. */
static int static int
write_debug_data4 (data4, comment, dosizeonly) write_debug_data4 (unsigned long data4, const char *comment, int dosizeonly)
unsigned long data4;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -647,10 +629,8 @@ write_debug_data4 (data4, comment, dosizeonly) ...@@ -647,10 +629,8 @@ write_debug_data4 (data4, comment, dosizeonly)
Return the data size. Just return the size if DOSIZEONLY is nonzero. */ Return the data size. Just return the size if DOSIZEONLY is nonzero. */
static int static int
write_debug_data8 (data8, comment, dosizeonly) write_debug_data8 (unsigned long long data8, const char *comment,
unsigned long long data8; int dosizeonly)
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -668,11 +648,8 @@ write_debug_data8 (data8, comment, dosizeonly) ...@@ -668,11 +648,8 @@ write_debug_data8 (data8, comment, dosizeonly)
DOSIZEONLY is nonzero. */ DOSIZEONLY is nonzero. */
static int static int
write_debug_delta4 (label1, label2, comment, dosizeonly) write_debug_delta4 (char *label1, char *label2, const char *comment,
char *label1; int dosizeonly)
char *label2;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -690,10 +667,7 @@ write_debug_delta4 (label1, label2, comment, dosizeonly) ...@@ -690,10 +667,7 @@ write_debug_delta4 (label1, label2, comment, dosizeonly)
nonzero. */ nonzero. */
static int static int
write_debug_string (string, comment, dosizeonly) write_debug_string (char *string, const char *comment, int dosizeonly)
char *string;
const char *comment;
int dosizeonly;
{ {
if (!dosizeonly) if (!dosizeonly)
{ {
...@@ -710,8 +684,7 @@ write_debug_string (string, comment, dosizeonly) ...@@ -710,8 +684,7 @@ write_debug_string (string, comment, dosizeonly)
size if DOSIZEONLY is nonzero. */ size if DOSIZEONLY is nonzero. */
static int static int
write_modbeg (dosizeonly) write_modbeg (int dosizeonly)
int dosizeonly;
{ {
DST_MODULE_BEGIN modbeg; DST_MODULE_BEGIN modbeg;
DST_MB_TRLR mb_trlr; DST_MB_TRLR mb_trlr;
...@@ -774,8 +747,7 @@ write_modbeg (dosizeonly) ...@@ -774,8 +747,7 @@ write_modbeg (dosizeonly)
the size if DOSIZEONLY is nonzero. */ the size if DOSIZEONLY is nonzero. */
static int static int
write_modend (dosizeonly) write_modend (int dosizeonly)
int dosizeonly;
{ {
DST_MODULE_END modend; DST_MODULE_END modend;
int totsize = 0; int totsize = 0;
...@@ -794,9 +766,7 @@ write_modend (dosizeonly) ...@@ -794,9 +766,7 @@ write_modend (dosizeonly)
Just return the size if DOSIZEONLY is nonzero. */ Just return the size if DOSIZEONLY is nonzero. */
static int static int
write_rtnbeg (rtnnum, dosizeonly) write_rtnbeg (int rtnnum, int dosizeonly)
int rtnnum;
int dosizeonly;
{ {
char *rtnname; char *rtnname;
int rtnnamelen; int rtnnamelen;
...@@ -889,9 +859,7 @@ write_rtnbeg (rtnnum, dosizeonly) ...@@ -889,9 +859,7 @@ write_rtnbeg (rtnnum, dosizeonly)
Just return the size if DOSIZEONLY is nonzero. */ Just return the size if DOSIZEONLY is nonzero. */
static int static int
write_rtnend (rtnnum, dosizeonly) write_rtnend (int rtnnum, int dosizeonly)
int rtnnum;
int dosizeonly;
{ {
DST_ROUTINE_END rtnend; DST_ROUTINE_END rtnend;
char label1[MAX_ARTIFICIAL_LABEL_BYTES]; char label1[MAX_ARTIFICIAL_LABEL_BYTES];
...@@ -933,8 +901,7 @@ write_rtnend (rtnnum, dosizeonly) ...@@ -933,8 +901,7 @@ write_rtnend (rtnnum, dosizeonly)
the size if DOSIZEONLY is nonzero */ the size if DOSIZEONLY is nonzero */
static int static int
write_pclines (dosizeonly) write_pclines (int dosizeonly)
int dosizeonly;
{ {
unsigned i; unsigned i;
int fn; int fn;
...@@ -1064,10 +1031,8 @@ write_pclines (dosizeonly) ...@@ -1064,10 +1031,8 @@ write_pclines (dosizeonly)
nonzero. */ nonzero. */
static int static int
write_srccorr (fileid, file_info_entry, dosizeonly) write_srccorr (int fileid, dst_file_info_entry file_info_entry,
int fileid; int dosizeonly)
dst_file_info_entry file_info_entry;
int dosizeonly;
{ {
int src_command_size; int src_command_size;
int linesleft = file_info_entry.max_line; int linesleft = file_info_entry.max_line;
...@@ -1259,8 +1224,7 @@ write_srccorr (fileid, file_info_entry, dosizeonly) ...@@ -1259,8 +1224,7 @@ write_srccorr (fileid, file_info_entry, dosizeonly)
the size if DOSIZEONLY is nonzero. */ the size if DOSIZEONLY is nonzero. */
static int static int
write_srccorrs (dosizeonly) write_srccorrs (int dosizeonly)
int dosizeonly;
{ {
unsigned int i; unsigned int i;
int totsize = 0; int totsize = 0;
...@@ -1275,9 +1239,7 @@ write_srccorrs (dosizeonly) ...@@ -1275,9 +1239,7 @@ write_srccorrs (dosizeonly)
the prologue. */ the prologue. */
static void static void
vmsdbgout_begin_prologue (line, file) vmsdbgout_begin_prologue (unsigned int line, const char *file)
unsigned int line;
const char *file;
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
...@@ -1296,9 +1258,7 @@ vmsdbgout_begin_prologue (line, file) ...@@ -1296,9 +1258,7 @@ vmsdbgout_begin_prologue (line, file)
the prologue. */ the prologue. */
static void static void
vmsdbgout_end_prologue (line, file) vmsdbgout_end_prologue (unsigned int line, const char *file)
unsigned int line;
const char *file;
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
...@@ -1319,8 +1279,7 @@ vmsdbgout_end_prologue (line, file) ...@@ -1319,8 +1279,7 @@ vmsdbgout_end_prologue (line, file)
/* No output for VMS debug, but make obligatory call to Dwarf2 debug */ /* No output for VMS debug, but make obligatory call to Dwarf2 debug */
static void static void
vmsdbgout_end_function (line) vmsdbgout_end_function (unsigned int line)
unsigned int line;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.end_function) (line); (*dwarf2_debug_hooks.end_function) (line);
...@@ -1331,9 +1290,7 @@ vmsdbgout_end_function (line) ...@@ -1331,9 +1290,7 @@ vmsdbgout_end_function (line)
been generated. */ been generated. */
static void static void
vmsdbgout_end_epilogue (line, file) vmsdbgout_end_epilogue (unsigned int line, const char *file)
unsigned int line;
const char *file;
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
...@@ -1357,9 +1314,7 @@ vmsdbgout_end_epilogue (line, file) ...@@ -1357,9 +1314,7 @@ vmsdbgout_end_epilogue (line, file)
a lexical block. */ a lexical block. */
static void static void
vmsdbgout_begin_block (line, blocknum) vmsdbgout_begin_block (register unsigned line, register unsigned blocknum)
register unsigned line;
register unsigned blocknum;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.begin_block) (line, blocknum); (*dwarf2_debug_hooks.begin_block) (line, blocknum);
...@@ -1372,9 +1327,7 @@ vmsdbgout_begin_block (line, blocknum) ...@@ -1372,9 +1327,7 @@ vmsdbgout_begin_block (line, blocknum)
lexical block. */ lexical block. */
static void static void
vmsdbgout_end_block (line, blocknum) vmsdbgout_end_block (register unsigned line, register unsigned blocknum)
register unsigned line;
register unsigned blocknum;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.end_block) (line, blocknum); (*dwarf2_debug_hooks.end_block) (line, blocknum);
...@@ -1386,8 +1339,7 @@ vmsdbgout_end_block (line, blocknum) ...@@ -1386,8 +1339,7 @@ vmsdbgout_end_block (line, blocknum)
/* Not implemented in VMS Debug. */ /* Not implemented in VMS Debug. */
static bool static bool
vmsdbgout_ignore_block (block) vmsdbgout_ignore_block (tree block)
tree block;
{ {
bool retval = 0; bool retval = 0;
...@@ -1400,8 +1352,7 @@ vmsdbgout_ignore_block (block) ...@@ -1400,8 +1352,7 @@ vmsdbgout_ignore_block (block)
/* Add an entry for function DECL into the func_table. */ /* Add an entry for function DECL into the func_table. */
static void static void
vmsdbgout_begin_function (decl) vmsdbgout_begin_function (tree decl)
tree decl;
{ {
const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
...@@ -1425,8 +1376,7 @@ static char fullname_buff [4096]; ...@@ -1425,8 +1376,7 @@ static char fullname_buff [4096];
in VMS syntax in order to be processed by VMS Debug. */ in VMS syntax in order to be processed by VMS Debug. */
static char * static char *
full_name (filename) full_name (const char *filename)
const char *filename;
{ {
#ifdef VMS #ifdef VMS
FILE *fp = fopen (filename, "r"); FILE *fp = fopen (filename, "r");
...@@ -1457,8 +1407,7 @@ full_name (filename) ...@@ -1457,8 +1407,7 @@ full_name (filename)
all searches. */ all searches. */
static unsigned int static unsigned int
lookup_filename (file_name) lookup_filename (const char *file_name)
const char *file_name;
{ {
static unsigned int last_file_lookup_index = 0; static unsigned int last_file_lookup_index = 0;
register char *fn; register char *fn;
...@@ -1556,9 +1505,7 @@ lookup_filename (file_name) ...@@ -1556,9 +1505,7 @@ lookup_filename (file_name)
'line_info_table' for later output of the .debug_line section. */ 'line_info_table' for later output of the .debug_line section. */
static void static void
vmsdbgout_source_line (line, filename) vmsdbgout_source_line (register unsigned line, register const char *filename)
register unsigned line;
register const char *filename;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.source_line) (line, filename); (*dwarf2_debug_hooks.source_line) (line, filename);
...@@ -1593,9 +1540,7 @@ vmsdbgout_source_line (line, filename) ...@@ -1593,9 +1540,7 @@ vmsdbgout_source_line (line, filename)
At present, unimplemented. */ At present, unimplemented. */
static void static void
vmsdbgout_start_source_file (lineno, filename) vmsdbgout_start_source_file (unsigned int lineno, const char *filename)
unsigned int lineno;
const char *filename;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.start_source_file) (lineno, filename); (*dwarf2_debug_hooks.start_source_file) (lineno, filename);
...@@ -1605,8 +1550,7 @@ vmsdbgout_start_source_file (lineno, filename) ...@@ -1605,8 +1550,7 @@ vmsdbgout_start_source_file (lineno, filename)
At present, unimplemented. */ At present, unimplemented. */
static void static void
vmsdbgout_end_source_file (lineno) vmsdbgout_end_source_file (unsigned int lineno ATTRIBUTE_UNUSED)
unsigned int lineno ATTRIBUTE_UNUSED;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.end_source_file) (lineno); (*dwarf2_debug_hooks.end_source_file) (lineno);
...@@ -1615,8 +1559,7 @@ vmsdbgout_end_source_file (lineno) ...@@ -1615,8 +1559,7 @@ vmsdbgout_end_source_file (lineno)
/* Set up for Debug output at the start of compilation. */ /* Set up for Debug output at the start of compilation. */
static void static void
vmsdbgout_init (main_input_filename) vmsdbgout_init (const char *main_input_filename)
const char *main_input_filename;
{ {
const char *language_string = lang_hooks.name; const char *language_string = lang_hooks.name;
...@@ -1672,9 +1615,7 @@ vmsdbgout_init (main_input_filename) ...@@ -1672,9 +1615,7 @@ vmsdbgout_init (main_input_filename)
/* Not implemented in VMS Debug. */ /* Not implemented in VMS Debug. */
static void static void
vmsdbgout_define (lineno, buffer) vmsdbgout_define (unsigned int lineno, const char *buffer)
unsigned int lineno;
const char *buffer;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.define) (lineno, buffer); (*dwarf2_debug_hooks.define) (lineno, buffer);
...@@ -1683,9 +1624,7 @@ vmsdbgout_define (lineno, buffer) ...@@ -1683,9 +1624,7 @@ vmsdbgout_define (lineno, buffer)
/* Not implemented in VMS Debug. */ /* Not implemented in VMS Debug. */
static void static void
vmsdbgout_undef (lineno, buffer) vmsdbgout_undef (unsigned int lineno, const char *buffer)
unsigned int lineno;
const char *buffer;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.undef) (lineno, buffer); (*dwarf2_debug_hooks.undef) (lineno, buffer);
...@@ -1694,8 +1633,7 @@ vmsdbgout_undef (lineno, buffer) ...@@ -1694,8 +1633,7 @@ vmsdbgout_undef (lineno, buffer)
/* Not implemented in VMS Debug. */ /* Not implemented in VMS Debug. */
static void static void
vmsdbgout_decl (decl) vmsdbgout_decl (tree decl)
tree decl;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.function_decl) (decl); (*dwarf2_debug_hooks.function_decl) (decl);
...@@ -1704,8 +1642,7 @@ vmsdbgout_decl (decl) ...@@ -1704,8 +1642,7 @@ vmsdbgout_decl (decl)
/* Not implemented in VMS Debug. */ /* Not implemented in VMS Debug. */
static void static void
vmsdbgout_global_decl (decl) vmsdbgout_global_decl (tree decl)
tree decl;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.global_decl) (decl); (*dwarf2_debug_hooks.global_decl) (decl);
...@@ -1714,8 +1651,7 @@ vmsdbgout_global_decl (decl) ...@@ -1714,8 +1651,7 @@ vmsdbgout_global_decl (decl)
/* Not implemented in VMS Debug. */ /* Not implemented in VMS Debug. */
static void static void
vmsdbgout_abstract_function (decl) vmsdbgout_abstract_function (tree decl)
tree decl;
{ {
if (write_symbols == VMS_AND_DWARF2_DEBUG) if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.outlining_inline_function) (decl); (*dwarf2_debug_hooks.outlining_inline_function) (decl);
...@@ -1725,8 +1661,7 @@ vmsdbgout_abstract_function (decl) ...@@ -1725,8 +1661,7 @@ vmsdbgout_abstract_function (decl)
VMS Debug debugging info. */ VMS Debug debugging info. */
static void static void
vmsdbgout_finish (main_input_filename) vmsdbgout_finish (const char *main_input_filename ATTRIBUTE_UNUSED)
const char *main_input_filename ATTRIBUTE_UNUSED;
{ {
unsigned int i; unsigned int i;
int totsize; int totsize;
......
/* Output xcoff-format symbol table information from GNU compiler. /* Output xcoff-format symbol table information from GNU compiler.
Copyright (C) 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002 Copyright (C) 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -98,7 +98,7 @@ const char *xcoff_lastfile; ...@@ -98,7 +98,7 @@ const char *xcoff_lastfile;
? xcoff_current_include_file : main_input_filename); \ ? xcoff_current_include_file : main_input_filename); \
} }
#define ASM_OUTPUT_LFE(FILE,LINENUM) \ #define ASM_OUTPUT_LFE(FILE,LINENUM) \
do \ do \
{ \ { \
fprintf (FILE, "\t.ef\t%d\n", (LINENUM)); \ fprintf (FILE, "\t.ef\t%d\n", (LINENUM)); \
...@@ -112,9 +112,9 @@ const char *xcoff_lastfile; ...@@ -112,9 +112,9 @@ const char *xcoff_lastfile;
#define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \ #define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \
fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)) fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
static void assign_type_number PARAMS ((tree, const char *, int)); static void assign_type_number (tree, const char *, int);
static void xcoffout_block PARAMS ((tree, int, tree)); static void xcoffout_block (tree, int, tree);
static void xcoffout_source_file PARAMS ((FILE *, const char *, int)); static void xcoffout_source_file (FILE *, const char *, int);
/* Support routines for XCOFF debugging info. */ /* Support routines for XCOFF debugging info. */
...@@ -122,10 +122,7 @@ static void xcoffout_source_file PARAMS ((FILE *, const char *, int)); ...@@ -122,10 +122,7 @@ static void xcoffout_source_file PARAMS ((FILE *, const char *, int));
Search all decls in the list SYMS to find the type NAME. */ Search all decls in the list SYMS to find the type NAME. */
static void static void
assign_type_number (syms, name, number) assign_type_number (tree syms, const char *name, int number)
tree syms;
const char *name;
int number;
{ {
tree decl; tree decl;
...@@ -142,8 +139,7 @@ assign_type_number (syms, name, number) ...@@ -142,8 +139,7 @@ assign_type_number (syms, name, number)
possible. */ possible. */
void void
xcoff_output_standard_types (syms) xcoff_output_standard_types (tree syms)
tree syms;
{ {
/* Handle built-in C types here. */ /* Handle built-in C types here. */
...@@ -179,8 +175,7 @@ xcoff_output_standard_types (syms) ...@@ -179,8 +175,7 @@ xcoff_output_standard_types (syms)
/* Conversion routine from BSD stabs to AIX storage classes. */ /* Conversion routine from BSD stabs to AIX storage classes. */
int int
stab_to_sclass (stab) stab_to_sclass (int stab)
int stab;
{ {
switch (stab) switch (stab)
{ {
...@@ -282,10 +277,7 @@ stab_to_sclass (stab) ...@@ -282,10 +277,7 @@ stab_to_sclass (stab)
INLINE_P is true if this is from an inlined function. */ INLINE_P is true if this is from an inlined function. */
static void static void
xcoffout_source_file (file, filename, inline_p) xcoffout_source_file (FILE *file, const char *filename, int inline_p)
FILE *file;
const char *filename;
int inline_p;
{ {
if (filename if (filename
&& (xcoff_lastfile == 0 || strcmp (filename, xcoff_lastfile) && (xcoff_lastfile == 0 || strcmp (filename, xcoff_lastfile)
...@@ -314,9 +306,7 @@ xcoffout_source_file (file, filename, inline_p) ...@@ -314,9 +306,7 @@ xcoffout_source_file (file, filename, inline_p)
/* Output a line number symbol entry for location (FILENAME, LINE). */ /* Output a line number symbol entry for location (FILENAME, LINE). */
void void
xcoffout_source_line (line, filename) xcoffout_source_line (unsigned int line, const char *filename)
unsigned int line;
const char *filename;
{ {
bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0 bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0
|| (int) line < xcoff_begin_function_line); || (int) line < xcoff_begin_function_line);
...@@ -334,10 +324,7 @@ xcoffout_source_line (line, filename) ...@@ -334,10 +324,7 @@ xcoffout_source_line (line, filename)
static int do_block = 0; static int do_block = 0;
static void static void
xcoffout_block (block, depth, args) xcoffout_block (tree block, int depth, tree args)
tree block;
int depth;
tree args;
{ {
while (block) while (block)
{ {
...@@ -376,9 +363,7 @@ xcoffout_block (block, depth, args) ...@@ -376,9 +363,7 @@ xcoffout_block (block, depth, args)
if the count starts at 0 for the outermost one. */ if the count starts at 0 for the outermost one. */
void void
xcoffout_begin_block (line, n) xcoffout_begin_block (unsigned int line, unsigned int n)
unsigned int line;
unsigned int n;
{ {
tree decl = current_function_decl; tree decl = current_function_decl;
...@@ -394,9 +379,7 @@ xcoffout_begin_block (line, n) ...@@ -394,9 +379,7 @@ xcoffout_begin_block (line, n)
/* Describe the end line-number of an internal block within a function. */ /* Describe the end line-number of an internal block within a function. */
void void
xcoffout_end_block (line, n) xcoffout_end_block (unsigned int line, unsigned int n)
unsigned int line;
unsigned int n;
{ {
if (n != 1) if (n != 1)
ASM_OUTPUT_LBE (asm_out_file, line, n); ASM_OUTPUT_LBE (asm_out_file, line, n);
...@@ -406,10 +389,7 @@ xcoffout_end_block (line, n) ...@@ -406,10 +389,7 @@ xcoffout_end_block (line, n)
Declare function as needed for debugging. */ Declare function as needed for debugging. */
void void
xcoffout_declare_function (file, decl, name) xcoffout_declare_function (FILE *file, tree decl, const char *name)
FILE *file;
tree decl;
const char *name;
{ {
int i; int i;
...@@ -446,9 +426,8 @@ xcoffout_declare_function (file, decl, name) ...@@ -446,9 +426,8 @@ xcoffout_declare_function (file, decl, name)
Record the file name that this function is contained in. */ Record the file name that this function is contained in. */
void void
xcoffout_begin_prologue (line, file) xcoffout_begin_prologue (unsigned int line,
unsigned int line; const char *file ATTRIBUTE_UNUSED)
const char *file ATTRIBUTE_UNUSED;
{ {
ASM_OUTPUT_LFB (asm_out_file, line); ASM_OUTPUT_LFB (asm_out_file, line);
dbxout_parms (DECL_ARGUMENTS (current_function_decl)); dbxout_parms (DECL_ARGUMENTS (current_function_decl));
...@@ -468,8 +447,7 @@ xcoffout_begin_prologue (line, file) ...@@ -468,8 +447,7 @@ xcoffout_begin_prologue (line, file)
Describe end of outermost block. */ Describe end of outermost block. */
void void
xcoffout_end_function (last_linenum) xcoffout_end_function (unsigned int last_linenum)
unsigned int last_linenum;
{ {
ASM_OUTPUT_LFE (asm_out_file, last_linenum); ASM_OUTPUT_LFE (asm_out_file, last_linenum);
} }
...@@ -478,9 +456,8 @@ xcoffout_end_function (last_linenum) ...@@ -478,9 +456,8 @@ xcoffout_end_function (last_linenum)
Called after the epilogue is output. */ Called after the epilogue is output. */
void void
xcoffout_end_epilogue (line, file) xcoffout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
unsigned int line ATTRIBUTE_UNUSED; const char *file ATTRIBUTE_UNUSED)
const char *file ATTRIBUTE_UNUSED;
{ {
/* We need to pass the correct function size to .function, otherwise, /* We need to pass the correct function size to .function, otherwise,
the xas assembler can't figure out the correct size for the function the xas assembler can't figure out the correct size for the function
......
/* XCOFF definitions. These are needed in dbxout.c, final.c, /* XCOFF definitions. These are needed in dbxout.c, final.c,
and xcoffout.h. and xcoffout.h.
Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. Copyright (C) 1998, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -181,27 +182,24 @@ extern const char *xcoff_lastfile; ...@@ -181,27 +182,24 @@ extern const char *xcoff_lastfile;
/* Prototype functions in xcoffout.c. */ /* Prototype functions in xcoffout.c. */
extern int stab_to_sclass PARAMS ((int)); extern int stab_to_sclass (int);
#ifdef BUFSIZ #ifdef BUFSIZ
extern void xcoffout_begin_prologue PARAMS ((unsigned int, extern void xcoffout_begin_prologue (unsigned int, const char *);
const char *)); extern void xcoffout_begin_block (unsigned, unsigned);
extern void xcoffout_begin_block PARAMS ((unsigned, unsigned)); extern void xcoffout_end_epilogue (unsigned int, const char *);
extern void xcoffout_end_epilogue PARAMS ((unsigned int, extern void xcoffout_end_function (unsigned int);
const char *)); extern void xcoffout_end_block (unsigned, unsigned);
extern void xcoffout_end_function PARAMS ((unsigned int));
extern void xcoffout_end_block PARAMS ((unsigned, unsigned));
#endif /* BUFSIZ */ #endif /* BUFSIZ */
#ifdef TREE_CODE #ifdef TREE_CODE
extern void xcoff_output_standard_types PARAMS ((tree)); extern void xcoff_output_standard_types (tree);
#ifdef BUFSIZ #ifdef BUFSIZ
extern void xcoffout_declare_function PARAMS ((FILE *, tree, const char *)); extern void xcoffout_declare_function (FILE *, tree, const char *);
#endif /* BUFSIZ */ #endif /* BUFSIZ */
#endif /* TREE_CODE */ #endif /* TREE_CODE */
#ifdef RTX_CODE #ifdef RTX_CODE
#ifdef BUFSIZ #ifdef BUFSIZ
extern void xcoffout_source_line PARAMS ((unsigned int, extern void xcoffout_source_line (unsigned int, const char *);
const char *));
#endif /* BUFSIZ */ #endif /* BUFSIZ */
#endif /* RTX_CODE */ #endif /* RTX_CODE */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment