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: c++/9297


Here's the aforementioned alignment patch.  set_mem_attributes will
increase the alignment if appropriate to the type.

Booted and tested i686-pc-linux-gnu, applied to trunk.  I think this is
also appropriate for 3.3; what do others think?

2003-03-03  Jason Merrill  <jason at redhat dot com>

	* calls.c (compute_argument_addresses): Give the new MEMs a
	minimum alignment of PARM_BOUNDARY.

*** ./gcc/calls.c.~1~	Sun Feb 23 17:19:39 2003
--- ./gcc/calls.c	Mon Mar  3 01:35:45 2003
*************** compute_argument_addresses (args, argblo
*** 1634,1639 ****
--- 1634,1640 ----
  
  	  addr = plus_constant (addr, arg_offset);
  	  args[i].stack = gen_rtx_MEM (args[i].mode, addr);
+ 	  set_mem_align (args[i].stack, PARM_BOUNDARY);
  	  set_mem_attributes (args[i].stack,
  			      TREE_TYPE (args[i].tree_value), 1);
  
*************** compute_argument_addresses (args, argblo
*** 1644,1649 ****
--- 1645,1651 ----
  
  	  addr = plus_constant (addr, arg_offset);
  	  args[i].stack_slot = gen_rtx_MEM (args[i].mode, addr);
+ 	  set_mem_align (args[i].stack_slot, PARM_BOUNDARY);
  	  set_mem_attributes (args[i].stack_slot,
  			      TREE_TYPE (args[i].tree_value), 1);
  

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