aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-02-10 06:16:53 +0000
committerAlan Modra <amodra@gcc.gnu.org>2003-02-10 16:46:53 +1030
commit546ff7777c7d980c60b8bacf194d37145f950aeb (patch)
treebfb3ef814276bfc2fba2a12c40942b1b606a89ab /gcc/calls.c
parent626098f9b9c148257d077ce829f243045e345d3b (diff)
downloadgcc-546ff7777c7d980c60b8bacf194d37145f950aeb.zip
gcc-546ff7777c7d980c60b8bacf194d37145f950aeb.tar.gz
gcc-546ff7777c7d980c60b8bacf194d37145f950aeb.tar.bz2
calls.c (try_to_integrate): Tidy stack_usage_map access.
* calls.c (try_to_integrate): Tidy stack_usage_map access. (emit_library_call_value_1): Likewise. Formatting. (store_one_arg): Likewise. From-SVN: r62622
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 31ad51c..6bec3df 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1834,9 +1834,11 @@ try_to_integrate (fndecl, actparms, target, ignore, type, structure_value_addr)
the stack before executing the inlined function if it
makes any calls. */
- for (i = reg_parm_stack_space - 1; i >= 0; i--)
- if (i < highest_outgoing_arg_in_use && stack_usage_map[i] != 0)
- break;
+ i = reg_parm_stack_space;
+ if (i > highest_outgoing_arg_in_use)
+ i = highest_outgoing_arg_in_use;
+ while (--i >= 0 && stack_usage_map[i] == 0)
+ ;
if (stack_arg_under_construction || i >= 0)
{
@@ -3727,12 +3729,12 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
{
tree type = (*lang_hooks.types.type_for_mode) (mode, 0);
- slot = gen_rtx_MEM (mode,
- expand_expr (build1 (ADDR_EXPR,
- build_pointer_type
- (type),
- make_tree (type, val)),
- NULL_RTX, VOIDmode, 0));
+ slot
+ = gen_rtx_MEM (mode,
+ expand_expr (build1 (ADDR_EXPR,
+ build_pointer_type (type),
+ make_tree (type, val)),
+ NULL_RTX, VOIDmode, 0));
}
call_fusage = gen_rtx_EXPR_LIST (VOIDmode,
@@ -3923,14 +3925,15 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
upper_bound = lower_bound + argvec[argnum].size.constant;
#endif
- for (i = lower_bound; i < upper_bound; i++)
- if (stack_usage_map[i]
- /* Don't store things in the fixed argument area at this
- point; it has already been saved. */
- && i > reg_parm_stack_space)
- break;
+ i = lower_bound;
+ /* Don't worry about things in the fixed argument area;
+ it has already been saved. */
+ if (i < reg_parm_stack_space)
+ i = reg_parm_stack_space;
+ while (i < upper_bound && stack_usage_map[i] == 0)
+ i++;
- if (i != upper_bound)
+ if (i < upper_bound)
{
/* We need to make a save area. See what mode we can make
it. */
@@ -4301,14 +4304,15 @@ store_one_arg (arg, argblock, flags, variable_size, reg_parm_stack_space)
upper_bound = lower_bound + arg->size.constant;
#endif
- for (i = lower_bound; i < upper_bound; i++)
- if (stack_usage_map[i]
- /* Don't store things in the fixed argument area at this point;
- it has already been saved. */
- && i > reg_parm_stack_space)
- break;
+ i = lower_bound;
+ /* Don't worry about things in the fixed argument area;
+ it has already been saved. */
+ if (i < reg_parm_stack_space)
+ i = reg_parm_stack_space;
+ while (i < upper_bound && stack_usage_map[i] == 0)
+ i++;
- if (i != upper_bound)
+ if (i < upper_bound)
{
/* We need to make a save area. See what mode we can make it. */
enum machine_mode save_mode