This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING] [PATCH] Fix asm X constraint (PR inline-asm/59155)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jeff Law <law at redhat dot com>, Vladimir Makarov <vmakarov at redhat dot com>, Bernd Edlinger <bernd dot edlinger at hotmail dot de>, Richard Biener <rguenther at suse dot de>
- Date: Mon, 6 Jun 2016 21:40:47 +0200
- Subject: Re: [PING] [PATCH] Fix asm X constraint (PR inline-asm/59155)
- Authentication-results: sourceware.org; auth=none
- References: <AM4PR07MB157116B6325547B97D4C148CE4400 at AM4PR07MB1571 dot eurprd07 dot prod dot outlook dot com> <AM4PR07MB157148DEF55A9C540991A296E45C0 at AM4PR07MB1571 dot eurprd07 dot prod dot outlook dot com> <5755AD05 dot 4010608 at redhat dot com> <b143b78e-688d-b1b4-4094-9c8ebd50b1ea at redhat dot com> <20160606180128 dot GC7387 at tucnak dot redhat dot com> <ff20dba7-b480-07a4-4c71-1cbef1dba384 at redhat dot com> <20160606180845 dot GD7387 at tucnak dot redhat dot com> <alpine dot DEB dot 2 dot 20 dot 1606062055481 dot 17222 at laptop-mg dot saclay dot inria dot fr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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.
Jakub