From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Hubicka To: rth@cygnus.com, law@cygnus.com, egcs@egcs.cygnus.com, bernds@cygnus.co.uk Subject: PREFERRED_STACK_BOUNDARY and !PUSH_ARGS_REVERSED Date: Wed, 22 Mar 2000 03:06:00 -0000 Message-id: <20000322120640.B8072@atrey.karlin.mff.cuni.cz> X-SW-Source: 2000-03/msg00553.html 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