Hi!

On Wed, Feb 16, 2022 at 06:03:53PM -0500, Michael Meissner wrote:
> [PATCH, V3] Define __SIZEOF_FLOAT128__ and __SIZEOF_IBM128__.
> 
> Define the sizes of the PowerPC specific types __float128 and __ibm128 if 
> those
> types are enabled.
> 
> This patch will define __SIZEOF_IBM128__ and __SIZEOF_FLOAT128__ if their
> respective types are created in the compiler.

> gcc/
>       PR target/99708
>       * config/rs6000/rs6000-c.cc (rs6000_cpu_cpp_builtins): Define
>       __SIZEOF_IBM128__ if the IBM 128-bit long double type is created.
>       Define __SIZEOF_FLOAT128__ if we have float128 support.

> --- a/gcc/config/rs6000/rs6000-c.cc
> +++ b/gcc/config/rs6000/rs6000-c.cc
> @@ -622,8 +622,13 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
>      builtin_define ("__RSQRTE__");
>    if (TARGET_FRSQRTES)
>      builtin_define ("__RSQRTEF__");
> +  if (ibm128_float_type_node)
> +    builtin_define ("__SIZEOF_IBM128__=16");
>    if (TARGET_FLOAT128_TYPE)
> -    builtin_define ("__FLOAT128_TYPE__");
> +    {
> +      builtin_define ("__FLOAT128_TYPE__");
> +      builtin_define ("__SIZEOF_FLOAT128__=16");
> +    }

  if (TARGET_FLOAT128_TYPE)
    builtin_define ("__FLOAT128_TYPE__");

  if (float128_type_node)
    builtin_define ("__SIZEOF_FLOAT128__=16");
  if (ibm128_float_type_node)
    builtin_define ("__SIZEOF_IBM128__=16");

Okay like that.  Thanks!


Segher

Reply via email to