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: PATCH to avoid copying tail padding (was: GCC 3.2)


One more problem: we were using expr_size in store_one_arg to determine how
much space to push.  That amount should be determined by the size of the
type, not the data size of the expression.

Tested i686-pc-linux-gnu, applied trunk and 3.2 branch.

2002-09-12  Jason Merrill  <jason@redhat.com>

	* calls.c (store_one_arg): Use size_in_bytes to determine the
	amount of space to push.

*** calls.c.~1~	Fri Aug 30 20:34:24 2002
--- calls.c	Tue Sep 10 13:37:50 2002
*************** store_one_arg (arg, argblock, flags, var
*** 4512,4518 ****
  	     emit_push_insn for BLKmode is careful to avoid it.  */
  	  excess = (arg->size.constant - int_size_in_bytes (TREE_TYPE (pval))
  		    + partial * UNITS_PER_WORD);
! 	  size_rtx = expr_size (pval);
  	}
  
        if ((flags & ECF_SIBCALL) && GET_CODE (arg->value) == MEM)
--- 4512,4519 ----
  	     emit_push_insn for BLKmode is careful to avoid it.  */
  	  excess = (arg->size.constant - int_size_in_bytes (TREE_TYPE (pval))
  		    + partial * UNITS_PER_WORD);
! 	  size_rtx = expand_expr (size_in_bytes (TREE_TYPE (pval)),
! 				  NULL_RTX, TYPE_MODE (sizetype), 0);
  	}
  
        if ((flags & ECF_SIBCALL) && GET_CODE (arg->value) == MEM)

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