diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-22 21:33:45 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-22 21:33:45 +0000 |
commit | 63c68695947927f83f1182fb22cb6a272780e1d3 (patch) | |
tree | ace680a722a0e53efec5b1c5ed875f52981efc95 /gcc/calls.c | |
parent | 016bf95b03b216fabbba5c041db848f8b5b841df (diff) | |
download | gcc-63c68695947927f83f1182fb22cb6a272780e1d3.tar.gz |
* defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
* calls.c (compute_argument_block_size, expand_call,
emit_library_call_value_1): Don't ifdef OUTGOING_REG_PARM_STACK_SPACE.
* expr.c (block_move_libcall_safe_for_call_parm): Likewise.
* function.c (STACK_DYNAMIC_OFFSET): Likewise.
* doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Update.
* config/alpha/unicosmk.h, config/bfin/bfin.h, config/iq2000/iq2000.h,
config/mips/mips.h, config/mn10300/mn10300.h, config/mt/mt.h,
config/pa/pa.h, config/rs6000/rs6000.h, config/score/score.h,
config/spu/spu.h, config/v850/v850.h (OUTGOING_REG_PARM_STACK_SPACE):
Set to 1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123135 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 8723e1f4fae..9ef3b0ed125 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1222,13 +1222,12 @@ compute_argument_block_size (int reg_parm_stack_space, = size_binop (MAX_EXPR, args_size->var, ssize_int (reg_parm_stack_space)); -#ifndef OUTGOING_REG_PARM_STACK_SPACE /* The area corresponding to register parameters is not to count in the size of the block we need. So make the adjustment. */ - args_size->var - = size_binop (MINUS_EXPR, args_size->var, - ssize_int (reg_parm_stack_space)); -#endif + if (!OUTGOING_REG_PARM_STACK_SPACE) + args_size->var + = size_binop (MINUS_EXPR, args_size->var, + ssize_int (reg_parm_stack_space)); } } else @@ -1246,9 +1245,8 @@ compute_argument_block_size (int reg_parm_stack_space, args_size->constant = MAX (args_size->constant, reg_parm_stack_space); -#ifndef OUTGOING_REG_PARM_STACK_SPACE - args_size->constant -= reg_parm_stack_space; -#endif + if (!OUTGOING_REG_PARM_STACK_SPACE) + args_size->constant -= reg_parm_stack_space; } return unadjusted_args_size; } @@ -2026,10 +2024,8 @@ expand_call (tree exp, rtx target, int ignore) reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl); #endif -#ifndef OUTGOING_REG_PARM_STACK_SPACE - if (reg_parm_stack_space > 0 && PUSH_ARGS) + if (!OUTGOING_REG_PARM_STACK_SPACE && reg_parm_stack_space > 0 && PUSH_ARGS) must_preallocate = 1; -#endif /* Set up a place to return a structure. */ @@ -2430,12 +2426,11 @@ expand_call (tree exp, rtx target, int ignore) Another approach might be to try to reorder the argument evaluations to avoid this conflicting stack usage. */ -#ifndef OUTGOING_REG_PARM_STACK_SPACE /* Since we will be writing into the entire argument area, the map must be allocated for its entire size, not just the part that is the responsibility of the caller. */ - needed += reg_parm_stack_space; -#endif + if (!OUTGOING_REG_PARM_STACK_SPACE) + needed += reg_parm_stack_space; #ifdef ARGS_GROW_DOWNWARD highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use, @@ -2531,12 +2526,10 @@ expand_call (tree exp, rtx target, int ignore) an argument. */ if (stack_arg_under_construction) { -#ifndef OUTGOING_REG_PARM_STACK_SPACE - rtx push_size = GEN_INT (reg_parm_stack_space - + adjusted_args_size.constant); -#else - rtx push_size = GEN_INT (adjusted_args_size.constant); -#endif + rtx push_size + = GEN_INT (adjusted_args_size.constant + + (OUTGOING_REG_PARM_STACK_SPACE ? 0 + : reg_parm_stack_space)); if (old_stack_level == 0) { emit_stack_save (SAVE_BLOCK, &old_stack_level, @@ -2706,11 +2699,9 @@ expand_call (tree exp, rtx target, int ignore) /* If register arguments require space on the stack and stack space was not preallocated, allocate stack space here for arguments passed in registers. */ -#ifdef OUTGOING_REG_PARM_STACK_SPACE - if (!ACCUMULATE_OUTGOING_ARGS + if (OUTGOING_REG_PARM_STACK_SPACE && !ACCUMULATE_OUTGOING_ARGS && must_preallocate == 0 && reg_parm_stack_space > 0) anti_adjust_stack (GEN_INT (reg_parm_stack_space)); -#endif /* Pass the function the address in which to return a structure value. */ @@ -3532,9 +3523,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, args_size.constant = MAX (args_size.constant, reg_parm_stack_space); -#ifndef OUTGOING_REG_PARM_STACK_SPACE - args_size.constant -= reg_parm_stack_space; -#endif + 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; @@ -3555,12 +3545,11 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, needed = args_size.constant; -#ifndef OUTGOING_REG_PARM_STACK_SPACE /* Since we will be writing into the entire argument area, the map must be allocated for its entire size, not just the part that is the responsibility of the caller. */ - needed += reg_parm_stack_space; -#endif + if (!OUTGOING_REG_PARM_STACK_SPACE) + needed += reg_parm_stack_space; #ifdef ARGS_GROW_DOWNWARD highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use, |