[PATCH 4/4] arm: Enable ARM mode for armv6 strlen
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Fri Apr 13 15:43:00 GMT 2018
Phil Blundell wrote:
> But here we are, two decades later, and the landscape is a bit
> different. It's not entirely clear that -marm/-mthumb are very useful
> options in an ARMv7 world because the user shouldn't need to care. In
> an ideal world the compiler would be able to predict for any given
> function whether T32 or A32 encoding would give the best results
> (either speed or space according to the selected optimisation settings)
> and proceed accordingly. Unfortunately in practice I don't think
> we're quite there yet and for critical code there's still an element of
> "try building it both ways round and see which one runs quickest" which
> means the compiler flags probably are still necessary. Users might
> even legitimately wish to try that experiment with glibc, so forbidding
> them to compile it under -marm would not obviously be the right thing
> to do.
If there are still cases where GCC generates worse code for Thumb-2,
then those can be addressed easily. Our very first Thumb-2 compiler
had performance within 2% on ARM1156T2 more than 2 decades ago!
Things have improved a lot since then, and system wide effects of code
footprint have become more important, so using only Arm on a modern
core just doesn't make any sense today.
Wilco
More information about the Libc-alpha
mailing list