This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: x86: Check BIGGEST_ALIGNMENT for alignment
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 25 Mar 2008 08:52:39 -0700
- Subject: PATCH: x86: Check BIGGEST_ALIGNMENT for alignment
Hi,
Intel AVX has 256bit vector registers. BIGGEST_ALIGNMENT will
be changed to
#define BIGGEST_ALIGNMENT (TARGET_AVX ? 256: 128)
This patch checks BIGGEST_ALIGNMENT for the biggest alignment,
instead of 128.
H.J.
2008-03-25 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_function_arg_boundary): Check
BIGGEST_ALIGNMENT instead of 128.
(setup_incoming_varargs_64): Likewise.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 1889)
+++ config/i386/i386.c (working copy)
@@ -4684,8 +4684,8 @@ ix86_function_arg_boundary (enum machine
align = PARM_BOUNDARY;
}
}
- if (align > 128)
- align = 128;
+ if (align > BIGGEST_ALIGNMENT)
+ align = BIGGEST_ALIGNMENT;
return align;
}
@@ -5082,8 +5082,8 @@ setup_incoming_varargs_64 (CUMULATIVE_AR
We also may end up assuming that only 64bit values are stored in SSE
register let some floating point program work. */
- if (ix86_preferred_stack_boundary >= 128)
- cfun->stack_alignment_needed = 128;
+ if (ix86_preferred_stack_boundary >= BIGGEST_ALIGNMENT)
+ cfun->stack_alignment_needed = BIGGEST_ALIGNMENT;
save_area = frame_pointer_rtx;
set = get_varargs_alias_set ();