On Sun, May 20, 2012 at 11:53 PM, H.J. Lu <hjl.to...@gmail.com> wrote:

>>> We should warn passing SSE vector argument without SSE enabled changes
>>> the ABI for 64-bit. Tested on Linux/x86-64.  OK to install?

>>> @@ -5828,7 +5833,22 @@ type_natural_mode (const_tree type, const 
>>> CUMULATIVE_ARGS *cum)
>>>                    return TYPE_MODE (type);
>>>                  }
>>>                else
>>> -                 return mode;
>>> +                 {
>>
>> No need for these outermost braces.
>
> It is needed to avoid
>
> /export/gnu/import/git/gcc/gcc/config/i386/i386.c: In function
> \u2018type_natural_mode\u2019:
> /export/gnu/import/git/gcc/gcc/config/i386/i386.c:5813:9: warning:
> suggest explicit braces to avoid ambiguous \u2018else\u2019
> [-Wparentheses]

Sure, you need

else if ( ... )
  {
     ...
  }
else
  return mode;

there.

>> BTW: Can you please also add MMX warning for -mno-mmx to be consistent
>> with 32bit targets?
>
> 64-bit passes 8-byte vector in SSE register, not MMX register.
> I updated the patch to want 8-byte vector. Is this patch OK?
>
> Thanks.
>
> --
> H.J.
> ----
> gcc/
>
> 2012-05-20  H.J. Lu  <hongjiu...@intel.com>
>
>        PR target/53425
>        * config/i386/i386.c (type_natural_mode): Warn passing SSE
>        vector argument without SSE enabled changes the ABI.
>
> gcc/testsuite/
>
> 2012-05-20  H.J. Lu  <hongjiu...@intel.com>
>
>        PR target/53425
>        * gcc.target/i386/pr53425-1.c: New file.
>        * gcc.target/i386/pr53425-2.c: Likewise.

OK with the above change.

Thanks,
Uros.

Reply via email to