This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] arm: Enable ARM mode for armv6 strlen
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "adhemerval dot zanella at linaro dot org" <adhemerval dot zanella at linaro dot org>
- Cc: "pb at pbcl dot net" <pb at pbcl dot net>, Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>, nd <nd at arm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 13 Apr 2018 15:09:57 +0000
- Subject: Re: [PATCH 4/4] arm: Enable ARM mode for armv6 strlen
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi,
I can't see a valid reason for disabling Thumb-2 when it is available - it's not slower
and if necessary you can align loops or force Thumb-2 instructions to be 32 bit in an inner
loop. So basically if you have Thumb-2 available you might as well use it to get smaller
code - there is no advantage in using Arm. Supporting a no-Thumb-2 build would be
additional maintenance (unless it was an official variant it would not be tested as you've
shown, and I think there are already too many variants...).
Also keeping assembly code clean without lots of #if's that make it hard to follow the
logic (or the carry flags!) is best.
Wilco