[PATCH] Atomic swap and test-and-set
Tijl Coosemans
tijl at coosemans.org
Fri Aug 2 08:53:20 UTC 2013
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.
>
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130802/8920cf8e/attachment.sig>
More information about the freebsd-arch
mailing list