Re: Inline ASM and stack/base pointer

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

 



Daniel Mierswa <impulze@xxxxxxxxxxx> writes:

>> What happens if you compile only with -fomit-frame-pointer? I'm not sure
>> if it will be activated without adding an -Ox option. Can you add an
>> example code?
> impulze@istari ~ $ gcc-4.4 -S -fomit-frame-pointer test.c && grep -m1
> lea test.s
> 	lea 12(%esp), %edi
> impulze@istari ~ $ gcc-4.5 -S -fomit-frame-pointer test.c && grep -m1
> lea test.s
> 	lea 12(%esp), %edi
> impulze@istari ~ $ gcc-4.6 -S -fomit-frame-pointer test.c && grep -m1
> lea test.s
> 	lea 12(%esp), %edi
> impulze@istari ~ $ cat test.c
> void f()
> {
>     int i;
>     __asm__ __volatile__("lea %0, %%edi\n"::"m"(i):"%esp");
> }
>
>> What gcc you use?
> 4.4.5, 4.5.2, 4.6.0

Bother, you're right, I was looking at an invalid example.  I don't know
of a way to do this.  Sorry.

Ian


[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