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: inline asm and multi-alternative constraints


On 11/02/2015 04:06 PM, Jeff Law wrote:
On 10/30/2015 09:09 PM, David Wohlferd wrote:

I have updated the non-md text with (most of) the changes I think it
needs (attached).  These changes are pleasantly minor, mostly just
adding some example text and a bit of formatting.

However.  Trying to actually use the information on this page is turning
up some problems.
I think the fundamental problem here is we ought not be exposing those
modifiers to the user.  They're inherently tied to the details of the
register allocation and reloading passes.

This is what I'm thinking as well. Why would a user even need multi-alternative constraints in inline asm? An insn template might be instantiated in many different contexts and need to deal with different flavors of operands, but inline asm code is generally unique and the programmer writing it knows very well what the operands are supposed to be (this one is a register, that one is an address, etc).

Choosing the most efficient form of a logical-or instruction is hardly a good motivating example, either -- nobody writes inline asm to do that. I'm under the impression that the primary uses of inline asm are either to access machine instructions not exposed by builtins, or to provide a block of highly tuned code replacing all/most of a C function body.

-Sandra


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