public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.36/master] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776)
@ 2023-01-10 16:03 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2023-01-10 16:03 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dbd23eaca95eb0264b6325c7286a4b370a67404d

commit dbd23eaca95eb0264b6325c7286a4b370a67404d
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Nov 12 11:20:31 2022 +1030

    elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776)
    
    Supports pcrel addressing of TLS GOT entry.  Also tweak the non-pcrel
    asm constraint to better reflect how the reg is used.
    
    (cherry picked from commit 94628de77888c3292fc103840731ff85f283368e)

Diff:
---
 NEWS                                 | 1 +
 sysdeps/powerpc/mod-tlsopt-powerpc.c | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index fb2d73a6be..dbe2b2e301 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,7 @@ The following bugs are resolved with this release:
     platforms
   [29730] broken y2038 support in fstatat on MIPS N64
   [29771] Restore IPC_64 support in sysvipc *ctl functions
+  [29776] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10
 \f
 Version 2.36
 
diff --git a/sysdeps/powerpc/mod-tlsopt-powerpc.c b/sysdeps/powerpc/mod-tlsopt-powerpc.c
index 2a82e53baf..d941024963 100644
--- a/sysdeps/powerpc/mod-tlsopt-powerpc.c
+++ b/sysdeps/powerpc/mod-tlsopt-powerpc.c
@@ -22,7 +22,11 @@ tls_get_addr_opt_test (void)
   tls_index *tls_arg;
 #ifdef __powerpc64__
   register unsigned long thread_pointer __asm__ ("r13");
-  asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg));
+# ifdef __PCREL__
+  asm ("paddi %0,0,foo@got@tlsgd@pcrel,1" : "=b" (tls_arg));
+# else
+  asm ("addi %0,2,foo@got@tlsgd" : "=b" (tls_arg));
+# endif
 #else
   register unsigned long thread_pointer __asm__ ("r2");
   asm ("bcl 20,31,1f\n1:\t"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-10 16:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 16:03 [glibc/release/2.36/master] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).