This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v3, middle end]: Fix PR 37908, thinko with atomic NAND operation, doc addendum
- From: Andrew Haley <aph at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, David Daney <ddaney at caviumnetworks dot com>, "Lu, Hongjiu" <hongjiu dot lu at intel dot com>, "Lavery, Daniel M" <daniel dot m dot lavery at intel dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 05 Nov 2008 14:27:05 +0000
- Subject: Re: [PATCH v3, middle end]: Fix PR 37908, thinko with atomic NAND operation, doc addendum
- References: <5787cf470811050550s3d55f6bcnbde2891b2c843906@mail.gmail.com>
Uros Bizjak wrote:
> Hello!
>
> Just a small documentation update as a followup to the patch:
>
> Index: extend.texi
> ===================================================================
> --- extend.texi (revision 141602)
> +++ extend.texi (working copy)
> @@ -5774,9 +5774,12 @@
>
> @smallexample
> @{ tmp = *ptr; *ptr @var{op}= value; return tmp; @}
> -@{ tmp = *ptr; *ptr = ~tmp & value; return tmp; @} // nand
> +@{ tmp = *ptr; *ptr = ~(tmp & value); return tmp; @} // nand
> @end smallexample
>
> +@emph{Note:} GCC 4.4 and later implement @code{__sync_fetch_and_nand}
> +builtin as @code{*ptr = ~(tmp & value)} instead of @code{*ptr = tmp & value}.
> +
Shouldn't this be
as @code{*ptr = ~(tmp & value)} instead of @code{*ptr = ~tmp & value}.