public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* PREFERRED_STACK_BOUNDARY and !PUSH_ARGS_REVERSED
@ 2000-03-22  3:06 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2000-03-22  3:06 UTC (permalink / raw)
  To: rth, law, egcs, bernds

Hi
I am trying to cleanup the PREFERRED_STACK_BOUNDARY handling code in calls.c
in order to do the alignment right before first argument is pushed.  This
will simplify the handling of nested function calls and allow to do the
deffer_pop optimization even in the nested levels.

but there is one bit I don't understand. on !PUSH_ARGS_REVERSED the stack
adjustments is done after the arguments are pushed. I believe this can't work,
since the adjustment made depend on the value of pending_stack_adjust and
args_size_so_far, so the called function will not see the arguments at the
fixed delta from frame pointer.

So my question is how this is supposed to work?  How does the passing on
!PUSH_ARGS_REVERSED look like? Does the function receive some pointer to the
start of argument block or the varargs is not supported?

Perhaps correct solution is to align the block before as we do for normal
order stack too. Other solution that comes into mind is to align both
before (to PREFERRED_STACK_BOUNDARY) and after.  

What do you think?

Last question is about variable argument size. Where I can find testcase for
this code?  I believe the PREFERRED_STACK_BOUNDARY handling is badly broken
there.

Honza

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-22  3:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-22  3:06 PREFERRED_STACK_BOUNDARY and !PUSH_ARGS_REVERSED Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).