Generated unique labels
Joern Rennecke
joern.rennecke@superh.com
Tue Jan 7 16:29:00 GMT 2003
> I am a bit confused by where this conversation is going. Isn't the Projects
> list item referring to having labels in inline assembler. I will give you
> the problem I was having which I thought was the same problem as the
> projects file item.
>
> int simple_func (int b, int c)
> {
> int x;
> asm (
> "simple_func_loop_start:\n\t"
> " Do Assebly Stuff \n\t"
> " LOOP to simple_func_loop_start"
> : [x] "=r" (x)
> : [b] "r" (b), [c] "r" (c)
> : "r0", "r1", "memory" );
>
> return x;
> }
I'm a bit surprised that this conversation is going on at all. We got the
%= output specifier which is perfectly fine to handle this problem, and it
is documented in md.texi.
int simple_func (int b, int c)
{
int x;
asm (
"simple_func_loop_start%=:\n\t"
" Do Assebly Stuff \n\t"
" LOOP to simple_func_loop_start%="
: [x] "=r" (x)
: [b] "r" (b), [c] "r" (c)
: "r0", "r1", "memory" );
return x;
}
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
More information about the Gcc
mailing list