Re: Question on i386 stack adjustment optimization

2005-10-18 Thread H. J. Lu
On Tue, Oct 18, 2005 at 07:10:52PM +0200, Jan Hubicka wrote: > > I modified the gcc i386 backend. Now my gcc optimizes function prologue > > > > movq%rbx, -16(%rsp) > > movq%rbp, -8(%rsp) > > subq$16, %rsp > > > > to > > movq%rbx, -16(%rsp) > > movq%rbp, -8

Re: Question on i386 stack adjustment optimization

2005-10-18 Thread Jan Hubicka
> I modified the gcc i386 backend. Now my gcc optimizes function prologue > > movq%rbx, -16(%rsp) > movq%rbp, -8(%rsp) > subq$16, %rsp > > to > movq%rbx, -16(%rsp) > movq%rbp, -8(%rsp) > pushq %rax > pushq %rax > > The change was

Re: Question on i386 stack adjustment optimization

2005-10-17 Thread Ross Ridge
>I have a question. It is OK to turn stack pointer addition into >pop instructions with a scratch register. But I don't see how you can >turn stack pointer substraction into push instructions with a >scratch register since push will change the contents of the stack, >in addition to stack pointer.

Question on i386 stack adjustment optimization

2005-10-17 Thread H. J. Lu
I modified the gcc i386 backend. Now my gcc optimizes function prologue movq%rbx, -16(%rsp) movq%rbp, -8(%rsp) subq$16, %rsp to movq%rbx, -16(%rsp) movq%rbp, -8(%rsp) pushq %rax pushq %rax The change was introduced b