aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-04-08 10:59:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-04-08 08:59:34 +0000
commit38173d38cc4d944f209f1b2e0101fb176ac21e84 (patch)
tree72b27dbbc1af80f97285e66868faf1c622ad35d0 /gcc/config/arm
parent02ba6f3c841d89ddf6d2ab6ce8e54b69ed36bf10 (diff)
downloadgcc-38173d38cc4d944f209f1b2e0101fb176ac21e84.zip
gcc-38173d38cc4d944f209f1b2e0101fb176ac21e84.tar.gz
gcc-38173d38cc4d944f209f1b2e0101fb176ac21e84.tar.bz2
function.h (incomming_args): Break out of struct function.
* function.h (incomming_args): Break out of struct function. (function_subsections): Break out of struct function. (rtl_data): Add args, subsections fields. Break out outgoing_args_size, return_rtx and hard_reg_initial_vals from struct function. Kill inl_max_label_num. (current_function_pops_args, current_function_args_info, current_function_args_size, current_function_args_size, current_function_pretend_args_size, current_function_outgoing_args_size, current_function_internal_arg_pointer, current_function_return_rtx): Kill compatibility accestor macros. * builtins.c (expand_builtin_apply_args_1): Update. (expand_builtin_next_arg): Update. * df-scan.c (df_get_call_refs): Update. * dbxout.c (dbxout_function_end): Update. * dwarf2out.c (dwarf2out_switch_text_section): Update. (output_line_info): Update. (secname_for_decl): Update. (dwarf2out_var_location): Update. * function.c (free_after_compilation): Update. (assign_parm_find_stack_rtl): Update. (assign_parms): Update. (expand_dummy_function_end): Update. (expand_function_end): Update. * calls.c (mem_overlaps_already_clobbered_arg_p): Update. (expand_call): Update. (emit_library_call_value_1): Update. (store_one_arg): Update. * varasm.c (initialize_cold_section_name): Update. (unlikely_text_section): Update. (unlikely_text_section_p): Update. (assemble_start_function): Update. (assemble_end_function): Update. (default_section_type_flags): Update. (switch_to_section): Update. * integrate.c (set_decl_abstract_flags): Update. (get_hard_reg_initial_val): Update. (has_hard_reg_initial_val): Update. (allocate_initial_values): Update. * resource.c (init_resource_info): Update. * config/alpha/alpha.c (NUM_ARGS): Update. (direct_return): Update. (alpha_va_start): Update. (alpha_sa_size): Update. (alpha_initial_elimination_offset): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_expand_epilogue): Update. (unicosmk_initial_elimination_offset): * config/alpha/alpha.md (call expander): Update. * config/s390/s390.c (s390_register_info): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_initial_elimination_offset): Update. (s390_build_builtin_va_list): Update. (s390_va_start): Update. * config/spu/spu.c (direct_return): Update. (spu_expand_prologue): Update. (spu_initial_elimination_offset): Update. (spu_build_builtin_va_list): Update. (spu_va_start): Update. * config/sparc/sparc.c (sparc_init_modes): Update. (sparc_compute_frame_size): Update. (function_value): Update. * config/m32r/m32r.c (m32r_compute_frame_size): Update. * config/i386/i386.md (return expander): Update. * config/i386/i386.c (ix86_va_start): Update. (ix86_can_use_return_insn_p): Update. (ix86_compute_frame_layout): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh_expand_prologue): Update. (sh_builtin_saveregs): Update. (sh_va_start): Update. (initial_elimination_offset): Update. (sh_allocate_initial_value): Update. (sh_function_ok_for_sibcall): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.md (return expander): Update. * config/avr/avr.c (frame_pointer_required_p): UPdate. * config/crx/crx.c (crx_compute_frame): UPdate. (crx_initial_elimination_offset): UPdate. * config/xtensa/xtensa.c (compute_frame_size): Update (xtensa_builtin_saveregs): Update. (xtensa_va_start): Update. (order_regs_for_local_alloc): Update. * config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update. (xstormy16_expand_builtin_va_start): Update. * config/fr30/fr30.c (fr30_compute_frame_size): Update. * config/m68hc11/m68hc11.md (return expanders): Update. * config/m68hc11/m68hc11.c (expand_prologue): Update. (expand_epilogue): Update. * config/cris/cris.c (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. * config/iq2000/iq2000.c (iq2000_va_start): Update. (compute_frame_size): Update. * config/mt/mt.c (mt_compute_frame_size): Update. * config/mn10300/mn10300.c (expand_prologue): Update. (expand_epilogue): Update. (initial_offset): Update. (mn10300_builtin_saveregs): * config/mn10300/mn10300.md (return expander): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_initial_elimination_offset): Update. (ia64_initial_elimination_offset): Update. (ia64_expand_prologue): Update. * config/m68k/m68k.md (return expander): Update. * config/rs6000/rs6000.c (rs6000_va_start): Update. (rs6000_stack_info): Update. * config/mcore/mcore.c (layout_mcore_frame): Update. (mcore_expand_prolog): Update. * config/arc/arc.c (arc_compute_frame_size): Update. * config/score/score3.c (score3_compute_frame_size): Update. * config/score/score7.c (score7_compute_frame_size): Update. * config/arm/arm.c (use_return_insn): Update. (thumb_find_work_register): Update. (arm_compute_save_reg_mask): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_size_return_regs): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_exit): Update. (thumb_unexpanded_epilogue): Update. (thumb1_output_function_prologue): Update. * config/pa/pa.md (return expander): Update. * config/pa/pa.c (compute_frame_size): Update. (hppa_builtin_saveregs): Update. * config/mips/mips.c (mips_va_start): Update. (mips16_build_function_stub): Update. (mips_compute_frame_info): Update. (mips_restore_gp): Update. (mips_output_function_prologue): Update. (mips_expand_prologue): Update. * config/v850/v850.c (compute_frame_size): Update. (expand_prologue): * config/mmix/mmix.c (along): update. (mmix_initial_elimination_offset): update. (mmix_reorg): update. (mmix_use_simple_return): update. (mmix_expand_prologue): update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (bfin_initial_elimination_offset): Update. (emit_link_insn): Update. From-SVN: r134087
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/arm.c58
-rw-r--r--gcc/config/arm/arm.h4
2 files changed, 31 insertions, 31 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 43a3078..78aac13 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1653,7 +1653,7 @@ use_return_insn (int iscond, rtx sibling)
stack_adjust = offsets->outgoing_args - offsets->saved_regs;
/* As do variadic functions. */
- if (current_function_pretend_args_size
+ if (crtl->args.pretend_args_size
|| cfun->machine->uses_anonymous_args
/* Or if the function calls __builtin_eh_return () */
|| current_function_calls_eh_return
@@ -3544,15 +3544,15 @@ thumb_find_work_register (unsigned long pushed_regs_mask)
the variable argument list and so we can be sure that it will be
pushed right at the start of the function. Hence it will be available
for the rest of the prologue.
- (*): ie current_function_pretend_args_size is greater than 0. */
+ (*): ie crtl->args.pretend_args_size is greater than 0. */
if (cfun->machine->uses_anonymous_args
- && current_function_pretend_args_size > 0)
+ && crtl->args.pretend_args_size > 0)
return LAST_ARG_REGNUM;
/* The other case is when we have fixed arguments but less than 4 registers
worth. In this case r3 might be used in the body of the function, but
it is not being used to convey an argument into the function. In theory
- we could just check current_function_args_size to see how many bytes are
+ we could just check crtl->args.size to see how many bytes are
being passed in argument registers, but it seems that it is unreliable.
Sometimes it will have the value 0 when in fact arguments are being
passed. (See testcase execute/20021111-1.c for an example). So we also
@@ -3562,8 +3562,8 @@ thumb_find_work_register (unsigned long pushed_regs_mask)
when a function has an unused argument in r3. But it is better to be
safe than to be sorry. */
if (! cfun->machine->uses_anonymous_args
- && current_function_args_size >= 0
- && current_function_args_size <= (LAST_ARG_REGNUM * UNITS_PER_WORD)
+ && crtl->args.size >= 0
+ && crtl->args.size <= (LAST_ARG_REGNUM * UNITS_PER_WORD)
&& cfun->args_info.nregs < 4)
return LAST_ARG_REGNUM;
@@ -10833,7 +10833,7 @@ arm_compute_save_reg_mask (void)
if (TARGET_REALLY_IWMMXT
&& ((bit_count (save_reg_mask)
- + ARM_NUM_INTS (current_function_pretend_args_size)) % 2) != 0)
+ + ARM_NUM_INTS (crtl->args.pretend_args_size)) % 2) != 0)
{
/* The total number of registers that are going to be pushed
onto the stack is odd. We need to ensure that the stack
@@ -11258,8 +11258,8 @@ arm_output_function_prologue (FILE *f, HOST_WIDE_INT frame_size)
asm_fprintf (f, "\t%@ Stack Align: May be called with mis-aligned SP.\n");
asm_fprintf (f, "\t%@ args = %d, pretend = %d, frame = %wd\n",
- current_function_args_size,
- current_function_pretend_args_size, frame_size);
+ crtl->args.size,
+ crtl->args.pretend_args_size, frame_size);
asm_fprintf (f, "\t%@ frame_needed = %d, uses_anonymous_args = %d\n",
frame_pointer_needed,
@@ -11626,7 +11626,7 @@ arm_output_epilogue (rtx sibling)
&& (TARGET_ARM || ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL)
&& !IS_STACKALIGN (func_type)
&& really_return
- && current_function_pretend_args_size == 0
+ && crtl->args.pretend_args_size == 0
&& saved_regs_mask & (1 << LR_REGNUM)
&& !current_function_calls_eh_return)
{
@@ -11661,11 +11661,11 @@ arm_output_epilogue (rtx sibling)
print_multi_reg (f, "pop\t", SP_REGNUM, saved_regs_mask, 0);
}
- if (current_function_pretend_args_size)
+ if (crtl->args.pretend_args_size)
{
/* Unwind the pre-pushed regs. */
operands[0] = operands[1] = stack_pointer_rtx;
- operands[2] = GEN_INT (current_function_pretend_args_size);
+ operands[2] = GEN_INT (crtl->args.pretend_args_size);
output_add_immediate (operands);
}
}
@@ -11890,8 +11890,8 @@ arm_size_return_regs (void)
{
enum machine_mode mode;
- if (current_function_return_rtx != 0)
- mode = GET_MODE (current_function_return_rtx);
+ if (crtl->return_rtx != 0)
+ mode = GET_MODE (crtl->return_rtx);
else
mode = DECL_MODE (DECL_RESULT (current_function_decl));
@@ -12050,7 +12050,7 @@ arm_get_frame_offsets (void)
leaf = leaf_function_p ();
/* Space for variadic functions. */
- offsets->saved_args = current_function_pretend_args_size;
+ offsets->saved_args = crtl->args.pretend_args_size;
/* In Thumb mode this is incorrect, but never used. */
offsets->frame = offsets->saved_args + (frame_pointer_needed ? 4 : 0);
@@ -12119,7 +12119,7 @@ arm_get_frame_offsets (void)
/* Try to align stack by pushing an extra reg. Don't bother doing this
when there is a stack frame as the alignment will be rolled into
the normal stack adjustment. */
- if (frame_size + current_function_outgoing_args_size == 0)
+ if (frame_size + crtl->outgoing_args_size == 0)
{
int reg = -1;
@@ -12150,7 +12150,7 @@ arm_get_frame_offsets (void)
offsets->locals_base = offsets->soft_frame + frame_size;
offsets->outgoing_args = (offsets->locals_base
- + current_function_outgoing_args_size);
+ + crtl->outgoing_args_size);
if (ARM_DOUBLEWORD_ALIGN)
{
@@ -12399,7 +12399,7 @@ arm_expand_prologue (void)
return;
/* Make a copy of c_f_p_a_s as we may need to modify it locally. */
- args_to_push = current_function_pretend_args_size;
+ args_to_push = crtl->args.pretend_args_size;
/* Compute which register we will have to save onto the stack. */
offsets = arm_get_frame_offsets ();
@@ -12599,7 +12599,7 @@ arm_expand_prologue (void)
if (!df_regs_ever_live_p (3)
|| saved_pretend_args)
insn = gen_rtx_REG (SImode, 3);
- else /* if (current_function_pretend_args_size == 0) */
+ else /* if (crtl->args.pretend_args_size == 0) */
{
insn = plus_constant (hard_frame_pointer_rtx, 4);
insn = gen_frame_mem (SImode, insn);
@@ -16288,8 +16288,8 @@ thumb_exit (FILE *f, int reg_containing_return_addr)
ever used in the function, not just if the register is used
to hold a return value. */
- if (current_function_return_rtx != 0)
- mode = GET_MODE (current_function_return_rtx);
+ if (crtl->return_rtx != 0)
+ mode = GET_MODE (crtl->return_rtx);
else
mode = DECL_MODE (DECL_RESULT (current_function_decl));
@@ -16705,7 +16705,7 @@ thumb_unexpanded_epilogue (void)
had_to_push_lr = (live_regs_mask & (1 << LR_REGNUM)) != 0;
live_regs_mask &= 0xff;
- if (current_function_pretend_args_size == 0 || TARGET_BACKTRACE)
+ if (crtl->args.pretend_args_size == 0 || TARGET_BACKTRACE)
{
/* Pop the return address into the PC. */
if (had_to_push_lr)
@@ -16762,7 +16762,7 @@ thumb_unexpanded_epilogue (void)
/* Remove the argument registers that were pushed onto the stack. */
asm_fprintf (asm_out_file, "\tadd\t%r, %r, #%d\n",
SP_REGNUM, SP_REGNUM,
- current_function_pretend_args_size);
+ crtl->args.pretend_args_size);
thumb_exit (asm_out_file, regno);
}
@@ -17105,12 +17105,12 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
asm_fprintf (f, "%s%U%s:\n", STUB_NAME, name);
}
- if (current_function_pretend_args_size)
+ if (crtl->args.pretend_args_size)
{
/* Output unwind directive for the stack adjustment. */
if (ARM_EABI_UNWIND_TABLES)
fprintf (f, "\t.pad #%d\n",
- current_function_pretend_args_size);
+ crtl->args.pretend_args_size);
if (cfun->machine->uses_anonymous_args)
{
@@ -17118,7 +17118,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
fprintf (f, "\tpush\t{");
- num_pushes = ARM_NUM_INTS (current_function_pretend_args_size);
+ num_pushes = ARM_NUM_INTS (crtl->args.pretend_args_size);
for (regno = LAST_ARG_REGNUM + 1 - num_pushes;
regno <= LAST_ARG_REGNUM;
@@ -17131,7 +17131,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
else
asm_fprintf (f, "\tsub\t%r, %r, #%d\n",
SP_REGNUM, SP_REGNUM,
- current_function_pretend_args_size);
+ crtl->args.pretend_args_size);
/* We don't need to record the stores for unwinding (would it
help the debugger any if we did?), but record the change in
@@ -17140,7 +17140,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
char *l = dwarf2out_cfi_label ();
- cfa_offset = cfa_offset + current_function_pretend_args_size;
+ cfa_offset = cfa_offset + crtl->args.pretend_args_size;
dwarf2out_def_cfa (l, SP_REGNUM, cfa_offset);
}
}
@@ -17202,7 +17202,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
offset = 0;
asm_fprintf (f, "\tadd\t%r, %r, #%d\n", work_register, SP_REGNUM,
- offset + 16 + current_function_pretend_args_size);
+ offset + 16 + crtl->args.pretend_args_size);
asm_fprintf (f, "\tstr\t%r, [%r, #%d]\n", work_register, SP_REGNUM,
offset + 4);
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 3901768..a340441 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1409,7 +1409,7 @@ do { \
couldn't convert a direct call into an indirect one. */
#define CALLER_INTERWORKING_SLOT_SIZE \
(TARGET_CALLER_INTERWORKING \
- && current_function_outgoing_args_size != 0 \
+ && crtl->outgoing_args_size != 0 \
? UNITS_PER_WORD : 0)
/* Offset within stack frame to start allocating local variables at.
@@ -1426,7 +1426,7 @@ do { \
/* Define this if the maximum size of all the outgoing args is to be
accumulated and pushed during the prologue. The amount can be
- found in the variable current_function_outgoing_args_size. */
+ found in the variable crtl->outgoing_args_size. */
#define ACCUMULATE_OUTGOING_ARGS 1
/* Offset of first parameter from the argument pointer register value. */