From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5054 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: thumb2 support Date: Sun, 4 May 2014 10:09:59 -0400 Message-ID: <20140504140959.GA25506@brightrain.aerifal.cx> References: <20140428120630.GG12324@port70.net> <20140428142714.GX26358@brightrain.aerifal.cx> <20140429005658.GC26358@brightrain.aerifal.cx> <20140430190357.GM26358@brightrain.aerifal.cx> <20140504120123.GB23751@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1399212620 3552 80.91.229.3 (4 May 2014 14:10:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 14:10:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5058-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 04 16:10:13 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Wgx7M-0002NM-1x for gllmg-musl@plane.gmane.org; Sun, 04 May 2014 16:10:12 +0200 Original-Received: (qmail 28303 invoked by uid 550); 4 May 2014 14:10:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 28289 invoked from network); 4 May 2014 14:10:10 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5054 Archived-At: On Sun, May 04, 2014 at 02:56:49PM +0100, Justin Cormack wrote: > I was wrong, sorry, __thumb__ and __thumb2__ are defined. Maybe > __ARM_ARCH_ISA_THUMB does seem to be not defined always. OK, so the patch as committed should at least be ok, even if not optimal. > Some armv6 machines have thumb2, but not many (ARMv6T2 apparently, I > don't have one I don't think). In any case it's not broken on them, just using the kuser helpers rather than inlines. > All v7 machines do have (only) thumb2. > So you could test ARM_ARCH_6T2 or __thumb2__. We could change the !__thumb__ test to (!__thumb__||__thumb2__). > Alternatively it seems you can compile with -Wa,-mimplicit-it=always > and you don't need the patch at all. That could make it easier in > future. Yes, but it doesn't fix the fact that we have to omit the asm entirely on thumb1. Also adding mandatory arch-specific CFLAGS is probably more ugly than tucking away this logic in the arch-specific atomic.h file. > So far all the thumb2-only hardware has no MMU, so less likely to be > using musl... And if it is using musl it will probably need a special bare-metal-type port with its own asm dirs rather than using the existing Linux/ARM asm. (Of course rdp has an approach that shares the Linux asm and syscall framework despite being "bare-metal".) Rich