[PATCH][ARM] optimizing _muldi3 for Thumb
Paul Brook
paul@codesourcery.com
Mon Aug 4 22:38:00 GMT 2008
On Saturday 02 August 2008, Doug Kwan (關振德) wrote:
> Here is an updated patch.
This is bad in several ways.
The condition for pure Thumb-1 code is completely wrong, you want
__ARM_ARCH_6M__, exactly the same as all the other Thumb-1 only code.
For most purposes ARMv6-M is Thumb-1. ARM marketing sometimes call
it "Thumb-2" to deliberately confuse people. Please don't do this.
> +/* We cannot use the faster ARM version for THUMB libgcc on V6 and V6M
> since Cortex-M1 does not run ARM code. */
Shows you've completely misunderstood which architecture variants have which
features.
umull is only available on v3M and later cores.
The Thumb-2 code is just dumb (Yes I know it's what the compiler generates,
but gcc is notoriously bad at doubleword arithmetic). mla is not Thumb-2
specific, and using it certainly doesn't require additional register pushes.
AFAICS there's no reason to have different code for ARM and Thumb-2.
Paul
More information about the Gcc-patches
mailing list