+Thu Jan 7 11:26:17 1999 Mark Mitchell <mark@markmitchell.com>
+
+ * calls.c (store_unaligned_arguments_into_pseudos): Use xmalloc to
+ allocate memory that will live beyond this function.
+ (expand_call): Free it here.
+
Thu Jan 7 03:08:17 1999 Richard Henderson <rth@cygnus.com>
* sparc.h (PREFERRED_RELOAD_CLASS): Select GENERAL_REGS for
/* If any elements in ARGS refer to parameters that are to be passed in
registers, but not in memory, and whose alignment does not permit a
direct copy into registers. Copy the values into a group of pseudos
- which we will later copy into the appropriate hard registers. */
+ which we will later copy into the appropriate hard registers.
+
+ Pseudos for each unaligned argument will be stored into the array
+ args[argnum].aligned_regs. The caller is responsible for deallocating
+ the aligned_regs array if it is nonzero. */
+
static void
store_unaligned_arguments_into_pseudos (args, num_actuals)
struct arg_data *args;
= args[i].partial ? args[i].partial
: (bytes + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD;
- args[i].aligned_regs = (rtx *) alloca (sizeof (rtx)
- * args[i].n_aligned_regs);
+ args[i].aligned_regs = (rtx *) xmalloc (sizeof (rtx)
+ * args[i].n_aligned_regs);
/* Structures smaller than a word are aligned to the least
significant byte (to the right). On a BYTES_BIG_ENDIAN machine,
pop_temp_slots ();
+ /* Free up storage we no longer need. */
+ for (i = 0; i < num_actuals; ++i)
+ if (args[i].aligned_regs)
+ free (args[i].aligned_regs);
+
return target;
}
\f