aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-09-16 19:22:39 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-09-16 19:22:39 -0400
commit0dfa4517b711f3dc98501605375462e5f3d00cba (patch)
tree24d95c10333ef5976d975a4114607c978e79ad8f /gcc
parent2c793b325101980a9ff28757fac1d8d583494479 (diff)
downloadgcc-0dfa4517b711f3dc98501605375462e5f3d00cba.zip
gcc-0dfa4517b711f3dc98501605375462e5f3d00cba.tar.gz
gcc-0dfa4517b711f3dc98501605375462e5f3d00cba.tar.bz2
(global_alloc): Mark regs assigned to SCRATCH as used by more than
just local alloc. From-SVN: r8091
Diffstat (limited to 'gcc')
-rw-r--r--gcc/global.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/global.c b/gcc/global.c
index 08a0f8a..ff86fec 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -446,6 +446,18 @@ global_alloc (file)
if (regs_ever_live[i])
local_reg_n_refs[i] = 0;
+ /* Likewise for regs used in a SCRATCH. */
+ for (i = 0; i < scratch_list_length; i++)
+ if (scratch_list[i])
+ {
+ int regno = REGNO (scratch_list[i]);
+ int lim = regno + HARD_REGNO_NREGS (regno, GET_MODE (scratch_list[i]));
+ int j;
+
+ for (j = regno; j < lim; j++)
+ local_reg_n_refs[j] = 0;
+ }
+
/* Allocate the space for the conflict and preference tables and
initialize them. */