diff options
author | Jeff Law <law@gcc.gnu.org> | 1998-08-17 14:11:06 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-08-17 14:11:06 -0600 |
commit | e7b7998a0c8c79b23d9580a916c1ba1745fe7c97 (patch) | |
tree | 134edc78adcd85e5b811b25d20e314f4856a98d0 /gcc | |
parent | 3c144fbd0cb7b84155163da04748b6b6171637db (diff) | |
download | gcc-e7b7998a0c8c79b23d9580a916c1ba1745fe7c97.zip gcc-e7b7998a0c8c79b23d9580a916c1ba1745fe7c97.tar.gz gcc-e7b7998a0c8c79b23d9580a916c1ba1745fe7c97.tar.bz2 |
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: r21808
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index cb40c18..c1a2cea 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 |