Converting MSVC to intel-style gcc inline assembly
tm_gccmail@kloo.net
tm_gccmail@kloo.net
Mon Mar 8 22:01:00 GMT 2004
On Sat, 6 Mar 2004, Jamie Lokier wrote:
> 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
You can store your operands in an auto struct, then pass in a pointer
to the struct.
This accomplishes most of what you want, sans referencing stuff
with the frame pointer.
Toshi
More information about the Gcc
mailing list