This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: Inline ASM and stack/base pointer


On 09.06.2011 17:49, Ian Lance Taylor wrote:
> Add "%esp" to your clobber list.  That should force the compiler to pass
> any stack variables using an offset from %ebp.

Ok it does seem to have an effect after all, as long as I don't compile
it with -O2, as soon as -O2 is passed, it uses esp instead of ebp and
does not even build up a base pointer at all in the generated assembly.

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
               --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22


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