Re: stack alignment issues

2002-02-05 Thread Simon 'corecode' Schubert
On Mon, 04 Feb 2002 15:36:11 -0800 Terry Lambert <[EMAIL PROTECTED]> wrote: > Alfred Perlstein wrote: > > > 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 c

Re: stack alignment issues

2002-02-05 Thread Mike Silbersack
On Tue, 5 Feb 2002, Alfred Perlstein wrote: > * Bruce Evans <[EMAIL PROTECTED]> [020205 12:09] wrote: > > On Tue, 5 Feb 2002, Mike Silbersack wrote: > > > > > On Tue, 5 Feb 2002, Bruce Evans wrote: > > > > foo: > > > > pushl %ebp > > > > movl %esp,%ebp > > > > subl $8,%es

Re: stack alignment issues

2002-02-05 Thread Alfred Perlstein
* Matthew Dillon <[EMAIL PROTECTED]> [020205 12:28] wrote: > > I've been forced to add -mpreferred-stack-boundary=2 to critical code > in certain projects to get rid of the crap GCC adds to the assembly. > > I don't mind if GCC aligns the stack for routines that actually need > i

Re: stack alignment issues

2002-02-05 Thread Matthew Dillon
:> > :> > 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. :> :> It's clearly the result of work in progress :-). : :I see really cruddy stuff like this every time i do a gcc -S, don't :they watch for and t

Re: stack alignment issues

2002-02-05 Thread Alfred Perlstein
* Bruce Evans <[EMAIL PROTECTED]> [020205 12:09] wrote: > On Tue, 5 Feb 2002, Mike Silbersack wrote: > > > On Tue, 5 Feb 2002, Bruce Evans wrote: > > > foo: > > > pushl %ebp > > > movl %esp,%ebp > > > subl $8,%esp# <- extra instruction for alignment (for foo) > > > addl $-12,%

Re: stack alignment issues

2002-02-05 Thread Bruce Evans
On Tue, 5 Feb 2002, Mike Silbersack wrote: > On Tue, 5 Feb 2002, Bruce Evans wrote: > > foo: > > pushl %ebp > > movl %esp,%ebp > > subl $8,%esp# <- extra instruction for alignment (for foo) > > addl $-12,%esp # <- extra instruction for alignment (for f1) > > W

Re: stack alignment issues

2002-02-05 Thread Mike Silbersack
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 rout

Re: stack alignment issues

2002-02-05 Thread Bruce Evans
On Tue, 5 Feb 2002, Nik Clayton wrote: > On Tue, Feb 05, 2002 at 05:01:29PM +1100, Bruce Evans wrote: > > My patch is not suitable for committing verbatim. It has 2 or 3 XXX's. > > Do you make these patches available anywhere, so that other people can > look over them and maybe help you on the X

Re: stack alignment issues

2002-02-05 Thread Nik Clayton
Bruce, On Tue, Feb 05, 2002 at 05:01:29PM +1100, Bruce Evans wrote: > My patch is not suitable for committing verbatim. It has 2 or 3 XXX's. Do you make these patches available anywhere, so that other people can look over them and maybe help you on the XXX'd sections? N -- FreeBSD: The Power

Re: stack alignment issues

2002-02-04 Thread Bruce Evans
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 alig

Re: stack alignment issues

2002-02-04 Thread Terry Lambert
Alfred Perlstein wrote: > > 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. > > I agree, either way we should try to optimized the current situation, > e

Re: stack alignment issues

2002-02-04 Thread Alfred Perlstein
* Mike Silbersack <[EMAIL PROTECTED]> [020204 10:04] wrote: > > On Tue, 5 Feb 2002, Bruce Evans wrote: > > > On Mon, 4 Feb 2002, Michal Mertl wrote: > > > > > Did you look at the patch by Bruce at > > > http://groups.yahoo.com/group/freebsd-current/message/39605 ? > > > > > > Bruce, is it still

Re: stack alignment issues

2002-02-04 Thread Mike Silbersack
On Tue, 5 Feb 2002, Bruce Evans wrote: > On Mon, 4 Feb 2002, Michal Mertl wrote: > > > Did you look at the patch by Bruce at > > http://groups.yahoo.com/group/freebsd-current/message/39605 ? > > > > Bruce, is it still fresh in your memory? Can you comment on the patch - > > can it be commited in

Re: stack alignment issues

2002-02-04 Thread Bruce Evans
On Mon, 4 Feb 2002, Michal Mertl wrote: > Did you look at the patch by Bruce at > http://groups.yahoo.com/group/freebsd-current/message/39605 ? > > Bruce, is it still fresh in your memory? Can you comment on the patch - > can it be commited in some form? I haven't done anything to clean up the p

Re: stack alignment issues

2002-02-04 Thread Michal Mertl
Greg Shenaut wrote: > In message <[EMAIL PROTECTED]>, Dan Nelson cleopede: > >In the last episode (Feb 03), Alfred Perlstein said: > >> * Michal Mertl <[EMAIL PROTECTED]> [020203 08:17] wrote: > >> Not really sure what to make of this, anyone else know how we ought > >> to fix this? > > > >This ha

Re: stack alignment issues (was: unbelievable benchmark output)

2002-02-03 Thread Greg Shenaut
In message <[EMAIL PROTECTED]>, Dan Nelson cleopede: >In the last episode (Feb 03), Alfred Perlstein said: >> * Michal Mertl <[EMAIL PROTECTED]> [020203 08:17] wrote: >> Not really sure what to make of this, anyone else know how we ought >> to fix this? > >This has actually been an issue for ages,

Re: stack alignment issues (was: unbelievable benchmark output)

2002-02-03 Thread Dan Nelson
In the last episode (Feb 03), Alfred Perlstein said: > * Michal Mertl <[EMAIL PROTECTED]> [020203 08:17] wrote: > > Several runs of the program take about the same time but the time > > changes wildly when the executable is called differently. > > > > The only thing which I can think of that can

Re: stack alignment issues (was: unbelievable benchmark output)

2002-02-03 Thread Miguel Mendez
On Sun, 3 Feb 2002 08:59:41 -0800 Alfred Perlstein <[EMAIL PROTECTED]> wrote: Hi, > It sure looks like an alignment issue. If you print the address > of 'i' and 'j' in the attached program you can see for the fast > case they are aligned to 8 byte boundries, but when it's slow they > are at an

stack alignment issues (was: unbelievable benchmark output)

2002-02-03 Thread Alfred Perlstein
* Michal Mertl <[EMAIL PROTECTED]> [020203 08:17] wrote: > I wrote a simple program which does this: > > gettimeofday > something (takes several seconds) > gettimeofday > print time elapsed > > Several runs of the program take about the same time but the time > changes wildly when the executable