Commit 0d1416c6 by Bernd Schmidt Committed by Bernd Schmidt

Remove second arg from assign_parms

From-SVN: r29431
parent dd42155e
Wed Sep 15 11:04:43 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* function.c (assign_parms): Delete arg SECOND_TIME. Don't test it,
behave as if it's zero in all cases.
(expand_function_start): Adjust call to assign_parms.
* tree.h (assign_parms): Adjust prototype.
* objc/objc-act.c (hack_method_prototype): Adjust call to
assign_parms.
Tue Sep 14 21:47:06 1999 Jeffrey A Law (law@cygnus.com) Tue Sep 14 21:47:06 1999 Jeffrey A Law (law@cygnus.com)
* cse.c (FIXED_BASE_PLUS_P): Do not consider referneces to * cse.c (FIXED_BASE_PLUS_P): Do not consider referneces to
......
...@@ -3878,19 +3878,11 @@ aggregate_value_p (exp) ...@@ -3878,19 +3878,11 @@ aggregate_value_p (exp)
/* Assign RTL expressions to the function's parameters. /* Assign RTL expressions to the function's parameters.
This may involve copying them into registers and using This may involve copying them into registers and using
those registers as the RTL for them. those registers as the RTL for them. */
If SECOND_TIME is non-zero it means that this function is being
called a second time. This is done by integrate.c when a function's
compilation is deferred. We need to come back here in case the
FUNCTION_ARG macro computes items needed for the rest of the compilation
(such as changing which registers are fixed or caller-saved). But suppress
writing any insns or setting DECL_RTL of anything in this case. */
void void
assign_parms (fndecl, second_time) assign_parms (fndecl)
tree fndecl; tree fndecl;
int second_time;
{ {
register tree parm; register tree parm;
register rtx entry_parm = 0; register rtx entry_parm = 0;
...@@ -3944,8 +3936,7 @@ assign_parms (fndecl, second_time) ...@@ -3944,8 +3936,7 @@ assign_parms (fndecl, second_time)
if ((ARG_POINTER_REGNUM == STACK_POINTER_REGNUM if ((ARG_POINTER_REGNUM == STACK_POINTER_REGNUM
|| ! (fixed_regs[ARG_POINTER_REGNUM] || ! (fixed_regs[ARG_POINTER_REGNUM]
|| ARG_POINTER_REGNUM == FRAME_POINTER_REGNUM)) || ARG_POINTER_REGNUM == FRAME_POINTER_REGNUM)))
&& ! second_time)
internal_arg_pointer = copy_to_reg (virtual_incoming_args_rtx); internal_arg_pointer = copy_to_reg (virtual_incoming_args_rtx);
else else
internal_arg_pointer = virtual_incoming_args_rtx; internal_arg_pointer = virtual_incoming_args_rtx;
...@@ -4093,8 +4084,7 @@ assign_parms (fndecl, second_time) ...@@ -4093,8 +4084,7 @@ assign_parms (fndecl, second_time)
if (last_named && !varargs_setup) if (last_named && !varargs_setup)
{ {
SETUP_INCOMING_VARARGS (args_so_far, promoted_mode, passed_type, SETUP_INCOMING_VARARGS (args_so_far, promoted_mode, passed_type,
current_function_pretend_args_size, current_function_pretend_args_size, 0);
second_time);
varargs_setup = 1; varargs_setup = 1;
} }
#endif #endif
...@@ -4129,25 +4119,24 @@ assign_parms (fndecl, second_time) ...@@ -4129,25 +4119,24 @@ assign_parms (fndecl, second_time)
#endif #endif
fndecl, &stack_args_size, &stack_offset, &arg_size); fndecl, &stack_args_size, &stack_offset, &arg_size);
if (! second_time) {
{ rtx offset_rtx = ARGS_SIZE_RTX (stack_offset);
rtx offset_rtx = ARGS_SIZE_RTX (stack_offset);
if (offset_rtx == const0_rtx)
if (offset_rtx == const0_rtx) stack_parm = gen_rtx_MEM (promoted_mode, internal_arg_pointer);
stack_parm = gen_rtx_MEM (promoted_mode, internal_arg_pointer); else
else stack_parm = gen_rtx_MEM (promoted_mode,
stack_parm = gen_rtx_MEM (promoted_mode, gen_rtx_PLUS (Pmode,
gen_rtx_PLUS (Pmode, internal_arg_pointer,
internal_arg_pointer, offset_rtx));
offset_rtx));
/* If this is a memory ref that contains aggregate components,
/* If this is a memory ref that contains aggregate components, mark it as such for cse and loop optimize. Likewise if it
mark it as such for cse and loop optimize. Likewise if it is readonly. */
is readonly. */ MEM_SET_IN_STRUCT_P (stack_parm, aggregate);
MEM_SET_IN_STRUCT_P (stack_parm, aggregate); RTX_UNCHANGING_P (stack_parm) = TREE_READONLY (parm);
RTX_UNCHANGING_P (stack_parm) = TREE_READONLY (parm); MEM_ALIAS_SET (stack_parm) = get_alias_set (parm);
MEM_ALIAS_SET (stack_parm) = get_alias_set (parm); }
}
/* If this parameter was passed both in registers and in the stack, /* If this parameter was passed both in registers and in the stack,
use the copy on the stack. */ use the copy on the stack. */
...@@ -4175,20 +4164,18 @@ assign_parms (fndecl, second_time) ...@@ -4175,20 +4164,18 @@ assign_parms (fndecl, second_time)
/ (PARM_BOUNDARY / BITS_PER_UNIT) / (PARM_BOUNDARY / BITS_PER_UNIT)
* (PARM_BOUNDARY / BITS_PER_UNIT)); * (PARM_BOUNDARY / BITS_PER_UNIT));
if (! second_time) /* Handle calls that pass values in multiple non-contiguous
{ locations. The Irix 6 ABI has examples of this. */
/* Handle calls that pass values in multiple non-contiguous if (GET_CODE (entry_parm) == PARALLEL)
locations. The Irix 6 ABI has examples of this. */ emit_group_store (validize_mem (stack_parm), entry_parm,
if (GET_CODE (entry_parm) == PARALLEL) int_size_in_bytes (TREE_TYPE (parm)),
emit_group_store (validize_mem (stack_parm), entry_parm, (TYPE_ALIGN (TREE_TYPE (parm))
int_size_in_bytes (TREE_TYPE (parm)), / BITS_PER_UNIT));
(TYPE_ALIGN (TREE_TYPE (parm)) else
/ BITS_PER_UNIT)); move_block_from_reg (REGNO (entry_parm),
else validize_mem (stack_parm), nregs,
move_block_from_reg (REGNO (entry_parm), int_size_in_bytes (TREE_TYPE (parm)));
validize_mem (stack_parm), nregs,
int_size_in_bytes (TREE_TYPE (parm)));
}
entry_parm = stack_parm; entry_parm = stack_parm;
} }
} }
...@@ -4200,8 +4187,7 @@ assign_parms (fndecl, second_time) ...@@ -4200,8 +4187,7 @@ assign_parms (fndecl, second_time)
entry_parm = stack_parm; entry_parm = stack_parm;
/* Record permanently how this parm was passed. */ /* Record permanently how this parm was passed. */
if (! second_time) DECL_INCOMING_RTL (parm) = entry_parm;
DECL_INCOMING_RTL (parm) = entry_parm;
/* If there is actually space on the stack for this parm, /* If there is actually space on the stack for this parm,
count it in stack_args_size; otherwise set stack_parm to 0 count it in stack_args_size; otherwise set stack_parm to 0
...@@ -4237,10 +4223,6 @@ assign_parms (fndecl, second_time) ...@@ -4237,10 +4223,6 @@ assign_parms (fndecl, second_time)
FUNCTION_ARG_ADVANCE (args_so_far, promoted_mode, FUNCTION_ARG_ADVANCE (args_so_far, promoted_mode,
passed_type, named_arg); passed_type, named_arg);
/* If this is our second time through, we are done with this parm. */
if (second_time)
continue;
/* If we can't trust the parm stack slot to be aligned enough /* If we can't trust the parm stack slot to be aligned enough
for its ultimate type, don't use that slot after entry. for its ultimate type, don't use that slot after entry.
We'll make another stack slot, if we need one. */ We'll make another stack slot, if we need one. */
...@@ -5880,7 +5862,7 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -5880,7 +5862,7 @@ expand_function_start (subr, parms_have_cleanups)
/* Initialize rtx for parameters and local variables. /* Initialize rtx for parameters and local variables.
In some cases this requires emitting insns. */ In some cases this requires emitting insns. */
assign_parms (subr, 0); assign_parms (subr);
/* Copy the static chain now if it wasn't a register. The delay is to /* Copy the static chain now if it wasn't a register. The delay is to
avoid conflicts with the parameter passing registers. */ avoid conflicts with the parameter passing registers. */
......
...@@ -3087,7 +3087,7 @@ hack_method_prototype (nst_methods, tmp_decl) ...@@ -3087,7 +3087,7 @@ hack_method_prototype (nst_methods, tmp_decl)
init_function_start (tmp_decl, "objc-act", 0); init_function_start (tmp_decl, "objc-act", 0);
/* Typically called from expand_function_start for function definitions. */ /* Typically called from expand_function_start for function definitions. */
assign_parms (tmp_decl, 0); assign_parms (tmp_decl);
/* install return type */ /* install return type */
TREE_TYPE (TREE_TYPE (tmp_decl)) = groktypename (TREE_TYPE (nst_methods)); TREE_TYPE (TREE_TYPE (tmp_decl)) = groktypename (TREE_TYPE (nst_methods));
......
...@@ -2306,7 +2306,7 @@ extern void init_dummy_function_start PROTO ((void)); ...@@ -2306,7 +2306,7 @@ extern void init_dummy_function_start PROTO ((void));
extern void expand_dummy_function_end PROTO ((void)); extern void expand_dummy_function_end PROTO ((void));
extern void init_function_for_compilation PROTO ((void)); extern void init_function_for_compilation PROTO ((void));
extern void init_function_start PROTO ((tree, char *, int)); extern void init_function_start PROTO ((tree, char *, int));
extern void assign_parms PROTO ((tree, int)); extern void assign_parms PROTO ((tree));
extern void put_var_into_stack PROTO ((tree)); extern void put_var_into_stack PROTO ((tree));
extern void uninitialized_vars_warning PROTO ((tree)); extern void uninitialized_vars_warning PROTO ((tree));
extern void setjmp_args_warning PROTO ((void)); extern void setjmp_args_warning PROTO ((void));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment