This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation
Hi,
According to Dan, __sync_fetch_and_nand intrinsic should be implemented as ~(target & val). Uros's patch is correct.
Thanks.
H.J.
hongjiu.lu@intel.com
>-----Original Message-----
>From: Andrew Haley [mailto:aph@redhat.com]
>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
>operation
>
>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.
>
>Andrew.
- References:
- [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation
- Re: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation
- Re: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation
- Re: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation
- Re: [PATCH, middle end]: Fix PR 37908, thinko with atomic NAND operation