Converting MSVC to intel-style gcc inline assembly

Jamie Lokier jamie@shareable.org
Sat Mar 6 20:26:00 GMT 2004


Andi Kleen wrote:
> What I meant is that when you change the stack pointer and gcc passes
> in offset(%esp) for "m" then offset is not valid anymore. So you have
> to be careful that this doesn't happen, e.g. by always using "r" 
> for anything local.

It would be nice for GCC's operand formatting syntax ("%w0" etc.) to
include a way to indicate a fixed numerical offset when the operand is
on the stack.  Code that needs pushes and pops tends to be the kind of
code where there aren't enough registers to pass all the arguments,
and anyway it's silly to force arguments into registers when it would
be faster for the stack slot to be used directly.

-- Jamie



More information about the Gcc mailing list