This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3 RFC] PATCH to memory asm ops in atomicity.h
- From: Jason Merrill <jason at redhat dot com>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 16 Dec 2003 20:58:45 -0500
- Subject: Re: [v3 RFC] PATCH to memory asm ops in atomicity.h
- References: <200312170001.BAA06160@faui1d.informatik.uni-erlangen.de>
On Wed, 17 Dec 2003 01:01:39 +0100 (CET), Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de> wrote:
> Jason Merrill wrote:
>
>>! : "=&d" (__old_val), "=&d" (__new_val), "+m" (*__mem)
>
> I had been under the impression that "+m" is not valid, because it translates
> to a matching constraint for a memory constraint. There can be situations
> where reload cannot handle this (as it assumes a matching constraint always
> matches a register constraint). Is this no longer true?
The first part is not true--an in/out operand does not (always) translate
into a matching constraint:
When the constraints for the read-write operand (or the operand in
which only some of the bits are to be changed) allows a register, you
may, as an alternative, logically split its function into two separate
operands, one input operand and one write-only output operand.
Jason