diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2014-05-18 09:17:06 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2014-05-18 09:17:06 +0200 |
commit | db2687a001b0a31fe25f478af1064f11e0ff8c50 (patch) | |
tree | 229c6054245da65e9054f7d6f5a907bdc951c4fa /gcc/doc | |
parent | d6145916208456cb6015a7e5404cb73b99d1dac7 (diff) | |
download | gcc-db2687a001b0a31fe25f478af1064f11e0ff8c50.zip gcc-db2687a001b0a31fe25f478af1064f11e0ff8c50.tar.gz gcc-db2687a001b0a31fe25f478af1064f11e0ff8c50.tar.bz2 |
extend.texi (Size of an asm): Really move node to its position.
* doc/extend.texi (Size of an asm): Really move node to its position.
From-SVN: r210577
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 31a48dd..2009c75 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -7267,28 +7267,6 @@ output of the assembler instruction directly into a particular register. specified for that operand in the @code{asm}.) @end itemize -@node Size of an asm -@subsection Size of an @code{asm} - -Some targets require that GCC track the size of each instruction used -in order to generate correct code. Because the final length of the -code produced by an @code{asm} statement is only known by the -assembler, GCC must make an estimate as to how big it will be. It -does this by counting the number of instructions in the pattern of the -@code{asm} and multiplying that by the length of the longest -instruction supported by that processor. (When working out the number -of instructions, it assumes that any occurrence of a newline or of -whatever statement separator character is supported by the assembler -- -typically @samp{;} --- indicates the end of an instruction.) - -Normally, GCC's estimate is 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 may produce a diagnostic saying that -a label is unreachable. - @menu * Global Reg Vars:: * Local Reg Vars:: @@ -7467,6 +7445,28 @@ register int *result asm ("r0"); asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2)); @end smallexample +@node Size of an asm +@subsection Size of an @code{asm} + +Some targets require that GCC track the size of each instruction used +in order to generate correct code. Because the final length of the +code produced by an @code{asm} statement is only known by the +assembler, GCC must make an estimate as to how big it will be. It +does this by counting the number of instructions in the pattern of the +@code{asm} and multiplying that by the length of the longest +instruction supported by that processor. (When working out the number +of instructions, it assumes that any occurrence of a newline or of +whatever statement separator character is supported by the assembler -- +typically @samp{;} --- indicates the end of an instruction.) + +Normally, GCC's estimate is 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 may produce a diagnostic saying that +a label is unreachable. + @node Alternate Keywords @section Alternate Keywords @cindex alternate keywords |