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


tm_gccmail@kloo.net wrote:
> 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.

Yes it _works_, but

> > it's silly to force arguments into registers when it would
> > be faster for the stack slot to be used directly.

it would be nice to generate tight code without redundant
instructions, and without overly constraining GCC.

It's not important; it would only be useful very rarely, and it's not
obvious which is the cleanest design for the feature, if any.  It
could be done with an operand constraint instead of a formatting
letter - let the asm pattern specify a stack-slot and non-stack-slot
alternative (using the new constraint - there doesn't exist one which
distinguishes stack-slotness AFAIK), and use the multi-alternative
output syntax to select code which has offsets added in the code
template as text, unknown to GCC.

-- Jamie


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