From: Jeff Law Date: Mon, 17 Aug 1998 20:09:31 +0000 (-0600) Subject: rs6000.c (secondary_reload_class): For TARGET_ELF... X-Git-Tag: prereleases/egcs-1.1-prerelease~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb35273dee016e5f90141a9273a2e74183f7328;p=thirdparty%2Fgcc.git rs6000.c (secondary_reload_class): For TARGET_ELF... � * rs6000.c (secondary_reload_class): For TARGET_ELF, indicate that a BASE_REGS register is needed as an intermediate when copying a symbolic value into any register class other than BASE_REGS. From-SVN: r21806 --- diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b23923bc91b4..a8389238022c 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2187,6 +2187,16 @@ secondary_reload_class (class, mode, in) if (regno >= FIRST_PSEUDO_REGISTER) regno = -1; + /* We can not copy a symbolic operand directly into anyting other than + BASE_REGS for TARGET_ELF. So indicate that a register from BASE_REGS + is needed as an intermediate register. */ + if (TARGET_ELF + && class != BASE_REGS + && (GET_CODE (in) == SYMBOL_REF + || GET_CODE (in) == LABEL_REF + || GET_CODE (in) == CONST)) + return BASE_REGS; + /* We can place anything into GENERAL_REGS and can put GENERAL_REGS into anything. */ if (class == GENERAL_REGS || class == BASE_REGS