Re: loop in asm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I compiled it by "gcc -Wall 1.c", I did not get
any compilation errors.

But surprisingly I got compilation error when I
compiled it by "gcc -O3 -Wall 1.c", I got comilation
error saying that label .JIT already defined .

It inlined the function, but also kept a separate
copy because the function it is defined in isn't
static.

How to solve it?

You can use local labels, for example

void fun()
{
asm volatile (" movl $0xFFFFFFFF, %%ecx;"
                "0: loop 0b\n;"
                :
                :
                :"%ecx");
}


Segher


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux