[PATCH 4/4] arm: Enable ARM mode for armv6 strlen
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Apr 12 20:49:00 GMT 2018
On 12/04/2018 17:31, Phil Blundell wrote:
> On Thu, 2018-04-12 at 16:41 -0300, Adhemerval Zanella wrote:
>> Because as reported by BZ#23031 [1], the user is using a kernel
>> explicit
>> configured to no enable thumb instructions. Although this kernel
>> configÂ
>> is debatable whether is brings any gain to userland, it still a valid
>> one.
>
> I don't think it's legitimate for the user to tell glibc that he's
> using ARMv7 and then configure the runtime environment to disable some
> parts of that architecture. If he doesn't want Thumb, he should
> configure glibc for an architecture that doesn't include it.
>
> p.
Even though it configure the toolchain to not emit thumb, if user tries
to optimize for armv7 (by tinkering with CC or CFLAGS) it will still
emit thumb instructions because of the optimized assembly implementations.
And the expectation imho is to if user explicit builds with -marm the
resulting library should not user thumb instructions.
In fact, the whole idea of current code is indeed to prevent thumb
instructions in such cases, it is just using the *wrong* preprocessor
to check it (and the wrong assumption from the arm-features.h
include kinda confirm it).
More information about the Libc-alpha
mailing list