From 0dfa4517b711f3dc98501605375462e5f3d00cba Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 16 Sep 1994 19:22:39 -0400 Subject: [PATCH] (global_alloc): Mark regs assigned to SCRATCH as used by more than just local alloc. From-SVN: r8091 --- gcc/global.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/global.c b/gcc/global.c index 08a0f8a1e6d..ff86feca1f1 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. */