This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]