From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3475 invoked by alias); 28 Feb 2013 00:34:44 -0000 Received: (qmail 3426 invoked by uid 22791); 28 Feb 2013 00:34:44 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 00:34:39 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UArSJ-0006ek-Aj from joseph_myers@mentor.com ; Wed, 27 Feb 2013 16:34:39 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 27 Feb 2013 16:34:39 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Thu, 28 Feb 2013 00:34:37 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1UArSG-0006bY-FC; Thu, 28 Feb 2013 00:34:36 +0000 Date: Thu, 28 Feb 2013 00:34:00 -0000 From: "Joseph S. Myers" To: Richard Henderson CC: Subject: Re: [PATCH 07/26] arm: Introduce and use GET_TLS In-Reply-To: <1361934986-17018-8-git-send-email-rth@twiddle.net> Message-ID: References: <1361934986-17018-1-git-send-email-rth@twiddle.net> <1361934986-17018-8-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00121.txt.bz2 On Tue, 26 Feb 2013, Richard Henderson wrote: > Factor out the sequence needed to call kuser_get_tls, > as we can't play subtract into pc games in thumb mode. > --- > * sysdeps/unix/sysv/linux/arm/sysdep.h (GET_TLS): New macro. > * sysdeps/unix/arm/sysdep.S (__syscall_error): Use it. > * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise. > * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Likewise. > * sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise. > * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S (__aeabi_read_tp): > Add thumb2 alternative. OK - although for v6K, v6ZK and v7-A and above, GCC defaults to -mtp=hard, so it might make sense as a followup to define this macro to use corresponding hard-tp code on such architectures (and for that matter to make __aeabi_read_tp use the hard-tp instruction, for running code built for an older architecture with libc built for a newer architecture). (In the hard-tp case you could then avoid the lr save/restore in the users of GET_TLS, though you'd need to define another macro to say that GET_TLS doesn't clobber lr.) -- Joseph S. Myers joseph@codesourcery.com