This is the mail archive of the gcc-patches@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: [v3 RFC] PATCH to memory asm ops in atomicity.h


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


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