This is the mail archive of the 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: RFC: -msse/-mavx change x86 ABI

Hi HJ,

In the Intel compiler, we guarantee that outgoing arguments are aligned properly except in the case of 8-byte alignment on IA-32.  We will dynamically align the stack and/or insert padding in the outgoing argument block as necessary to make this happen.

Note that this includes both the alignment requirements of the built-in types as specified by the ABI and alignment requirements specified by the programmer via __attribute__((aligned(N))) or __declspec(align(N)).

To summarize

1) For Intel64, always properly align outgoing parameter.
2) For IA-32, properly align parameter if alignment is >= 16 bytes.  Otherwise, align to 4 bytes.

Dave Kreitzer

-----Original Message-----
From: H.J. Lu [] 
Sent: Friday, August 20, 2010 10:53 AM
To: GCC Patches; Uros Bizjak; Jan Hubicka; Kreitzer, David L; Girkar, Milind
Subject: Re: RFC: -msse/-mavx change x86 ABI

On Mon, Jul 19, 2010 at 7:50 AM, H.J. Lu <> wrote:
> Hi,
> When passing a parameter with alignment >= 16byte on stack,
> ?-msse/-mavx may change its alignment on stack. See:
> Before gcc 4.4, we couldn't align the stack properly. The
> maximum alignment we could generate for parameters on
> stack we supported is the alignment of incoming stack. Now
> we can properly align the stack.
> How should we fix this bug? There are several different
> approaches in the PR. Any comments?

CC Intel compiler people.  David, Milind, do you have any



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