Mail Archives: djgpp/1998/04/23/07:15:27
Michel Huot <huotm AT icrdl DOT net> wrote in article <3537E4CB DOT 5B59 AT icrdl DOT net>...
> I am writing a program and, for speed reasons, i must inline some
> function that has a label and a loop in it, like that:
>
> void foo(. . .)
> {
> asm volatile (" ...
> Loop1: ...
> loop Loop1
> ... ");
> }
>
> GCC compiles and say me that Loop1 is already defined. I found that
> everywhere I call foo, the compiler inline it and put the label
"Loop1"...
Look for as.info, node: "Symbols Names". It say that you can use up to ten
local labels (0..9) and make reference to the nearest ([f]orward of
[b]ackward) one:
asm volatile (" ...
0: ... // the local label
loop 0b // refer to the most recent definition of 0
... ");
- Raw text -