From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15630 invoked by alias); 12 Aug 2009 17:17:07 -0000 Received: (qmail 15582 invoked by uid 22791); 12 Aug 2009 17:17:06 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Aug 2009 17:16:59 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7CHEvtK000805; Wed, 12 Aug 2009 13:14:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7CHEufK028748; Wed, 12 Aug 2009 13:14:56 -0400 Received: from zebedee.pink (vpn2-8-94.ams2.redhat.com [10.36.8.94]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7CHEskq010562; Wed, 12 Aug 2009 13:14:54 -0400 Message-ID: <4A82F88D.7030708@redhat.com> Date: Wed, 12 Aug 2009 17:17:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: Paolo Bonzini CC: "Joseph S. Myers" , java-patches@gcc.gnu.org, Gcc Patch List Subject: Re: Java: add flag_use_atomic_builtins References: <4A82E93B.5010504@redhat.com> <4A82F34B.2080404@redhat.com> <4A82F47A.7060708@gnu.org> <4A82F5C0.5000300@redhat.com> In-Reply-To: <4A82F5C0.5000300@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2009-q3/txt/msg00074.txt.bz2 Andrew Haley wrote: > Paolo Bonzini wrote: >> On 08/12/2009 06:52 PM, Andrew Haley wrote: >>> Joseph S. Myers wrote: >>>> On Wed, 12 Aug 2009, Andrew Haley wrote: >>>> >>>>> Some targets, particularly ARM, don't have instructions for things >>>>> such as sync_compare_and_swap. Instead, a routine in libgcc is >>>>> used. This patch adds a new gcj option, -fuse-atomic-builtins, >>>>> which causes gcj to use the routines in libgcc whenever atomic >>>>> operations are needed. >>>> Wouldn't a target hook to allow a target to declare which operations it >>>> provides in libgcc be better than a command-line option? >>> Maybe it would. I'm happy to work with anyone to create such a >>> thing. What would such a hook look like, and how would a front- >>> end use it? >> Couldn't optabs be (re)used? > > That would be nice. I guess that's just a matter of set_optab_libfunc (sync_compare_and_swap_optab, SImode,, SImode, SImode "__sync_bool_compare_and_swap_4"); or somesuch? Andrew.