aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2009-02-18 02:16:03 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2009-02-17 18:16:03 -0800
commitbce08d5003e0cb1f63cbe92895be8cbcc5c48547 (patch)
tree69c176a033d12f090d8e12d52fe61b4ace95034f /gcc/doc
parent5600f233ef5f740908f0480b76936e503b1d4cda (diff)
downloadgcc-bce08d5003e0cb1f63cbe92895be8cbcc5c48547.zip
gcc-bce08d5003e0cb1f63cbe92895be8cbcc5c48547.tar.gz
gcc-bce08d5003e0cb1f63cbe92895be8cbcc5c48547.tar.bz2
re PR target/39082 (union with long double doesn't follow x86-64 psABI)
gcc/ 2009-02-17 H.J. Lu <hongjiu.lu@intel.com> PR target/39082 * c.opt (Wabi): Support C and ObjC. (Wpsabi): New. * c-opts.c (c_common_handle_option): Handle OPT_Wabi. * config/i386/i386.c (classify_argument): Warn once about the ABI change when passing union with long double. * doc/invoke.texi: Update -Wabi for warning psABI changes. gcc/testsuite/ 2009-02-17 H.J. Lu <hongjiu.lu@intel.com> PR target/39082 * g++.dg/compat/struct-layout-1_generate.c (dg_options): Add -Wno-abi for x86. * gcc.dg/compat/struct-layout-1_generate.c (dg_options): Likewise. * gcc.target/i386/pr39082-1.c: New. * gcc.target/x86_64/abi/abi-x86_64.exp (additional_flags): Add -Wno-abi. * gcc.target/x86_64/abi/args.h (XMM_T): Add _m64 and _m128 if CHECK_M64_M128 is defined. (check_f_arguments): Add "do". (check_vector_arguments): New. (check_m64_arguments): Likewise. (check_m128_arguments): Likewise. * gcc.target/x86_64/abi/defines.h: Include <xmmintrin.h>. (CHECK_M64_M128): Define. * gcc.target/x86_64/abi/test_m64m128_returning.c: New. Based on abitest. * gcc.target/x86_64/abi/test_passing_m64m128.c: Likewise. * gcc.target/x86_64/abi/test_passing_structs.c: Define __m128 tests only if CHECK_M64_M128 is defined. * gcc.target/x86_64/abi/test_passing_structs.c (m128_struct): New. (m128_2_struct): Likewise. (check_struct_passing5): Likewise. (check_struct_passing6): Likewise. (main): Test struct with __m128 if CHECK_M64_M128 is defined. * gcc.target/x86_64/abi/test_passing_unions.c (un4): New. (un5): Likewise. (check_union_passing4): Likewise. (main): Test union with __m128 if CHECK_M64_M128 is defined. From-SVN: r144257
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi23
1 files changed, 22 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6d36794..f52b643 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1966,7 +1966,7 @@ Do not assume @samp{inline} for functions defined inside a class scope.
functions will have linkage like inline functions; they just won't be
inlined by default.
-@item -Wabi @r{(C++ and Objective-C++ only)}
+@item -Wabi @r{(C, Objective-C, C++ and Objective-C++ only)}
@opindex Wabi
@opindex Wno-abi
Warn when G++ generates code that is probably not compatible with the
@@ -2066,6 +2066,27 @@ Instantiations of these templates may be mangled incorrectly.
@end itemize
+It also warns psABI related changes. The known psABI changes at this
+point include:
+
+@itemize @bullet
+
+@item
+For SYSV/x86-64, when passing union with long double, it is changed to
+pass in memory as specified in psABI. For example:
+
+@smallexample
+union U @{
+ long double ld;
+ int i;
+@};
+@end smallexample
+
+@noindent
+@code{union U} will always be passed in memory.
+
+@end itemize
+
@item -Wctor-dtor-privacy @r{(C++ and Objective-C++ only)}
@opindex Wctor-dtor-privacy
@opindex Wno-ctor-dtor-privacy