From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74653 invoked by alias); 9 Jan 2019 06:35:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 74640 invoked by uid 89); 9 Jan 2019 06:35:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Envelope-From:sk:sebasti, smallexample X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Jan 2019 06:35:22 +0000 Received: from [88.198.220.130] (helo=sslproxy01.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gh7SR-0003dy-BG for gcc-patches@gcc.gnu.org; Wed, 09 Jan 2019 07:35:19 +0100 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gh7SR-0002Yv-4G for gcc-patches@gcc.gnu.org; Wed, 09 Jan 2019 07:35:19 +0100 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id C0C822A0043 for ; Wed, 9 Jan 2019 07:35:50 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id SJRVqnrrpmPG for ; Wed, 9 Jan 2019 07:35:50 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 794272A0928 for ; Wed, 9 Jan 2019 07:35:50 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IKmEa-Ftqz_L for ; Wed, 9 Jan 2019 07:35:50 +0100 (CET) Received: from linux-diu0.suse (unknown [192.168.96.161]) by mail.embedded-brains.de (Postfix) with ESMTP id 604C52A0043 for ; Wed, 9 Jan 2019 07:35:50 +0100 (CET) From: Sebastian Huber To: gcc-patches@gcc.gnu.org Subject: [PATCH] Document atomic fetch and nand Date: Wed, 09 Jan 2019 06:35:00 -0000 Message-Id: <20190109063517.849-1-sebastian.huber@embedded-brains.de> X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00456.txt.bz2 Copy code example for fetch and nand from "Legacy __sync Built-in Functions for Atomic Memory Access" to "Built-in Functions for Memory Model Aware Atomic Operations". gcc/ * doc/extend.texi (Built-in Functions for Memory Model Aware Atomic Operations): Document atomic fetch and nand. --- gcc/doc/extend.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7f33be4f29c..f2a61e4c4f8 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -11008,6 +11008,7 @@ they are not scaled by the size of the type to which the pointer points. @smallexample @{ *ptr @var{op}= val; return *ptr; @} +@{ *ptr = ~(*ptr & val); return *ptr; @} // nand @end smallexample The object pointed to by the first argument must be of integer or pointer @@ -11029,6 +11030,7 @@ the type to which the pointer points. @smallexample @{ tmp = *ptr; *ptr @var{op}= val; return tmp; @} +@{ tmp = *ptr; *ptr = ~(*ptr & val); return tmp; @} // nand @end smallexample The same constraints on arguments apply as for the corresponding -- 2.16.4