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: Question regarding constraint usage within inline asm


On Thu, Feb 21, 2019 at 05:16:48PM -0600, Peter Bergner wrote:
> About the only usage of register asm that is guaranteed, is their
> usage in inline asm.  If you specify a hard register for a variable
> and then use that variable in an inline asm, you are guaranteed
> that that variable will use that register in the inline asm.

Yup.

> That said, the "bug" in the case we're seeing, is that asmcons
> rewrote all of "input"'s pseudos, and it should be more careful
> to not create rtl with illegal constraint usage that LRA cannot
> fix up.  With the fix, operand %1 in the inline asm is no longer
> hard coded to r3 and it uses the pseudo instead, so everything
> is copacetic.

And that expand used one pseudo for everything in the asm is bad already.
If two inputs have identical constraints, sure, then it makes sense perhaps
(but does it really safe anything anyway?)  Otherwise it does not.


Segher


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