Half-baked i386 stack alignment thoughts
John Wehle
john@feith.com
Thu Nov 2 16:45:00 GMT 2000
> 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.
My impression from the last time I looked at the Intel Pentium II optimization
manual (which was a while ago) is that several operations which modify the
stack pointer are handled as special cases.
> This sounds bad for superscalar x86 members.
The reports in the past have been that the performance of the current
accumulate-outgoing-args (which doesn't use pushl) is a mixed bag when
compared to not accumulating the outgoing args due (in part) to the
instructions being larger which affects code density.
My suggestion (in theory) should be no worst than the current default of
adjusting the stack and pushing the arguments. It remains to be seen if
practice is the same as theory in this case. :-)
BTW: I was looking to have:
addl $4, %esp
pushl %eax
optimized to:
mov %eax, (%esp)
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
More information about the Gcc
mailing list