summaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2001-08-01 21:40:43 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2001-08-01 21:40:43 +0000
commitfc1296b77aae81ca5df45cd699c23e80b6e5e1fd (patch)
tree12aceb7d22a94c9c2c37a7ffda9fa08b77c49f3b /gcc/regclass.c
parentb38b083acf3d71c9a05858a5e5d9bde14ee7e9ef (diff)
downloadgcc-fc1296b77aae81ca5df45cd699c23e80b6e5e1fd.tar.gz
regclass.c (call_really_used_regs): New array for registers which are actually used by a call.
2001-08-01 Andrew MacLeod <amacleod@redhat.com> * regclass.c (call_really_used_regs): New array for registers which are actually used by a call. (init_reg_sets_1): Initialize regs_invalidated_by_call with the new array. (fix_register): Set call_really_used too. * config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): Initialize. * doc/tm.texi (CALL_REALLY_USED_REGISTERS): Document. From-SVN: r44558
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index b16a677d805..9d1fe55b4b5 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -94,6 +94,18 @@ HARD_REG_SET losing_caller_save_reg_set;
/* Data for initializing the above. */
static char initial_call_used_regs[] = CALL_USED_REGISTERS;
+
+/* This is much like call_used_regs, except it doesn't have to
+ be a superset of FIXED_REGISTERS. This vector indicates
+ what is really call clobbered, and is used when defining
+ regs_invalidated_by_call. */
+
+char call_really_used_regs[] =
+#ifdef CALL_REALLY_USED_REGISTERS
+ CALL_REALLY_USED_REGISTERS;
+#else
+ CALL_USED_REGISTERS;
+#endif
/* Indexed by hard register number, contains 1 for registers that are
fixed use or call used registers that cannot hold quantities across
@@ -464,7 +476,7 @@ init_reg_sets_1 ()
else if (i == PIC_OFFSET_TABLE_REGNUM && flag_pic)
;
#endif
- else if (call_used_regs[i] || global_regs[i])
+ else if (call_really_used_regs[i] || global_regs[i])
SET_HARD_REG_BIT (regs_invalidated_by_call, i);
}
@@ -747,6 +759,8 @@ fix_register (name, fixed, call_used)
{
fixed_regs[i] = fixed;
call_used_regs[i] = call_used;
+ if (fixed == 0)
+ call_really_used_regs[i] = call_used;
}
}
else