From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13528 invoked by alias); 6 Jun 2011 16:27:36 -0000 Received: (qmail 13329 invoked by uid 22791); 6 Jun 2011 16:27:35 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_BL X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 06 Jun 2011 16:27:21 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 06 Jun 2011 17:27:18 +0100 Received: from [10.1.67.34] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 6 Jun 2011 17:27:46 +0100 Message-ID: <4DECFFE4.4060308@arm.com> Date: Mon, 06 Jun 2011 16:27:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Nathan Sidwell CC: GCC Patches Subject: Re: [ARM] TLS Descriptor support References: <4DC8DFF6.4000600@codesourcery.com> In-Reply-To: <4DC8DFF6.4000600@codesourcery.com> X-MC-Unique: 111060617271801001 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00429.txt.bz2 On 05/10/11 07:49, Nathan Sidwell wrote: > This patch implements TLS descriptor support in GCC. TLS descriptors=20 > are described at=20 > http://www.codesourcery.com/publications/RFC-TLSDESC-ARM.txt and=20 > blessed by ARM, who have reserved the relocation numbers. > > Binutils and GLIBC patches are already committed (there is an=20 > orthogonal glibc patch to do with make dependencies that I need to=20 > post though). > > This patch adds a --with-tls=3D{arm|gnu} configuration option, to=20 > specify the default scheme. It can be overridden with a=20 > -mtls-dialect=3D{arm|gnu} option (this is the name used by the x86=20 > backend, which also has tlsdescriptor support). I have not added=20 > --with-tls support to the x86 bits of config.gcc etc, but it would be=20 > simple to do so. > > The arm.{c,h,md} changes are fairly mechanical -- a new tls pattern=20 > and smarts to emit it appropriately. > > This patch has been tested for both default arm and default gnu tls=20 > schemes using the gcc and glibc testsuites for an arm-linux-gnueabi=20 > target. > > ok? > > nathan > + /* The + is to avoid an assembly parse ambiguity with symbols that + look like register names, which is unsuccessfully recovered=20 from. */ + return TARGET_THUMB2 ? "blx\\t%c0(tlscall)" : "bl\\t+%c0(tlscall)"; Eh? This is backwards. There is blx , but no bl . If the=20 assembler gets confused with 'bl r0' then it needs to be fixed urgently. Further, both the assembler and the linker know how to change bl to blx=20 when needed, so it's best to just put out bl and be done with it. R.