This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: asm label generation bug?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]