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


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


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