From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21248 invoked by alias); 22 Mar 2004 18:21:20 -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 21215 invoked from network); 22 Mar 2004 18:21:17 -0000 Received: from unknown (HELO frothingslosh.sfbay.redhat.com) (66.187.237.200) by sources.redhat.com with SMTP; 22 Mar 2004 18:21:17 -0000 Received: from frothingslosh.sfbay.redhat.com (localhost.localdomain [127.0.0.1]) by frothingslosh.sfbay.redhat.com (8.12.10/8.12.10) with ESMTP id i2MILFT4014643; Mon, 22 Mar 2004 10:21:15 -0800 Received: (from rth@localhost) by frothingslosh.sfbay.redhat.com (8.12.10/8.12.10/Submit) id i2MILE3B014641; Mon, 22 Mar 2004 10:21:14 -0800 X-Authentication-Warning: frothingslosh.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Mon, 22 Mar 2004 23:09:00 -0000 From: Richard Henderson To: Dave Korn Cc: gcc@gcc.gnu.org Subject: Re: How can INITIAL_FRAME_POINTER_OFFSET be made correct? Message-ID: <20040322182114.GA14605@redhat.com> Mail-Followup-To: Richard Henderson , Dave Korn , gcc@gcc.gnu.org References: <20040319194927.GA26527@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-SW-Source: 2004-03/txt/msg01313.txt.bz2 On Mon, Mar 22, 2004 at 03:04:20PM -0000, Dave Korn wrote: > > I don't suppose your link register is marked CALL_USED? > > Turns out it certainly is, or at any rate it fixes my va-arg-11.c failure > and several others too. I'm not sure why it's a mistake, though: function > calls are performed by a jump-and-link instruction that clobbers the LR; in > the definition of CALL_USED_REGISTERS in the documentation, it seems to > suggest that means I should include it. Is it wrong because that counts as > being clobbered by the caller, rather than by the callee, perhaps? It's wrong because any function that clobbers the link register is very likely to need to save the link register so that it can be restored for the return. Not looking at sources, but I can well imagine that reload has an optimization that says that it needn't go back through the allocation loop if the new register it chose to use is call clobbered. r~