From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59803 invoked by alias); 24 Sep 2015 10:41:28 -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 59791 invoked by uid 89); 24 Sep 2015 10:41:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 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, 24 Sep 2015 10:41:27 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 25B572589E; Thu, 24 Sep 2015 10:41:26 +0000 (UTC) Received: from localhost.localdomain (vpn1-5-35.ams2.redhat.com [10.36.5.35]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8OAfP0C031344; Thu, 24 Sep 2015 06:41:25 -0400 Subject: Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ... To: gcc-patches@gcc.gnu.org, vogt@linux.vnet.ibm.com References: <20150921113158.GA30365@linux.vnet.ibm.com> <5601B25F.7020501@redhat.com> <20150923144851.GA22727@linux.vnet.ibm.com> From: Bernd Schmidt Message-ID: <5603D354.5030404@redhat.com> Date: Thu, 24 Sep 2015 11:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150923144851.GA22727@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg01844.txt.bz2 On 09/23/2015 04:48 PM, Dominik Vogt wrote: > On Tue, Sep 22, 2015 at 01:56:15PM -0600, Jeff Law wrote: > Is > there some good reason these aren't hooks? > > No, that was just inobservance. New version attached. Would it be > preferrable to initialize the hooks with a NULL pointer and test > the pointer before calling them? (That way the changes to > hooks.[ch] could be dropped.) There are already several hooks/macros in use for this kind of thing, have you checked that they are not usable for your purpose? There's ASM_DECLARE_FUNCTION_NAME, which is used by nvptx for example, and there's also ASM_OUTPUT_FUNCTION_PREFIX, which is apparently used by nothing in the current tree. For the end you could use ASM_DECLARE_FUNCTION_SIZE. FWIW I prefer the initialization with functions rather than NULL. Bernd