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
This commit is contained in:
Jakub Jelinek 2003-03-15 00:04:55 +01:00 committed by Jakub Jelinek
parent 67c3c951a7
commit c55acdcfe8
2 changed files with 28 additions and 14 deletions

View File

@ -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

View File

@ -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 ();