diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 13 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15df443..8a84e12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-03-31 Segher Boessenkool <segher@koffie.nl> + + PR target/10177 + * config/rs6000/rs6000.h (HARD_REGNO_RENAME_OK): New. + * config/rs6000/rs6000.c (compute_vrsave_mask): Don't mark + all call-clobbered registers as used. + 2003-03-31 Michael Matz <matz@suse.de> * cppexp.c (cpp_classify_number): Accept '.' after "0x". diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ff3f940..b910520 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9021,19 +9021,6 @@ compute_vrsave_mask () if (mask == 0) return mask; - /* Next, add all registers that are call-clobbered. We do this - because post-reload register optimizers such as regrename_optimize - may choose to use them. They never change the register class - chosen by reload, so cannot create new uses of altivec registers - if there were none before, so the early exit above is safe. */ - /* ??? Alternately, we could define HARD_REGNO_RENAME_OK to disallow - altivec registers not saved in the mask, which might well make the - adjustments below more effective in eliding the save/restore of - VRSAVE in small functions. */ - for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) - if (call_used_regs[i]) - mask |= ALTIVEC_REG_BIT (i); - /* Next, remove the argument registers from the set. These must be in the VRSAVE mask set by the caller, so we don't need to add them in again. More importantly, the mask we compute here is diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 58d5d5b..b13c403 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -961,6 +961,12 @@ extern int rs6000_default_long_calls; ? ALTIVEC_VECTOR_MODE (MODE1) \ : 1) +/* Post-reload, we can't use any new AltiVec registers, as we already + emitted the vrsave mask. */ + +#define HARD_REGNO_RENAME_OK(SRC, DST) \ + (! ALTIVEC_REGNO_P (DST) || regs_ever_live[DST]) + /* A C expression returning the cost of moving data from a register of class CLASS1 to one of CLASS2. */ |