This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: new argument macro: INITIAL_ARGS_SIZE


On Fri, Mar 01, 2002 at 09:18:08AM +1100, Aldy Hernandez wrote:
> ! 	save_area = plus_constant (virtual_stack_vars_rtx,
> ! 				   - RS6000_VARARGS_SIZE);
> ! 	save_area
> ! 	  = plus_constant (virtual_stack_vars_rtx,
> ! 			   - RS6000_VARARGS_SIZE
> ! 			   + INITIAL_ARGS_SIZE (current_function_decl));

We're getting close.

I didn't notice this one last time.  This is wrong, I think.
virtual_stack_vars_rtx is frame_pointer plus STARTING_FRAME_OFFSET,
which should already include INITIAL_ARGS_SIZE.

Also, STARTING_FRAME_OFFSET should be using STACK_POINTER_OFFSET
instead of RS6000_SAVE_AREA.  As it is you're counting that space
twice: once from current_function_outgoing_args_size, since that
includes INITIAL_ARGS_SIZE, and once from the explicit reference
to RS6000_SAVE_AREA there in the macro.


r~


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