aboutsummaryrefslogtreecommitdiff
path: root/gcc/local-alloc.c
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>1998-09-30 18:09:47 +0000
committerJeff Law <law@gcc.gnu.org>1998-09-30 12:09:47 -0600
commit1e326708e83b2e03807c689f14ed3772cd346efc (patch)
tree4cad448709fc0bd1befbe6fec3245d112509581d /gcc/local-alloc.c
parentb8c08e043a09a5e0ccb342bc89ffe5d39d206635 (diff)
downloadgcc-1e326708e83b2e03807c689f14ed3772cd346efc.zip
gcc-1e326708e83b2e03807c689f14ed3772cd346efc.tar.gz
gcc-1e326708e83b2e03807c689f14ed3772cd346efc.tar.bz2
regs.h (HARD_REGNO_CALL_PART_CLOBBERED): New macro.
* regs.h (HARD_REGNO_CALL_PART_CLOBBERED): New macro. * local-alloc.c (find_free_reg): Use it. * global.c (find_reg): Likewise. * tm.texi: Document HARD_REGNO_CALL_PART_CLOBBERED. From-SVN: r22688
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r--gcc/local-alloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 5dbde52..3049a98 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -2043,7 +2043,10 @@ find_free_reg (class, mode, qty, accept_call_clobbered, just_try_suggested,
int regno = i;
#endif
if (! TEST_HARD_REG_BIT (first_used, regno)
- && HARD_REGNO_MODE_OK (regno, mode))
+ && HARD_REGNO_MODE_OK (regno, mode)
+ && (qty_n_calls_crossed[qty] == 0
+ || accept_call_clobbered
+ || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)))
{
register int j;
register int size1 = HARD_REGNO_NREGS (regno, mode);