This is the mail archive of the
mailing list for the GCC project.
Re: combination of read/write and earlyclobber constraint modifier
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: gcc at gcc dot gnu dot org, Jeff Law <law at redhat dot com>, Vladimir Makarov <vmakarov at redhat dot com>
- Date: Wed, 2 Jul 2014 10:32:57 +0200 (CEST)
- Subject: Re: combination of read/write and earlyclobber constraint modifier
- Authentication-results: sourceware.org; auth=none
- References: <53B30B96 dot 2000603 at mentor dot com> <53B31041 dot 8060608 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1407012155000 dot 2640 at laptop-mg dot saclay dot inria dot fr> <53B32D3A dot 1030700 at mentor dot com> <alpine dot DEB dot 2 dot 10 dot 1407020800530 dot 2059 at laptop-mg dot saclay dot inria dot fr> <53B3AAE8 dot 3080003 at mentor dot com> <alpine dot DEB dot 2 dot 10 dot 1407020855050 dot 2059 at laptop-mg dot saclay dot inria dot fr> <53B3BEC3 dot 5040004 at mentor dot com>
On Wed, 2 Jul 2014, Tom de Vries wrote:
On 02-07-14 09:02, Marc Glisse wrote:
Still, the meaning of +&, in inline asm for instance, seems relatively
I can't find any testsuite examples using this construct.
Furthermore, I'd expect the same semantics and restrictions for constraints
in rtl templates and inline asm.
So I'm not sure what you mean.
Coming back to your original question:
An earlyclobber operand is defined as 'modified before the instruction is
finished using the input operands'. AFAIU that would indeed exclude the
possibility that the earlyclobber operand is an input/output operand it
self, but perhaps I misunderstand.
So my question is: is the combination of '&' and '+' supported ? If so,
what is the exact semantics ? If not, should we warn or give an error ?
An earlyclobber operand X prevents *other* input operands from using the
same register, but that does not include X itself (if it is using +) or
operands explicitly using a matching constraint for X. At least that's how
I understand it.