This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] optimizing _muldi3 for Thumb
Doug Kwan (Ãö®¶¼w) wrote:
> Ok. I will update my patch to include a thumb-2 implementation then.
> I will resubmit my patch after testing it with thumb-2 only. There is
> no thumb (not thumb-2) only CPU I guess?
As I said, Cortex-M1 is close to the original Thumb. It's technically
Thumb-2, but it's missing a lot of the Thumb-2 instructions. You should
look at ARM's ISA manuals to make sure it has what you need.
Of course, even for CPUs with both modes, there's often a cost to
switching from Thumb to ARM and back, so it's certainly better if a
Thumb libgcc multilib doesn't end up using ARM code.
And I think Nathan Froyd's question is a good one; if there's an
efficient instruction sequence for this, let's not use libgcc at all,
unless we're optimizing for size. When optimizing for speed, we should
avoid the call entirely.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713