+Mon Jul 17 08:26:35 2000 Clinton Popetz <cpopetz@cygnus.com>
+
+ * mips.c (mips_expand_prologue): Don't calculate the last
+ argument register unless we need it. When we are calculating
+ this, make sure FUNCTION_ARG is giving us a REG.
+
2000-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* flow.c (libcall_dead_p): Use single_set to verify the insn
2000-07-17 Mark Klein <mklein@dis.com>
+
* pa.c (emit_hpdiv_const): Update to match new pattern for udivsi3.
2000-07-17 J. David Anglin <dave@hiauly1.hia.nrc.ca>
tree cur_arg;
CUMULATIVE_ARGS args_so_far;
rtx reg_18_save = NULL_RTX;
+ int store_args_on_stack = (mips_abi == ABI_32 || mips_abi == ABI_O64)
+ && (! mips_entry || mips_can_use_return_insn ());
/* If struct value address is treated as the first argument, make it so. */
if (aggregate_value_p (DECL_RESULT (fndecl))
of the first argument in the variable part of the argument list,
otherwise GP_ARG_LAST+1. Note also if the last argument is
the varargs special argument, and treat it as part of the
- variable arguments. */
+ variable arguments.
+
+ This is only needed if store_args_on_stack is true. */
INIT_CUMULATIVE_ARGS (args_so_far, fntype, NULL_RTX, 0);
regno = GP_ARG_FIRST;
FUNCTION_ARG_ADVANCE (args_so_far, passed_mode, passed_type, 1);
next_arg = TREE_CHAIN (cur_arg);
- if (entry_parm)
+ if (entry_parm && store_args_on_stack)
{
if (next_arg == 0
&& DECL_NAME (cur_arg)
else
{
int words;
-
+
+ if (GET_CODE (entry_parm) != REG)
+ abort ();
+
/* passed in a register, so will get homed automatically */
if (GET_MODE (entry_parm) == BLKmode)
words = (int_size_in_bytes (passed_type) + 3) / 4;
/* If this function is a varargs function, store any registers that
would normally hold arguments ($4 - $7) on the stack. */
- if ((mips_abi == ABI_32 || mips_abi == ABI_O64)
- && (! mips_entry || mips_can_use_return_insn ())
+ if (store_args_on_stack
&& ((TYPE_ARG_TYPES (fntype) != 0
&& (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
!= void_type_node))