ACCUMULATE_OUTGOING_ARGS and the i386

Jeffrey A Law law@cygnus.com
Thu Oct 22 21:15:00 GMT 1998


  In message < 199810212227.SAA06575@jwlab.FEITH.COM >you write:
  > Ultimately ACCUMULATE_OUTGOING_ARGS needs to build a stack frame
  > for a call which is compatible with what the called function expects.
Right.

  > It appears that PUSH_ROUNDING affects the stack layout.  How is
  > ACCUMULATE_OUTGOING_ARGS guaranteed to create the same stack layout
  > on a platform which previously didn't use ACCUMULATE_OUTGOING_ARGS
  > and defined PUSH_ROUNDING if ACCUMULATE_OUTGOING_ARGS doesn't use
  > information provided by PUSH_ROUNDING?
That's a good question. 

  > For example ... if the platform's calling convention requires two bytes
  > to be allocated in the stack when only one byte is being passed what
  > happens when using ACCUMULATE_OUTGOING_ARGS?  This is handled when
  > not using ACCUMULATE_OUTGOING_ARGS by correctly defining PUSH_ROUNDING
  > and the push patterns.
PUSH_ROUNDING is generall to deal with architectures that have a push
byte instruction which actually pushes a 16bit word and similar cases.

I guess the first thing to do is try and trigger a case where PUSH_ROUNDING
does something to the stack frame.  Probably by playing with trying to
pass byte sized args to prototyped functions.

One we know exactly when and how PUSH_ROUNDING effects argument layout we'll
be able to determine what (if anything) needs to be done to A_O_A.

jeff



More information about the Gcc mailing list