|
Message-ID: <20140504120123.GB23751@brightrain.aerifal.cx> Date: Sun, 4 May 2014 08:01:23 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: thumb2 support On Sun, May 04, 2014 at 12:54:40PM +0100, Justin Cormack wrote: > On Wed, Apr 30, 2014 at 8:03 PM, Rich Felker <dalias@...c.org> 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.