Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm' - Mailing list pgsql-ports

From Tom Lane
Subject Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'
Date
Msg-id 26524.1087148323@sss.pgh.pa.us
Whole thread Raw
In response to Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'  (Martin Pitt <martin@piware.de>)
Responses Re: Build failure on m68k and ia64: inconsistent operand  (Roman Zippel <zippel@linux-m68k.org>)
List pgsql-ports
Martin Pitt <martin@piware.de> writes:
> On 2004-06-11 10:10 +0200, Roman Zippel wrote:
>> gcc developers disagree, we had same problem with the kernel, e.g. see:
>>
>> http://marc.theaimsgroup.com/?l=3Dlinux-kernel&m=3D107475162200773&w=3D2

Yeah, and notice who he's arguing with ;-).

I'm with Linus on this one.  Every version of the gcc asm documentation
that I've looked at says I *must* use a match constraint to ensure that
input and output operands are in the same location.  I'm not inclined to
take one person's claim to the contrary as authoritative, especially not
when his argument is based on a statement about lvalues that isn't in
the docs at all.

BTW, if I read this message correctly, it's also saying that "+m"(*lock)
wouldn't work, which moves it out of the realm of reasonability
altogether.  Why in the world would an asm facility not support the
concept of a read-write operand in memory?

I was about to propose switching over to "+m" on the basis of some
advice I'd gotten internally at Red Hat, but now I think I will sit and
wait until some gcc developer shows me updated documentation that
actually explains what they think asm code should look like.

            regards, tom lane

pgsql-ports by date:

Previous
From: Martin Pitt
Date:
Subject: Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'
Next
From: Roman Zippel
Date:
Subject: Re: Build failure on m68k and ia64: inconsistent operand