This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: c++/9297
- From: Jason Merrill <jason at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "rth at redhat dot com" <rth at redhat dot com>
- Date: Mon, 03 Mar 2003 16:20:04 -0500
- Subject: Re: PATCH: c++/9297
- References: <117850000.1045863286@warlock.codesourcery.com>
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);