diff options
author | Alan Modra <amodra@gmail.com> | 2022-11-12 11:20:31 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-11-14 22:04:25 +1030 |
commit | 94628de77888c3292fc103840731ff85f283368e (patch) | |
tree | 92e6dde5296b4913c107b7772f9714a06aff1e1d /sysdeps/powerpc/mod-tlsopt-powerpc.c | |
parent | 838b0da96a33e1200adb279c9cef30b1079b6709 (diff) | |
download | glibc-94628de77888c3292fc103840731ff85f283368e.tar glibc-94628de77888c3292fc103840731ff85f283368e.tar.gz glibc-94628de77888c3292fc103840731ff85f283368e.tar.bz2 glibc-94628de77888c3292fc103840731ff85f283368e.zip |
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.
Diffstat (limited to 'sysdeps/powerpc/mod-tlsopt-powerpc.c')
-rw-r--r-- | sysdeps/powerpc/mod-tlsopt-powerpc.c | 6 |
1 files changed, 5 insertions, 1 deletions
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" |