From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5051 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 08:01:23 -0400 Message-ID: <20140504120123.GB23751@brightrain.aerifal.cx> References: <20140428120630.GG12324@port70.net> <20140428142714.GX26358@brightrain.aerifal.cx> <20140429005658.GC26358@brightrain.aerifal.cx> <20140430190357.GM26358@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 1399204906 8938 80.91.229.3 (4 May 2014 12:01:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 12:01:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5055-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 04 14:01:40 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 1Wgv6t-000595-TN for gllmg-musl@plane.gmane.org; Sun, 04 May 2014 14:01:35 +0200 Original-Received: (qmail 22455 invoked by uid 550); 4 May 2014 12:01:35 -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 22447 invoked from network); 4 May 2014 12:01:35 -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:5051 Archived-At: On Sun, May 04, 2014 at 12:54:40PM +0100, Justin Cormack wrote: > On Wed, Apr 30, 2014 at 8:03 PM, Rich Felker wrote: > > On Tue, Apr 29, 2014 at 06:09:14PM +0200, Wermut wrote: > >> Hi > >> > >> I have tested the patch from Stephen Thomas at least for gcc 4.6, 4.7 > >> and 4.8. Seems to work. Would be nice if the 1.1.1 release will > >> include a fix. > > > > It only works for armv7. On armv6k, I'm getting errors that the > > instructions aren't supported. I think we could simply add !thumb as a > > condition for the whole block... > > The patch has the wrong conditional in, there are no standard > __thumb__ and __thumb2__ defines, it is __ARM_ARCH_ISA_THUMB being 1 > or 2 that differentiates. armv6k does not support thumb2. I should > have enough machines of different flavours to make a working patch. I don't see __ARM_ARCH_ISA_THUMB getting defined at all (gcc 4.7.1) so it doesn't seem reliable. __THUMBEL__ is defined in thumb mode (presumably the EL is for little endian?) but that's the only thing I'm getting that seems relevant other than __thumb__. > We should be able to support just using thumb2, for thumb 1 I guess we > can support a mixed mode with some files like this compiled for arm > only, but the rest compiled with thumb, with interop turned on. Not > sure how messy this will turn out to be. armv6 does not seem to have thumb2, does it? And for armv7 I think it should be reasonable to assume any thumb support is thumb2. Is this wrong? Aside from the question of the macro name, I think the current patch covers all cases that can be covered. (BTW as far as I can tell there's no good reason to ever compile with -mthumb for pre-v7, but it doesn't hurt to support it. All the asm is arm mode anyway, so -mthumb doesn't get you the ability to run on obscure hardware that's thumb-only unless you rewrite all the asm too.) Rich