From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26022 invoked by alias); 6 Nov 2014 18:23:41 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 26000 invoked by uid 89); 6 Nov 2014 18:23:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 06 Nov 2014 18:23:39 +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 sA6INavL021546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Nov 2014 13:23:37 -0500 Received: from zebedee.pink (ovpn-113-89.phx2.redhat.com [10.3.113.89]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA6INXep006461; Thu, 6 Nov 2014 13:23:34 -0500 Message-ID: <545BBCA5.7060203@redhat.com> Date: Thu, 06 Nov 2014 18:23:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Andrew MacLeod , Richard Biener , Richard Henderson , gcc-patches CC: Jeff Law , java@gcc.gnu.org Subject: Re: [patch] Provide a can_compare_and_swap_p target hook. References: <5458FE9C.2090409@redhat.com> <54590C19.40208@redhat.com> <54591348.1010904@redhat.com> <545913A4.5010400@redhat.com> <54591B3A.8030908@redhat.com> <70044BE8-9F38-4BDB-B73F-6E2FC9AC2629@gmail.com> <54593352.2000700@redhat.com> <545BB682.9000209@redhat.com> In-Reply-To: <545BB682.9000209@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00001.txt.bz2 On 11/06/2014 05:57 PM, Andrew MacLeod wrote: > It looks like java is deciding whether or not GCC can inline atomic > operations or not, and if it can't, doesn't want the atomic > operations... which presumably means there is no dependency on > libatomic at runtime. > > A call to can_compare_and_swap_p(mode) is analogous to a compile time > version of folding atomic_always_lock_free(mode) to a constant... > Frankly that seems like a reasonable question for some front end to > ask... and elect not to emit atomic calls if so desired. (which is what > java is doing I think) > > whether it still needs to do that is a question for some java person. I did it because some targets did not have library support for some builtins, so a compile would fail with a (to a Java programmer) baffling error message. The Java operations certainly should use the generic builtins. Andrew.