From ca9f165c10137135232bbf89f2f0cbd7969e4531 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Mon, 8 Dec 2014 23:47:39 +0000 Subject: [PATCH] re PR target/64226 (Secondary reload incorrect TOC address) 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 | 7 +++++++ gcc/config/rs6000/rs6000.c | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e8de749a6a..8154a327e1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-12-08 David Edelsohn + + 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 PR debug/60782 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8c492cce7cf..f3818e65953 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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; -- 2.30.2