From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27713 invoked by alias); 12 Dec 2006 17:06:39 -0000 Received: (qmail 27693 invoked by uid 22791); 12 Dec 2006 17:06:37 -0000 X-Spam-Check-By: sourceware.org Received: from cpc1-cmbg8-0-0-cust558.cmbg.cable.ntl.com (HELO zebedee.littlepinkcloud.COM) (82.6.106.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Dec 2006 17:06:30 +0000 Received: from littlepinkcloud.COM (localhost.localdomain [127.0.0.1]) by zebedee.littlepinkcloud.COM (8.13.6/8.13.5) with ESMTP id kBCH68ft000317; Tue, 12 Dec 2006 17:06:09 GMT Received: (from aph@localhost) by littlepinkcloud.COM (8.13.6/8.13.5/Submit) id kBCH67Nc000308; Tue, 12 Dec 2006 17:06:07 GMT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17790.57726.696229.240657@zebedee.pink> Date: Tue, 12 Dec 2006 17:06:00 -0000 From: Andrew Haley To: Ian Lance Taylor Cc: "Mark Kettenis" , "Jan Kratochvil" , gcc@gcc.gnu.org, libc-alpha@sources.redhat.com, gdb@sourceware.org, "Jakub Jelinek" , "Richard Henderson" Subject: Re: Unwinding CFI gcc practice of assumed `same value' regs In-Reply-To: References: <20061211190300.GA4372@host0.dyn.jankratochvil.net> <17790.46246.634400.638852@zebedee.pink> <22844.82.92.89.47.1165935102.squirrel@webmail.xs4all.nl> <17790.50417.668957.495292@zebedee.pink> X-Mailer: VM 7.19 under Emacs 21.4.1 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00105.txt.bz2 Ian Lance Taylor writes: > Andrew Haley writes: > > > In practice, %ebp either points to a call frame -- not necessarily the > > most recent one -- or is null. I don't think that having an optional > > frame pointer mees you can use %ebp for anything random at all, but we > > need to make a clarification request of the ABI. > > I don't see that as feasible. If %ebp/%rbp may be used as a general > callee-saved register, then it can hold any value. Sure, we already know that, as has been clear. The question is *if* %rbp may be used as a general callee-saved register that can hold any value. > And permitting %ebp/%rbp to hold any value is a very useful > optimization in a function which does not require a frame pointer, > since it gives the compiler an extra register to use. > > If you want to require %ebp/%rbp to hold a non-zero value, then you > are effectively saying that this optimization is forbidden. There is > no meaningful way to tell gcc "this is a general register, but you may > not store zero in it." It would be a poor tradeoff to forbid that > optimization in order to provide better support for exception > handling: exception handling is supposed to be unusual. Sure, that's reasonable: it's a good reason to suggest that the ABI spec (still in DRAFT state, I note!) might be changed. Andrew.