diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-03-15 00:04:55 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-03-15 00:04:55 +0100 |
commit | c55acdcfe896a2452fa7fb61f66f9193fe701f97 (patch) | |
tree | 85cc912fe5fa59c4ad2f16b946b26f444792dd46 | |
parent | 67c3c951a755eb8a3f2052e9f8627ea9359f3e89 (diff) | |
download | gcc-c55acdcfe896a2452fa7fb61f66f9193fe701f97.zip gcc-c55acdcfe896a2452fa7fb61f66f9193fe701f97.tar.gz gcc-c55acdcfe896a2452fa7fb61f66f9193fe701f97.tar.bz2 |
rs6000.c (rs6000_emit_load_toc_table): Don't call rs6000_maybe_dead if !fromprolog.
* config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Don't call
rs6000_maybe_dead if !fromprolog.
From-SVN: r64377
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 37 |
2 files changed, 28 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f25b02a..148d87e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-03-14 Jakub Jelinek <jakub@redhat.com> + + * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Don't call + rs6000_maybe_dead if !fromprolog. + 2003-03-14 Eric Botcazou <ebotcazou@libertysurf.fr> PR optimization/8396 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 521f092..80a3849 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -8053,7 +8053,7 @@ void rs6000_emit_load_toc_table (fromprolog) int fromprolog; { - rtx dest; + rtx dest, insn; dest = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM); if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 1) @@ -8061,8 +8061,12 @@ rs6000_emit_load_toc_table (fromprolog) rtx temp = (fromprolog ? gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM) : gen_reg_rtx (Pmode)); - rs6000_maybe_dead (emit_insn (gen_load_toc_v4_pic_si (temp))); - rs6000_maybe_dead (emit_move_insn (dest, temp)); + insn = emit_insn (gen_load_toc_v4_pic_si (temp)); + if (fromprolog) + rs6000_maybe_dead (insn); + insn = emit_move_insn (dest, temp); + if (fromprolog) + rs6000_maybe_dead (insn); } else if (TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2) { @@ -8109,14 +8113,13 @@ rs6000_emit_load_toc_table (fromprolog) ASM_GENERATE_INTERNAL_LABEL (buf, "LCG", reload_toc_labelno++); symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); - rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_1b (tempLR, - symF, - tocsym))); - rs6000_maybe_dead (emit_move_insn (dest, tempLR)); - rs6000_maybe_dead (emit_move_insn (temp0, - gen_rtx_MEM (Pmode, dest))); + emit_insn (gen_load_toc_v4_PIC_1b (tempLR, symF, tocsym)); + emit_move_insn (dest, tempLR); + emit_move_insn (temp0, gen_rtx_MEM (Pmode, dest)); } - rs6000_maybe_dead (emit_insn (gen_addsi3 (dest, temp0, dest))); + insn = emit_insn (gen_addsi3 (dest, temp0, dest)); + if (fromprolog) + rs6000_maybe_dead (insn); } else if (TARGET_ELF && !TARGET_AIX && flag_pic == 0 && TARGET_MINIMAL_TOC) { @@ -8126,15 +8129,21 @@ rs6000_emit_load_toc_table (fromprolog) ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); - rs6000_maybe_dead (emit_insn (gen_elf_high (dest, realsym))); - rs6000_maybe_dead (emit_insn (gen_elf_low (dest, dest, realsym))); + insn = emit_insn (gen_elf_high (dest, realsym)); + if (fromprolog) + rs6000_maybe_dead (insn); + insn = emit_insn (gen_elf_low (dest, dest, realsym)); + if (fromprolog) + rs6000_maybe_dead (insn); } else if (DEFAULT_ABI == ABI_AIX) { if (TARGET_32BIT) - rs6000_maybe_dead (emit_insn (gen_load_toc_aix_si (dest))); + insn = emit_insn (gen_load_toc_aix_si (dest)); else - rs6000_maybe_dead (emit_insn (gen_load_toc_aix_di (dest))); + insn = emit_insn (gen_load_toc_aix_di (dest)); + if (fromprolog) + rs6000_maybe_dead (insn); } else abort (); |