RFC: -mimplicit-it and GCC upstream
dave.martin at linaro.org
Mon Nov 22 18:34:14 UTC 2010
On Mon, Nov 22, 2010 at 2:39 PM, Nicolas Pitre <nicolas.pitre at linaro.org> wrote:
> I hope there is at least a validation of the IT instructions by the
> assembler with regards to the condition codes on the following
> instructions (and vice versa) to make sure they are all coherent, and
> even so for ARM mode compilation.
In unified syntax, yes; in traditional syntax, no.
When driving gas via GCC, this means that the checking is done only
when building for Thumb-2 (since traditional syntax is always used for
ARM code generated by GCC, and this probably isn't going to change for
now). In traditional syntax, at least some binutils versions totally
ignore IT instructions.
However, for code generated by GCC itself (i.e., not inline asm), GCC
is supposed to generate the correct IT instructions when generating
Thumb-2 code. -mimplicit-it may therefore cause some code generation
errors to go unnoticed, particularly where the compiler misses out an
IT instruction which it was supposed to insert, but the assembler
silently inserts the missing instruction.
More information about the linaro-toolchain