Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2013 10:52:00 +0200
From:      Tijl Coosemans <tijl@coosemans.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Jung-uk Kim <jkim@FreeBSD.org>, dumbbell@FreeBSD.org, freebsd-arch@FreeBSD.org
Subject:   Re: [PATCH] Atomic swap and test-and-set
Message-ID:  <20130802105200.29672730@kalimero.tijl.coosemans.org>
In-Reply-To: <20130801055421.R2570@besplex.bde.org>
References:  <51F81A74.4030009@FreeBSD.org> <20130731173247.GK4972@kib.kiev.ua> <20130801055421.R2570@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/BWkRovEEKzbI/YgkEZrBK1w
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Thu, 1 Aug 2013 06:42:21 +1000 (EST) Bruce Evans wrote:
> On Wed, 31 Jul 2013, Konstantin Belousov wrote:
>> I think that constraints for all added inlines contradict the explicit
>> requirement in the gcc documentation, which states that rmw operands
>> should be specified using the 'same location' output operand for the
>> input operand (hopefully this can be parsed).  It just happens so that
>> for "m" compiler cannot do anything else then passing the address.
>>
>> The problem is not specific to the new functions, it seems to be present
>> in other functions as well, e.g. cmpset.  This probably can be postponed.
>=20
> The problem is the opposite.  The other functions used to use the '+'
> constraint to indicate input-output operands, but gcc broke this so it
> was changed in 2005.  gcc.info still says fuzzily that the '+' constraint
> "should" only be used for operands that can be allocated in a register:

That text has changed for gcc 4.8.0:
http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02130.html

It refers to a patch from 2004:
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00438.html

That patch appears to be in all gcc 4.x releases.

--Sig_/BWkRovEEKzbI/YgkEZrBK1w
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iF4EAREIAAYFAlH7czUACgkQfoCS2CCgtisFqAD/RwXejdmz2/29RZ0yUB2Y0Qj5
BEBwQb/t9sQy9nULhAoA/1zwDK+Z8Tao3xUjXBnM+goR0uF/9pReH6MWkEgZybiJ
=6d4o
-----END PGP SIGNATURE-----

--Sig_/BWkRovEEKzbI/YgkEZrBK1w--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130802105200.29672730>