This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Half-baked i386 stack alignment thoughts
- To: john at feith dot com (John Wehle)
- Subject: Re: Half-baked i386 stack alignment thoughts
- From: Toshi Morita <tm2 at best dot com>
- Date: Thu, 2 Nov 2000 16:24:33 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
John Wehle wrote:
> The default code generation suffers from too many stack adjustments.
> -maccumulate-outgoing-args solves that problem, however it suffers
> from using a more expensive addressing mode.
Are you sure pushl is better?
Pushes are usually nasty on multiple-issue processors.
Unless you have funky bypass logic, it will suppress multiple instructions
issue because the next push can't issue until the previous push is finished
because it's dependent on the modified stack pointer.
> What I propose is making -maccumulate-outgoing-args the default
> and use push to place the arguments on the stack. I.e.:
>
> ...
> addl $8, %esp
> pushl %eax
> pushl %eax
> call subr
> movl %eax, %ebx
> ...
>
> Questions, comments, and suggestions welcomed.
This sounds bad for superscalar x86 members.
Toshi