This is the mail archive of the gcc@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: Converting MSVC to intel-style gcc inline assembly


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




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