Date: Tue, 5 Feb 2002 13:43:22 +0000 (GMT) From: Mike Silbersack <silby@silby.com> To: Bruce Evans <bde@zeta.org.au> Cc: Michal Mertl <mime@traveller.cz>, <hackers@freebsd.org>, <greg@bogslab.ucdavis.edu> Subject: Re: stack alignment issues Message-ID: <20020205134035.M1617-100000@patrocles.silby.com> In-Reply-To: <20020205163210.G25358-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Feb 2002, Bruce Evans wrote: > On Mon, 4 Feb 2002, Mike Silbersack wrote: > > > On Tue, 5 Feb 2002, Bruce Evans wrote: > > > I haven't done anything to clean up the patch. I hope the problem > > > will go away in future versions of gcc (align the stack at runtime in > > > the few routines that actually need it). > > > > Well, if Linux aligns the initial stack, the chance that gcc will have > > auto-alignment added sounds to be about zero. You might as well go ahead > > with your patch when you get a chance. > > There is a nonzero probability that the pessimization of aligning in almost > every routine will be fixed someday. Actually, the pessimization is worse > -- the alignment is done before every call. Even so, I'd wager that you can align the initial stack a few months ahead of when gcc's alignment is improved. > foo: > pushl %ebp > movl %esp,%ebp > subl $8,%esp # <- extra instruction for alignment (for foo) > addl $-12,%esp # <- extra instruction for alignment (for f1) What disgusting code. I find it amazing that they didn't even stick in some peephole optimizer to at least limit it to one operation. > My patch is not suitable for committing verbatim. It has 2 or 3 XXX's. > > Bruce True, but I'm sure you're capable of fixing it up if you so desire. :) Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020205134035.M1617-100000>