[patch] PR33932 - extend documentation about top-level asm blocks
Mark Mitchell
mark@codesourcery.com
Mon Dec 29 20:59:00 GMT 2008
Steven Bosscher wrote:
Thanks for working on this.
> +optimize. Similarly, calls to labels defined in an @code{asm} block are
> +not supported.
Aren't they supported provided that you use the code section directives?
Your example looks like a call to such a label to me. So, I suspect
you're saying something meaningful, but I'm failing to understand it. :-)
> +Without the @code{.text} and @code{.previous} assembler macros, the
> +@code{asm} block could end up in a non-code section, and calling @code{tst()}
> +at runtime would probably not give the expected result.
I think we should note here that .text and .previous are specific to a
particular assembler and OS. Otherwise, people may think this is
cookbook stuff that they should just put in.
Something like:
Note: both the choice of section and the directives that you should use
to indicate to the assembler that your code goes in a particular section
depend on your assembly code, your assembler, and your target operating
system.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc-patches
mailing list