l...@gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <m...@netris.org> skribis:
>
>> I chose system name "armhf-linux", GNU triplet "arm-linux-gnueabihf",
>> and the following GCC configure flags:
>>
>>    --with-arch=armv7-a
>>    --with-float=hard
>>    --with-mode=thumb
>>    --with-fpu=vfpv3-d16
>
> Does it mean that GCC generates Thumb code by default?

Yes.  I confess that I'm not sufficiently knowledgeable about ARM to
understand the tradeoffs here, and have simply followed Debian's lead.
There is some rationale here:

  https://wiki.debian.org/ArmHardFloatPort

There, it says:

  Thumb-2/ThumbEE: Thumb-2 provides code size improvements and unlike
  thumb(1) there is no interworking overhead except in a few corner
  cases. Also Thumb-2 is sufficiently complete that there is no need to
  fall back to ARM ISA for some operations (unlike thumb1). Thus
  defaulting to Thumb-2 on v7 or later makes sense.

I haven't yet verified that our GCC is generating Thumb-2 instructions
(as opposed to Thumb-1).  Debian's GCC apparently does, but they apply a
rather large patch from Linaro.  This should be checked at some point.

Anyway, here are some more links that might be worth looking at if we
run into build problems:

  https://wiki.ubuntu.com/ARM/Thumb2
  https://wiki.ubuntu.com/ARM/Thumb2PortingHowto

    Regards,
      Mark

Reply via email to