This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PING: PATCH: PR target/39082: union with long double doesn't follow x86-64 psABI
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Richard Guenther <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org, matz at suse dot de, jh at suse dot cz
- Date: Tue, 17 Feb 2009 16:51:36 -0800
- Subject: PING: PATCH: PR target/39082: union with long double doesn't follow x86-64 psABI
On Fri, Feb 13, 2009 at 8:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Feb 10, 2009 at 10:41 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Feb 10, 2009 at 9:43 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Tue, Feb 10, 2009 at 7:17 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>>>> On Thu, Feb 05, 2009 at 12:56:06PM -0800, H.J. Lu wrote:
>>>>> --Wunused-value -Wunused-variable @gol
>>>>> +-Wunused-value -Wunused-variable -Wunion-with-long-double @gol
>>>>
>>>> I think inventing a new -W* option for this is a bad idea, I'd prefer
>>>> the warning to be covered by -Wabi (I know it is ATM C++/ObjC++ only,
>>>> but it could be easily changed to be a common warning).
>>>
>>> -Wabi is off by default. Don't we want this warning on by default?
>>>
>>>>> --- testsuite/gcc.dg/compat/struct-layout-1_generate.c (revision 5181)
>>>>> +++ testsuite/gcc.dg/compat/struct-layout-1_generate.c (working copy)
>>>>> @@ -44,7 +44,7 @@ along with GCC; see the file COPYING3.
>>>>>
>>>>> const char *dg_options[] = {
>>>>> "/* { dg-options \"%s-I%s\" } */\n",
>>>>> -"/* { dg-options \"%s-I%s -mno-mmx\" { target i?86-*-* x86_64-*-* } } */\n",
>>>>> +"/* { dg-options \"%s-I%s -mno-mmx -Wno-union-with-long-double\" { target i?86-*-* x86_64-*-* } } */\n",
>>>>> "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
>>>>> "/* { dg-options \"%s-I%s -mno-mmx -fno-common\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
>>>>
>>>> The i?86/x86_64 darwin dg-options should use the same -W* option as other
>>>> i?86/x86_64 targets.
>>>>
>>>>> --- testsuite/g++.dg/compat/struct-layout-1_generate.c (revision 5181)
>>>>> +++ testsuite/g++.dg/compat/struct-layout-1_generate.c (working copy)
>>>>
>>>> Likewise.
>>>>
>>>
>>> I will make those changes.
>>>
>>
>> Here is the updated patch. I added an undocumented -Wpsabi so that
>> psABI changes can be turned on by default when -Wabi/-Wno-abi isn't
>> used. OK for trunk?
>>
>> Thanks.
>>
>>
>> --
>> H.J.
>> ---
>> gcc/
>>
>> 2009-02-10 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-10 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/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.
>>
>
> PING.
>
>
PING.
--
H.J.