This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix some sse parameter alignment bug
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Jul 2005 14:05:28 -0700
- Subject: fix some sse parameter alignment bug
... which i've gone and misplaced. But passes i686 and x86_64 testing.
r~
* function.c (locate_and_pad_parm): Record parameter alignment in
stack_alignment_needed.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.634
diff -u -p -d -r1.634 function.c
--- function.c 6 Jul 2005 23:13:51 -0000 1.634
+++ function.c 7 Jul 2005 21:02:42 -0000
@@ -3256,7 +3256,7 @@ locate_and_pad_parm (enum machine_mode p
{
tree sizetree;
enum direction where_pad;
- int boundary;
+ unsigned int boundary;
int reg_parm_stack_space = 0;
int part_size_in_regs;
@@ -3291,6 +3291,13 @@ locate_and_pad_parm (enum machine_mode p
locate->where_pad = where_pad;
locate->boundary = boundary;
+ /* Remember if the outgoing parameter requires extra alignment on the
+ calling function side. */
+ if (boundary > PREFERRED_STACK_BOUNDARY)
+ boundary = PREFERRED_STACK_BOUNDARY;
+ if (cfun->stack_alignment_needed < boundary)
+ cfun->stack_alignment_needed = boundary;
+
#ifdef ARGS_GROW_DOWNWARD
locate->slot_offset.constant = -initial_offset_ptr->constant;
if (initial_offset_ptr->var)