From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20493 invoked by alias); 12 Dec 2006 16:55:09 -0000 Received: (qmail 20460 invoked by uid 22791); 12 Dec 2006 16:55:08 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.12) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Dec 2006 16:55:02 +0000 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id kBCGsGjo004562; Tue, 12 Dec 2006 08:54:16 -0800 Received: from localhost.localdomain.google.com (dhcp-172-18-118-195.corp.google.com [172.18.118.195]) (authenticated bits=0) by zps35.corp.google.com with ESMTP id kBCGs83T019891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 12 Dec 2006 08:54:08 -0800 To: Andrew Haley 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 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> From: Ian Lance Taylor Date: Tue, 12 Dec 2006 16:55:00 -0000 In-Reply-To: <17790.50417.668957.495292@zebedee.pink> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00103.txt.bz2 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. 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. Ian