diff options
Diffstat (limited to 'gcc/config')
58 files changed, 308 insertions, 308 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 9e650b9..02d3b68 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -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 (); } diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index b0019bf2..5f2431e 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -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. */ diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index ca862bb..768ff38 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -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) diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index 5bd16e7..b2fb213 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -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 diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 5b2e7b8..7b7d580 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -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); diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 17412fc..06aa403 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -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 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 43a3078..78aac13 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -1653,7 +1653,7 @@ use_return_insn (int iscond, rtx sibling) stack_adjust = offsets->outgoing_args - offsets->saved_regs; /* As do variadic functions. */ - if (current_function_pretend_args_size + if (crtl->args.pretend_args_size || cfun->machine->uses_anonymous_args /* Or if the function calls __builtin_eh_return () */ || current_function_calls_eh_return @@ -3544,15 +3544,15 @@ thumb_find_work_register (unsigned long pushed_regs_mask) the variable argument list and so we can be sure that it will be pushed right at the start of the function. Hence it will be available for the rest of the prologue. - (*): ie current_function_pretend_args_size is greater than 0. */ + (*): ie crtl->args.pretend_args_size is greater than 0. */ if (cfun->machine->uses_anonymous_args - && current_function_pretend_args_size > 0) + && crtl->args.pretend_args_size > 0) return LAST_ARG_REGNUM; /* The other case is when we have fixed arguments but less than 4 registers worth. In this case r3 might be used in the body of the function, but it is not being used to convey an argument into the function. In theory - we could just check current_function_args_size to see how many bytes are + we could just check crtl->args.size to see how many bytes are being passed in argument registers, but it seems that it is unreliable. Sometimes it will have the value 0 when in fact arguments are being passed. (See testcase execute/20021111-1.c for an example). So we also @@ -3562,8 +3562,8 @@ thumb_find_work_register (unsigned long pushed_regs_mask) when a function has an unused argument in r3. But it is better to be safe than to be sorry. */ if (! cfun->machine->uses_anonymous_args - && current_function_args_size >= 0 - && current_function_args_size <= (LAST_ARG_REGNUM * UNITS_PER_WORD) + && crtl->args.size >= 0 + && crtl->args.size <= (LAST_ARG_REGNUM * UNITS_PER_WORD) && cfun->args_info.nregs < 4) return LAST_ARG_REGNUM; @@ -10833,7 +10833,7 @@ arm_compute_save_reg_mask (void) if (TARGET_REALLY_IWMMXT && ((bit_count (save_reg_mask) - + ARM_NUM_INTS (current_function_pretend_args_size)) % 2) != 0) + + ARM_NUM_INTS (crtl->args.pretend_args_size)) % 2) != 0) { /* The total number of registers that are going to be pushed onto the stack is odd. We need to ensure that the stack @@ -11258,8 +11258,8 @@ arm_output_function_prologue (FILE *f, HOST_WIDE_INT frame_size) asm_fprintf (f, "\t%@ Stack Align: May be called with mis-aligned SP.\n"); asm_fprintf (f, "\t%@ args = %d, pretend = %d, frame = %wd\n", - current_function_args_size, - current_function_pretend_args_size, frame_size); + crtl->args.size, + crtl->args.pretend_args_size, frame_size); asm_fprintf (f, "\t%@ frame_needed = %d, uses_anonymous_args = %d\n", frame_pointer_needed, @@ -11626,7 +11626,7 @@ arm_output_epilogue (rtx sibling) && (TARGET_ARM || ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL) && !IS_STACKALIGN (func_type) && really_return - && current_function_pretend_args_size == 0 + && crtl->args.pretend_args_size == 0 && saved_regs_mask & (1 << LR_REGNUM) && !current_function_calls_eh_return) { @@ -11661,11 +11661,11 @@ arm_output_epilogue (rtx sibling) print_multi_reg (f, "pop\t", SP_REGNUM, saved_regs_mask, 0); } - if (current_function_pretend_args_size) + if (crtl->args.pretend_args_size) { /* Unwind the pre-pushed regs. */ operands[0] = operands[1] = stack_pointer_rtx; - operands[2] = GEN_INT (current_function_pretend_args_size); + operands[2] = GEN_INT (crtl->args.pretend_args_size); output_add_immediate (operands); } } @@ -11890,8 +11890,8 @@ arm_size_return_regs (void) { enum machine_mode mode; - if (current_function_return_rtx != 0) - mode = GET_MODE (current_function_return_rtx); + if (crtl->return_rtx != 0) + mode = GET_MODE (crtl->return_rtx); else mode = DECL_MODE (DECL_RESULT (current_function_decl)); @@ -12050,7 +12050,7 @@ arm_get_frame_offsets (void) leaf = leaf_function_p (); /* Space for variadic functions. */ - offsets->saved_args = current_function_pretend_args_size; + offsets->saved_args = crtl->args.pretend_args_size; /* In Thumb mode this is incorrect, but never used. */ offsets->frame = offsets->saved_args + (frame_pointer_needed ? 4 : 0); @@ -12119,7 +12119,7 @@ arm_get_frame_offsets (void) /* Try to align stack by pushing an extra reg. Don't bother doing this when there is a stack frame as the alignment will be rolled into the normal stack adjustment. */ - if (frame_size + current_function_outgoing_args_size == 0) + if (frame_size + crtl->outgoing_args_size == 0) { int reg = -1; @@ -12150,7 +12150,7 @@ arm_get_frame_offsets (void) offsets->locals_base = offsets->soft_frame + frame_size; offsets->outgoing_args = (offsets->locals_base - + current_function_outgoing_args_size); + + crtl->outgoing_args_size); if (ARM_DOUBLEWORD_ALIGN) { @@ -12399,7 +12399,7 @@ arm_expand_prologue (void) return; /* Make a copy of c_f_p_a_s as we may need to modify it locally. */ - args_to_push = current_function_pretend_args_size; + args_to_push = crtl->args.pretend_args_size; /* Compute which register we will have to save onto the stack. */ offsets = arm_get_frame_offsets (); @@ -12599,7 +12599,7 @@ arm_expand_prologue (void) if (!df_regs_ever_live_p (3) || saved_pretend_args) insn = gen_rtx_REG (SImode, 3); - else /* if (current_function_pretend_args_size == 0) */ + else /* if (crtl->args.pretend_args_size == 0) */ { insn = plus_constant (hard_frame_pointer_rtx, 4); insn = gen_frame_mem (SImode, insn); @@ -16288,8 +16288,8 @@ thumb_exit (FILE *f, int reg_containing_return_addr) ever used in the function, not just if the register is used to hold a return value. */ - if (current_function_return_rtx != 0) - mode = GET_MODE (current_function_return_rtx); + if (crtl->return_rtx != 0) + mode = GET_MODE (crtl->return_rtx); else mode = DECL_MODE (DECL_RESULT (current_function_decl)); @@ -16705,7 +16705,7 @@ thumb_unexpanded_epilogue (void) had_to_push_lr = (live_regs_mask & (1 << LR_REGNUM)) != 0; live_regs_mask &= 0xff; - if (current_function_pretend_args_size == 0 || TARGET_BACKTRACE) + if (crtl->args.pretend_args_size == 0 || TARGET_BACKTRACE) { /* Pop the return address into the PC. */ if (had_to_push_lr) @@ -16762,7 +16762,7 @@ thumb_unexpanded_epilogue (void) /* Remove the argument registers that were pushed onto the stack. */ asm_fprintf (asm_out_file, "\tadd\t%r, %r, #%d\n", SP_REGNUM, SP_REGNUM, - current_function_pretend_args_size); + crtl->args.pretend_args_size); thumb_exit (asm_out_file, regno); } @@ -17105,12 +17105,12 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED) asm_fprintf (f, "%s%U%s:\n", STUB_NAME, name); } - if (current_function_pretend_args_size) + if (crtl->args.pretend_args_size) { /* Output unwind directive for the stack adjustment. */ if (ARM_EABI_UNWIND_TABLES) fprintf (f, "\t.pad #%d\n", - current_function_pretend_args_size); + crtl->args.pretend_args_size); if (cfun->machine->uses_anonymous_args) { @@ -17118,7 +17118,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED) fprintf (f, "\tpush\t{"); - num_pushes = ARM_NUM_INTS (current_function_pretend_args_size); + num_pushes = ARM_NUM_INTS (crtl->args.pretend_args_size); for (regno = LAST_ARG_REGNUM + 1 - num_pushes; regno <= LAST_ARG_REGNUM; @@ -17131,7 +17131,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED) else asm_fprintf (f, "\tsub\t%r, %r, #%d\n", SP_REGNUM, SP_REGNUM, - current_function_pretend_args_size); + crtl->args.pretend_args_size); /* We don't need to record the stores for unwinding (would it help the debugger any if we did?), but record the change in @@ -17140,7 +17140,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED) { char *l = dwarf2out_cfi_label (); - cfa_offset = cfa_offset + current_function_pretend_args_size; + cfa_offset = cfa_offset + crtl->args.pretend_args_size; dwarf2out_def_cfa (l, SP_REGNUM, cfa_offset); } } @@ -17202,7 +17202,7 @@ thumb1_output_function_prologue (FILE *f, HOST_WIDE_INT size ATTRIBUTE_UNUSED) offset = 0; asm_fprintf (f, "\tadd\t%r, %r, #%d\n", work_register, SP_REGNUM, - offset + 16 + current_function_pretend_args_size); + offset + 16 + crtl->args.pretend_args_size); asm_fprintf (f, "\tstr\t%r, [%r, #%d]\n", work_register, SP_REGNUM, offset + 4); diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 3901768..a340441 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1409,7 +1409,7 @@ do { \ couldn't convert a direct call into an indirect one. */ #define CALLER_INTERWORKING_SLOT_SIZE \ (TARGET_CALLER_INTERWORKING \ - && current_function_outgoing_args_size != 0 \ + && crtl->outgoing_args_size != 0 \ ? UNITS_PER_WORD : 0) /* Offset within stack frame to start allocating local variables at. @@ -1426,7 +1426,7 @@ do { \ /* Define this if the maximum size of all the outgoing args is to be accumulated and pushed during the prologue. The amount can be - found in the variable current_function_outgoing_args_size. */ + found in the variable crtl->outgoing_args_size. */ #define ACCUMULATE_OUTGOING_ARGS 1 /* Offset of first parameter from the argument pointer register value. */ diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 3101ae6..c440729 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -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); } diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index f50c09f..cc558d7 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -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; } diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index d9b2762..33ab81d 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -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. diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index ba572eb..85a944b 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -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 diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c index 5be938b..9e8c3a9 100644 --- a/gcc/config/crx/crx.c +++ b/gcc/config/crx/crx.c @@ -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 (); } diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c index 8c52356..78f7775 100644 --- a/gcc/config/fr30/fr30.c +++ b/gcc/config/fr30/fr30.c @@ -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; diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h index 7a39a11..0f7592d 100644 --- a/gcc/config/fr30/fr30.h +++ b/gcc/config/fr30/fr30.h @@ -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. diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index feb88d5..6c86ef5 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -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. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 59d06c4..6fcbe66 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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); diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index faf0a18..bb6fa18 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -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. */ diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index ce5722a..10f172e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -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; } diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index ceda883..0658b53 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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 diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index a4306e8..60934f2 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -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 diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 7a31b47..1baf6eb 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -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; diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h index f7beb54..cdbf5a2 100644 --- a/gcc/config/iq2000/iq2000.h +++ b/gcc/config/iq2000/iq2000.h @@ -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 */ diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 1edd659..ea4e7f8 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -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; diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index 51e8414..d1ac1c8 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -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 diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 0232eda..83b73b2 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -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; diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md index 996f8d7..8a7a5d0 100644 --- a/gcc/config/m68hc11/m68hc11.md +++ b/gcc/config/m68hc11/m68hc11.md @@ -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\"; diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index c3f3138..523b039 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -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 diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index 4bf895c..d9d3398 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -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; diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h index 5e14410..7ea9ac4 100644 --- a/gcc/config/mcore/mcore.h +++ b/gcc/config/mcore/mcore.h @@ -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 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 861a308..b9c4950 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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. */ diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 3bc9dfe..3a0e58c 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -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) diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index fa6566b..3a40843 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -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 diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 0d2ae38..1effca3 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -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)); } diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index c9540b8..7f34986 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -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)); diff --git a/gcc/config/mt/mt.c b/gcc/config/mt/mt.c index 9e281a1..272e028 100644 --- a/gcc/config/mt/mt.c +++ b/gcc/config/mt/mt.c @@ -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; diff --git a/gcc/config/mt/mt.h b/gcc/config/mt/mt.h index 74f8d01..67a8185 100644 --- a/gcc/config/mt/mt.h +++ b/gcc/config/mt/mt.h @@ -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 diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 8076c40..3fff521 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -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)); } diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 07f675e..48e595a 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -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.\ diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 9487afa..2aca58d 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -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, diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index f6c9ee3..9479fc3 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -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 */ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9734c4e..eda6df0 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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 diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 7f7dd57..62f1d38 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -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 diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 280358c..f2a1947 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -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", diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 391ac1c..9cba97e 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -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 diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h index 8a1efb6..ffb5af8 100644 --- a/gcc/config/score/score.h +++ b/gcc/config/score/score.h @@ -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 diff --git a/gcc/config/score/score3.c b/gcc/config/score/score3.c index 592f5f5..1399bee 100644 --- a/gcc/config/score/score3.c +++ b/gcc/config/score/score3.c @@ -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) diff --git a/gcc/config/score/score7.c b/gcc/config/score/score7.c index 3c16b0d..2796e2e 100644 --- a/gcc/config/score/score7.c +++ b/gcc/config/score/score7.c @@ -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; diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 6013c2a..d020ccd 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -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); diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 773c347..cfcf1b2 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -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")]) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 54c81b1..962ed9f 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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; diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index d1c607c..eed0164 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -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 \ diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 4592e66..8096b6fe 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -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; diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 078b367..99aea1c 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -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); } diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 85991db..c99841a 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -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 ()); diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index f7bb17f..50119c2 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -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 \ diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 2518aed..a5ca463 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -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++) diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index 60fc785..b78b25f 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -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 |