[fedora-arm] Thumb mode IT instruction requirements and -mimplicit-it assembler flag

Henrik Nordström henrik at henriknordstrom.net
Sat Sep 17 21:18:42 UTC 2011


The armv7 distro bootstrap have run into a number of packages failing to
compile in Thumb mode (default enabled in rpmrc) failing on ARM assembly
parts with conditional branch instructions. In thumb mode one apparently
need to use the IT instruction to hint to the CPU about the conditions
of following instructions in addition to have the conditions on the
instructions themselves. While investing these I saw rumors about GCC
eventually adding an automatic handling of these adding IT instructions
as needed, and even projects being very reluctant about touching any of
this until GCC have made up it's mind, and finally in an upstream bug
report on pulseaudio there is a reference to the -mimplicit-it=thumb GAS
option doing exacly this.

Is there any drawbacks from enabling implicit IT instruction generation
letting GAS automatically deal with this as required by Thumb mode? If
not, should we add this to rpmrc?

  -Wa, -mimplicit-it=thumb

from what I can understand it should be quite safe. And I am even of the
opinion that GAS is way better suited at adding these instructions than
the average programmer as it carries redundant information which need to
match the conditions of the instructions following after.

Would even argue that it's a design error in Thumb assembly language to
even require the instruction to be declared not have the instruction
implicitly generated by default based on the conditional instructions it
covers. Programmers are humans. But that is a separate topic. 

Regards
Henrik



More information about the arm mailing list