This is the mail archive of the gcc-bugs@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]

[Bug middle-end/17052] [3.5 Regression] altivec varargs failure if no optimization


------- Additional Comments From amodra at bigpond dot net dot au  2004-08-23 08:47 -------
And the reason for the stack slot problem is
#define STARTING_FRAME_OFFSET						\
  (RS6000_ALIGN (current_function_outgoing_args_size,			\
		 TARGET_ALTIVEC ? 16 : 8)				\
   + RS6000_VARARGS_AREA						\
   + RS6000_SAVE_AREA)

and
#define RS6000_VARARGS_AREA ((cfun->machine->sysv_varargs_p) ?
RS6000_VARARGS_SIZE : 0)

with sysv_varargs_p not being set until TARGET_SETUP_INCOMING_VARARGS is
called, but this is later than the stack slots are assigned.

See cfgexpand.c:tree_expand_cfg

  /* Expand the variables recorded during gimple lowering.  */
  expand_used_vars ();

  /* Set up parameters and prepare for return, for the function.  */
  expand_function_start (current_function_decl);

and note that setup_incoming_varargs is called via expand_function_start.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|powerpc64-unknown-linux-gnu |powerpc-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17052


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