From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19920 invoked by alias); 12 Dec 2002 21:46:57 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 19913 invoked from network); 12 Dec 2002 21:46:57 -0000 Received: from unknown (HELO nikam.ms.mff.cuni.cz) (195.113.18.106) by sources.redhat.com with SMTP; 12 Dec 2002 21:46:57 -0000 Received: from camelot.ms.mff.cuni.cz (kampanus.ms.mff.cuni.cz [195.113.18.107]) by nikam.ms.mff.cuni.cz (Postfix) with SMTP id 0E6E04DDF1; Thu, 12 Dec 2002 22:46:58 +0100 (CET) Received: by camelot.ms.mff.cuni.cz (sSMTP sendmail emulation); Thu, 12 Dec 2002 22:46:54 +0100 Date: Thu, 12 Dec 2002 13:59:00 -0000 From: Jan Hubicka To: Peter Barada Cc: jh@suse.cz, Peter.Barada@motorola.com, rth@redhat.com, gcc@gcc.gnu.org Subject: Re: Saga of m68k PIC continues Message-ID: <20021212214654.GR15490@kam.mff.cuni.cz> References: <200212112045.gBBKjnQ13223@hyper.wm.sps.mot.com> <20021211235940.GF6975@redhat.com> <200212120011.gBC0B5W08189@hyper.wm.sps.mot.com> <200212122025.gBCKPd819055@hyper.wm.sps.mot.com> <20021212202844.GJ15490@kam.mff.cuni.cz> <200212122039.gBCKdf519120@hyper.wm.sps.mot.com> <20021212204443.GK15490@kam.mff.cuni.cz> <200212122139.gBCLdPm20043@hyper.wm.sps.mot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212122139.gBCLdPm20043@hyper.wm.sps.mot.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2002-12/txt/msg00672.txt.bz2 > > While looking at the PIC code, I'm wondering if there is a way to > suppress setting up the global_table register if: > > 1) the funciton is static > 2) the function's address is not taken > 3) the function is a leaf. You can take a look at the i386. 3) can be easilly handled via current_function_is_leaf. > > If so then: > lea (%pc, _GLOBAL_OFFSET_TABLE_@GOTPC), %a5 > > doesn't need to be done in the function prologue since all callers to > the function have already setup %a5. As long as the function doesn't > modify %a5, everthing should just work... You can bypass a5 setup by optimizing call to static functions into PC relative calls, see of SYMBOL_REF_FLAG in i386... I don't think we handle the scheme with function addresses not taken and these two tricks are incompatible.... Honza > > -- > Peter Barada Peter.Barada@motorola.com > Wizard 781-852-2768 (direct) > WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)