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]

fix powerpc64 libjava failures


I'm applying this as obvious to fix the powerpc64-linux libjava
failures.  As currently implemented by gcc, powerpc tls uses x@got@tlsgd
and similar.  ie. we are expecting the linker to manage allocation of
tls entries in the got rather than having gcc allocate them itself in
toc sections.  This means that powerpc64 should always use r2 for tls,
even when -mminimal-toc.

	PR target/24465
	* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Always
	use r2 for 64-bit tls .got access.

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.872
diff -u -p -r1.872 rs6000.c
--- gcc/config/rs6000/rs6000.c	6 Oct 2005 22:58:59 -0000	1.872
+++ gcc/config/rs6000/rs6000.c	21 Oct 2005 05:02:57 -0000
@@ -2979,7 +2979,7 @@ rs6000_legitimize_tls_address (rtx addr,
       rtx r3, got, tga, tmp1, tmp2, eqv;
 
       if (TARGET_64BIT)
-	got = gen_rtx_REG (Pmode, TOC_REGISTER);
+	got = gen_rtx_REG (Pmode, 2);
       else
 	{
 	  if (flag_pic == 1)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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