diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/cris/cris.h | 17 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 85660d7..371f4e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-10-14 Hans-Peter Nilsson <hp@axis.com> + + PR target/38948 + * config/cris/cris.h (SECONDARY_RELOAD_CLASS): Handle reload + requests between special registers. + 2009-10-13 Eric Botcazou <ebotcazou@adacore.com> * dwarf2out.c (mem_loc_descriptor): Accept UNGT as well. diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index 586f7ff..76ebcef 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -630,12 +630,17 @@ enum reg_class ? GENERAL_REGS : (CLASS)) /* We can't move special registers to and from memory in smaller than - word_mode. */ -#define SECONDARY_RELOAD_CLASS(CLASS, MODE, X) \ - (((CLASS) != SPECIAL_REGS && (CLASS) != MOF_REGS) \ - || GET_MODE_SIZE (MODE) == 4 \ - || !MEM_P (X) \ - ? NO_REGS : GENERAL_REGS) + word_mode. We also can't move between special registers. Luckily, + -1, as returned by true_regnum for non-sub/registers, is valid as a + parameter to our REGNO_REG_CLASS, returning GENERAL_REGS, so we get + the effect that any X that isn't a special-register is treated as + a non-empty intersection with GENERAL_REGS. */ +#define SECONDARY_RELOAD_CLASS(CLASS, MODE, X) \ + ((((CLASS) == SPECIAL_REGS || (CLASS) == MOF_REGS) \ + && ((GET_MODE_SIZE (MODE) < 4 && MEM_P (X)) \ + || !reg_classes_intersect_p (REGNO_REG_CLASS (true_regnum (X)), \ + GENERAL_REGS))) \ + ? GENERAL_REGS : NO_REGS) /* FIXME: Fix regrename.c; it should check validity of replacements, not just with a silly pass-specific macro. We may miss some |