From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id 176083982EC4 for ; Thu, 1 Oct 2020 11:15:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 176083982EC4 Received: by mail-pf1-x443.google.com with SMTP id x123so4163383pfc.7 for ; Thu, 01 Oct 2020 04:15:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RnrbkFNSbWlbMLNKB5vTBAAIuwvJKXG3HKAXeqdO/Uk=; b=ga3+9wrAYPMf8DkenVySB/v4ewnrD95SK/layosaeMNMKJm5y2zE0H650tbiggeNYc GKinYmNLlZ8ePylvCvGJILrrhnzPale2KW504yRYQhcUujWEzr/NEzXh7ktussQrC1Lr ffPeNALMWwI+km0tZlkhnKHVC1prvQi9i5+E3PRBanCNvzsEL0OROPPwQ4zMbMjkmbpf DSWAdQhDC9Wzkq+gr3ZNDzx0CTcESp/ozmz1U/jpDwMEF/872xfWZsJdeazpjpgy5xmv BoXJ5JzbwXQbnYxpCzwAbT04vJpYIAaBaszTdELAT2sgxPda1x22C35WPt5gICYB28GL BHHg== X-Gm-Message-State: AOAM533kvedZN3Q8y/wFXogdBIqPZGqdQgxxIztXNp4azH3PEOwNA4wd T19s6JsFN20M7Rrs0IeQuJZGTKYmIAQ+9Q== X-Google-Smtp-Source: ABdhPJzN5mHdOYUqE73qbxW4K4xHdOUe/h8RXX1493xW4k8E1s/0skvOUO1gf400u9cNoJ90AwXnLg== X-Received: by 2002:a17:902:23:b029:d2:90c1:6c with SMTP id 32-20020a1709020023b02900d290c1006cmr6680637pla.17.1601550921259; Thu, 01 Oct 2020 04:15:21 -0700 (PDT) Received: from bubble.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id nl10sm4374615pjb.11.2020.10.01.04.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 04:15:20 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 8141C86966; Thu, 1 Oct 2020 20:45:16 +0930 (ACST) Date: Thu, 1 Oct 2020 20:45:16 +0930 From: Alan Modra To: Florian Weimer Cc: Tulio Magno Quites Machado Filho via Libc-alpha , Tulio Magno Quites Machado Filho Subject: Re: [PATCH] powerpc64: Implement TLS using PC-relative addressing Message-ID: <20201001111516.GJ15011@bubble.grove.modra.org> References: <20200930195512.724059-1-tuliom@linux.ibm.com> <87y2kqjpp4.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y2kqjpp4.fsf@oldenburg2.str.redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 11:15:23 -0000 On Thu, Oct 01, 2020 at 10:49:43AM +0200, Florian Weimer wrote: > * Tulio Magno Quites Machado Filho via Libc-alpha: > > > diff --git a/sysdeps/powerpc/mod-tlsopt-powerpc.c b/sysdeps/powerpc/mod-tlsopt-powerpc.c > > index ee0db12a73..5856dab60b 100644 > > --- a/sysdeps/powerpc/mod-tlsopt-powerpc.c > > +++ b/sysdeps/powerpc/mod-tlsopt-powerpc.c > > @@ -24,7 +24,14 @@ tls_get_addr_opt_test (void) > > tls_index *tls_arg; > > #ifdef __powerpc64__ > > register unsigned long thread_pointer __asm__ ("r13"); > > + /* PC-relative addressing is available when compiling with -mpcrel. > > + The first releases of GCC 10 do support -mpcrel, but do not export > > + __PCREL__. */ > > +# if defined(__PCREL__) || __GNUC__ <= 10 && defined(_ARCH_PWR10) > > + asm ("pla %0,foo@got@tlsgd@pcrel" : "=r" (tls_arg)); > > +# else > > asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg)); > > +# endif > > Should this check for binutils support for @pcrel? Or won't GCC enable > _ARCH_PWR10 in this case? Right, gcc doesn't support power10 without the requisite binutils support. In any case, this file is only used when running the testsuite so it hardly seems worth the bother of configure checks. The patch looks good to me. -- Alan Modra Australia Development Lab, IBM