From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1644 invoked by alias); 5 Jan 2007 11:05:12 -0000 Received: (qmail 1635 invoked by uid 22791); 5 Jan 2007 11:05:11 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 Jan 2007 11:05:06 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8) with ESMTP id l05B50gF004182; Fri, 5 Jan 2007 12:05:00 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8/Submit) id l05B4xl1024647; Fri, 5 Jan 2007 12:04:59 +0100 (CET) Date: Fri, 05 Jan 2007 11:05:00 -0000 Message-Id: <200701051104.l05B4xl1024647@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20070105064916.GS17211@adacore.com> (message from Joel Brobecker on Fri, 5 Jan 2007 10:49:16 +0400) Subject: Re: PING: [RFA/i386] 2 more patterns in i386_analyze_stack_align References: <20061220104945.GB27642@adacore.com> <20061231060844.GP3640@adacore.com> <200612311215.kBVCF75Z010607@brahms.sibelius.xs4all.nl> <20070105064916.GS17211@adacore.com> 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/msg00184.txt.bz2 > Date: Fri, 5 Jan 2007 10:49:16 +0400 > From: Joel Brobecker > > 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. Well, it seems a valid generalisation, so I have no problems in adding the patterns. Actually that's why I think we should also add %ebx. > . 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. Ah wait, that's true even for "absolute" code. I had a quick look at the GCC code and it seems to always treat %ebx as callee-saved. So I'm happy with leaving it out, but you could add a comment saying so to prevent us from having this same discussion in about two months ;-). Mark