[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.41.1 Size of an asm
Some targets require that GCC track the size of each instruction used in
order to generate correct code. Because the final length of an
asm
is only known by the assembler, GCC must make an estimate as
to how big it will be. The estimate is formed by counting the number of
statements in the pattern of the asm
and multiplying that by the
length of the longest instruction on that processor. Statements in the
asm
are identified by newline characters and whatever statement
separator characters are supported by the assembler; on most processors
this is the ‘;’ character.
Normally, GCC’s estimate is perfectly adequate to ensure that correct code is generated, but it is possible to confuse the compiler if you use pseudo instructions or assembler macros that expand into multiple real instructions or if you use assembler directives that expand to more space in the object file than is needed for a single instruction. If this happens then the assembler produces a diagnostic saying that a label is unreachable.
This document was generated on October 19, 2013 using texi2html 5.0.