From owner-freebsd-arch@FreeBSD.ORG Fri Aug 2 08:53:20 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DD3DADE; Fri, 2 Aug 2013 08:53:20 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id A3E692C11; Fri, 2 Aug 2013 08:53:19 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=YNYxFN+OaEw7Bvgx8BtAje2BdF1dMiUvAYP8MJfhIY0= c=1 sm=2 a=1OkM0EXDtuEA:10 a=ZxPGInapWdQA:10 a=ltDKUUI1AAAA:8 a=mDV3o1hIAAAA:8 a=gMpRr5FI_dPS_sViXIkA:9 a=CjuIK1q_8ugA:10 a=JbAvG2SwbSEA:10 a=npukW5hYu58A:10 a=kT6dOc83ZcwA:10 a=utvzSIibA5NBc_NGTNcA:9 a=0CaTwavtbm8A:10 a=_G8qimlXLBUA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlgGAA1y+1FR8ZNi/2dsb2JhbABbgwY1rjyQYYEaF3SCJAEBBVYjEAsOCgklDyoeBognCLkQjS+CWAeEDAOQEodMkU+DGTo Received: from 98.147-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.147.98]) by relay.skynet.be with ESMTP; 02 Aug 2013 10:52:08 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r728q6UG001866; Fri, 2 Aug 2013 10:52:07 +0200 (CEST) (envelope-from tijl@coosemans.org) Date: Fri, 2 Aug 2013 10:52:00 +0200 From: Tijl Coosemans To: Bruce Evans 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/BWkRovEEKzbI/YgkEZrBK1w"; protocol="application/pgp-signature" Cc: Konstantin Belousov , Jung-uk Kim , dumbbell@FreeBSD.org, freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 08:53:20 -0000 --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--