From d286588b498802ef740f5a5f7811cf6108cbbb86 Mon Sep 17 00:00:00 2001 From: bstarynk Date: Fri, 16 Oct 2009 04:41:41 +0000 Subject: 2009-10-16 Basile Starynkevitch MELT branch merged with trunk rev 152888 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@152889 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/cris/cris.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'gcc/config/cris') diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index 586f7ff2077..76ebcefbae7 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 -- cgit v1.2.1