rs6000.c (rs6000_eliminate_indexed_memrefs): Do not break apart constant pool addresses.
authorDavid Edelsohn <edelsohn@gnu.org>
Tue, 28 Dec 2004 00:39:18 +0000 (00:39 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Tue, 28 Dec 2004 00:39:18 +0000 (19:39 -0500)
        * config/rs6000/rs6000.c (rs6000_eliminate_indexed_memrefs):
        Do not break apart constant pool addresses.
        (rs6000_emit_move): Only force source into REG if target is MEM.

From-SVN: r92657

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index e01e7562c44dfe3fca5364370683f5815818faea..66264fb33a8a83d39921656feca8472890d59471 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-27  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.c (rs6000_eliminate_indexed_memrefs):
+       Do not break apart constant pool addresses.
+       (rs6000_emit_move): Only force source into REG if target is MEM.
+
 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/19148
index f368b5f405e5e25dd72b48c3c212cef1810ffe7f..cf7c8eec816bb4523132c12f264724ad20c4170b 100644 (file)
@@ -4233,6 +4233,7 @@ rs6000_eliminate_indexed_memrefs (rtx operands[2])
 {
   if (GET_CODE (operands[0]) == MEM
       && GET_CODE (XEXP (operands[0], 0)) != REG
+      && ! legitimate_constant_pool_address_p (XEXP (operands[0], 0))
       && ! reload_in_progress)
     operands[0]
       = replace_equiv_address (operands[0],
@@ -4240,6 +4241,7 @@ rs6000_eliminate_indexed_memrefs (rtx operands[2])
 
   if (GET_CODE (operands[1]) == MEM
       && GET_CODE (XEXP (operands[1], 0)) != REG
+      && ! legitimate_constant_pool_address_p (XEXP (operands[1], 0))
       && ! reload_in_progress)
     operands[1]
       = replace_equiv_address (operands[1],
@@ -4294,7 +4296,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
       return;
     }
 
-  if (!no_new_pseudos && GET_CODE (operands[0]) != REG
+  if (!no_new_pseudos && GET_CODE (operands[0]) == MEM
       && !gpc_reg_operand (operands[1], mode))
     operands[1] = force_reg (mode, operands[1]);