This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: x86: Check BIGGEST_ALIGNMENT for alignment
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Uros Bizjak" <ubizjak at gmail dot com>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Danny Smith" <dannysmith at clear dot net dot nz>, dominiq at lps dot ens dot fr
- Date: Tue, 25 Mar 2008 12:46:32 -0700
- Subject: Re: PATCH: x86: Check BIGGEST_ALIGNMENT for alignment
- References: <47E952F0.80402@gmail.com>
On Tue, Mar 25, 2008 at 12:30 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> > 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.
> >
>
> -ENOTESTINGINFO?
>
> Please also remove redefinition of the default value in cygming.h,
> around line 330.
>
> OK for mainline with this change, but please wait 24h for possible
> comments from cygming maintainer (CC'd), and perhaps for Darwin people
> (CC'd) if they want to test the patch in advance.
>
Hi,
Here is the patch with cygming.h change. I will wait 24 hours before checking
it in.
Thanks.
H.J.
2008-03-25 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/cygming.h (BIGGEST_ALIGNMENT): Removed.
* config/i386/i386.c (ix86_function_arg_boundary): Check
BIGGEST_ALIGNMENT instead of 128.
(setup_incoming_varargs_64): Likewise.
--- gcc/config/i386/cygming.h.big 2008-01-29 09:02:25.000000000 -0800
+++ gcc/config/i386/cygming.h 2008-03-25 12:43:46.000000000 -0700
@@ -327,10 +327,6 @@ do { \
#undef MS_AGGREGATE_RETURN
#define MS_AGGREGATE_RETURN 1
-/* No data type wants to be aligned rounder than this. */
-#undef BIGGEST_ALIGNMENT
-#define BIGGEST_ALIGNMENT 128
-
/* Biggest alignment supported by the object file format of this
machine. Use this macro to limit the alignment which can be
specified using the `__attribute__ ((aligned (N)))' construct. If
--- gcc/config/i386/i386.c.big 2008-03-24 17:45:25.000000000 -0700
+++ gcc/config/i386/i386.c 2008-03-25 12:43:19.000000000 -0700
@@ -4604,8 +4604,8 @@ ix86_function_arg_boundary (enum machine
align = PARM_BOUNDARY;
}
}
- if (align > 128)
- align = 128;
+ if (align > BIGGEST_ALIGNMENT)
+ align = BIGGEST_ALIGNMENT;
return align;
}
@@ -5002,8 +5002,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 ();