public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFC: -msse/-mavx change x86 ABI
@ 2010-07-19 14:50 H.J. Lu
  2010-08-20 15:17 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2010-07-19 14:50 UTC (permalink / raw)
  To: GCC Patches, Uros Bizjak, Jan Hubicka

Hi,

When passing a parameter with alignment >= 16byte on stack,
 -msse/-mavx may change its alignment on stack. See:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44948

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?

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFC: -msse/-mavx change x86 ABI
  2010-07-19 14:50 RFC: -msse/-mavx change x86 ABI H.J. Lu
@ 2010-08-20 15:17 ` H.J. Lu
  2010-08-20 15:50   ` Kreitzer, David L
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2010-08-20 15:17 UTC (permalink / raw)
  To: GCC Patches, Uros Bizjak, Jan Hubicka, Kreitzer, David L, Girkar, Milind

On Mon, Jul 19, 2010 at 7:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hi,
>
> When passing a parameter with alignment >= 16byte on stack,
>  -msse/-mavx may change its alignment on stack. See:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44948
>
> 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
comments?

Thanks.


-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: RFC: -msse/-mavx change x86 ABI
  2010-08-20 15:17 ` H.J. Lu
@ 2010-08-20 15:50   ` Kreitzer, David L
  0 siblings, 0 replies; 3+ messages in thread
From: Kreitzer, David L @ 2010-08-20 15:50 UTC (permalink / raw)
  To: H.J. Lu, GCC Patches, Uros Bizjak, Jan Hubicka, Girkar, Milind

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 [mailto:hjl.tools@gmail.com] 
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 <hjl.tools@gmail.com> wrote:
> Hi,
>
> When passing a parameter with alignment >= 16byte on stack,
>  -msse/-mavx may change its alignment on stack. See:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44948
>
> 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
comments?

Thanks.


-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-20 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 14:50 RFC: -msse/-mavx change x86 ABI H.J. Lu
2010-08-20 15:17 ` H.J. Lu
2010-08-20 15:50   ` Kreitzer, David L

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).