[PING] [PATCH] Fix asm X constraint (PR inline-asm/59155)

Jakub Jelinek jakub@redhat.com
Thu Jun 9 16:43:00 GMT 2016


On Thu, Jun 09, 2016 at 10:30:13AM -0600, Jeff Law wrote:
> On 06/06/2016 01:40 PM, Jakub Jelinek wrote:
> >On Mon, Jun 06, 2016 at 09:27:56PM +0200, Marc Glisse wrote:
> >>The last one would miss floating point registers (no 2 platforms use the
> >>same letter for those, hence my quest for something more generic).
> >>
> >>The goal of the experiment is described in PR59159 (for which "+X" is
> >>unlikely to be the right answer, in particular because it is meaningless for
> >>constants). I don't know in what context people use the "X" constraint, or
> >>even better "=X"...
> >
> >X constraint has been added mainly for uses in match_scratch like:
> >(clobber (match_scratch:SI 2 "=X,X,X,&r"))
> >or when the predicate takes care of everything and it is not needed to
> >specify anything further:
> >  [(set (match_operand:SWI12 0 "push_operand" "=X")
> >        (match_operand:SWI12 1 "nonmemory_no_elim_operand" "rn"))]
> >Using it in inline asm generally has resulted in lots of issues, including
> >ICEs etc., so nothing I'd recommend to use.
> So would it make sense to define it as not available for use in ASMs?  I
> realize that's potentially a user-visible change, but it might be a
> reasonable one to make.

Yes, I'm all in favor in disabling X constraint for inline asm.
Especially if people actually try to print it as well, rather than make it
unused.  That is a sure path to ICEs.

	Jakub



More information about the Gcc-patches mailing list