From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2603 invoked by alias); 7 Nov 2011 16:28:04 -0000 Received: (qmail 2587 invoked by uid 22791); 7 Nov 2011 16:28:04 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_CX 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; Mon, 07 Nov 2011 16:27:52 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA7GRnfO029189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2011 11:27:49 -0500 Received: from anchor.twiddle.net (vpn-225-162.phx2.redhat.com [10.3.225.162]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA7GRmEr001513; Mon, 7 Nov 2011 11:27:48 -0500 Message-ID: <4EB80704.90505@redhat.com> Date: Mon, 07 Nov 2011 16:32:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: Andrew MacLeod CC: Hans-Peter Nilsson , hp@axis.com, gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, Benjamin Kosnik Subject: Re: cxx-mem-model merge [6 of 9] - libstdc++-v3 References: <201111071117.pA7BHERD007071@ignucius.se.axis.com> <4EB7EEDF.1040103@redhat.com> In-Reply-To: <4EB7EEDF.1040103@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2011-11/txt/msg00990.txt.bz2 On 11/07/2011 06:44 AM, Andrew MacLeod wrote: > rth: __sync_lock_test_and_set_1 could be provided by libgcc if the > OS has hooks in it to provide functionality... How can we tell when > compiling a C++ program whether that is going to be an unresolved > external or whether libgcc is going to provide it? I know you have a > pending patch for libgcc support fo the __atomics, but Im unsure how > we check this from the compiler In the pending patch, several of the direct_optabs get transformed to normal optabs, and have the opportunity to have their libcall fields filled in. At which point one checks both optab_handler and optab_libcall for the availability of the feature. r~