From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E6D9A1F4B4 for ; Thu, 1 Oct 2020 11:15:33 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1336F3857839; Thu, 1 Oct 2020 11:15:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1336F3857839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1601550925; bh=RnrbkFNSbWlbMLNKB5vTBAAIuwvJKXG3HKAXeqdO/Uk=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UC9gjE+LpbAVZPlCxxoIZmQyYu05pT/6IuED0biiznl79vWn15KED/zHeKQD3vqK/ RzI7hO6/tuyt4I4lXuF4USDjUIcIIs2faUWhPaCQLSWW0BzRXJ4E2jhjVow8yzQ4aC eYhd8m+FWpVYyB+C3mKPFia0/JEu+Bpmx96WSBj0= 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 To: Florian Weimer 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-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: , From: Alan Modra via Libc-alpha Reply-To: Alan Modra Cc: Tulio Magno Quites Machado Filho , Tulio Magno Quites Machado Filho via Libc-alpha Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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