Half-baked i386 stack alignment thoughts
John Wehle
john@feith.com
Thu Nov 2 22:34:00 GMT 2000
>On Thu, Nov 02, 2000 at 07:00:39PM -0500, John Wehle wrote:
>> 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
>
> It's an interesting idea, though I doubt you'll be able to
> do it with the accumulate-outgoing-args logic.
I'm curious what you mean by that. What I had in mind was modifying
calls.c so that ACCUMULATE_OUTGOING_ARGS controls if a preallocated
space is used and PUSH_ARGS controls whether move or push instructions
are used. Currently having ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS
both true is documented as an illegal configuration.
Unfortunately calls.c appears somewhat complex and fragile ...
a combination which may increase the number of iterations required
to get it right. :-( However, I'm willing to burn the time if
it seems worthwhile.
-- 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