This is the mail archive of the gcc-patches@gcc.gnu.org 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]

PATCH: PR target/44948: -msse/-mavx change x86 ABI


On Fri, Aug 20, 2010 at 8:39 AM, Kreitzer, David L
<david.l.kreitzer@intel.com> wrote:
> 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
>

Here is the patch to implement this.  Tested on Linux/ia32 and Linux/Intel64.
OK for trunk?

Thanks.


-- 
H.J.
---
gcc/

2010-08-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/44948
	* config/i386/i386.c (ix86_old_function_arg_boundary): New.
	(ix86_function_arg_boundary): Always align parameters on stack
	in 64bit and align parameters with alignment >= 16byte on stack
	in 32bit.  Warn alignment change.

gcc/testsuite/

2010-08-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/44948
	* g++.dg/abi/param2.C: Add -Wno-psabi for ilp32 x86.
	* g++.dg/vect/pr33860a.cc: Likewise.
	* gcc.c-torture/compile/20070522-1.c: Likewise.
	* gcc.dg/compat/struct-align-1_x.c: Likewise.
	* gcc.dg/compat/struct-align-1_y.c: Likewise.
	* gcc.dg/compat/struct-align-2_x.c: Likewise.
	* gcc.dg/compat/struct-align-2_y.c: Likewise.
	* gcc.dg/pr44136.c: Likewise.

	* gcc.c-torture/compile/pr33617.c: Add -Wno-psabi for x86.
	* gcc.dg/compat/vector-1_x.c: Likewise.
	* gcc.dg/compat/vector-1_y.c: Likewise.
	* gcc.dg/compat/vector-2_x.c: Likewise.
	* gcc.dg/compat/vector-2_y.c: Likewise.
	* gcc.dg/pr43300.c: Likewise.

	* gcc.dg/compat/vector-1a_x.c: Add -Wno-psabi.
	* gcc.dg/compat/vector-1a_y.c: Likewise.
	* gcc.dg/compat/vector-1b_x.c: Likewise.
	* gcc.dg/compat/vector-1b_y.c: Likewise.
	* gcc.dg/compat/vector-2a_x.c: Likewise.
	* gcc.dg/compat/vector-2a_y.c: Likewise.
	* gcc.dg/compat/vector-2b_x.c: Likewise.
	* gcc.dg/compat/vector-2b_y.c: Likewise.
	* gcc.target/i386/pr39162.c: Likewise.
	* gcc.target/i386/pr40906-2.c: Likewise.
	* gcc.target/i386/sse-5.c: Likewise.

	* gcc.dg/pr35442.c: Prune ABI change warnings.

	* gcc.c-torture/execute/pr38151.x: New.
	* gcc.target/i386/pr44948-1a.c: Likewise.
	* gcc.target/i386/pr44948-1b.c: Likewise.
	* gcc.target/i386/pr44948-2a.c: Likewise.
	* gcc.target/i386/pr44948-2b.c: Likewise.

Attachment: gcc-pr44948-7.patch
Description: Text document


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