From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14795 invoked by alias); 10 Apr 2012 14:44:50 -0000 Received: (qmail 14663 invoked by uid 22791); 10 Apr 2012 14:44:49 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 14:44:34 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3AEiXop006738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Apr 2012 10:44:34 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3AEiXcF026754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Apr 2012 10:44:33 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id q3AEiWYB006052; Tue, 10 Apr 2012 16:44:32 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id q3AEiWng006051; Tue, 10 Apr 2012 16:44:32 +0200 Date: Tue, 10 Apr 2012 14:44:00 -0000 From: Jakub Jelinek To: "H.J. Lu" Cc: Kirill Yukhin , GCC Patches Subject: Re: [i386, patch, RFC] HLE support in GCC Message-ID: <20120410144431.GX16117@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20120307111008.GK16117@tyan-ft48-01.lab.bos.redhat.com> <20120308150912.GS16117@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-04/txt/msg00528.txt.bz2 On Tue, Apr 10, 2012 at 07:42:53AM -0700, H.J. Lu wrote: > > Attached patch implements HLE support for __atomic_compare_exchange_n. > > > > So, to emit HLE prefix, it is possible to do: > > int > > foo2 (int *p, int oldv, int newv) > > { > >  __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_ACQUIRE | > > __ATOMIC_USE_HLE, __ATOMIC_ACQUIRE); > >  return oldv; > > } > > This is wrong since HLE ACQUIRE/RELEASE has nothing to do with > C++ atomic acquire/release. You can have HLE RELEASE with C++ > atomic acquire. Yes, of course, there should be two bits for HLE rather than one. Jakub