* caller-save.c (init_caller_save): Use it.
* tm.texi: Document HARD_REGNO_CALLER_SAVE_MODE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22682
138bc75d-0d04-0410-961f-
82ee72b054a4
-Wed Sep 30 12:57:30 1998Zack Weinberg <zack@rabi.phys.columbia.edu>
+Wed Sep 30 18:19:27 1998 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * regs.h (HARD_REGNO_CALLER_SAVE_MODE): New macro.
+ * caller-save.c (init_caller_save): Use it.
+ * tm.texi: Document HARD_REGNO_CALLER_SAVE_MODE.
+
+Wed Sep 30 12:57:30 1998 Zack Weinberg <zack@rabi.phys.columbia.edu>
* configure.in: Add --enable-cpplib option which uses cpplib
for cpp, but doesn't link cpplib into cc1. Make help text
{
for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++)
{
- regno_save_mode[i][j] = choose_hard_reg_mode (i, j);
+ regno_save_mode[i][j] = HARD_REGNO_CALLER_SAVE_MODE (i, j);
if (regno_save_mode[i][j] == VOIDmode && j == 1)
{
call_fixed_regs[i] = 1;
#define CLASS_LIKELY_SPILLED_P(CLASS) (reg_class_size[(int) (CLASS)] == 1)
#endif
+/* Select a register mode required for caller save of hard regno REGNO. */
+#ifndef HARD_REGNO_CALLER_SAVE_MODE
+#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS) \
+ choose_hard_reg_mode (REGNO, NREGS)
+#endif
+
/* Allocated in local_alloc. */
/* A list of SCRATCH rtl allocated by local-alloc. */
If you don't define this macro, a default is used which is good on most
machines: @code{4 * @var{calls} < @var{refs}}.
+
+@findex HARD_REGNO_CALLER_SAVE_MODE
+@item HARD_REGNO_CALLER_SAVE_MODE (@var{regno}, @var{nregs})
+A C expression specifying which mode is required for saving @var{nregs}
+of a pseudo-register in call-clobbered hard register @var{regno}. If
+@var{regno} is unsuitable for caller save, @code{VOIDmode} should be
+returned. For most machines this macro need not be defined since GCC
+will select the smallest suitable mode.
@end table
@node Function Entry