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
This commit is contained in:
parent
02ba6f3c84
commit
38173d38cc
149
gcc/ChangeLog
149
gcc/ChangeLog
|
@ -1,3 +1,152 @@
|
|||
2008-04-08 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* 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.
|
||||
|
||||
2008-04-08 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
* config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Define
|
||||
|
|
|
@ -1351,7 +1351,7 @@ expand_builtin_apply_args_1 (void)
|
|||
as we might have pretended they were passed. Make sure it's a valid
|
||||
operand, as emit_move_insn isn't expected to handle a PLUS. */
|
||||
tem
|
||||
= force_operand (plus_constant (tem, current_function_pretend_args_size),
|
||||
= force_operand (plus_constant (tem, crtl->args.pretend_args_size),
|
||||
NULL_RTX);
|
||||
#endif
|
||||
emit_move_insn (adjust_address (registers, Pmode, 0), tem);
|
||||
|
@ -4600,7 +4600,7 @@ static rtx
|
|||
expand_builtin_args_info (tree exp)
|
||||
{
|
||||
int nwords = sizeof (CUMULATIVE_ARGS) / sizeof (int);
|
||||
int *word_ptr = (int *) ¤t_function_args_info;
|
||||
int *word_ptr = (int *) &crtl->args.info;
|
||||
|
||||
gcc_assert (sizeof (CUMULATIVE_ARGS) % sizeof (int) == 0);
|
||||
|
||||
|
@ -4632,8 +4632,8 @@ expand_builtin_next_arg (void)
|
|||
/* Checking arguments is already done in fold_builtin_next_arg
|
||||
that must be called before this function. */
|
||||
return expand_binop (ptr_mode, add_optab,
|
||||
current_function_internal_arg_pointer,
|
||||
current_function_arg_offset_rtx,
|
||||
crtl->args.internal_arg_pointer,
|
||||
crtl->args.arg_offset_rtx,
|
||||
NULL_RTX, 0, OPTAB_LIB_WIDEN);
|
||||
}
|
||||
|
||||
|
|
34
gcc/calls.c
34
gcc/calls.c
|
@ -1513,16 +1513,16 @@ mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size)
|
|||
{
|
||||
HOST_WIDE_INT i;
|
||||
|
||||
if (addr == current_function_internal_arg_pointer)
|
||||
if (addr == crtl->args.internal_arg_pointer)
|
||||
i = 0;
|
||||
else if (GET_CODE (addr) == PLUS
|
||||
&& XEXP (addr, 0) == current_function_internal_arg_pointer
|
||||
&& XEXP (addr, 0) == crtl->args.internal_arg_pointer
|
||||
&& GET_CODE (XEXP (addr, 1)) == CONST_INT)
|
||||
i = INTVAL (XEXP (addr, 1));
|
||||
/* Return true for arg pointer based indexed addressing. */
|
||||
else if (GET_CODE (addr) == PLUS
|
||||
&& (XEXP (addr, 0) == current_function_internal_arg_pointer
|
||||
|| XEXP (addr, 1) == current_function_internal_arg_pointer))
|
||||
&& (XEXP (addr, 0) == crtl->args.internal_arg_pointer
|
||||
|| XEXP (addr, 1) == crtl->args.internal_arg_pointer))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -2281,16 +2281,16 @@ expand_call (tree exp, rtx target, int ignore)
|
|||
|| (fndecl && decl_function_context (fndecl) == current_function_decl)
|
||||
/* If this function requires more stack slots than the current
|
||||
function, we cannot change it into a sibling call.
|
||||
current_function_pretend_args_size is not part of the
|
||||
crtl->args.pretend_args_size is not part of the
|
||||
stack allocated by our caller. */
|
||||
|| args_size.constant > (current_function_args_size
|
||||
- current_function_pretend_args_size)
|
||||
|| args_size.constant > (crtl->args.size
|
||||
- crtl->args.pretend_args_size)
|
||||
/* If the callee pops its own arguments, then it must pop exactly
|
||||
the same number of arguments as the current function. */
|
||||
|| (RETURN_POPS_ARGS (fndecl, funtype, args_size.constant)
|
||||
!= RETURN_POPS_ARGS (current_function_decl,
|
||||
TREE_TYPE (current_function_decl),
|
||||
current_function_args_size))
|
||||
crtl->args.size))
|
||||
|| !lang_hooks.decls.ok_for_sibcall (fndecl))
|
||||
try_tail_call = 0;
|
||||
|
||||
|
@ -2395,9 +2395,9 @@ expand_call (tree exp, rtx target, int ignore)
|
|||
argblock = virtual_incoming_args_rtx;
|
||||
argblock
|
||||
#ifdef STACK_GROWS_DOWNWARD
|
||||
= plus_constant (argblock, current_function_pretend_args_size);
|
||||
= plus_constant (argblock, crtl->args.pretend_args_size);
|
||||
#else
|
||||
= plus_constant (argblock, -current_function_pretend_args_size);
|
||||
= plus_constant (argblock, -crtl->args.pretend_args_size);
|
||||
#endif
|
||||
stored_args_map = sbitmap_alloc (args_size.constant);
|
||||
sbitmap_zero (stored_args_map);
|
||||
|
@ -2434,8 +2434,8 @@ expand_call (tree exp, rtx target, int ignore)
|
|||
the prologue (if ACCUMULATE_OUTGOING_ARGS, or stack overflow
|
||||
checking). */
|
||||
|
||||
if (needed > current_function_outgoing_args_size)
|
||||
current_function_outgoing_args_size = needed;
|
||||
if (needed > crtl->outgoing_args_size)
|
||||
crtl->outgoing_args_size = needed;
|
||||
|
||||
if (must_preallocate)
|
||||
{
|
||||
|
@ -3551,8 +3551,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
|
|||
if (!OUTGOING_REG_PARM_STACK_SPACE)
|
||||
args_size.constant -= reg_parm_stack_space;
|
||||
|
||||
if (args_size.constant > current_function_outgoing_args_size)
|
||||
current_function_outgoing_args_size = args_size.constant;
|
||||
if (args_size.constant > crtl->outgoing_args_size)
|
||||
crtl->outgoing_args_size = args_size.constant;
|
||||
|
||||
if (ACCUMULATE_OUTGOING_ARGS)
|
||||
{
|
||||
|
@ -4325,13 +4325,13 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
|
|||
rtx x = arg->value;
|
||||
int i = 0;
|
||||
|
||||
if (XEXP (x, 0) == current_function_internal_arg_pointer
|
||||
if (XEXP (x, 0) == crtl->args.internal_arg_pointer
|
||||
|| (GET_CODE (XEXP (x, 0)) == PLUS
|
||||
&& XEXP (XEXP (x, 0), 0) ==
|
||||
current_function_internal_arg_pointer
|
||||
crtl->args.internal_arg_pointer
|
||||
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT))
|
||||
{
|
||||
if (XEXP (x, 0) != current_function_internal_arg_pointer)
|
||||
if (XEXP (x, 0) != crtl->args.internal_arg_pointer)
|
||||
i = INTVAL (XEXP (XEXP (x, 0), 1));
|
||||
|
||||
/* expand_call should ensure this. */
|
||||
|
|
|
@ -189,9 +189,9 @@ static struct alpha_rtx_cost_data const alpha_rtx_cost_size =
|
|||
|
||||
/* Get the number of args of a function in one of two ways. */
|
||||
#if TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK
|
||||
#define NUM_ARGS current_function_args_info.num_args
|
||||
#define NUM_ARGS crtl->args.info.num_args
|
||||
#else
|
||||
#define NUM_ARGS current_function_args_info
|
||||
#define NUM_ARGS crtl->args.info
|
||||
#endif
|
||||
|
||||
#define REG_PV 27
|
||||
|
@ -643,8 +643,8 @@ direct_return (void)
|
|||
&& reload_completed
|
||||
&& alpha_sa_size () == 0
|
||||
&& get_frame_size () == 0
|
||||
&& current_function_outgoing_args_size == 0
|
||||
&& current_function_pretend_args_size == 0);
|
||||
&& crtl->outgoing_args_size == 0
|
||||
&& crtl->args.pretend_args_size == 0);
|
||||
}
|
||||
|
||||
/* Return the ADDR_VEC associated with a tablejump insn. */
|
||||
|
@ -6082,7 +6082,7 @@ alpha_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
|
|||
if (NUM_ARGS < 6)
|
||||
offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD;
|
||||
else
|
||||
offset = -6 * UNITS_PER_WORD + current_function_pretend_args_size;
|
||||
offset = -6 * UNITS_PER_WORD + crtl->args.pretend_args_size;
|
||||
|
||||
if (TARGET_ABI_OPEN_VMS)
|
||||
{
|
||||
|
@ -7148,7 +7148,7 @@ alpha_sa_size (void)
|
|||
|
||||
alpha_procedure_type
|
||||
= (sa_size || get_frame_size() != 0
|
||||
|| current_function_outgoing_args_size
|
||||
|| crtl->outgoing_args_size
|
||||
|| current_function_stdarg || current_function_calls_alloca
|
||||
|| frame_pointer_needed)
|
||||
? PT_STACK : PT_REGISTER;
|
||||
|
@ -7184,7 +7184,7 @@ alpha_sa_size (void)
|
|||
= (frame_pointer_needed
|
||||
|| current_function_has_nonlocal_label
|
||||
|| alpha_procedure_type == PT_STACK
|
||||
|| current_function_outgoing_args_size)
|
||||
|| crtl->outgoing_args_size)
|
||||
? REG_PV : HARD_FRAME_POINTER_REGNUM;
|
||||
|
||||
/* If we want to copy PV into FP, we need to find some register
|
||||
|
@ -7229,7 +7229,7 @@ alpha_initial_elimination_offset (unsigned int from,
|
|||
HOST_WIDE_INT ret;
|
||||
|
||||
ret = alpha_sa_size ();
|
||||
ret += ALPHA_ROUND (current_function_outgoing_args_size);
|
||||
ret += ALPHA_ROUND (crtl->outgoing_args_size);
|
||||
|
||||
switch (from)
|
||||
{
|
||||
|
@ -7238,8 +7238,8 @@ alpha_initial_elimination_offset (unsigned int from,
|
|||
|
||||
case ARG_POINTER_REGNUM:
|
||||
ret += (ALPHA_ROUND (get_frame_size ()
|
||||
+ current_function_pretend_args_size)
|
||||
- current_function_pretend_args_size);
|
||||
+ crtl->args.pretend_args_size)
|
||||
- crtl->args.pretend_args_size);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -7447,23 +7447,23 @@ alpha_expand_prologue (void)
|
|||
frame_size = ALPHA_ROUND (sa_size
|
||||
+ (alpha_procedure_type == PT_STACK ? 8 : 0)
|
||||
+ frame_size
|
||||
+ current_function_pretend_args_size);
|
||||
+ crtl->args.pretend_args_size);
|
||||
else if (TARGET_ABI_UNICOSMK)
|
||||
/* We have to allocate space for the DSIB if we generate a frame. */
|
||||
frame_size = ALPHA_ROUND (sa_size
|
||||
+ (alpha_procedure_type == PT_STACK ? 48 : 0))
|
||||
+ ALPHA_ROUND (frame_size
|
||||
+ current_function_outgoing_args_size);
|
||||
+ crtl->outgoing_args_size);
|
||||
else
|
||||
frame_size = (ALPHA_ROUND (current_function_outgoing_args_size)
|
||||
frame_size = (ALPHA_ROUND (crtl->outgoing_args_size)
|
||||
+ sa_size
|
||||
+ ALPHA_ROUND (frame_size
|
||||
+ current_function_pretend_args_size));
|
||||
+ crtl->args.pretend_args_size));
|
||||
|
||||
if (TARGET_ABI_OPEN_VMS)
|
||||
reg_offset = 8;
|
||||
else
|
||||
reg_offset = ALPHA_ROUND (current_function_outgoing_args_size);
|
||||
reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
|
||||
|
||||
alpha_sa_mask (&imask, &fmask);
|
||||
|
||||
|
@ -7677,14 +7677,14 @@ alpha_expand_prologue (void)
|
|||
FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx));
|
||||
|
||||
/* If we have to allocate space for outgoing args, do it now. */
|
||||
if (current_function_outgoing_args_size != 0)
|
||||
if (crtl->outgoing_args_size != 0)
|
||||
{
|
||||
rtx seq
|
||||
= emit_move_insn (stack_pointer_rtx,
|
||||
plus_constant
|
||||
(hard_frame_pointer_rtx,
|
||||
- (ALPHA_ROUND
|
||||
(current_function_outgoing_args_size))));
|
||||
(crtl->outgoing_args_size))));
|
||||
|
||||
/* Only set FRAME_RELATED_P on the stack adjustment we just emitted
|
||||
if ! frame_pointer_needed. Setting the bit will change the CFA
|
||||
|
@ -7696,7 +7696,7 @@ alpha_expand_prologue (void)
|
|||
frame_pointer_needed
|
||||
=> vms_unwind_regno == HARD_FRAME_POINTER_REGNUM
|
||||
and
|
||||
current_function_outgoing_args_size != 0
|
||||
crtl->outgoing_args_size != 0
|
||||
=> alpha_procedure_type != PT_NULL,
|
||||
|
||||
so when we are not setting the bit here, we are guaranteed to
|
||||
|
@ -7773,22 +7773,22 @@ alpha_start_function (FILE *file, const char *fnname,
|
|||
frame_size = ALPHA_ROUND (sa_size
|
||||
+ (alpha_procedure_type == PT_STACK ? 8 : 0)
|
||||
+ frame_size
|
||||
+ current_function_pretend_args_size);
|
||||
+ crtl->args.pretend_args_size);
|
||||
else if (TARGET_ABI_UNICOSMK)
|
||||
frame_size = ALPHA_ROUND (sa_size
|
||||
+ (alpha_procedure_type == PT_STACK ? 48 : 0))
|
||||
+ ALPHA_ROUND (frame_size
|
||||
+ current_function_outgoing_args_size);
|
||||
+ crtl->outgoing_args_size);
|
||||
else
|
||||
frame_size = (ALPHA_ROUND (current_function_outgoing_args_size)
|
||||
frame_size = (ALPHA_ROUND (crtl->outgoing_args_size)
|
||||
+ sa_size
|
||||
+ ALPHA_ROUND (frame_size
|
||||
+ current_function_pretend_args_size));
|
||||
+ crtl->args.pretend_args_size));
|
||||
|
||||
if (TARGET_ABI_OPEN_VMS)
|
||||
reg_offset = 8;
|
||||
else
|
||||
reg_offset = ALPHA_ROUND (current_function_outgoing_args_size);
|
||||
reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
|
||||
|
||||
alpha_sa_mask (&imask, &fmask);
|
||||
|
||||
|
@ -7858,7 +7858,7 @@ alpha_start_function (FILE *file, const char *fnname,
|
|||
}
|
||||
|
||||
/* Set up offsets to alpha virtual arg/local debugging pointer. */
|
||||
alpha_auto_offset = -frame_size + current_function_pretend_args_size;
|
||||
alpha_auto_offset = -frame_size + crtl->args.pretend_args_size;
|
||||
alpha_arg_offset = -frame_size + 48;
|
||||
|
||||
/* Describe our frame. If the frame size is larger than an integer,
|
||||
|
@ -7877,7 +7877,7 @@ alpha_start_function (FILE *file, const char *fnname,
|
|||
(frame_pointer_needed
|
||||
? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
|
||||
frame_size >= max_frame_size ? 0 : frame_size,
|
||||
current_function_pretend_args_size);
|
||||
crtl->args.pretend_args_size);
|
||||
|
||||
/* Describe which registers were spilled. */
|
||||
if (TARGET_ABI_UNICOSMK)
|
||||
|
@ -7972,17 +7972,17 @@ alpha_expand_epilogue (void)
|
|||
frame_size = ALPHA_ROUND (sa_size
|
||||
+ (alpha_procedure_type == PT_STACK ? 8 : 0)
|
||||
+ frame_size
|
||||
+ current_function_pretend_args_size);
|
||||
+ crtl->args.pretend_args_size);
|
||||
else if (TARGET_ABI_UNICOSMK)
|
||||
frame_size = ALPHA_ROUND (sa_size
|
||||
+ (alpha_procedure_type == PT_STACK ? 48 : 0))
|
||||
+ ALPHA_ROUND (frame_size
|
||||
+ current_function_outgoing_args_size);
|
||||
+ crtl->outgoing_args_size);
|
||||
else
|
||||
frame_size = (ALPHA_ROUND (current_function_outgoing_args_size)
|
||||
frame_size = (ALPHA_ROUND (crtl->outgoing_args_size)
|
||||
+ sa_size
|
||||
+ ALPHA_ROUND (frame_size
|
||||
+ current_function_pretend_args_size));
|
||||
+ crtl->args.pretend_args_size));
|
||||
|
||||
if (TARGET_ABI_OPEN_VMS)
|
||||
{
|
||||
|
@ -7992,7 +7992,7 @@ alpha_expand_epilogue (void)
|
|||
reg_offset = 0;
|
||||
}
|
||||
else
|
||||
reg_offset = ALPHA_ROUND (current_function_outgoing_args_size);
|
||||
reg_offset = ALPHA_ROUND (crtl->outgoing_args_size);
|
||||
|
||||
alpha_sa_mask (&imask, &fmask);
|
||||
|
||||
|
@ -9775,12 +9775,12 @@ unicosmk_initial_elimination_offset (int from, int to)
|
|||
else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
|
||||
return 0;
|
||||
else if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
return (ALPHA_ROUND (current_function_outgoing_args_size)
|
||||
return (ALPHA_ROUND (crtl->outgoing_args_size)
|
||||
+ ALPHA_ROUND (get_frame_size()));
|
||||
else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
return (ALPHA_ROUND (fixed_size)
|
||||
+ ALPHA_ROUND (get_frame_size()
|
||||
+ current_function_outgoing_args_size));
|
||||
+ crtl->outgoing_args_size));
|
||||
else
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
|
|
@ -662,7 +662,7 @@ extern int alpha_memory_latency;
|
|||
|
||||
/* 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. */
|
||||
|
@ -915,7 +915,7 @@ do { \
|
|||
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 28)
|
||||
#define EH_RETURN_HANDLER_RTX \
|
||||
gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, \
|
||||
current_function_outgoing_args_size))
|
||||
crtl->outgoing_args_size))
|
||||
|
||||
/* Addressing modes, and classification of registers for them. */
|
||||
|
||||
|
|
|
@ -474,11 +474,11 @@
|
|||
&& INTVAL (operands[2])
|
||||
< (0x7fff8000
|
||||
- FIRST_PSEUDO_REGISTER * UNITS_PER_WORD
|
||||
- ALPHA_ROUND(current_function_outgoing_args_size)
|
||||
- ALPHA_ROUND(crtl->outgoing_args_size)
|
||||
- (ALPHA_ROUND (get_frame_size ()
|
||||
+ max_reg_num () * UNITS_PER_WORD
|
||||
+ current_function_pretend_args_size)
|
||||
- current_function_pretend_args_size))"
|
||||
+ crtl->args.pretend_args_size)
|
||||
- crtl->args.pretend_args_size))"
|
||||
"@
|
||||
lda %0,%2(%1)
|
||||
ldah %0,%h2(%1)
|
||||
|
|
|
@ -143,14 +143,14 @@ along with GCC; see the file COPYING3. If not see
|
|||
case ARG_POINTER_REGNUM: \
|
||||
(OFFSET) = (ALPHA_ROUND (alpha_sa_size () + alpha_pv_save_size () \
|
||||
+ get_frame_size () \
|
||||
+ current_function_pretend_args_size) \
|
||||
- current_function_pretend_args_size); \
|
||||
+ crtl->args.pretend_args_size) \
|
||||
- crtl->args.pretend_args_size); \
|
||||
break; \
|
||||
default: \
|
||||
gcc_unreachable (); \
|
||||
} \
|
||||
if ((TO) == STACK_POINTER_REGNUM) \
|
||||
(OFFSET) += ALPHA_ROUND (current_function_outgoing_args_size); \
|
||||
(OFFSET) += ALPHA_ROUND (crtl->outgoing_args_size); \
|
||||
}
|
||||
|
||||
/* Define a data type for recording info about an argument list
|
||||
|
|
|
@ -1079,11 +1079,11 @@ arc_compute_frame_size (int size /* # of var. bytes allocated. */)
|
|||
int interrupt_p;
|
||||
|
||||
var_size = size;
|
||||
args_size = current_function_outgoing_args_size;
|
||||
pretend_size = current_function_pretend_args_size;
|
||||
args_size = crtl->outgoing_args_size;
|
||||
pretend_size = crtl->args.pretend_args_size;
|
||||
extra_size = FIRST_PARM_OFFSET (0);
|
||||
total_size = extra_size + pretend_size + args_size + var_size;
|
||||
reg_offset = FIRST_PARM_OFFSET(0) + current_function_outgoing_args_size;
|
||||
reg_offset = FIRST_PARM_OFFSET(0) + crtl->outgoing_args_size;
|
||||
reg_size = 0;
|
||||
gmask = 0;
|
||||
|
||||
|
@ -2282,8 +2282,8 @@ static void
|
|||
arc_va_start (tree valist, rtx nextarg)
|
||||
{
|
||||
/* See arc_setup_incoming_varargs for reasons for this oddity. */
|
||||
if (current_function_args_info < 8
|
||||
&& (current_function_args_info & 1))
|
||||
if (crtl->args.info < 8
|
||||
&& (crtl->args.info & 1))
|
||||
nextarg = plus_constant (nextarg, UNITS_PER_WORD);
|
||||
|
||||
std_expand_builtin_va_start (valist, nextarg);
|
||||
|
|
|
@ -531,7 +531,7 @@ extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing
|
||||
arguments will be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. No space will be pushed
|
||||
`crtl->outgoing_args_size'. No space will be pushed
|
||||
onto the stack for each call; instead, the function prologue should
|
||||
increase the stack frame size by this amount. */
|
||||
#define ACCUMULATE_OUTGOING_ARGS 1
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -2736,7 +2736,7 @@ int
|
|||
frame_pointer_required_p (void)
|
||||
{
|
||||
return (current_function_calls_alloca
|
||||
|| current_function_args_info.nregs == 0
|
||||
|| crtl->args.info.nregs == 0
|
||||
|| get_frame_size () > 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -779,9 +779,9 @@ bfin_initial_elimination_offset (int from, int to)
|
|||
|
||||
if (to == STACK_POINTER_REGNUM)
|
||||
{
|
||||
if (current_function_outgoing_args_size >= FIXED_STACK_AREA)
|
||||
offset += current_function_outgoing_args_size;
|
||||
else if (current_function_outgoing_args_size)
|
||||
if (crtl->outgoing_args_size >= FIXED_STACK_AREA)
|
||||
offset += crtl->outgoing_args_size;
|
||||
else if (crtl->outgoing_args_size)
|
||||
offset += FIXED_STACK_AREA;
|
||||
|
||||
offset += get_frame_size ();
|
||||
|
@ -945,10 +945,10 @@ emit_link_insn (rtx spreg, HOST_WIDE_INT frame_size)
|
|||
static HOST_WIDE_INT
|
||||
arg_area_size (void)
|
||||
{
|
||||
if (current_function_outgoing_args_size)
|
||||
if (crtl->outgoing_args_size)
|
||||
{
|
||||
if (current_function_outgoing_args_size >= FIXED_STACK_AREA)
|
||||
return current_function_outgoing_args_size;
|
||||
if (crtl->outgoing_args_size >= FIXED_STACK_AREA)
|
||||
return crtl->outgoing_args_size;
|
||||
else
|
||||
return FIXED_STACK_AREA;
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ extern const char *bfin_library_id_string;
|
|||
|
||||
/* 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
|
||||
|
||||
/* Value should be nonzero if functions must have frame pointers.
|
||||
|
|
|
@ -1206,7 +1206,7 @@ cris_initial_frame_pointer_offset (void)
|
|||
offs += get_frame_size ();
|
||||
|
||||
/* And more; the accumulated args size. */
|
||||
offs += current_function_outgoing_args_size;
|
||||
offs += crtl->outgoing_args_size;
|
||||
|
||||
/* Then round it off, in case we use aligned stack. */
|
||||
if (TARGET_STACK_ALIGN)
|
||||
|
@ -1700,9 +1700,9 @@ cris_simple_epilogue (void)
|
|||
if (! reload_completed
|
||||
|| frame_pointer_needed
|
||||
|| get_frame_size () != 0
|
||||
|| current_function_pretend_args_size
|
||||
|| current_function_args_size
|
||||
|| current_function_outgoing_args_size
|
||||
|| crtl->args.pretend_args_size
|
||||
|| crtl->args.size
|
||||
|| crtl->outgoing_args_size
|
||||
|| current_function_calls_eh_return
|
||||
|
||||
/* If we're not supposed to emit prologue and epilogue, we must
|
||||
|
@ -2731,14 +2731,14 @@ cris_expand_prologue (void)
|
|||
int regno;
|
||||
int size = get_frame_size ();
|
||||
/* Shorten the used name for readability. */
|
||||
int cfoa_size = current_function_outgoing_args_size;
|
||||
int cfoa_size = crtl->outgoing_args_size;
|
||||
int last_movem_reg = -1;
|
||||
int framesize = 0;
|
||||
rtx mem, insn;
|
||||
int return_address_on_stack = cris_return_address_on_stack ();
|
||||
int got_really_used = false;
|
||||
int n_movem_regs = 0;
|
||||
int pretend = current_function_pretend_args_size;
|
||||
int pretend = crtl->args.pretend_args_size;
|
||||
|
||||
/* Don't do anything if no prologues or epilogues are wanted. */
|
||||
if (!TARGET_PROLOGUE_EPILOGUE)
|
||||
|
@ -2765,7 +2765,7 @@ cris_expand_prologue (void)
|
|||
{
|
||||
/* See also cris_setup_incoming_varargs where
|
||||
cfun->machine->stdarg_regs is set. There are other setters of
|
||||
current_function_pretend_args_size than stdarg handling, like
|
||||
crtl->args.pretend_args_size than stdarg handling, like
|
||||
for an argument passed with parts in R13 and stack. We must
|
||||
not store R13 into the pretend-area for that case, as GCC does
|
||||
that itself. "Our" store would be marked as redundant and GCC
|
||||
|
@ -2799,7 +2799,7 @@ cris_expand_prologue (void)
|
|||
get confused. */
|
||||
}
|
||||
|
||||
/* For other setters of current_function_pretend_args_size, we
|
||||
/* For other setters of crtl->args.pretend_args_size, we
|
||||
just adjust the stack by leaving the remaining size in
|
||||
"pretend", handled below. */
|
||||
}
|
||||
|
@ -3012,8 +3012,8 @@ cris_expand_epilogue (void)
|
|||
int regno;
|
||||
int size = get_frame_size ();
|
||||
int last_movem_reg = -1;
|
||||
int argspace_offset = current_function_outgoing_args_size;
|
||||
int pretend = current_function_pretend_args_size;
|
||||
int argspace_offset = crtl->outgoing_args_size;
|
||||
int pretend = crtl->args.pretend_args_size;
|
||||
rtx mem;
|
||||
bool return_address_on_stack = cris_return_address_on_stack ();
|
||||
/* A reference may have been optimized out
|
||||
|
|
|
@ -318,7 +318,7 @@ crx_compute_frame (void)
|
|||
local_vars_size += padding_locals;
|
||||
|
||||
size_for_adjusting_sp = local_vars_size + (ACCUMULATE_OUTGOING_ARGS ?
|
||||
current_function_outgoing_args_size : 0);
|
||||
crtl->outgoing_args_size : 0);
|
||||
}
|
||||
|
||||
/* Implements the macro INITIAL_ELIMINATION_OFFSET, return the OFFSET. */
|
||||
|
@ -334,13 +334,13 @@ crx_initial_elimination_offset (int from, int to)
|
|||
|
||||
if ((from) == FRAME_POINTER_REGNUM && (to) == STACK_POINTER_REGNUM)
|
||||
return (ACCUMULATE_OUTGOING_ARGS ?
|
||||
current_function_outgoing_args_size : 0);
|
||||
crtl->outgoing_args_size : 0);
|
||||
else if ((from) == ARG_POINTER_REGNUM && (to) == FRAME_POINTER_REGNUM)
|
||||
return (sum_regs + local_vars_size);
|
||||
else if ((from) == ARG_POINTER_REGNUM && (to) == STACK_POINTER_REGNUM)
|
||||
return (sum_regs + local_vars_size +
|
||||
(ACCUMULATE_OUTGOING_ARGS ?
|
||||
current_function_outgoing_args_size : 0));
|
||||
crtl->outgoing_args_size : 0));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
|
|
@ -181,8 +181,8 @@ fr30_compute_frame_size (int from_reg, int to_reg)
|
|||
unsigned int gmask;
|
||||
|
||||
var_size = WORD_ALIGN (get_frame_size ());
|
||||
args_size = WORD_ALIGN (current_function_outgoing_args_size);
|
||||
pretend_size = current_function_pretend_args_size;
|
||||
args_size = WORD_ALIGN (crtl->outgoing_args_size);
|
||||
pretend_size = crtl->args.pretend_args_size;
|
||||
|
||||
reg_size = 0;
|
||||
gmask = 0;
|
||||
|
|
|
@ -534,7 +534,7 @@ enum reg_class
|
|||
register. See `FIXED_REGISTERS' for more information. */
|
||||
/* #define FRAME_POINTER_REQUIRED 0 */
|
||||
#define FRAME_POINTER_REQUIRED \
|
||||
(flag_omit_frame_pointer == 0 || current_function_pretend_args_size > 0)
|
||||
(flag_omit_frame_pointer == 0 || crtl->args.pretend_args_size > 0)
|
||||
|
||||
/* If defined, this macro specifies a table of register pairs used to eliminate
|
||||
unneeded registers that point into the stack frame. If it is not defined,
|
||||
|
@ -586,7 +586,7 @@ enum reg_class
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing arguments will
|
||||
be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. No space will be pushed onto the
|
||||
`crtl->outgoing_args_size'. No space will be pushed onto the
|
||||
stack for each call; instead, the function prologue should increase the
|
||||
stack frame size by this amount.
|
||||
|
||||
|
|
|
@ -1620,7 +1620,7 @@ typedef struct frv_stack {
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing arguments will
|
||||
be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. No space will be pushed onto the
|
||||
`crtl->outgoing_args_size'. No space will be pushed onto the
|
||||
stack for each call; instead, the function prologue should increase the
|
||||
stack frame size by this amount.
|
||||
|
||||
|
|
|
@ -5204,9 +5204,9 @@ ix86_va_start (tree valist, rtx nextarg)
|
|||
sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE);
|
||||
|
||||
/* Count number of gp and fp argument registers used. */
|
||||
words = current_function_args_info.words;
|
||||
n_gpr = current_function_args_info.regno;
|
||||
n_fpr = current_function_args_info.sse_regno;
|
||||
words = crtl->args.info.words;
|
||||
n_gpr = crtl->args.info.regno;
|
||||
n_fpr = crtl->args.info.sse_regno;
|
||||
|
||||
if (cfun->va_list_gpr_size)
|
||||
{
|
||||
|
@ -5750,8 +5750,8 @@ ix86_can_use_return_insn_p (void)
|
|||
|
||||
/* Don't allow more than 32 pop, since that's all we can do
|
||||
with one instruction. */
|
||||
if (current_function_pops_args
|
||||
&& current_function_args_size >= 32768)
|
||||
if (crtl->args.pops_args
|
||||
&& crtl->args.size >= 32768)
|
||||
return 0;
|
||||
|
||||
ix86_compute_frame_layout (&frame);
|
||||
|
@ -6182,14 +6182,14 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
|
|||
/* Add outgoing arguments area. Can be skipped if we eliminated
|
||||
all the function calls as dead code.
|
||||
Skipping is however impossible when function calls alloca. Alloca
|
||||
expander assumes that last current_function_outgoing_args_size
|
||||
expander assumes that last crtl->outgoing_args_size
|
||||
of stack frame are unused. */
|
||||
if (ACCUMULATE_OUTGOING_ARGS
|
||||
&& (!current_function_is_leaf || current_function_calls_alloca
|
||||
|| ix86_current_function_calls_tls_descriptor))
|
||||
{
|
||||
offset += current_function_outgoing_args_size;
|
||||
frame->outgoing_arguments_size = current_function_outgoing_args_size;
|
||||
offset += crtl->outgoing_args_size;
|
||||
frame->outgoing_arguments_size = crtl->outgoing_args_size;
|
||||
}
|
||||
else
|
||||
frame->outgoing_arguments_size = 0;
|
||||
|
@ -6750,15 +6750,15 @@ ix86_expand_epilogue (int style)
|
|||
if (style == 0)
|
||||
return;
|
||||
|
||||
if (current_function_pops_args && current_function_args_size)
|
||||
if (crtl->args.pops_args && crtl->args.size)
|
||||
{
|
||||
rtx popc = GEN_INT (current_function_pops_args);
|
||||
rtx popc = GEN_INT (crtl->args.pops_args);
|
||||
|
||||
/* i386 can only pop 64K bytes. If asked to pop more, pop
|
||||
return address, do explicit add, and jump indirectly to the
|
||||
caller. */
|
||||
|
||||
if (current_function_pops_args >= 65536)
|
||||
if (crtl->args.pops_args >= 65536)
|
||||
{
|
||||
rtx ecx = gen_rtx_REG (SImode, CX_REG);
|
||||
|
||||
|
|
|
@ -1603,7 +1603,7 @@ enum reg_class
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing arguments will
|
||||
be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. No space will be pushed onto the
|
||||
`crtl->outgoing_args_size'. No space will be pushed onto the
|
||||
stack for each call; instead, the function prologue should increase the stack
|
||||
frame size by this amount. */
|
||||
|
||||
|
|
|
@ -14806,9 +14806,9 @@
|
|||
[(return)]
|
||||
"ix86_can_use_return_insn_p ()"
|
||||
{
|
||||
if (current_function_pops_args)
|
||||
if (crtl->args.pops_args)
|
||||
{
|
||||
rtx popc = GEN_INT (current_function_pops_args);
|
||||
rtx popc = GEN_INT (crtl->args.pops_args);
|
||||
emit_jump_insn (gen_return_pop_internal (popc));
|
||||
DONE;
|
||||
}
|
||||
|
|
|
@ -2575,12 +2575,12 @@ ia64_compute_frame_size (HOST_WIDE_INT size)
|
|||
the stack, then the FR save area will be unaligned. We round the
|
||||
size of this area up to keep things 16 byte aligned. */
|
||||
if (spilled_fr_p)
|
||||
pretend_args_size = IA64_STACK_ALIGN (current_function_pretend_args_size);
|
||||
pretend_args_size = IA64_STACK_ALIGN (crtl->args.pretend_args_size);
|
||||
else
|
||||
pretend_args_size = current_function_pretend_args_size;
|
||||
pretend_args_size = crtl->args.pretend_args_size;
|
||||
|
||||
total_size = (spill_size + extra_spill_size + size + pretend_args_size
|
||||
+ current_function_outgoing_args_size);
|
||||
+ crtl->outgoing_args_size);
|
||||
total_size = IA64_STACK_ALIGN (total_size);
|
||||
|
||||
/* We always use the 16-byte scratch area provided by the caller, but
|
||||
|
@ -2616,14 +2616,14 @@ ia64_initial_elimination_offset (int from, int to)
|
|||
offset = -current_frame_info.total_size;
|
||||
else
|
||||
offset = -(current_frame_info.total_size
|
||||
- current_function_outgoing_args_size - 16);
|
||||
- crtl->outgoing_args_size - 16);
|
||||
break;
|
||||
|
||||
case STACK_POINTER_REGNUM:
|
||||
if (current_function_is_leaf)
|
||||
offset = 0;
|
||||
else
|
||||
offset = 16 + current_function_outgoing_args_size;
|
||||
offset = 16 + crtl->outgoing_args_size;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2637,12 +2637,12 @@ ia64_initial_elimination_offset (int from, int to)
|
|||
switch (to)
|
||||
{
|
||||
case HARD_FRAME_POINTER_REGNUM:
|
||||
offset = 16 - current_function_pretend_args_size;
|
||||
offset = 16 - crtl->args.pretend_args_size;
|
||||
break;
|
||||
|
||||
case STACK_POINTER_REGNUM:
|
||||
offset = (current_frame_info.total_size
|
||||
+ 16 - current_function_pretend_args_size);
|
||||
+ 16 - crtl->args.pretend_args_size);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2994,7 +2994,7 @@ ia64_expand_prologue (void)
|
|||
/* We don't need an alloc instruction if we've used no outputs or locals. */
|
||||
if (current_frame_info.n_local_regs == 0
|
||||
&& current_frame_info.n_output_regs == 0
|
||||
&& current_frame_info.n_input_regs <= current_function_args_info.int_regs
|
||||
&& current_frame_info.n_input_regs <= crtl->args.info.int_regs
|
||||
&& !TEST_HARD_REG_BIT (current_frame_info.mask, AR_PFS_REGNUM))
|
||||
{
|
||||
/* If there is no alloc, but there are input registers used, then we
|
||||
|
|
|
@ -1029,7 +1029,7 @@ enum reg_class
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing arguments will
|
||||
be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. */
|
||||
`crtl->outgoing_args_size'. */
|
||||
|
||||
#define ACCUMULATE_OUTGOING_ARGS 1
|
||||
|
||||
|
|
|
@ -1368,7 +1368,7 @@ iq2000_va_start (tree valist, rtx nextarg)
|
|||
/* Find out how many non-float named formals. */
|
||||
int gpr_save_area_size;
|
||||
/* Note UNITS_PER_WORD is 4 bytes. */
|
||||
int_arg_words = current_function_args_info.arg_words;
|
||||
int_arg_words = crtl->args.info.arg_words;
|
||||
|
||||
if (int_arg_words < 8 )
|
||||
/* Adjust for the prologue's economy measure. */
|
||||
|
@ -1615,7 +1615,7 @@ compute_frame_size (HOST_WIDE_INT size)
|
|||
mask = 0;
|
||||
extra_size = IQ2000_STACK_ALIGN ((0));
|
||||
var_size = IQ2000_STACK_ALIGN (size);
|
||||
args_size = IQ2000_STACK_ALIGN (current_function_outgoing_args_size);
|
||||
args_size = IQ2000_STACK_ALIGN (crtl->outgoing_args_size);
|
||||
|
||||
/* If a function dynamically allocates the stack and
|
||||
has 0 for STACK_DYNAMIC_OFFSET then allocate some stack space. */
|
||||
|
@ -1660,7 +1660,7 @@ compute_frame_size (HOST_WIDE_INT size)
|
|||
&& ! profile_flag)
|
||||
total_size = extra_size = 0;
|
||||
|
||||
total_size += IQ2000_STACK_ALIGN (current_function_pretend_args_size);
|
||||
total_size += IQ2000_STACK_ALIGN (crtl->args.pretend_args_size);
|
||||
|
||||
/* Save other computed information. */
|
||||
cfun->machine->total_size = total_size;
|
||||
|
|
|
@ -303,7 +303,7 @@ enum reg_class
|
|||
#define FRAME_GROWS_DOWNWARD 0
|
||||
|
||||
#define STARTING_FRAME_OFFSET \
|
||||
(current_function_outgoing_args_size)
|
||||
(crtl->outgoing_args_size)
|
||||
|
||||
/* Use the default value zero. */
|
||||
/* #define STACK_POINTER_OFFSET 0 */
|
||||
|
|
|
@ -1276,8 +1276,8 @@ m32r_compute_frame_size (int size) /* # of var. bytes allocated. */
|
|||
| current_function_profile);
|
||||
|
||||
var_size = M32R_STACK_ALIGN (size);
|
||||
args_size = M32R_STACK_ALIGN (current_function_outgoing_args_size);
|
||||
pretend_size = current_function_pretend_args_size;
|
||||
args_size = M32R_STACK_ALIGN (crtl->outgoing_args_size);
|
||||
pretend_size = crtl->args.pretend_args_size;
|
||||
extra_size = FIRST_PARM_OFFSET (0);
|
||||
total_size = extra_size + pretend_size + args_size + var_size;
|
||||
reg_size = 0;
|
||||
|
|
|
@ -717,7 +717,7 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
|||
/* The frame pointer points at the same place as the stack pointer, except if
|
||||
alloca has been called. */
|
||||
#define STARTING_FRAME_OFFSET \
|
||||
M32R_STACK_ALIGN (current_function_outgoing_args_size)
|
||||
M32R_STACK_ALIGN (crtl->outgoing_args_size)
|
||||
|
||||
/* Offset from the stack pointer register to the first location at which
|
||||
outgoing arguments are placed. */
|
||||
|
@ -818,9 +818,9 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
|||
if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \
|
||||
(OFFSET) = 0; \
|
||||
else if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM) \
|
||||
(OFFSET) = size - current_function_pretend_args_size; \
|
||||
(OFFSET) = size - crtl->args.pretend_args_size; \
|
||||
else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \
|
||||
(OFFSET) = size - current_function_pretend_args_size; \
|
||||
(OFFSET) = size - crtl->args.pretend_args_size; \
|
||||
else \
|
||||
gcc_unreachable (); \
|
||||
} \
|
||||
|
@ -830,7 +830,7 @@ extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing
|
||||
arguments will be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. No space will be pushed
|
||||
`crtl->outgoing_args_size'. No space will be pushed
|
||||
onto the stack for each call; instead, the function prologue should
|
||||
increase the stack frame size by this amount. */
|
||||
#define ACCUMULATE_OUTGOING_ARGS 1
|
||||
|
|
|
@ -1597,7 +1597,7 @@ expand_prologue (void)
|
|||
If the first argument is a 32-bit quantity, the D+X registers
|
||||
are used. Use Y to compute the frame. Otherwise, X is cheaper.
|
||||
For 68HC12, this scratch register is not used. */
|
||||
if (current_function_args_info.nregs == 2)
|
||||
if (crtl->args.info.nregs == 2)
|
||||
scratch = iy_reg;
|
||||
else
|
||||
scratch = ix_reg;
|
||||
|
@ -1685,12 +1685,12 @@ expand_epilogue (void)
|
|||
/* If we are returning a value in two registers, we have to preserve the
|
||||
X register and use the Y register to restore the stack and the saved
|
||||
registers. Otherwise, use X because it's faster (and smaller). */
|
||||
if (current_function_return_rtx == 0)
|
||||
if (crtl->return_rtx == 0)
|
||||
return_size = 0;
|
||||
else if (GET_CODE (current_function_return_rtx) == MEM)
|
||||
else if (GET_CODE (crtl->return_rtx) == MEM)
|
||||
return_size = HARD_REG_SIZE;
|
||||
else
|
||||
return_size = GET_MODE_SIZE (GET_MODE (current_function_return_rtx));
|
||||
return_size = GET_MODE_SIZE (GET_MODE (crtl->return_rtx));
|
||||
|
||||
if (return_size > HARD_REG_SIZE && return_size <= 2 * HARD_REG_SIZE)
|
||||
scratch = iy_reg;
|
||||
|
|
|
@ -6722,8 +6722,8 @@
|
|||
{
|
||||
int ret_size = 0;
|
||||
|
||||
if (current_function_return_rtx)
|
||||
ret_size = GET_MODE_SIZE (GET_MODE (current_function_return_rtx));
|
||||
if (crtl->return_rtx)
|
||||
ret_size = GET_MODE_SIZE (GET_MODE (crtl->return_rtx));
|
||||
|
||||
/* Emit use notes only when HAVE_return is true. */
|
||||
if (m68hc11_total_frame_size () != 0)
|
||||
|
@ -6768,8 +6768,8 @@
|
|||
{
|
||||
int ret_size = 0;
|
||||
|
||||
if (current_function_return_rtx)
|
||||
ret_size = GET_MODE_SIZE (GET_MODE (current_function_return_rtx));
|
||||
if (crtl->return_rtx)
|
||||
ret_size = GET_MODE_SIZE (GET_MODE (crtl->return_rtx));
|
||||
|
||||
if (ret_size == 0)
|
||||
return \"jmp\\t__return_void\";
|
||||
|
|
|
@ -7153,9 +7153,9 @@
|
|||
return "sleep";
|
||||
|
||||
default:
|
||||
if (current_function_pops_args)
|
||||
if (crtl->args.pops_args)
|
||||
{
|
||||
operands[0] = GEN_INT (current_function_pops_args);
|
||||
operands[0] = GEN_INT (crtl->args.pops_args);
|
||||
return "rtd %0";
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1651,7 +1651,7 @@ layout_mcore_frame (struct mcore_frame * infp)
|
|||
|
||||
/* Might have to spill bytes to re-assemble a big argument that
|
||||
was passed partially in registers and partially on the stack. */
|
||||
nbytes = current_function_pretend_args_size;
|
||||
nbytes = crtl->args.pretend_args_size;
|
||||
|
||||
/* Determine how much space for spilled anonymous args (e.g., stdarg). */
|
||||
if (current_function_anonymous_args)
|
||||
|
@ -1665,7 +1665,7 @@ layout_mcore_frame (struct mcore_frame * infp)
|
|||
|
||||
/* And the rest of it... locals and space for overflowed outbounds. */
|
||||
infp->local_size = get_frame_size ();
|
||||
infp->outbound_size = current_function_outgoing_args_size;
|
||||
infp->outbound_size = crtl->outgoing_args_size;
|
||||
|
||||
/* Make sure we have a whole number of words for the locals. */
|
||||
if (infp->local_size % STACK_BYTES)
|
||||
|
@ -1962,7 +1962,7 @@ mcore_expand_prolog (void)
|
|||
/* If we have a parameter passed partially in regs and partially in memory,
|
||||
the registers will have been stored to memory already in function.c. So
|
||||
we only need to do something here for varargs functions. */
|
||||
if (fi.arg_size != 0 && current_function_pretend_args_size == 0)
|
||||
if (fi.arg_size != 0 && crtl->args.pretend_args_size == 0)
|
||||
{
|
||||
int offset;
|
||||
int rn = FIRST_PARM_REG + NPARM_REGS - 1;
|
||||
|
|
|
@ -538,7 +538,7 @@ extern const enum reg_class reg_class_from_letter[];
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing arguments
|
||||
will be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. No space will be pushed
|
||||
`crtl->outgoing_args_size'. No space will be pushed
|
||||
onto the stack for each call; instead, the function prologue should
|
||||
increase the stack frame size by this amount. */
|
||||
#define ACCUMULATE_OUTGOING_ARGS 1
|
||||
|
|
|
@ -4784,7 +4784,7 @@ mips_va_start (tree valist, rtx nextarg)
|
|||
int fpr_save_area_size;
|
||||
int fpr_offset;
|
||||
|
||||
cum = ¤t_function_args_info;
|
||||
cum = &crtl->args.info;
|
||||
gpr_save_area_size
|
||||
= (MAX_ARGS_IN_REGISTERS - cum->num_gprs) * UNITS_PER_WORD;
|
||||
fpr_save_area_size
|
||||
|
@ -5160,7 +5160,7 @@ mips16_build_function_stub (void)
|
|||
fprintf (asm_out_file, "\t# Stub function for %s (",
|
||||
current_function_name ());
|
||||
separator = "";
|
||||
for (f = (unsigned int) current_function_args_info.fp_code; f != 0; f >>= 2)
|
||||
for (f = (unsigned int) crtl->args.info.fp_code; f != 0; f >>= 2)
|
||||
{
|
||||
fprintf (asm_out_file, "%s%s", separator,
|
||||
(f & 3) == 1 ? "float" : "double");
|
||||
|
@ -5196,7 +5196,7 @@ mips16_build_function_stub (void)
|
|||
fprintf (asm_out_file, "\n");
|
||||
|
||||
/* Move the arguments from floating-point registers to general registers. */
|
||||
mips_output_args_xfer (current_function_args_info.fp_code, 'f');
|
||||
mips_output_args_xfer (crtl->args.info.fp_code, 'f');
|
||||
|
||||
/* Jump to the MIPS16 function. */
|
||||
fprintf (asm_out_file, "\tjr\t%s\n", reg_names[GP_REG_FIRST + 1]);
|
||||
|
@ -7846,7 +7846,7 @@ mips_compute_frame_info (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
frame->args_size = current_function_outgoing_args_size;
|
||||
frame->args_size = crtl->outgoing_args_size;
|
||||
frame->cprestore_size = STARTING_FRAME_OFFSET - frame->args_size;
|
||||
}
|
||||
offset = frame->args_size + frame->cprestore_size;
|
||||
|
@ -7912,7 +7912,7 @@ mips_compute_frame_info (void)
|
|||
frame->arg_pointer_offset = offset;
|
||||
|
||||
/* Move above the callee-allocated area for pretend stack arguments. */
|
||||
offset += current_function_pretend_args_size;
|
||||
offset += crtl->args.pretend_args_size;
|
||||
frame->total_size = offset;
|
||||
|
||||
/* Work out the offsets of the save areas from the top of the frame. */
|
||||
|
@ -8059,7 +8059,7 @@ mips_restore_gp (void)
|
|||
|
||||
base = frame_pointer_needed ? hard_frame_pointer_rtx : stack_pointer_rtx;
|
||||
address = mips_add_offset (pic_offset_table_rtx, base,
|
||||
current_function_outgoing_args_size);
|
||||
crtl->outgoing_args_size);
|
||||
mips_emit_move (pic_offset_table_rtx, gen_frame_mem (Pmode, address));
|
||||
if (!TARGET_EXPLICIT_RELOCS)
|
||||
emit_insn (gen_blockage ());
|
||||
|
@ -8149,7 +8149,7 @@ mips_output_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
|
|||
floating-point arguments. */
|
||||
if (TARGET_MIPS16
|
||||
&& TARGET_HARD_FLOAT_ABI
|
||||
&& current_function_args_info.fp_code != 0)
|
||||
&& crtl->args.info.fp_code != 0)
|
||||
mips16_build_function_stub ();
|
||||
|
||||
/* Select the MIPS16 mode for this function. */
|
||||
|
@ -8486,7 +8486,7 @@ mips_expand_prologue (void)
|
|||
|
||||
/* Initialize the $gp save slot. */
|
||||
if (frame->cprestore_size > 0)
|
||||
emit_insn (gen_cprestore (GEN_INT (current_function_outgoing_args_size)));
|
||||
emit_insn (gen_cprestore (GEN_INT (crtl->outgoing_args_size)));
|
||||
|
||||
/* If we are profiling, make sure no instructions are scheduled before
|
||||
the call to mcount. */
|
||||
|
|
|
@ -1883,7 +1883,7 @@ enum reg_class
|
|||
See mips_compute_frame_info for details about the frame layout. */
|
||||
|
||||
#define STARTING_FRAME_OFFSET \
|
||||
(current_function_outgoing_args_size \
|
||||
(crtl->outgoing_args_size \
|
||||
+ (TARGET_CALL_CLOBBERED_GP ? MIPS_STACK_ALIGN (UNITS_PER_WORD) : 0))
|
||||
|
||||
#define RETURN_ADDR_RTX mips_return_addr
|
||||
|
@ -1935,7 +1935,7 @@ enum reg_class
|
|||
allocate the area reserved for arguments passed in registers.
|
||||
If `ACCUMULATE_OUTGOING_ARGS' is also defined, the only effect
|
||||
of this macro is to determine whether the space is included in
|
||||
`current_function_outgoing_args_size'. */
|
||||
`crtl->outgoing_args_size'. */
|
||||
#define OUTGOING_REG_PARM_STACK_SPACE 1
|
||||
|
||||
#define STACK_BOUNDARY (TARGET_NEWABI ? 128 : 64)
|
||||
|
|
|
@ -95,10 +95,10 @@ along with GCC; see the file COPYING3. If not see
|
|||
/* The %d in "POP %d,0". */
|
||||
#define MMIX_POP_ARGUMENT() \
|
||||
((! TARGET_ABI_GNU \
|
||||
&& current_function_return_rtx != NULL \
|
||||
&& crtl->return_rtx != NULL \
|
||||
&& ! current_function_returns_struct) \
|
||||
? (GET_CODE (current_function_return_rtx) == PARALLEL \
|
||||
? GET_NUM_ELEM (XVEC (current_function_return_rtx, 0)) : 1) \
|
||||
? (GET_CODE (crtl->return_rtx) == PARALLEL \
|
||||
? GET_NUM_ELEM (XVEC (crtl->return_rtx, 0)) : 1) \
|
||||
: 0)
|
||||
|
||||
/* The canonical saved comparison operands for non-cc0 machines, set in
|
||||
|
@ -531,7 +531,7 @@ mmix_initial_elimination_offset (int fromreg, int toreg)
|
|||
{
|
||||
int regno;
|
||||
int fp_sp_offset
|
||||
= (get_frame_size () + current_function_outgoing_args_size + 7) & ~7;
|
||||
= (get_frame_size () + crtl->outgoing_args_size + 7) & ~7;
|
||||
|
||||
/* There is no actual offset between these two virtual values, but for
|
||||
the frame-pointer, we have the old one in the stack position below
|
||||
|
@ -795,9 +795,9 @@ mmix_reorg (void)
|
|||
wasteful to optimize for unused parameter registers. As of
|
||||
2002-04-30, df_regs_ever_live_p (n) seems to be set for only-reads too, but
|
||||
that might change. */
|
||||
if (!TARGET_ABI_GNU && regno < current_function_args_info.regs - 1)
|
||||
if (!TARGET_ABI_GNU && regno < crtl->args.info.regs - 1)
|
||||
{
|
||||
regno = current_function_args_info.regs - 1;
|
||||
regno = crtl->args.info.regs - 1;
|
||||
|
||||
/* We don't want to let this cause us to go over the limit and make
|
||||
incoming parameter registers be misnumbered and treating the last
|
||||
|
@ -1838,8 +1838,8 @@ mmix_use_simple_return (void)
|
|||
int regno;
|
||||
|
||||
int stack_space_to_allocate
|
||||
= (current_function_outgoing_args_size
|
||||
+ current_function_pretend_args_size
|
||||
= (crtl->outgoing_args_size
|
||||
+ crtl->args.pretend_args_size
|
||||
+ get_frame_size () + 7) & ~7;
|
||||
|
||||
if (!TARGET_USE_RETURN_INSN || !reload_completed)
|
||||
|
@ -1875,8 +1875,8 @@ mmix_expand_prologue (void)
|
|||
HOST_WIDE_INT locals_size = get_frame_size ();
|
||||
int regno;
|
||||
HOST_WIDE_INT stack_space_to_allocate
|
||||
= (current_function_outgoing_args_size
|
||||
+ current_function_pretend_args_size
|
||||
= (crtl->outgoing_args_size
|
||||
+ crtl->args.pretend_args_size
|
||||
+ locals_size + 7) & ~7;
|
||||
HOST_WIDE_INT offset = -8;
|
||||
|
||||
|
@ -1909,12 +1909,12 @@ mmix_expand_prologue (void)
|
|||
internal_error ("stack frame not a multiple of 8 bytes: %wd",
|
||||
stack_space_to_allocate);
|
||||
|
||||
if (current_function_pretend_args_size)
|
||||
if (crtl->args.pretend_args_size)
|
||||
{
|
||||
int mmix_first_vararg_reg
|
||||
= (MMIX_FIRST_INCOMING_ARG_REGNUM
|
||||
+ (MMIX_MAX_ARGS_IN_REGS
|
||||
- current_function_pretend_args_size / 8));
|
||||
- crtl->args.pretend_args_size / 8));
|
||||
|
||||
for (regno
|
||||
= MMIX_FIRST_INCOMING_ARG_REGNUM + MMIX_MAX_ARGS_IN_REGS - 1;
|
||||
|
@ -2110,12 +2110,12 @@ mmix_expand_epilogue (void)
|
|||
HOST_WIDE_INT locals_size = get_frame_size ();
|
||||
int regno;
|
||||
HOST_WIDE_INT stack_space_to_deallocate
|
||||
= (current_function_outgoing_args_size
|
||||
+ current_function_pretend_args_size
|
||||
= (crtl->outgoing_args_size
|
||||
+ crtl->args.pretend_args_size
|
||||
+ locals_size + 7) & ~7;
|
||||
|
||||
/* The first address to access is beyond the outgoing_args area. */
|
||||
HOST_WIDE_INT offset = current_function_outgoing_args_size;
|
||||
HOST_WIDE_INT offset = crtl->outgoing_args_size;
|
||||
|
||||
/* Add the space for global non-register-stack registers.
|
||||
It is assumed that the frame-pointer register can be one of these
|
||||
|
|
|
@ -585,10 +585,10 @@ int
|
|||
can_use_return_insn (void)
|
||||
{
|
||||
/* size includes the fixed stack space needed for function calls. */
|
||||
int size = get_frame_size () + current_function_outgoing_args_size;
|
||||
int size = get_frame_size () + crtl->outgoing_args_size;
|
||||
|
||||
/* And space for the return pointer. */
|
||||
size += current_function_outgoing_args_size ? 4 : 0;
|
||||
size += crtl->outgoing_args_size ? 4 : 0;
|
||||
|
||||
return (reload_completed
|
||||
&& size == 0
|
||||
|
@ -697,8 +697,8 @@ expand_prologue (void)
|
|||
HOST_WIDE_INT size;
|
||||
|
||||
/* SIZE includes the fixed stack space needed for function calls. */
|
||||
size = get_frame_size () + current_function_outgoing_args_size;
|
||||
size += (current_function_outgoing_args_size ? 4 : 0);
|
||||
size = get_frame_size () + crtl->outgoing_args_size;
|
||||
size += (crtl->outgoing_args_size ? 4 : 0);
|
||||
|
||||
/* If we use any of the callee-saved registers, save them now. */
|
||||
mn10300_gen_multiple_store (mn10300_get_live_callee_saved_regs ());
|
||||
|
@ -956,8 +956,8 @@ expand_epilogue (void)
|
|||
HOST_WIDE_INT size;
|
||||
|
||||
/* SIZE includes the fixed stack space needed for function calls. */
|
||||
size = get_frame_size () + current_function_outgoing_args_size;
|
||||
size += (current_function_outgoing_args_size ? 4 : 0);
|
||||
size = get_frame_size () + crtl->outgoing_args_size;
|
||||
size += (crtl->outgoing_args_size ? 4 : 0);
|
||||
|
||||
if (TARGET_AM33_2 && fp_regs_to_save ())
|
||||
{
|
||||
|
@ -1408,12 +1408,12 @@ initial_offset (int from, int to)
|
|||
|| frame_pointer_needed)
|
||||
return (get_frame_size () + REG_SAVE_BYTES
|
||||
+ 4 * fp_regs_to_save ()
|
||||
+ (current_function_outgoing_args_size
|
||||
? current_function_outgoing_args_size + 4 : 0));
|
||||
+ (crtl->outgoing_args_size
|
||||
? crtl->outgoing_args_size + 4 : 0));
|
||||
else
|
||||
return (get_frame_size ()
|
||||
+ (current_function_outgoing_args_size
|
||||
? current_function_outgoing_args_size + 4 : 0));
|
||||
+ (crtl->outgoing_args_size
|
||||
? crtl->outgoing_args_size + 4 : 0));
|
||||
}
|
||||
|
||||
/* The difference between the frame pointer and stack pointer is the sum
|
||||
|
@ -1421,8 +1421,8 @@ initial_offset (int from, int to)
|
|||
for function calls (if any). */
|
||||
if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
return (get_frame_size ()
|
||||
+ (current_function_outgoing_args_size
|
||||
? current_function_outgoing_args_size + 4 : 0));
|
||||
+ (crtl->outgoing_args_size
|
||||
? crtl->outgoing_args_size + 4 : 0));
|
||||
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -1452,21 +1452,21 @@ mn10300_builtin_saveregs (void)
|
|||
alias_set_type set = get_varargs_alias_set ();
|
||||
|
||||
if (argadj)
|
||||
offset = plus_constant (current_function_arg_offset_rtx, argadj);
|
||||
offset = plus_constant (crtl->args.arg_offset_rtx, argadj);
|
||||
else
|
||||
offset = current_function_arg_offset_rtx;
|
||||
offset = crtl->args.arg_offset_rtx;
|
||||
|
||||
mem = gen_rtx_MEM (SImode, current_function_internal_arg_pointer);
|
||||
mem = gen_rtx_MEM (SImode, crtl->args.internal_arg_pointer);
|
||||
set_mem_alias_set (mem, set);
|
||||
emit_move_insn (mem, gen_rtx_REG (SImode, 0));
|
||||
|
||||
mem = gen_rtx_MEM (SImode,
|
||||
plus_constant (current_function_internal_arg_pointer, 4));
|
||||
plus_constant (crtl->args.internal_arg_pointer, 4));
|
||||
set_mem_alias_set (mem, set);
|
||||
emit_move_insn (mem, gen_rtx_REG (SImode, 1));
|
||||
|
||||
return copy_to_reg (expand_binop (Pmode, add_optab,
|
||||
current_function_internal_arg_pointer,
|
||||
crtl->args.internal_arg_pointer,
|
||||
offset, 0, 0, OPTAB_LIB_WIDEN));
|
||||
}
|
||||
|
||||
|
|
|
@ -2589,7 +2589,7 @@
|
|||
{
|
||||
rtx sp_reg = gen_rtx_REG (SImode, SP_REG);
|
||||
int need_stack_space = (get_frame_size () == 0
|
||||
&& current_function_outgoing_args_size == 0);
|
||||
&& crtl->outgoing_args_size == 0);
|
||||
|
||||
if (need_stack_space)
|
||||
emit_move_insn (sp_reg, plus_constant (sp_reg, -4));
|
||||
|
|
|
@ -866,8 +866,8 @@ mt_compute_frame_size (int size)
|
|||
unsigned int reg_mask;
|
||||
|
||||
var_size = size;
|
||||
args_size = current_function_outgoing_args_size;
|
||||
pretend_size = current_function_pretend_args_size;
|
||||
args_size = crtl->outgoing_args_size;
|
||||
pretend_size = crtl->args.pretend_args_size;
|
||||
extra_size = FIRST_PARM_OFFSET (0);
|
||||
total_size = extra_size + pretend_size + args_size + var_size;
|
||||
reg_size = 0;
|
||||
|
|
|
@ -436,7 +436,7 @@ enum save_direction
|
|||
subtracting the first slot's length from `STARTING_FRAME_OFFSET'.
|
||||
Otherwise, it is found by adding the length of the first slot to
|
||||
the value `STARTING_FRAME_OFFSET'. */
|
||||
#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
|
||||
#define STARTING_FRAME_OFFSET crtl->outgoing_args_size
|
||||
|
||||
/* Offset from the argument pointer register to the first argument's address.
|
||||
On some machines it may depend on the data type of the function.
|
||||
|
@ -527,7 +527,7 @@ extern struct mt_frame_info current_frame_info;
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing
|
||||
arguments will be computed and placed into the variable
|
||||
`current_function_outgoing_args_size'. */
|
||||
`crtl->outgoing_args_size'. */
|
||||
#define ACCUMULATE_OUTGOING_ARGS 1
|
||||
|
||||
/* Define this if it is the responsibility of the caller to
|
||||
|
|
|
@ -3570,7 +3570,7 @@ compute_frame_size (HOST_WIDE_INT size, int *fregs_live)
|
|||
size of the current function's stack frame. We don't need to align
|
||||
for the outgoing arguments as their alignment is set by the final
|
||||
rounding for the frame as a whole. */
|
||||
size += current_function_outgoing_args_size;
|
||||
size += crtl->outgoing_args_size;
|
||||
|
||||
/* Allocate space for the fixed frame marker. This space must be
|
||||
allocated for any function that makes calls or allocates
|
||||
|
@ -5935,9 +5935,9 @@ hppa_builtin_saveregs (void)
|
|||
? UNITS_PER_WORD : 0);
|
||||
|
||||
if (argadj)
|
||||
offset = plus_constant (current_function_arg_offset_rtx, argadj);
|
||||
offset = plus_constant (crtl->args.arg_offset_rtx, argadj);
|
||||
else
|
||||
offset = current_function_arg_offset_rtx;
|
||||
offset = crtl->args.arg_offset_rtx;
|
||||
|
||||
if (TARGET_64BIT)
|
||||
{
|
||||
|
@ -5945,9 +5945,9 @@ hppa_builtin_saveregs (void)
|
|||
|
||||
/* Adjust for varargs/stdarg differences. */
|
||||
if (argadj)
|
||||
offset = plus_constant (current_function_arg_offset_rtx, -argadj);
|
||||
offset = plus_constant (crtl->args.arg_offset_rtx, -argadj);
|
||||
else
|
||||
offset = current_function_arg_offset_rtx;
|
||||
offset = crtl->args.arg_offset_rtx;
|
||||
|
||||
/* We need to save %r26 .. %r19 inclusive starting at offset -64
|
||||
from the incoming arg pointer and growing to larger addresses. */
|
||||
|
@ -5971,7 +5971,7 @@ hppa_builtin_saveregs (void)
|
|||
|
||||
/* Store general registers on the stack. */
|
||||
dest = gen_rtx_MEM (BLKmode,
|
||||
plus_constant (current_function_internal_arg_pointer,
|
||||
plus_constant (crtl->args.internal_arg_pointer,
|
||||
-16));
|
||||
set_mem_alias_set (dest, get_varargs_alias_set ());
|
||||
set_mem_align (dest, BITS_PER_WORD);
|
||||
|
@ -5989,7 +5989,7 @@ hppa_builtin_saveregs (void)
|
|||
emit_insn (gen_blockage ());
|
||||
|
||||
return copy_to_reg (expand_binop (Pmode, add_optab,
|
||||
current_function_internal_arg_pointer,
|
||||
crtl->args.internal_arg_pointer,
|
||||
offset, 0, 0, OPTAB_LIB_WIDEN));
|
||||
}
|
||||
|
||||
|
|
|
@ -566,12 +566,12 @@ extern struct rtx_def *hppa_pic_save_rtx (void);
|
|||
marker, although the runtime documentation only describes a 16
|
||||
byte marker. For compatibility, we allocate 48 bytes. */
|
||||
#define STACK_POINTER_OFFSET \
|
||||
(TARGET_64BIT ? -(current_function_outgoing_args_size + 48): -32)
|
||||
(TARGET_64BIT ? -(crtl->outgoing_args_size + 48): -32)
|
||||
|
||||
#define STACK_DYNAMIC_OFFSET(FNDECL) \
|
||||
(TARGET_64BIT \
|
||||
? (STACK_POINTER_OFFSET) \
|
||||
: ((STACK_POINTER_OFFSET) - current_function_outgoing_args_size))
|
||||
: ((STACK_POINTER_OFFSET) - crtl->outgoing_args_size))
|
||||
|
||||
/* Value is 1 if returning from a function call automatically
|
||||
pops the arguments described by the number-of-args field in the call.
|
||||
|
@ -791,7 +791,7 @@ extern int may_call_alloca;
|
|||
|
||||
#define EXIT_IGNORE_STACK \
|
||||
(get_frame_size () != 0 \
|
||||
|| current_function_calls_alloca || current_function_outgoing_args_size)
|
||||
|| current_function_calls_alloca || crtl->outgoing_args_size)
|
||||
|
||||
/* Output assembler code for a block containing the constant parts
|
||||
of a trampoline, leaving space for the variable parts.\
|
||||
|
|
|
@ -7628,7 +7628,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
|
|||
the only method that we have for doing DImode multiplication
|
||||
is with a libcall. This could be trouble if we haven't
|
||||
allocated enough space for the outgoing arguments. */
|
||||
gcc_assert (INTVAL (nb) <= current_function_outgoing_args_size);
|
||||
gcc_assert (INTVAL (nb) <= crtl->outgoing_args_size);
|
||||
|
||||
emit_move_insn (arg_pointer_rtx,
|
||||
gen_rtx_PLUS (word_mode, stack_pointer_rtx,
|
||||
|
@ -8127,7 +8127,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
|
|||
the only method that we have for doing DImode multiplication
|
||||
is with a libcall. This could be trouble if we haven't
|
||||
allocated enough space for the outgoing arguments. */
|
||||
gcc_assert (INTVAL (nb) <= current_function_outgoing_args_size);
|
||||
gcc_assert (INTVAL (nb) <= crtl->outgoing_args_size);
|
||||
|
||||
emit_move_insn (arg_pointer_rtx,
|
||||
gen_rtx_PLUS (word_mode, stack_pointer_rtx,
|
||||
|
@ -8645,7 +8645,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
|
|||
the only method that we have for doing DImode multiplication
|
||||
is with a libcall. This could be trouble if we haven't
|
||||
allocated enough space for the outgoing arguments. */
|
||||
gcc_assert (INTVAL (nb) <= current_function_outgoing_args_size);
|
||||
gcc_assert (INTVAL (nb) <= crtl->outgoing_args_size);
|
||||
|
||||
emit_move_insn (arg_pointer_rtx,
|
||||
gen_rtx_PLUS (word_mode, stack_pointer_rtx,
|
||||
|
@ -8726,7 +8726,7 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
|
|||
the only method that we have for doing DImode multiplication
|
||||
is with a libcall. This could be trouble if we haven't
|
||||
allocated enough space for the outgoing arguments. */
|
||||
gcc_assert (INTVAL (nb) <= current_function_outgoing_args_size);
|
||||
gcc_assert (INTVAL (nb) <= crtl->outgoing_args_size);
|
||||
|
||||
emit_move_insn (arg_pointer_rtx,
|
||||
gen_rtx_PLUS (word_mode, stack_pointer_rtx,
|
||||
|
|
|
@ -173,12 +173,12 @@
|
|||
#define STARTING_FRAME_OFFSET \
|
||||
(FRAME_GROWS_DOWNWARD \
|
||||
? 0 \
|
||||
: (RS6000_ALIGN (current_function_outgoing_args_size, 16) \
|
||||
: (RS6000_ALIGN (crtl->outgoing_args_size, 16) \
|
||||
+ RS6000_SAVE_AREA))
|
||||
|
||||
#undef STACK_DYNAMIC_OFFSET
|
||||
#define STACK_DYNAMIC_OFFSET(FUNDECL) \
|
||||
(RS6000_ALIGN (current_function_outgoing_args_size, 16) \
|
||||
(RS6000_ALIGN (crtl->outgoing_args_size, 16) \
|
||||
+ (STACK_POINTER_OFFSET))
|
||||
|
||||
/* These are used by -fbranch-probabilities */
|
||||
|
|
|
@ -6656,10 +6656,10 @@ rs6000_va_start (tree valist, rtx nextarg)
|
|||
sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE);
|
||||
|
||||
/* Count number of gp and fp argument registers used. */
|
||||
words = current_function_args_info.words;
|
||||
n_gpr = MIN (current_function_args_info.sysv_gregno - GP_ARG_MIN_REG,
|
||||
words = crtl->args.info.words;
|
||||
n_gpr = MIN (crtl->args.info.sysv_gregno - GP_ARG_MIN_REG,
|
||||
GP_ARG_NUM_REG);
|
||||
n_fpr = MIN (current_function_args_info.fregno - FP_ARG_MIN_REG,
|
||||
n_fpr = MIN (crtl->args.info.fregno - FP_ARG_MIN_REG,
|
||||
FP_ARG_NUM_REG);
|
||||
|
||||
if (TARGET_DEBUG_ARG)
|
||||
|
@ -14207,7 +14207,7 @@ compute_vrsave_mask (void)
|
|||
them in again. More importantly, the mask we compute here is
|
||||
used to generate CLOBBERs in the set_vrsave insn, and we do not
|
||||
wish the argument registers to die. */
|
||||
for (i = cfun->args_info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG; --i)
|
||||
for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG; --i)
|
||||
mask &= ~ALTIVEC_REG_BIT (i);
|
||||
|
||||
/* Similarly, remove the return value from the set. */
|
||||
|
@ -14496,7 +14496,7 @@ rs6000_stack_info (void)
|
|||
info_ptr->reg_size = reg_size;
|
||||
info_ptr->fixed_size = RS6000_SAVE_AREA;
|
||||
info_ptr->vars_size = RS6000_ALIGN (get_frame_size (), 8);
|
||||
info_ptr->parm_size = RS6000_ALIGN (current_function_outgoing_args_size,
|
||||
info_ptr->parm_size = RS6000_ALIGN (crtl->outgoing_args_size,
|
||||
TARGET_ALTIVEC ? 16 : 8);
|
||||
if (FRAME_GROWS_DOWNWARD)
|
||||
info_ptr->vars_size
|
||||
|
|
|
@ -1288,7 +1288,7 @@ extern enum rs6000_abi rs6000_current_abi; /* available for use by subtarget */
|
|||
#define STARTING_FRAME_OFFSET \
|
||||
(FRAME_GROWS_DOWNWARD \
|
||||
? 0 \
|
||||
: (RS6000_ALIGN (current_function_outgoing_args_size, \
|
||||
: (RS6000_ALIGN (crtl->outgoing_args_size, \
|
||||
TARGET_ALTIVEC ? 16 : 8) \
|
||||
+ RS6000_SAVE_AREA))
|
||||
|
||||
|
@ -1299,7 +1299,7 @@ extern enum rs6000_abi rs6000_current_abi; /* available for use by subtarget */
|
|||
length of the outgoing arguments. The default is correct for most
|
||||
machines. See `function.c' for details. */
|
||||
#define STACK_DYNAMIC_OFFSET(FUNDECL) \
|
||||
(RS6000_ALIGN (current_function_outgoing_args_size, \
|
||||
(RS6000_ALIGN (crtl->outgoing_args_size, \
|
||||
TARGET_ALTIVEC ? 16 : 8) \
|
||||
+ (STACK_POINTER_OFFSET))
|
||||
|
||||
|
@ -1334,7 +1334,7 @@ extern enum rs6000_abi rs6000_current_abi; /* available for use by subtarget */
|
|||
|
||||
/* 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
|
||||
|
||||
/* Value is the number of bytes of arguments automatically
|
||||
|
|
|
@ -6620,9 +6620,9 @@ s390_register_info (int clobbered_regs[])
|
|||
{
|
||||
/* Varargs functions need to save gprs 2 to 6. */
|
||||
if (cfun->va_list_gpr_size
|
||||
&& current_function_args_info.gprs < GP_ARG_NUM_REG)
|
||||
&& crtl->args.info.gprs < GP_ARG_NUM_REG)
|
||||
{
|
||||
int min_gpr = current_function_args_info.gprs;
|
||||
int min_gpr = crtl->args.info.gprs;
|
||||
int max_gpr = min_gpr + cfun->va_list_gpr_size;
|
||||
if (max_gpr > GP_ARG_NUM_REG)
|
||||
max_gpr = GP_ARG_NUM_REG;
|
||||
|
@ -6644,9 +6644,9 @@ s390_register_info (int clobbered_regs[])
|
|||
|
||||
/* Mark f0, f2 for 31 bit and f0-f4 for 64 bit to be saved. */
|
||||
if (TARGET_HARD_FLOAT && cfun->va_list_fpr_size
|
||||
&& current_function_args_info.fprs < FP_ARG_NUM_REG)
|
||||
&& crtl->args.info.fprs < FP_ARG_NUM_REG)
|
||||
{
|
||||
int min_fpr = current_function_args_info.fprs;
|
||||
int min_fpr = crtl->args.info.fprs;
|
||||
int max_fpr = min_fpr + cfun->va_list_fpr_size;
|
||||
if (max_fpr > FP_ARG_NUM_REG)
|
||||
max_fpr = FP_ARG_NUM_REG;
|
||||
|
@ -6744,7 +6744,7 @@ s390_frame_info (void)
|
|||
|
||||
if (!TARGET_PACKED_STACK)
|
||||
cfun_frame_layout.frame_size += (STACK_POINTER_OFFSET
|
||||
+ current_function_outgoing_args_size
|
||||
+ crtl->outgoing_args_size
|
||||
+ cfun_frame_layout.high_fprs * 8);
|
||||
else
|
||||
{
|
||||
|
@ -6772,7 +6772,7 @@ s390_frame_info (void)
|
|||
STACK_BOUNDARY / BITS_PER_UNIT - 1)
|
||||
& ~(STACK_BOUNDARY / BITS_PER_UNIT - 1));
|
||||
|
||||
cfun_frame_layout.frame_size += current_function_outgoing_args_size;
|
||||
cfun_frame_layout.frame_size += crtl->outgoing_args_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6986,7 +6986,7 @@ s390_initial_elimination_offset (int from, int to)
|
|||
case FRAME_POINTER_REGNUM:
|
||||
offset = (get_frame_size()
|
||||
+ STACK_POINTER_OFFSET
|
||||
+ current_function_outgoing_args_size);
|
||||
+ crtl->outgoing_args_size);
|
||||
break;
|
||||
|
||||
case ARG_POINTER_REGNUM:
|
||||
|
@ -8011,9 +8011,9 @@ s390_build_builtin_va_list (void)
|
|||
The following global variables are used to initialize
|
||||
the va_list structure:
|
||||
|
||||
current_function_args_info:
|
||||
crtl->args.info:
|
||||
holds number of gprs and fprs used for named arguments.
|
||||
current_function_arg_offset_rtx:
|
||||
crtl->args.arg_offset_rtx:
|
||||
holds the offset of the first anonymous stack argument
|
||||
(relative to the virtual arg pointer). */
|
||||
|
||||
|
@ -8038,8 +8038,8 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
|
|||
|
||||
/* Count number of gp and fp argument registers used. */
|
||||
|
||||
n_gpr = current_function_args_info.gprs;
|
||||
n_fpr = current_function_args_info.fprs;
|
||||
n_gpr = crtl->args.info.gprs;
|
||||
n_fpr = crtl->args.info.fprs;
|
||||
|
||||
if (cfun->va_list_gpr_size)
|
||||
{
|
||||
|
@ -8063,7 +8063,7 @@ s390_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
|
|||
{
|
||||
t = make_tree (TREE_TYPE (ovf), virtual_incoming_args_rtx);
|
||||
|
||||
off = INTVAL (current_function_arg_offset_rtx);
|
||||
off = INTVAL (crtl->args.arg_offset_rtx);
|
||||
off = off < 0 ? 0 : off;
|
||||
if (TARGET_DEBUG_ARG)
|
||||
fprintf (stderr, "va_start: n_gpr = %d, n_fpr = %d off %d\n",
|
||||
|
|
|
@ -521,9 +521,9 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER];
|
|||
|
||||
/* Offset from the stack pointer register to an item dynamically
|
||||
allocated on the stack, e.g., by `alloca'. */
|
||||
extern int current_function_outgoing_args_size;
|
||||
extern int crtl->outgoing_args_size;
|
||||
#define STACK_DYNAMIC_OFFSET(FUNDECL) \
|
||||
(STACK_POINTER_OFFSET + current_function_outgoing_args_size)
|
||||
(STACK_POINTER_OFFSET + crtl->outgoing_args_size)
|
||||
|
||||
/* Offset of first parameter from the argument pointer register value.
|
||||
We have a fake argument pointer register that points directly to
|
||||
|
|
|
@ -508,7 +508,7 @@ extern enum reg_class score_char_to_class[256];
|
|||
|
||||
/* The offset of the first local variable from the beginning of the frame.
|
||||
See compute_frame_size for details about the frame layout. */
|
||||
#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
|
||||
#define STARTING_FRAME_OFFSET crtl->outgoing_args_size
|
||||
|
||||
/* The argument pointer always points to the first argument. */
|
||||
#define FIRST_PARM_OFFSET(FUNDECL) 0
|
||||
|
@ -578,7 +578,7 @@ extern enum reg_class score_char_to_class[256];
|
|||
allocate the area reserved for arguments passed in registers.
|
||||
If `ACCUMULATE_OUTGOING_ARGS' is also defined, the only effect
|
||||
of this macro is to determine whether the space is included in
|
||||
`current_function_outgoing_args_size'. */
|
||||
`crtl->outgoing_args_size'. */
|
||||
#define OUTGOING_REG_PARM_STACK_SPACE 1
|
||||
|
||||
#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
|
||||
|
|
|
@ -183,7 +183,7 @@ score3_compute_frame_size (HOST_WIDE_INT size)
|
|||
f->gp_reg_size = 0;
|
||||
f->mask = 0;
|
||||
f->var_size = SCORE3_STACK_ALIGN (size);
|
||||
f->args_size = current_function_outgoing_args_size;
|
||||
f->args_size = crtl->outgoing_args_size;
|
||||
f->cprestore_size = flag_pic ? UNITS_PER_WORD : 0;
|
||||
|
||||
if (f->var_size == 0 && current_function_is_leaf)
|
||||
|
|
|
@ -183,7 +183,7 @@ score7_compute_frame_size (HOST_WIDE_INT size)
|
|||
f->gp_reg_size = 0;
|
||||
f->mask = 0;
|
||||
f->var_size = SCORE7_STACK_ALIGN (size);
|
||||
f->args_size = current_function_outgoing_args_size;
|
||||
f->args_size = crtl->outgoing_args_size;
|
||||
f->cprestore_size = flag_pic ? UNITS_PER_WORD : 0;
|
||||
if (f->var_size == 0 && current_function_is_leaf)
|
||||
f->args_size = f->cprestore_size = 0;
|
||||
|
|
|
@ -5629,10 +5629,10 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
|
|||
if (epilogue_p > 0)
|
||||
{
|
||||
int nreg = 0;
|
||||
if (current_function_return_rtx)
|
||||
if (crtl->return_rtx)
|
||||
{
|
||||
enum machine_mode mode;
|
||||
mode = GET_MODE (current_function_return_rtx);
|
||||
mode = GET_MODE (crtl->return_rtx);
|
||||
if (BASE_RETURN_VALUE_REG (mode) == FIRST_RET_REG)
|
||||
nreg = HARD_REGNO_NREGS (FIRST_RET_REG, mode);
|
||||
}
|
||||
|
@ -5970,7 +5970,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
|
|||
/* Force PR to be live if the prologue has to call the SHmedia
|
||||
argument decoder or register saver. */
|
||||
if (TARGET_SHCOMPACT
|
||||
&& ((current_function_args_info.call_cookie
|
||||
&& ((crtl->args.info.call_cookie
|
||||
& ~ CALL_COOKIE_RET_TRAMP (1))
|
||||
|| current_function_saves_all_registers))
|
||||
pr_live = 1;
|
||||
|
@ -5997,7 +5997,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
|
|||
: (/* Only push those regs which are used and need to be saved. */
|
||||
(TARGET_SHCOMPACT
|
||||
&& flag_pic
|
||||
&& current_function_args_info.call_cookie
|
||||
&& crtl->args.info.call_cookie
|
||||
&& reg == PIC_OFFSET_TABLE_REGNUM)
|
||||
|| (df_regs_ever_live_p (reg)
|
||||
&& (!call_really_used_regs[reg]
|
||||
|
@ -6245,16 +6245,16 @@ sh_expand_prologue (void)
|
|||
|
||||
/* We have pretend args if we had an object sent partially in registers
|
||||
and partially on the stack, e.g. a large structure. */
|
||||
pretend_args = current_function_pretend_args_size;
|
||||
pretend_args = crtl->args.pretend_args_size;
|
||||
if (TARGET_VARARGS_PRETEND_ARGS (current_function_decl)
|
||||
&& (NPARM_REGS(SImode)
|
||||
> current_function_args_info.arg_count[(int) SH_ARG_INT]))
|
||||
> crtl->args.info.arg_count[(int) SH_ARG_INT]))
|
||||
pretend_args = 0;
|
||||
output_stack_adjust (-pretend_args
|
||||
- current_function_args_info.stack_regs * 8,
|
||||
- crtl->args.info.stack_regs * 8,
|
||||
stack_pointer_rtx, 0, NULL);
|
||||
|
||||
if (TARGET_SHCOMPACT && flag_pic && current_function_args_info.call_cookie)
|
||||
if (TARGET_SHCOMPACT && flag_pic && crtl->args.info.call_cookie)
|
||||
/* We're going to use the PIC register to load the address of the
|
||||
incoming-argument decoder and/or of the return trampoline from
|
||||
the GOT, so make sure the PIC register is preserved and
|
||||
|
@ -6262,7 +6262,7 @@ sh_expand_prologue (void)
|
|||
df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
|
||||
|
||||
if (TARGET_SHCOMPACT
|
||||
&& (current_function_args_info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1)))
|
||||
&& (crtl->args.info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1)))
|
||||
{
|
||||
int reg;
|
||||
|
||||
|
@ -6270,20 +6270,20 @@ sh_expand_prologue (void)
|
|||
be pushed onto the stack live, so that register renaming
|
||||
doesn't overwrite them. */
|
||||
for (reg = 0; reg < NPARM_REGS (SImode); reg++)
|
||||
if (CALL_COOKIE_STACKSEQ_GET (current_function_args_info.call_cookie)
|
||||
if (CALL_COOKIE_STACKSEQ_GET (crtl->args.info.call_cookie)
|
||||
>= NPARM_REGS (SImode) - reg)
|
||||
for (; reg < NPARM_REGS (SImode); reg++)
|
||||
emit_insn (gen_shcompact_preserve_incoming_args
|
||||
(gen_rtx_REG (SImode, FIRST_PARM_REG + reg)));
|
||||
else if (CALL_COOKIE_INT_REG_GET
|
||||
(current_function_args_info.call_cookie, reg) == 1)
|
||||
(crtl->args.info.call_cookie, reg) == 1)
|
||||
emit_insn (gen_shcompact_preserve_incoming_args
|
||||
(gen_rtx_REG (SImode, FIRST_PARM_REG + reg)));
|
||||
|
||||
emit_move_insn (gen_rtx_REG (Pmode, MACL_REG),
|
||||
stack_pointer_rtx);
|
||||
emit_move_insn (gen_rtx_REG (SImode, R0_REG),
|
||||
GEN_INT (current_function_args_info.call_cookie));
|
||||
GEN_INT (crtl->args.info.call_cookie));
|
||||
emit_move_insn (gen_rtx_REG (SImode, MACH_REG),
|
||||
gen_rtx_REG (SImode, R0_REG));
|
||||
}
|
||||
|
@ -6308,7 +6308,7 @@ sh_expand_prologue (void)
|
|||
rtx insn;
|
||||
|
||||
if (i >= (NPARM_REGS(SImode)
|
||||
- current_function_args_info.arg_count[(int) SH_ARG_INT]
|
||||
- crtl->args.info.arg_count[(int) SH_ARG_INT]
|
||||
))
|
||||
break;
|
||||
insn = push (rn);
|
||||
|
@ -6568,7 +6568,7 @@ sh_expand_prologue (void)
|
|||
frame_insn (GEN_MOV (hard_frame_pointer_rtx, stack_pointer_rtx));
|
||||
|
||||
if (TARGET_SHCOMPACT
|
||||
&& (current_function_args_info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1)))
|
||||
&& (crtl->args.info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1)))
|
||||
{
|
||||
/* This must NOT go through the PLT, otherwise mach and macl
|
||||
may be clobbered. */
|
||||
|
@ -6837,9 +6837,9 @@ sh_expand_epilogue (bool sibcall_p)
|
|||
emit_insn (gen_toggle_sz ());
|
||||
target_flags = save_flags;
|
||||
|
||||
output_stack_adjust (current_function_pretend_args_size
|
||||
output_stack_adjust (crtl->args.pretend_args_size
|
||||
+ save_size + d_rounding
|
||||
+ current_function_args_info.stack_regs * 8,
|
||||
+ crtl->args.info.stack_regs * 8,
|
||||
stack_pointer_rtx, e, NULL);
|
||||
|
||||
if (current_function_calls_eh_return)
|
||||
|
@ -6956,11 +6956,11 @@ static rtx
|
|||
sh_builtin_saveregs (void)
|
||||
{
|
||||
/* First unnamed integer register. */
|
||||
int first_intreg = current_function_args_info.arg_count[(int) SH_ARG_INT];
|
||||
int first_intreg = crtl->args.info.arg_count[(int) SH_ARG_INT];
|
||||
/* Number of integer registers we need to save. */
|
||||
int n_intregs = MAX (0, NPARM_REGS (SImode) - first_intreg);
|
||||
/* First unnamed SFmode float reg */
|
||||
int first_floatreg = current_function_args_info.arg_count[(int) SH_ARG_FLOAT];
|
||||
int first_floatreg = crtl->args.info.arg_count[(int) SH_ARG_FLOAT];
|
||||
/* Number of SFmode float regs to save. */
|
||||
int n_floatregs = MAX (0, NPARM_REGS (SFmode) - first_floatreg);
|
||||
rtx regbuf, fpregs;
|
||||
|
@ -6975,25 +6975,25 @@ sh_builtin_saveregs (void)
|
|||
|
||||
while (pushregs < NPARM_REGS (SImode) - 1
|
||||
&& (CALL_COOKIE_INT_REG_GET
|
||||
(current_function_args_info.call_cookie,
|
||||
(crtl->args.info.call_cookie,
|
||||
NPARM_REGS (SImode) - pushregs)
|
||||
== 1))
|
||||
{
|
||||
current_function_args_info.call_cookie
|
||||
crtl->args.info.call_cookie
|
||||
&= ~ CALL_COOKIE_INT_REG (NPARM_REGS (SImode)
|
||||
- pushregs, 1);
|
||||
pushregs++;
|
||||
}
|
||||
|
||||
if (pushregs == NPARM_REGS (SImode))
|
||||
current_function_args_info.call_cookie
|
||||
crtl->args.info.call_cookie
|
||||
|= (CALL_COOKIE_INT_REG (0, 1)
|
||||
| CALL_COOKIE_STACKSEQ (pushregs - 1));
|
||||
else
|
||||
current_function_args_info.call_cookie
|
||||
crtl->args.info.call_cookie
|
||||
|= CALL_COOKIE_STACKSEQ (pushregs);
|
||||
|
||||
current_function_pretend_args_size += 8 * n_intregs;
|
||||
crtl->args.pretend_args_size += 8 * n_intregs;
|
||||
}
|
||||
if (TARGET_SHCOMPACT)
|
||||
return const0_rtx;
|
||||
|
@ -7191,7 +7191,7 @@ sh_va_start (tree valist, rtx nextarg)
|
|||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
nfp = current_function_args_info.arg_count[SH_ARG_FLOAT];
|
||||
nfp = crtl->args.info.arg_count[SH_ARG_FLOAT];
|
||||
if (nfp < 8)
|
||||
nfp = 8 - nfp;
|
||||
else
|
||||
|
@ -7206,7 +7206,7 @@ sh_va_start (tree valist, rtx nextarg)
|
|||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
nint = current_function_args_info.arg_count[SH_ARG_INT];
|
||||
nint = crtl->args.info.arg_count[SH_ARG_INT];
|
||||
if (nint < 4)
|
||||
nint = 4 - nint;
|
||||
else
|
||||
|
@ -7920,11 +7920,11 @@ initial_elimination_offset (int from, int to)
|
|||
|
||||
if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
|
||||
return total_saved_regs_space + total_auto_space
|
||||
+ current_function_args_info.byref_regs * 8;
|
||||
+ crtl->args.info.byref_regs * 8;
|
||||
|
||||
if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
return total_saved_regs_space + total_auto_space
|
||||
+ current_function_args_info.byref_regs * 8;
|
||||
+ crtl->args.info.byref_regs * 8;
|
||||
|
||||
/* Initial gap between fp and sp is 0. */
|
||||
if (from == HARD_FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
|
@ -9206,7 +9206,7 @@ sh_allocate_initial_value (rtx hard_reg)
|
|||
if (current_function_is_leaf
|
||||
&& ! sh_pr_n_sets ()
|
||||
&& ! (TARGET_SHCOMPACT
|
||||
&& ((current_function_args_info.call_cookie
|
||||
&& ((crtl->args.info.call_cookie
|
||||
& ~ CALL_COOKIE_RET_TRAMP (1))
|
||||
|| current_function_saves_all_registers)))
|
||||
x = hard_reg;
|
||||
|
@ -9805,7 +9805,7 @@ sh_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
|
|||
{
|
||||
return (1
|
||||
&& (! TARGET_SHCOMPACT
|
||||
|| current_function_args_info.stack_regs == 0)
|
||||
|| crtl->args.info.stack_regs == 0)
|
||||
&& ! sh_cfun_interrupt_handler_p ()
|
||||
&& (! flag_pic
|
||||
|| (decl && ! TREE_PUBLIC (decl))
|
||||
|
@ -10602,7 +10602,7 @@ sh_get_pr_initial_val (void)
|
|||
PR register on SHcompact, because it might be clobbered by the prologue.
|
||||
We check first if that is known to be the case. */
|
||||
if (TARGET_SHCOMPACT
|
||||
&& ((current_function_args_info.call_cookie
|
||||
&& ((crtl->args.info.call_cookie
|
||||
& ~ CALL_COOKIE_RET_TRAMP (1))
|
||||
|| current_function_saves_all_registers))
|
||||
return gen_frame_mem (SImode, return_address_pointer_rtx);
|
||||
|
|
|
@ -9383,7 +9383,7 @@ mov.l\\t1f,r0\\n\\
|
|||
}
|
||||
|
||||
if (TARGET_SHCOMPACT
|
||||
&& (current_function_args_info.call_cookie & CALL_COOKIE_RET_TRAMP (1)))
|
||||
&& (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1)))
|
||||
{
|
||||
emit_jump_insn (gen_shcompact_return_tramp ());
|
||||
DONE;
|
||||
|
@ -9393,7 +9393,7 @@ mov.l\\t1f,r0\\n\\
|
|||
(define_insn "*return_i"
|
||||
[(return)]
|
||||
"TARGET_SH1 && ! (TARGET_SHCOMPACT
|
||||
&& (current_function_args_info.call_cookie
|
||||
&& (crtl->args.info.call_cookie
|
||||
& CALL_COOKIE_RET_TRAMP (1)))
|
||||
&& reload_completed
|
||||
&& lookup_attribute (\"trap_exit\",
|
||||
|
@ -9420,7 +9420,7 @@ mov.l\\t1f,r0\\n\\
|
|||
(define_expand "shcompact_return_tramp"
|
||||
[(return)]
|
||||
"TARGET_SHCOMPACT
|
||||
&& (current_function_args_info.call_cookie & CALL_COOKIE_RET_TRAMP (1))"
|
||||
&& (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))"
|
||||
"
|
||||
{
|
||||
rtx reg = gen_rtx_REG (Pmode, R0_REG);
|
||||
|
@ -9433,7 +9433,7 @@ mov.l\\t1f,r0\\n\\
|
|||
(define_insn "shcompact_return_tramp_i"
|
||||
[(parallel [(return) (use (reg:SI R0_REG))])]
|
||||
"TARGET_SHCOMPACT
|
||||
&& (current_function_args_info.call_cookie & CALL_COOKIE_RET_TRAMP (1))"
|
||||
&& (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))"
|
||||
"jmp @r0%#"
|
||||
[(set_attr "type" "jump_ind")
|
||||
(set_attr "needs_delay_slot" "yes")])
|
||||
|
|
|
@ -3769,7 +3769,7 @@ sparc_init_modes (void)
|
|||
HOST_WIDE_INT
|
||||
sparc_compute_frame_size (HOST_WIDE_INT size, int leaf_function_p)
|
||||
{
|
||||
int outgoing_args_size = (current_function_outgoing_args_size
|
||||
int outgoing_args_size = (crtl->outgoing_args_size
|
||||
+ REG_PARM_STACK_SPACE (current_function_decl));
|
||||
int n_regs = 0; /* N_REGS is the number of 4-byte regs saved thus far. */
|
||||
int i;
|
||||
|
@ -3799,7 +3799,7 @@ sparc_compute_frame_size (HOST_WIDE_INT size, int leaf_function_p)
|
|||
if (leaf_function_p
|
||||
&& n_regs == 0
|
||||
&& size == 0
|
||||
&& current_function_outgoing_args_size == 0)
|
||||
&& crtl->outgoing_args_size == 0)
|
||||
actual_fsize = apparent_fsize = 0;
|
||||
else
|
||||
{
|
||||
|
@ -5675,7 +5675,7 @@ function_value (const_tree type, enum machine_mode mode, int incoming_p)
|
|||
static rtx
|
||||
sparc_builtin_saveregs (void)
|
||||
{
|
||||
int first_reg = current_function_args_info.words;
|
||||
int first_reg = crtl->args.info.words;
|
||||
rtx address;
|
||||
int regno;
|
||||
|
||||
|
|
|
@ -1678,7 +1678,7 @@ do { \
|
|||
|
||||
#define EXIT_IGNORE_STACK \
|
||||
(get_frame_size () != 0 \
|
||||
|| current_function_calls_alloca || current_function_outgoing_args_size)
|
||||
|| current_function_calls_alloca || crtl->outgoing_args_size)
|
||||
|
||||
/* Define registers used by the epilogue and return instruction. */
|
||||
#define EPILOGUE_USES(REGNO) ((REGNO) == 31 \
|
||||
|
|
|
@ -1686,8 +1686,8 @@ direct_return (void)
|
|||
if (cfun->static_chain_decl == 0
|
||||
&& (spu_saved_regs_size ()
|
||||
+ get_frame_size ()
|
||||
+ current_function_outgoing_args_size
|
||||
+ current_function_pretend_args_size == 0)
|
||||
+ crtl->outgoing_args_size
|
||||
+ crtl->args.pretend_args_size == 0)
|
||||
&& current_function_is_leaf)
|
||||
return 1;
|
||||
}
|
||||
|
@ -1705,7 +1705,7 @@ direct_return (void)
|
|||
prev SP | back chain |
|
||||
+-------------+
|
||||
| var args |
|
||||
| reg save | current_function_pretend_args_size bytes
|
||||
| reg save | crtl->args.pretend_args_size bytes
|
||||
+-------------+
|
||||
| ... |
|
||||
| saved regs | spu_saved_regs_size() bytes
|
||||
|
@ -1715,7 +1715,7 @@ direct_return (void)
|
|||
+-------------+
|
||||
| ... |
|
||||
| outgoing |
|
||||
| args | current_function_outgoing_args_size bytes
|
||||
| args | crtl->outgoing_args_size bytes
|
||||
+-------------+
|
||||
| $lr of next |
|
||||
| frame |
|
||||
|
@ -1749,8 +1749,8 @@ spu_expand_prologue (void)
|
|||
|
||||
saved_regs_size = spu_saved_regs_size ();
|
||||
total_size = size + saved_regs_size
|
||||
+ current_function_outgoing_args_size
|
||||
+ current_function_pretend_args_size;
|
||||
+ crtl->outgoing_args_size
|
||||
+ crtl->args.pretend_args_size;
|
||||
|
||||
if (!current_function_is_leaf
|
||||
|| current_function_calls_alloca || total_size > 0)
|
||||
|
@ -1766,7 +1766,7 @@ spu_expand_prologue (void)
|
|||
|
||||
if (total_size > 0)
|
||||
{
|
||||
offset = -current_function_pretend_args_size;
|
||||
offset = -crtl->args.pretend_args_size;
|
||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
|
||||
if (need_to_save_reg (regno, 1))
|
||||
{
|
||||
|
@ -1840,7 +1840,7 @@ spu_expand_prologue (void)
|
|||
{
|
||||
rtx fp_reg = gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM);
|
||||
HOST_WIDE_INT fp_offset = STACK_POINTER_OFFSET
|
||||
+ current_function_outgoing_args_size;
|
||||
+ crtl->outgoing_args_size;
|
||||
/* Set the new frame_pointer */
|
||||
insn = frame_emit_add_imm (fp_reg, sp_reg, fp_offset, scratch_reg_0);
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
|
@ -1874,8 +1874,8 @@ spu_expand_epilogue (bool sibcall_p)
|
|||
|
||||
saved_regs_size = spu_saved_regs_size ();
|
||||
total_size = size + saved_regs_size
|
||||
+ current_function_outgoing_args_size
|
||||
+ current_function_pretend_args_size;
|
||||
+ crtl->outgoing_args_size
|
||||
+ crtl->args.pretend_args_size;
|
||||
|
||||
if (!current_function_is_leaf
|
||||
|| current_function_calls_alloca || total_size > 0)
|
||||
|
@ -1891,7 +1891,7 @@ spu_expand_epilogue (bool sibcall_p)
|
|||
|
||||
if (saved_regs_size > 0)
|
||||
{
|
||||
offset = -current_function_pretend_args_size;
|
||||
offset = -crtl->args.pretend_args_size;
|
||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
|
||||
if (need_to_save_reg (regno, 1))
|
||||
{
|
||||
|
@ -3045,15 +3045,15 @@ spu_initial_elimination_offset (int from, int to)
|
|||
{
|
||||
int saved_regs_size = spu_saved_regs_size ();
|
||||
int sp_offset = 0;
|
||||
if (!current_function_is_leaf || current_function_outgoing_args_size
|
||||
if (!current_function_is_leaf || crtl->outgoing_args_size
|
||||
|| get_frame_size () || saved_regs_size)
|
||||
sp_offset = STACK_POINTER_OFFSET;
|
||||
if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
return (sp_offset + current_function_outgoing_args_size);
|
||||
return (sp_offset + crtl->outgoing_args_size);
|
||||
else if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
|
||||
return 0;
|
||||
else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
|
||||
return sp_offset + current_function_outgoing_args_size
|
||||
return sp_offset + crtl->outgoing_args_size
|
||||
+ get_frame_size () + saved_regs_size + STACK_POINTER_OFFSET;
|
||||
else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
|
||||
return get_frame_size () + saved_regs_size + sp_offset;
|
||||
|
@ -3211,10 +3211,10 @@ spu_build_builtin_va_list (void)
|
|||
The following global variables are used to initialize
|
||||
the va_list structure:
|
||||
|
||||
current_function_args_info;
|
||||
crtl->args.info;
|
||||
the CUMULATIVE_ARGS for this function
|
||||
|
||||
current_function_arg_offset_rtx:
|
||||
crtl->args.arg_offset_rtx:
|
||||
holds the offset of the first anonymous stack argument
|
||||
(relative to the virtual arg pointer). */
|
||||
|
||||
|
@ -3235,7 +3235,7 @@ spu_va_start (tree valist, rtx nextarg)
|
|||
|
||||
/* Find the __args area. */
|
||||
t = make_tree (TREE_TYPE (args), nextarg);
|
||||
if (current_function_pretend_args_size > 0)
|
||||
if (crtl->args.pretend_args_size > 0)
|
||||
t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (args), t,
|
||||
size_int (-STACK_POINTER_OFFSET));
|
||||
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (args), args, t);
|
||||
|
@ -3245,7 +3245,7 @@ spu_va_start (tree valist, rtx nextarg)
|
|||
/* Find the __skip area. */
|
||||
t = make_tree (TREE_TYPE (skip), virtual_incoming_args_rtx);
|
||||
t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (skip), t,
|
||||
size_int (current_function_pretend_args_size
|
||||
size_int (crtl->args.pretend_args_size
|
||||
- STACK_POINTER_OFFSET));
|
||||
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (skip), skip, t);
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
|
|
|
@ -1005,13 +1005,13 @@ xstormy16_compute_stack_layout (void)
|
|||
+ layout.register_save_size
|
||||
+ layout.stdarg_save_size);
|
||||
|
||||
if (current_function_args_size <= 2048 && current_function_args_size != -1)
|
||||
if (crtl->args.size <= 2048 && crtl->args.size != -1)
|
||||
{
|
||||
if (layout.frame_size + INCOMING_FRAME_SP_OFFSET
|
||||
+ current_function_args_size <= 2048)
|
||||
+ crtl->args.size <= 2048)
|
||||
layout.fp_minus_ap = layout.frame_size + INCOMING_FRAME_SP_OFFSET;
|
||||
else
|
||||
layout.fp_minus_ap = 2048 - current_function_args_size;
|
||||
layout.fp_minus_ap = 2048 - crtl->args.size;
|
||||
}
|
||||
else
|
||||
layout.fp_minus_ap = (layout.stdarg_save_size
|
||||
|
@ -1356,7 +1356,7 @@ xstormy16_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
|
|||
|
||||
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (count), count,
|
||||
build_int_cst (NULL_TREE,
|
||||
current_function_args_info * UNITS_PER_WORD));
|
||||
crtl->args.info * UNITS_PER_WORD));
|
||||
TREE_SIDE_EFFECTS (t) = 1;
|
||||
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
|
||||
}
|
||||
|
|
|
@ -1488,7 +1488,7 @@ compute_frame_size (int size, long * p_reg_saved)
|
|||
{
|
||||
return (size
|
||||
+ compute_register_save_size (p_reg_saved)
|
||||
+ current_function_outgoing_args_size);
|
||||
+ crtl->outgoing_args_size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ expand_prologue (void)
|
|||
}
|
||||
|
||||
/* Save arg registers to the stack if necessary. */
|
||||
else if (current_function_args_info.anonymous_args)
|
||||
else if (crtl->args.info.anonymous_args)
|
||||
{
|
||||
if (TARGET_PROLOG_FUNCTION && TARGET_V850E && !TARGET_DISABLE_CALLT)
|
||||
emit_insn (gen_save_r6_r9_v850e ());
|
||||
|
|
|
@ -557,7 +557,7 @@ enum reg_class
|
|||
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
||||
{ \
|
||||
if ((FROM) == FRAME_POINTER_REGNUM) \
|
||||
(OFFSET) = get_frame_size () + current_function_outgoing_args_size; \
|
||||
(OFFSET) = get_frame_size () + crtl->outgoing_args_size; \
|
||||
else if ((FROM) == ARG_POINTER_REGNUM) \
|
||||
(OFFSET) = compute_frame_size (get_frame_size (), (long *)0); \
|
||||
else \
|
||||
|
|
|
@ -2292,7 +2292,7 @@ compute_frame_size (int size)
|
|||
|
||||
xtensa_current_frame_size =
|
||||
XTENSA_STACK_ALIGN (size
|
||||
+ current_function_outgoing_args_size
|
||||
+ crtl->outgoing_args_size
|
||||
+ (WINDOW_SIZE * UNITS_PER_WORD));
|
||||
return xtensa_current_frame_size;
|
||||
}
|
||||
|
@ -2485,7 +2485,7 @@ static rtx
|
|||
xtensa_builtin_saveregs (void)
|
||||
{
|
||||
rtx gp_regs;
|
||||
int arg_words = current_function_args_info.arg_words;
|
||||
int arg_words = crtl->args.info.arg_words;
|
||||
int gp_left = MAX_ARGS_IN_REGISTERS - arg_words;
|
||||
|
||||
if (gp_left <= 0)
|
||||
|
@ -2522,7 +2522,7 @@ xtensa_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
|
|||
tree t, u;
|
||||
int arg_words;
|
||||
|
||||
arg_words = current_function_args_info.arg_words;
|
||||
arg_words = crtl->args.info.arg_words;
|
||||
|
||||
f_stk = TYPE_FIELDS (va_list_type_node);
|
||||
f_reg = TREE_CHAIN (f_stk);
|
||||
|
@ -2868,7 +2868,7 @@ order_regs_for_local_alloc (void)
|
|||
|
||||
/* Use the AR registers in increasing order (skipping a0 and a1)
|
||||
but save the incoming argument registers for a last resort. */
|
||||
num_arg_regs = current_function_args_info.arg_words;
|
||||
num_arg_regs = crtl->args.info.arg_words;
|
||||
if (num_arg_regs > MAX_ARGS_IN_REGISTERS)
|
||||
num_arg_regs = MAX_ARGS_IN_REGISTERS;
|
||||
for (i = GP_ARG_FIRST; i < 16 - num_arg_regs; i++)
|
||||
|
|
|
@ -525,7 +525,7 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER];
|
|||
|
||||
/* Offset within stack frame to start allocating local variables at. */
|
||||
#define STARTING_FRAME_OFFSET \
|
||||
current_function_outgoing_args_size
|
||||
crtl->outgoing_args_size
|
||||
|
||||
/* The ARG_POINTER and FRAME_POINTER are not real Xtensa registers, so
|
||||
they are eliminated to either the stack pointer or hard frame pointer. */
|
||||
|
@ -556,7 +556,7 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER];
|
|||
|
||||
/* If defined, the maximum amount of space required for outgoing
|
||||
arguments will be computed and placed into the variable
|
||||
'current_function_outgoing_args_size'. No space will be pushed
|
||||
'crtl->outgoing_args_size'. No space will be pushed
|
||||
onto the stack for each call; instead, the function prologue
|
||||
should increase the stack frame size by this amount. */
|
||||
#define ACCUMULATE_OUTGOING_ARGS 1
|
||||
|
|
|
@ -931,11 +931,11 @@ dbxout_function_end (tree decl)
|
|||
if (flag_reorder_blocks_and_partition)
|
||||
{
|
||||
dbxout_begin_empty_stabs (N_FUN);
|
||||
dbxout_stab_value_label_diff (cfun->hot_section_end_label,
|
||||
cfun->hot_section_label);
|
||||
dbxout_stab_value_label_diff (crtl->subsections.hot_section_end_label,
|
||||
crtl->subsections.hot_section_label);
|
||||
dbxout_begin_empty_stabs (N_FUN);
|
||||
dbxout_stab_value_label_diff (cfun->cold_section_end_label,
|
||||
cfun->cold_section_label);
|
||||
dbxout_stab_value_label_diff (crtl->subsections.cold_section_end_label,
|
||||
crtl->subsections.cold_section_label);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3230,7 +3230,7 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
|
|||
&& (!is_sibling_call
|
||||
|| !bitmap_bit_p (df->exit_block_uses, ui)
|
||||
|| refers_to_regno_p (ui, ui+1,
|
||||
current_function_return_rtx, NULL)))
|
||||
crtl->return_rtx, NULL)))
|
||||
df_ref_record (collection_rec, regno_reg_rtx[ui],
|
||||
NULL, bb, insn, DF_REF_REG_DEF, DF_REF_MAY_CLOBBER | flags, -1, -1);
|
||||
}
|
||||
|
|
|
@ -2744,10 +2744,10 @@ dwarf2out_switch_text_section (void)
|
|||
|
||||
fde = &fde_table[fde_table_in_use - 1];
|
||||
fde->dw_fde_switched_sections = true;
|
||||
fde->dw_fde_hot_section_label = cfun->hot_section_label;
|
||||
fde->dw_fde_hot_section_end_label = cfun->hot_section_end_label;
|
||||
fde->dw_fde_unlikely_section_label = cfun->cold_section_label;
|
||||
fde->dw_fde_unlikely_section_end_label = cfun->cold_section_end_label;
|
||||
fde->dw_fde_hot_section_label = crtl->subsections.hot_section_label;
|
||||
fde->dw_fde_hot_section_end_label = crtl->subsections.hot_section_end_label;
|
||||
fde->dw_fde_unlikely_section_label = crtl->subsections.cold_section_label;
|
||||
fde->dw_fde_unlikely_section_end_label = crtl->subsections.cold_section_end_label;
|
||||
have_multiple_function_sections = true;
|
||||
|
||||
/* Reset the current label on switching text sections, so that we
|
||||
|
@ -8222,7 +8222,7 @@ output_line_info (void)
|
|||
current_line = 1;
|
||||
|
||||
if (cfun && in_cold_section_p)
|
||||
strcpy (prev_line_label, cfun->cold_section_label);
|
||||
strcpy (prev_line_label, crtl->subsections.cold_section_label);
|
||||
else
|
||||
strcpy (prev_line_label, text_section_label);
|
||||
for (lt_index = 1; lt_index < line_info_table_in_use; ++lt_index)
|
||||
|
@ -10792,7 +10792,7 @@ secname_for_decl (const_tree decl)
|
|||
secname = TREE_STRING_POINTER (sectree);
|
||||
}
|
||||
else if (cfun && in_cold_section_p)
|
||||
secname = cfun->cold_section_label;
|
||||
secname = crtl->subsections.cold_section_label;
|
||||
else
|
||||
secname = text_section_label;
|
||||
|
||||
|
@ -14611,7 +14611,7 @@ dwarf2out_var_location (rtx loc_note)
|
|||
newloc->next = NULL;
|
||||
|
||||
if (cfun && in_cold_section_p)
|
||||
newloc->section_label = cfun->cold_section_label;
|
||||
newloc->section_label = crtl->subsections.cold_section_label;
|
||||
else
|
||||
newloc->section_label = text_section_label;
|
||||
|
||||
|
|
|
@ -289,9 +289,6 @@ free_after_compilation (struct function *f)
|
|||
f->machine = NULL;
|
||||
f->cfg = NULL;
|
||||
|
||||
f->arg_offset_rtx = NULL;
|
||||
f->return_rtx = NULL;
|
||||
f->internal_arg_pointer = NULL;
|
||||
f->epilogue_delay_list = NULL;
|
||||
}
|
||||
|
||||
|
@ -1143,18 +1140,18 @@ static int cfa_offset;
|
|||
parameters. However, if OUTGOING_REG_PARM_STACK space is not defined,
|
||||
stack space for register parameters is not pushed by the caller, but
|
||||
rather part of the fixed stack areas and hence not included in
|
||||
`current_function_outgoing_args_size'. Nevertheless, we must allow
|
||||
`crtl->outgoing_args_size'. Nevertheless, we must allow
|
||||
for it when allocating stack dynamic objects. */
|
||||
|
||||
#if defined(REG_PARM_STACK_SPACE)
|
||||
#define STACK_DYNAMIC_OFFSET(FNDECL) \
|
||||
((ACCUMULATE_OUTGOING_ARGS \
|
||||
? (current_function_outgoing_args_size \
|
||||
? (crtl->outgoing_args_size \
|
||||
+ (OUTGOING_REG_PARM_STACK_SPACE ? 0 : REG_PARM_STACK_SPACE (FNDECL))) \
|
||||
: 0) + (STACK_POINTER_OFFSET))
|
||||
#else
|
||||
#define STACK_DYNAMIC_OFFSET(FNDECL) \
|
||||
((ACCUMULATE_OUTGOING_ARGS ? current_function_outgoing_args_size : 0) \
|
||||
((ACCUMULATE_OUTGOING_ARGS ? crtl->outgoing_args_size : 0) \
|
||||
+ (STACK_POINTER_OFFSET))
|
||||
#endif
|
||||
#endif
|
||||
|
@ -2263,7 +2260,7 @@ assign_parm_find_stack_rtl (tree parm, struct assign_parm_data_one *data)
|
|||
else
|
||||
offset_rtx = ARGS_SIZE_RTX (data->locate.offset);
|
||||
|
||||
stack_parm = current_function_internal_arg_pointer;
|
||||
stack_parm = crtl->args.internal_arg_pointer;
|
||||
if (offset_rtx != const0_rtx)
|
||||
stack_parm = gen_rtx_PLUS (Pmode, stack_parm, offset_rtx);
|
||||
stack_parm = gen_rtx_MEM (data->promoted_mode, stack_parm);
|
||||
|
@ -2949,7 +2946,7 @@ assign_parms (tree fndecl)
|
|||
struct assign_parm_data_all all;
|
||||
tree fnargs, parm;
|
||||
|
||||
current_function_internal_arg_pointer
|
||||
crtl->args.internal_arg_pointer
|
||||
= targetm.calls.internal_arg_pointer ();
|
||||
|
||||
assign_parms_initialize_all (&all);
|
||||
|
@ -3029,48 +3026,48 @@ assign_parms (tree fndecl)
|
|||
}
|
||||
|
||||
/* We have aligned all the args, so add space for the pretend args. */
|
||||
current_function_pretend_args_size = all.pretend_args_size;
|
||||
crtl->args.pretend_args_size = all.pretend_args_size;
|
||||
all.stack_args_size.constant += all.extra_pretend_bytes;
|
||||
current_function_args_size = all.stack_args_size.constant;
|
||||
crtl->args.size = all.stack_args_size.constant;
|
||||
|
||||
/* Adjust function incoming argument size for alignment and
|
||||
minimum length. */
|
||||
|
||||
#ifdef REG_PARM_STACK_SPACE
|
||||
current_function_args_size = MAX (current_function_args_size,
|
||||
crtl->args.size = MAX (crtl->args.size,
|
||||
REG_PARM_STACK_SPACE (fndecl));
|
||||
#endif
|
||||
|
||||
current_function_args_size = CEIL_ROUND (current_function_args_size,
|
||||
crtl->args.size = CEIL_ROUND (crtl->args.size,
|
||||
PARM_BOUNDARY / BITS_PER_UNIT);
|
||||
|
||||
#ifdef ARGS_GROW_DOWNWARD
|
||||
current_function_arg_offset_rtx
|
||||
crtl->args.arg_offset_rtx
|
||||
= (all.stack_args_size.var == 0 ? GEN_INT (-all.stack_args_size.constant)
|
||||
: expand_expr (size_diffop (all.stack_args_size.var,
|
||||
size_int (-all.stack_args_size.constant)),
|
||||
NULL_RTX, VOIDmode, 0));
|
||||
#else
|
||||
current_function_arg_offset_rtx = ARGS_SIZE_RTX (all.stack_args_size);
|
||||
crtl->args.arg_offset_rtx = ARGS_SIZE_RTX (all.stack_args_size);
|
||||
#endif
|
||||
|
||||
/* See how many bytes, if any, of its args a function should try to pop
|
||||
on return. */
|
||||
|
||||
current_function_pops_args = RETURN_POPS_ARGS (fndecl, TREE_TYPE (fndecl),
|
||||
current_function_args_size);
|
||||
crtl->args.pops_args = RETURN_POPS_ARGS (fndecl, TREE_TYPE (fndecl),
|
||||
crtl->args.size);
|
||||
|
||||
/* For stdarg.h function, save info about
|
||||
regs and stack space used by the named args. */
|
||||
|
||||
current_function_args_info = all.args_so_far;
|
||||
crtl->args.info = all.args_so_far;
|
||||
|
||||
/* Set the rtx used for the function return value. Put this in its
|
||||
own variable so any optimizers that need this information don't have
|
||||
to include tree.h. Do this here so it gets done when an inlined
|
||||
function gets output. */
|
||||
|
||||
current_function_return_rtx
|
||||
crtl->return_rtx
|
||||
= (DECL_RTL_SET_P (DECL_RESULT (fndecl))
|
||||
? DECL_RTL (DECL_RESULT (fndecl)) : NULL_RTX);
|
||||
|
||||
|
@ -3091,10 +3088,10 @@ assign_parms (tree fndecl)
|
|||
real_decl_rtl = targetm.calls.function_value (TREE_TYPE (decl_result),
|
||||
fndecl, true);
|
||||
REG_FUNCTION_VALUE_P (real_decl_rtl) = 1;
|
||||
/* The delay slot scheduler assumes that current_function_return_rtx
|
||||
/* The delay slot scheduler assumes that crtl->return_rtx
|
||||
holds the hard register containing the return value, not a
|
||||
temporary pseudo. */
|
||||
current_function_return_rtx = real_decl_rtl;
|
||||
crtl->return_rtx = real_decl_rtl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4291,7 +4288,7 @@ expand_dummy_function_end (void)
|
|||
void
|
||||
diddle_return_value (void (*doit) (rtx, void *), void *arg)
|
||||
{
|
||||
rtx outgoing = current_function_return_rtx;
|
||||
rtx outgoing = crtl->return_rtx;
|
||||
|
||||
if (! outgoing)
|
||||
return;
|
||||
|
@ -4452,7 +4449,7 @@ expand_function_end (void)
|
|||
? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
|
||||
: DECL_REGISTER (decl_result))
|
||||
{
|
||||
rtx real_decl_rtl = current_function_return_rtx;
|
||||
rtx real_decl_rtl = crtl->return_rtx;
|
||||
|
||||
/* This should be set in assign_parms. */
|
||||
gcc_assert (REG_FUNCTION_VALUE_P (real_decl_rtl));
|
||||
|
@ -4460,7 +4457,7 @@ expand_function_end (void)
|
|||
/* If this is a BLKmode structure being returned in registers,
|
||||
then use the mode computed in expand_return. Note that if
|
||||
decl_rtl is memory, then its mode may have been changed,
|
||||
but that current_function_return_rtx has not. */
|
||||
but that crtl->return_rtx has not. */
|
||||
if (GET_MODE (real_decl_rtl) == BLKmode)
|
||||
PUT_MODE (real_decl_rtl, GET_MODE (decl_rtl));
|
||||
|
||||
|
@ -4557,7 +4554,7 @@ expand_function_end (void)
|
|||
|
||||
/* Show return register used to hold result (in this case the address
|
||||
of the result. */
|
||||
current_function_return_rtx = outgoing;
|
||||
crtl->return_rtx = outgoing;
|
||||
}
|
||||
|
||||
/* Emit the actual code to clobber return register. */
|
||||
|
|
130
gcc/function.h
130
gcc/function.h
|
@ -171,12 +171,78 @@ struct varasm_status GTY(())
|
|||
unsigned int deferred_constants;
|
||||
};
|
||||
|
||||
/* Information mainlined about RTL representation of incoming arguments. */
|
||||
struct incoming_args GTY(())
|
||||
{
|
||||
/* Number of bytes of args popped by function being compiled on its return.
|
||||
Zero if no bytes are to be popped.
|
||||
May affect compilation of return insn or of function epilogue. */
|
||||
int pops_args;
|
||||
|
||||
/* If function's args have a fixed size, this is that size, in bytes.
|
||||
Otherwise, it is -1.
|
||||
May affect compilation of return insn or of function epilogue. */
|
||||
int size;
|
||||
|
||||
/* # bytes the prologue should push and pretend that the caller pushed them.
|
||||
The prologue must do this, but only if parms can be passed in
|
||||
registers. */
|
||||
int pretend_args_size;
|
||||
|
||||
/* This is the offset from the arg pointer to the place where the first
|
||||
anonymous arg can be found, if there is one. */
|
||||
rtx arg_offset_rtx;
|
||||
|
||||
/* Quantities of various kinds of registers
|
||||
used for the current function's args. */
|
||||
CUMULATIVE_ARGS info;
|
||||
|
||||
/* The arg pointer hard register, or the pseudo into which it was copied. */
|
||||
rtx internal_arg_pointer;
|
||||
};
|
||||
|
||||
/* Data for function partitioning. */
|
||||
struct function_subsections GTY(())
|
||||
{
|
||||
/* Assembly labels for the hot and cold text sections, to
|
||||
be used by debugger functions for determining the size of text
|
||||
sections. */
|
||||
|
||||
const char *hot_section_label;
|
||||
const char *cold_section_label;
|
||||
const char *hot_section_end_label;
|
||||
const char *cold_section_end_label;
|
||||
|
||||
/* String to be used for name of cold text sections, via
|
||||
targetm.asm_out.named_section. */
|
||||
|
||||
const char *unlikely_text_section_name;
|
||||
};
|
||||
|
||||
/* Datastructures maintained for currently processed function in RTL form. */
|
||||
struct rtl_data GTY(())
|
||||
{
|
||||
struct expr_status expr;
|
||||
struct emit_status emit;
|
||||
struct varasm_status varasm;
|
||||
struct incoming_args args;
|
||||
struct function_subsections subsections;
|
||||
|
||||
/* For function.c */
|
||||
|
||||
/* # of bytes of outgoing arguments. If ACCUMULATE_OUTGOING_ARGS is
|
||||
defined, the needed space is pushed by the prologue. */
|
||||
int outgoing_args_size;
|
||||
|
||||
/* If nonzero, an RTL expression for the location at which the current
|
||||
function returns its result. If the current function returns its
|
||||
result in a register, current_function_return_rtx will always be
|
||||
the hard register containing the result. */
|
||||
rtx return_rtx;
|
||||
|
||||
/* Opaque pointer used by get_hard_reg_initial_val and
|
||||
has_hard_reg_initial_val (see integrate.[hc]). */
|
||||
struct initial_value_struct *hard_reg_initial_vals;
|
||||
|
||||
/* List (chain of EXPR_LIST) of labels heading the current handlers for
|
||||
nonlocal gotos. */
|
||||
|
@ -222,8 +288,6 @@ struct rtl_data GTY(())
|
|||
/* Current nesting level for temporaries. */
|
||||
int x_temp_slot_level;
|
||||
|
||||
/* Highest label number in current function. */
|
||||
int inl_max_label_num;
|
||||
};
|
||||
|
||||
#define return_label (crtl->x_return_label)
|
||||
|
@ -271,46 +335,6 @@ struct function GTY(())
|
|||
/* Function containing this function, if any. */
|
||||
struct function *outer;
|
||||
|
||||
/* Number of bytes of args popped by function being compiled on its return.
|
||||
Zero if no bytes are to be popped.
|
||||
May affect compilation of return insn or of function epilogue. */
|
||||
int pops_args;
|
||||
|
||||
/* If function's args have a fixed size, this is that size, in bytes.
|
||||
Otherwise, it is -1.
|
||||
May affect compilation of return insn or of function epilogue. */
|
||||
int args_size;
|
||||
|
||||
/* # bytes the prologue should push and pretend that the caller pushed them.
|
||||
The prologue must do this, but only if parms can be passed in
|
||||
registers. */
|
||||
int pretend_args_size;
|
||||
|
||||
/* # of bytes of outgoing arguments. If ACCUMULATE_OUTGOING_ARGS is
|
||||
defined, the needed space is pushed by the prologue. */
|
||||
int outgoing_args_size;
|
||||
|
||||
/* This is the offset from the arg pointer to the place where the first
|
||||
anonymous arg can be found, if there is one. */
|
||||
rtx arg_offset_rtx;
|
||||
|
||||
/* Quantities of various kinds of registers
|
||||
used for the current function's args. */
|
||||
CUMULATIVE_ARGS args_info;
|
||||
|
||||
/* If nonzero, an RTL expression for the location at which the current
|
||||
function returns its result. If the current function returns its
|
||||
result in a register, current_function_return_rtx will always be
|
||||
the hard register containing the result. */
|
||||
rtx return_rtx;
|
||||
|
||||
/* The arg pointer hard register, or the pseudo into which it was copied. */
|
||||
rtx internal_arg_pointer;
|
||||
|
||||
/* Opaque pointer used by get_hard_reg_initial_val and
|
||||
has_hard_reg_initial_val (see integrate.[hc]). */
|
||||
struct initial_value_struct *hard_reg_initial_vals;
|
||||
|
||||
/* A PARM_DECL that should contain the static chain for this function.
|
||||
It will be initialized at the beginning of the function. */
|
||||
tree static_chain_decl;
|
||||
|
@ -359,20 +383,6 @@ struct function GTY(())
|
|||
/* The variables unexpanded so far. */
|
||||
tree unexpanded_var_list;
|
||||
|
||||
/* Assembly labels for the hot and cold text sections, to
|
||||
be used by debugger functions for determining the size of text
|
||||
sections. */
|
||||
|
||||
const char *hot_section_label;
|
||||
const char *cold_section_label;
|
||||
const char *hot_section_end_label;
|
||||
const char *cold_section_end_label;
|
||||
|
||||
/* String to be used for name of cold text sections, via
|
||||
targetm.asm_out.named_section. */
|
||||
|
||||
const char *unlikely_text_section_name;
|
||||
|
||||
/* A variable living at the top of the frame that holds a known value.
|
||||
Used for detecting stack clobbers. */
|
||||
tree stack_protect_guard;
|
||||
|
@ -530,7 +540,6 @@ extern void pop_cfun (void);
|
|||
extern void instantiate_decl_rtl (rtx x);
|
||||
|
||||
/* For backward compatibility... eventually these should all go away. */
|
||||
#define current_function_pops_args (cfun->pops_args)
|
||||
#define current_function_returns_struct (cfun->returns_struct)
|
||||
#define current_function_returns_pcc_struct (cfun->returns_pcc_struct)
|
||||
#define current_function_calls_setjmp (cfun->calls_setjmp)
|
||||
|
@ -538,14 +547,7 @@ extern void instantiate_decl_rtl (rtx x);
|
|||
#define current_function_accesses_prior_frames (cfun->accesses_prior_frames)
|
||||
#define current_function_calls_eh_return (cfun->calls_eh_return)
|
||||
#define current_function_is_thunk (cfun->is_thunk)
|
||||
#define current_function_args_info (cfun->args_info)
|
||||
#define current_function_args_size (cfun->args_size)
|
||||
#define current_function_pretend_args_size (cfun->pretend_args_size)
|
||||
#define current_function_outgoing_args_size (cfun->outgoing_args_size)
|
||||
#define current_function_arg_offset_rtx (cfun->arg_offset_rtx)
|
||||
#define current_function_stdarg (cfun->stdarg)
|
||||
#define current_function_internal_arg_pointer (cfun->internal_arg_pointer)
|
||||
#define current_function_return_rtx (cfun->return_rtx)
|
||||
#define current_function_profile (cfun->profile)
|
||||
#define current_function_funcdef_no (cfun->funcdef_no)
|
||||
#define current_function_limit_stack (cfun->limit_stack)
|
||||
|
|
|
@ -206,9 +206,9 @@ set_decl_abstract_flags (tree decl, int setting)
|
|||
the function. */
|
||||
|
||||
rtx
|
||||
get_hard_reg_initial_reg (struct function *fun, rtx reg)
|
||||
get_hard_reg_initial_reg (rtx reg)
|
||||
{
|
||||
struct initial_value_struct *ivs = fun->hard_reg_initial_vals;
|
||||
struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
|
||||
int i;
|
||||
|
||||
if (ivs == 0)
|
||||
|
@ -234,14 +234,14 @@ get_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
|
|||
if (rv)
|
||||
return rv;
|
||||
|
||||
ivs = cfun->hard_reg_initial_vals;
|
||||
ivs = crtl->hard_reg_initial_vals;
|
||||
if (ivs == 0)
|
||||
{
|
||||
ivs = ggc_alloc (sizeof (initial_value_struct));
|
||||
ivs->num_entries = 0;
|
||||
ivs->max_entries = 5;
|
||||
ivs->entries = ggc_alloc (5 * sizeof (initial_value_pair));
|
||||
cfun->hard_reg_initial_vals = ivs;
|
||||
crtl->hard_reg_initial_vals = ivs;
|
||||
}
|
||||
|
||||
if (ivs->num_entries >= ivs->max_entries)
|
||||
|
@ -268,7 +268,7 @@ has_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
|
|||
struct initial_value_struct *ivs;
|
||||
int i;
|
||||
|
||||
ivs = cfun->hard_reg_initial_vals;
|
||||
ivs = crtl->hard_reg_initial_vals;
|
||||
if (ivs != 0)
|
||||
for (i = 0; i < ivs->num_entries; i++)
|
||||
if (GET_MODE (ivs->entries[i].hard_reg) == mode
|
||||
|
@ -281,7 +281,7 @@ has_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
|
|||
unsigned int
|
||||
emit_initial_value_sets (void)
|
||||
{
|
||||
struct initial_value_struct *ivs = cfun->hard_reg_initial_vals;
|
||||
struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
|
||||
int i;
|
||||
rtx seq;
|
||||
|
||||
|
@ -324,7 +324,7 @@ allocate_initial_values (rtx *reg_equiv_memory_loc)
|
|||
{
|
||||
if (targetm.allocate_initial_value)
|
||||
{
|
||||
struct initial_value_struct *ivs = cfun->hard_reg_initial_vals;
|
||||
struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
|
||||
int i;
|
||||
|
||||
if (ivs == 0)
|
||||
|
|
|
@ -24,7 +24,7 @@ extern rtx get_hard_reg_initial_val (enum machine_mode, unsigned int);
|
|||
extern rtx has_hard_reg_initial_val (enum machine_mode, unsigned int);
|
||||
/* If a pseudo represents an initial hard reg (or expression), return
|
||||
it, else return NULL_RTX. */
|
||||
extern rtx get_hard_reg_initial_reg (struct function *, rtx);
|
||||
extern rtx get_hard_reg_initial_reg (rtx);
|
||||
/* Called from rest_of_compilation. */
|
||||
extern unsigned int emit_initial_value_sets (void);
|
||||
extern void allocate_initial_values (rtx *);
|
||||
|
|
|
@ -1415,7 +1415,7 @@ block_alloc (int b)
|
|||
|
||||
/* Avoid making a call-saved register unnecessarily
|
||||
clobbered. */
|
||||
hard_reg = get_hard_reg_initial_reg (cfun, r1);
|
||||
hard_reg = get_hard_reg_initial_reg (r1);
|
||||
if (hard_reg != NULL_RTX)
|
||||
{
|
||||
if (REG_P (hard_reg)
|
||||
|
|
|
@ -1150,8 +1150,8 @@ init_resource_info (rtx epilogue_insn)
|
|||
else
|
||||
SET_HARD_REG_BIT (end_of_function_needs.regs, STACK_POINTER_REGNUM);
|
||||
|
||||
if (current_function_return_rtx != 0)
|
||||
mark_referenced_resources (current_function_return_rtx,
|
||||
if (crtl->return_rtx != 0)
|
||||
mark_referenced_resources (crtl->return_rtx,
|
||||
&end_of_function_needs, 1);
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
|
|
52
gcc/varasm.c
52
gcc/varasm.c
|
@ -611,7 +611,7 @@ initialize_cold_section_name (void)
|
|||
tree dsn;
|
||||
|
||||
gcc_assert (cfun && current_function_decl);
|
||||
if (cfun->unlikely_text_section_name)
|
||||
if (crtl->subsections.unlikely_text_section_name)
|
||||
return;
|
||||
|
||||
dsn = DECL_SECTION_NAME (current_function_decl);
|
||||
|
@ -623,10 +623,10 @@ initialize_cold_section_name (void)
|
|||
stripped_name = targetm.strip_name_encoding (name);
|
||||
|
||||
buffer = ACONCAT ((stripped_name, "_unlikely", NULL));
|
||||
cfun->unlikely_text_section_name = ggc_strdup (buffer);
|
||||
crtl->subsections.unlikely_text_section_name = ggc_strdup (buffer);
|
||||
}
|
||||
else
|
||||
cfun->unlikely_text_section_name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME;
|
||||
crtl->subsections.unlikely_text_section_name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME;
|
||||
}
|
||||
|
||||
/* Tell assembler to switch to unlikely-to-be-executed text section. */
|
||||
|
@ -636,10 +636,10 @@ unlikely_text_section (void)
|
|||
{
|
||||
if (cfun)
|
||||
{
|
||||
if (!cfun->unlikely_text_section_name)
|
||||
if (!crtl->subsections.unlikely_text_section_name)
|
||||
initialize_cold_section_name ();
|
||||
|
||||
return get_named_section (NULL, cfun->unlikely_text_section_name, 0);
|
||||
return get_named_section (NULL, crtl->subsections.unlikely_text_section_name, 0);
|
||||
}
|
||||
else
|
||||
return get_named_section (NULL, UNLIKELY_EXECUTED_TEXT_SECTION_NAME, 0);
|
||||
|
@ -656,7 +656,7 @@ unlikely_text_section_p (section *sect)
|
|||
const char *name;
|
||||
|
||||
if (cfun)
|
||||
name = cfun->unlikely_text_section_name;
|
||||
name = crtl->subsections.unlikely_text_section_name;
|
||||
else
|
||||
name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME;
|
||||
|
||||
|
@ -1587,27 +1587,27 @@ assemble_start_function (tree decl, const char *fnname)
|
|||
char tmp_label[100];
|
||||
bool hot_label_written = false;
|
||||
|
||||
cfun->unlikely_text_section_name = NULL;
|
||||
crtl->subsections.unlikely_text_section_name = NULL;
|
||||
|
||||
first_function_block_is_cold = false;
|
||||
if (flag_reorder_blocks_and_partition)
|
||||
{
|
||||
ASM_GENERATE_INTERNAL_LABEL (tmp_label, "LHOTB", const_labelno);
|
||||
cfun->hot_section_label = ggc_strdup (tmp_label);
|
||||
crtl->subsections.hot_section_label = ggc_strdup (tmp_label);
|
||||
ASM_GENERATE_INTERNAL_LABEL (tmp_label, "LCOLDB", const_labelno);
|
||||
cfun->cold_section_label = ggc_strdup (tmp_label);
|
||||
crtl->subsections.cold_section_label = ggc_strdup (tmp_label);
|
||||
ASM_GENERATE_INTERNAL_LABEL (tmp_label, "LHOTE", const_labelno);
|
||||
cfun->hot_section_end_label = ggc_strdup (tmp_label);
|
||||
crtl->subsections.hot_section_end_label = ggc_strdup (tmp_label);
|
||||
ASM_GENERATE_INTERNAL_LABEL (tmp_label, "LCOLDE", const_labelno);
|
||||
cfun->cold_section_end_label = ggc_strdup (tmp_label);
|
||||
crtl->subsections.cold_section_end_label = ggc_strdup (tmp_label);
|
||||
const_labelno++;
|
||||
}
|
||||
else
|
||||
{
|
||||
cfun->hot_section_label = NULL;
|
||||
cfun->cold_section_label = NULL;
|
||||
cfun->hot_section_end_label = NULL;
|
||||
cfun->cold_section_end_label = NULL;
|
||||
crtl->subsections.hot_section_label = NULL;
|
||||
crtl->subsections.cold_section_label = NULL;
|
||||
crtl->subsections.hot_section_end_label = NULL;
|
||||
crtl->subsections.cold_section_end_label = NULL;
|
||||
}
|
||||
|
||||
/* The following code does not need preprocessing in the assembler. */
|
||||
|
@ -1628,7 +1628,7 @@ assemble_start_function (tree decl, const char *fnname)
|
|||
{
|
||||
switch_to_section (unlikely_text_section ());
|
||||
assemble_align (DECL_ALIGN (decl));
|
||||
ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label);
|
||||
ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.cold_section_label);
|
||||
|
||||
/* When the function starts with a cold section, we need to explicitly
|
||||
align the hot section and write out the hot section label.
|
||||
|
@ -1638,7 +1638,7 @@ assemble_start_function (tree decl, const char *fnname)
|
|||
{
|
||||
switch_to_section (text_section);
|
||||
assemble_align (DECL_ALIGN (decl));
|
||||
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label);
|
||||
ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.hot_section_label);
|
||||
hot_label_written = true;
|
||||
first_function_block_is_cold = true;
|
||||
}
|
||||
|
@ -1652,9 +1652,9 @@ assemble_start_function (tree decl, const char *fnname)
|
|||
|
||||
initialize_cold_section_name ();
|
||||
|
||||
if (cfun->unlikely_text_section_name
|
||||
if (crtl->subsections.unlikely_text_section_name
|
||||
&& strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
|
||||
cfun->unlikely_text_section_name) == 0)
|
||||
crtl->subsections.unlikely_text_section_name) == 0)
|
||||
first_function_block_is_cold = true;
|
||||
}
|
||||
|
||||
|
@ -1665,7 +1665,7 @@ assemble_start_function (tree decl, const char *fnname)
|
|||
switch_to_section (function_section (decl));
|
||||
if (flag_reorder_blocks_and_partition
|
||||
&& !hot_label_written)
|
||||
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label);
|
||||
ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.hot_section_label);
|
||||
|
||||
/* Tell assembler to move to target machine's alignment for functions. */
|
||||
align = floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT);
|
||||
|
@ -1743,12 +1743,12 @@ assemble_end_function (tree decl, const char *fnname ATTRIBUTE_UNUSED)
|
|||
|
||||
save_text_section = in_section;
|
||||
switch_to_section (unlikely_text_section ());
|
||||
ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_end_label);
|
||||
ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.cold_section_end_label);
|
||||
if (first_function_block_is_cold)
|
||||
switch_to_section (text_section);
|
||||
else
|
||||
switch_to_section (function_section (decl));
|
||||
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_end_label);
|
||||
ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.hot_section_end_label);
|
||||
switch_to_section (save_text_section);
|
||||
}
|
||||
}
|
||||
|
@ -5540,8 +5540,8 @@ default_section_type_flags (tree decl, const char *name, int reloc)
|
|||
flags = 0;
|
||||
else if (current_function_decl
|
||||
&& cfun
|
||||
&& cfun->unlikely_text_section_name
|
||||
&& strcmp (name, cfun->unlikely_text_section_name) == 0)
|
||||
&& crtl->subsections.unlikely_text_section_name
|
||||
&& strcmp (name, crtl->subsections.unlikely_text_section_name) == 0)
|
||||
flags = SECTION_CODE;
|
||||
else if (!decl
|
||||
&& (!current_function_decl || !cfun)
|
||||
|
@ -6316,10 +6316,10 @@ switch_to_section (section *new_section)
|
|||
{
|
||||
case SECTION_NAMED:
|
||||
if (cfun
|
||||
&& !cfun->unlikely_text_section_name
|
||||
&& !crtl->subsections.unlikely_text_section_name
|
||||
&& strcmp (new_section->named.name,
|
||||
UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0)
|
||||
cfun->unlikely_text_section_name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME;
|
||||
crtl->subsections.unlikely_text_section_name = UNLIKELY_EXECUTED_TEXT_SECTION_NAME;
|
||||
|
||||
targetm.asm_out.named_section (new_section->named.name,
|
||||
new_section->named.common.flags,
|
||||
|
|
Loading…
Reference in New Issue