re PR target/64226 (Secondary reload incorrect TOC address)
authorDavid Edelsohn <dje.gcc@gmail.com>
Mon, 8 Dec 2014 23:47:39 +0000 (23:47 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Mon, 8 Dec 2014 23:47:39 +0000 (18:47 -0500)
        PR target/64226
        * config/rs6000/rs6000.c (rs6000_secondary_reload_inner)
        [SYMBOL_REF]: Do not explicitly call create_TOC_reference for
        TARGET_TOC. Always use rs6000_emit_move.

From-SVN: r218497

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

index 8e8de749a6abc89de80c8d51975f6c96d68a7b49..8154a327e1f1698c14c494c6e2646e602be93e7d 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-08  David Edelsohn  <dje.gcc@gmail.com>
+
+       PR target/64226
+       * config/rs6000/rs6000.c (rs6000_secondary_reload_inner)
+       [SYMBOL_REF]: Do not explicitly call create_TOC_reference for
+       TARGET_TOC. Always use rs6000_emit_move.
+
 2014-12-08  Mark Wielaard  <mjw@redhat.com>
 
        PR debug/60782
index 8c492cce7cf482ca5a76765dc705ce74f8789c57..f3818e6595345e8946e15cebba6f9854247805cb 100644 (file)
@@ -17379,12 +17379,7 @@ rs6000_secondary_reload_inner (rtx reg, rtx mem, rtx scratch, bool store_p)
     case SYMBOL_REF:
     case CONST:
     case LABEL_REF:
-      if (TARGET_TOC)
-       emit_insn (gen_rtx_SET (VOIDmode, scratch,
-                               create_TOC_reference (addr, scratch)));
-      else
-       rs6000_emit_move (scratch, addr, Pmode);
-
+      rs6000_emit_move (scratch, addr, Pmode);
       new_addr = scratch;
       break;