From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26253 invoked by alias); 5 Jan 2007 06:48:38 -0000 Received: (qmail 26244 invoked by uid 22791); 5 Jan 2007 06:48:37 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 Jan 2007 06:48:31 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id BE32F48CC35; Fri, 5 Jan 2007 01:48:29 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17949-01-3; Fri, 5 Jan 2007 01:48:29 -0500 (EST) Received: from takamaka.act-europe.fr (AStDenis-105-1-31-133.w80-8.abo.wanadoo.fr [80.8.132.133]) by nile.gnat.com (Postfix) with ESMTP id D2C5848CC05; Fri, 5 Jan 2007 01:48:28 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 1000) id CA49534C099; Fri, 5 Jan 2007 10:49:16 +0400 (RET) Date: Fri, 05 Jan 2007 06:48:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: PING: [RFA/i386] 2 more patterns in i386_analyze_stack_align Message-ID: <20070105064916.GS17211@adacore.com> References: <20061220104945.GB27642@adacore.com> <20061231060844.GP3640@adacore.com> <200612311215.kBVCF75Z010607@brahms.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200612311215.kBVCF75Z010607@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00169.txt.bz2 Hi Mark, A followup on a recent discussion: > Hmm, you're missing the %ebx case here. Now on ELF systems, you'll > probably never see it since %ebx is used for GOT access, but on other > object formats I don't think there is any reason why GCC wouldn't > choose to use %ebx as well. I consulted with Olivier Hainque and here is what I learnt: . The current FSF GCC only uses %ecx, and punts on any realignment request for a function which needs ecx for other purposes, like neted functions with a static chain. . We have a local enhancement that takes advantage of the fact that when ecx is not available, edx and then eax are used. I wasn't aware of the fact that this change was local when I submitted my patch. I don't know yet why this change was not contributed, probably lack of time. Hopefully it will be included soon. . In terms of what registers can be ued in the realignment sequence, Olivier said: The "available" registers are the ABI caller-saved registers "dead" on both entry and exit of the function, that is, not used for arg passing, static chain or value returning. . The current implementation is SVR4 ABI oriented AFAICT, and ebx is not a possible candidate because it is callee-saved. We're not sure about the status of non-elf targets. As a result, I think it's 50/50 in terms of adding the %ebx sequence. I would recommend adding it anyway, with a small comment, just to be on the safe side. I don't think we can break anything in the debugger with such a change, and yet nothing worse than a broken callstack when you're trying to track a bug down. Let me know what you think. -- Joel