aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-09-30 11:21:12 -0600
committerJeff Law <law@gcc.gnu.org>1998-09-30 11:21:12 -0600
commit8d5c8167c956bc0d26fcd320e5eecbc2d376dcfe (patch)
tree93f07283cba47ba79d733a55522f62a33876cd47 /gcc
parent5ae4c799f27dd83933a7c5fe7aa1f154463ddea6 (diff)
downloadgcc-8d5c8167c956bc0d26fcd320e5eecbc2d376dcfe.zip
gcc-8d5c8167c956bc0d26fcd320e5eecbc2d376dcfe.tar.gz
gcc-8d5c8167c956bc0d26fcd320e5eecbc2d376dcfe.tar.bz2
regs.h (HARD_REGNO_CALLER_SAVE_MODE): New macro.
* 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. From-SVN: r22682
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/caller-save.c2
-rw-r--r--gcc/regs.h6
-rw-r--r--gcc/tm.texi8
4 files changed, 22 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 48e72c0..5e224d7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,10 @@
-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
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 4a2deb6..60011f7 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -115,7 +115,7 @@ init_caller_save ()
{
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;
diff --git a/gcc/regs.h b/gcc/regs.h
index e248665..02bdf92 100644
--- a/gcc/regs.h
+++ b/gcc/regs.h
@@ -211,6 +211,12 @@ extern int caller_save_needed;
#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. */
diff --git a/gcc/tm.texi b/gcc/tm.texi
index ea3e8b3..a42eb67 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -3174,6 +3174,14 @@ this is worth doing, and 0 otherwise.
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