This is the mail archive of the 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: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation


According to Dan, __sync_fetch_and_nand intrinsic should be implemented as ~(target & val). Uros's patch is correct.



>-----Original Message-----
>From: Andrew Haley []
>Sent: Friday, October 24, 2008 6:01 AM
>To: Jakub Jelinek
>Cc: Uros Bizjak; GCC Patches; Lu, Hongjiu
>Subject: Re: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND
>Jakub Jelinek wrote:
>> On Fri, Oct 24, 2008 at 01:29:55PM +0100, Andrew Haley wrote:
>>> I don't think it's that exactly, but that what the builtins do is
>>> wrong, or at best very misleading.  NAND is a well-defined term of
>>> the art; it isn't defined by the gcc documentation.
>> The name of the builtin may be misleading, but changing semantics of a
>> builtin after it has been in use for 9 years is even worse.  The origin
>> of the builtin is in ia64intrin.h and therefore icc, I guess, so
>> it matters what icc is implementing.
>Indeed.  It's a wonder no-one commented at the time.  At least, I can't
>remember anyone doing so.
>FAOD, I'm certainly not suggesting that we should change anything except
>perhaps to add a line or two to the documentation.

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