This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch : rs6000 check minimal toc register saved
- From: Tom Rix <trix at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 05 Feb 2002 17:19:19 -0600
- Subject: patch : rs6000 check minimal toc register saved
In the past there was a problem with powerpc64 floating point minimal
toc symbols being created after reload.
This patch checks if the minimal toc register was saved before it is
used.
Tom
--
Tom Rix
GCC Engineer
trix@redhat.com
2002-02-05 Tom Rix <trix@redhat.com>
* config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Check toc
register has been saved.
diff -rcp gcc-old/gcc/config/rs6000/rs6000.c gcc/gcc/config/rs6000/rs6000.c
*** gcc-old/gcc/config/rs6000/rs6000.c Mon Feb 4 12:12:21 2002
--- gcc/gcc/config/rs6000/rs6000.c Tue Feb 5 13:26:08 2002
*************** rs6000_emit_load_toc_table (fromprolog)
*** 7850,7855 ****
--- 7850,7859 ----
}
else
{
+ /* Sanity check that minimal toc register was saved */
+ if (! regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+ abort();
+
if (TARGET_32BIT)
rs6000_maybe_dead (emit_insn (gen_load_toc_aix_si (dest)));
else