This is the mail archive of the gcc-bugs@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]

%= for labels in asm blocks


If %= is allowed to be a documented feature for an "asm" block, it
might be useful to suggest it as an alternative to the "0:" style
temporary labels mentioned in the manual.

Would "Lasm%=" be necessary to avoid any chance of clashing with
compiler generated labels, or would just "L%=" be enough?

--- extend.texi.old	Fri May 25 10:30:54 2001
+++ extend.texi	Fri May 25 10:54:43 2001
@@ -2996,8 +2996,11 @@
 @end example
 
 @noindent
-This assumes your assembler supports local labels, as the GNU assembler
-and most Unix assemblers do.
+This assumes your assembler supports @samp{0:} style temporary local
+labels, as the GNU assembler and most Unix assemblers do.  If not then
+something like @samp{Lasm%=} can be used, assuming @samp{L} is the local
+label prefix.  @samp{%=} expands to a number unique to each @code{asm}
+block or compiler generated insn.
 
 Speaking of labels, jumps from one @code{asm} to another are not
 supported.  The compiler's optimizers do not know about these jumps, and

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