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


>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  |                         |
-------------------------------------------------------------------------


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