This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Half-baked i386 stack alignment thoughts


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]