asm label generation bug?

Mike Stump mrs@apple.com
Thu Dec 22 22:40:00 GMT 2005


On Dec 22, 2005, at 5:28 AM, Piotr Wyderski wrote:
> I am trying to compile my low-level library, which contains
> several inline assembly functions. It doesn't work, because
> the compiler (4.0.1) does not replace local labels from the
> assembly code (i.e. "0:", "1:", etc.) with their machine-specific
> replacements ("LCFI..4:" and so on). It generates the labels
> literally, i.e. the template
>
>     __asm__ __volatile__("0: bne 0b")

Please submit a bug report to your assembler provider, it is  
broken.  :-)

Beyond that, you can use:

@samp{%=} outputs a number which is unique to each instruction in the
entire compilation.  This is useful for making local labels to be
referred to more than once in a single template that generates multiple
assembler instructions.

If you looked in the manual and didn't find this the first time,  
please submit a patch that would have enabled you to find it,  
thanks.  You're not the only one to not be able to find it, thanks.



More information about the Gcc mailing list