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]

Re: PATCH: PR target/39678: complex type isn't passed correctly


On Thu, Apr 9, 2009 at 7:16 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> H.J. Lu wrote:
>
>> When SCmode starts at 32bit in a structure, we need to pass it in
>> one X86_64_SSE_CLASS and one X86_64_SSESF_CLASS. ?OK for trunk and
>> 4.4 if there are no regressions?
>>
>> Thanks.
>>
>>
>> H.J.
>> ----
>> gcc/
>>
>> 2009-04-09 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>
>> ? ? ? ?PR target/39678
>> ? ? ? ?* config/i386/i386.c (classify_argument): Handle SCmode with
>> ? ? ? ?(bit_offset % 64) != 0.
>>
>
> comments below...
>
>> gcc/testsuite/
>>
>> 2009-04-09 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>
>> ? ? ? ?PR target/39678
>> ? ? ? ?* g++.dg/torture/pr39678.C: New.
>> ? ? ? ?* gcc.dg/torture/pr39678.c: Likewise.
>> ? ? ? ?* gcc.target/i386/pr39678.c: Likewise.
>>
>> ? ? ? ?* gcc.target/x86_64/abi/test_passing_structs.c: Add tests for
>> ? ? ? ?structure with complex float.
>>
>> --- gcc/config/i386/i386.c.complex ? ? ?2009-04-09 05:45:01.000000000
>> -0700
>> +++ gcc/config/i386/i386.c ? ? ?2009-04-09 07:02:07.000000000 -0700
>> @@ -5273,7 +5273,22 @@ classify_argument (enum machine_mode mod
>> ? ? ? return 2;
>> ? ? case SCmode:
>> ? ? ? classes[0] = X86_64_SSE_CLASS;
>> - ? ? ?return 1;
>> + ? ? ?if (!(bit_offset % 64))
>> + ? ? ? return 1;
>> + ? ? ?else
>> + ? ? ? {
>> + ? ? ? ? static bool warned;
>> +
>> + ? ? ? ? if (!warned && warn_psabi)
>> + ? ? ? ? ? {
>> + ? ? ? ? ? ? warned = true;
>> + ? ? ? ? ? ? inform (input_location,
>> + ? ? ? ? ? ? ? ? ? ? "The ABI of passing structure with complex float"
>> + ? ? ? ? ? ? ? ? ? ? " member has changed in GCC 4.4");
>>
>
> This message should end with "... in GCC 4.4.1".

Not 4.4.0?  I don't think we should change the ABI in minor versions.  Note
that this is also a wrong-code bug as the caller ABI doesn't agree with
the callee ABI for GCC at the moment.

Richard.

> The patch is OK with this change for 4.5 and after a day or two without
> problems also for 4.4.
>
> Thanks,
> Uros.
>
>


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