From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 383783858D32; Mon, 14 Nov 2022 11:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 383783858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668425709; bh=GuCdKCGstcA4pyWdnKlXF8xoQZ4NiWoTiwF+iCZULxU=; h=From:To:Subject:Date:From; b=BfTxrDk6KexXr88vuOwRptwElqakhxv0qSOfcJx7gPBw4ImHA3LaHZnOGPGkET/tm +ljQPii8E5W9PM1iSGrdK0iWdJQlh3Ug0V3ZdCyHLVdMii43WKOL7lAmuMEh8JQL5w p32J32imQ5Akcl9mwg3Lme4ST4Tc2hNlTnWj3gBI= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alan Modra To: glibc-cvs@sourceware.org Subject: [glibc] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) X-Act-Checkin: glibc X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 838b0da96a33e1200adb279c9cef30b1079b6709 X-Git-Newrev: 94628de77888c3292fc103840731ff85f283368e Message-Id: <20221114113509.383783858D32@sourceware.org> Date: Mon, 14 Nov 2022 11:35:09 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=94628de77888c3292fc103840731ff85f283368e commit 94628de77888c3292fc103840731ff85f283368e Author: Alan Modra 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. Diff: --- sysdeps/powerpc/mod-tlsopt-powerpc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"