This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] powerpc64le: Enable float128
On Wed, 14 Jun 2017, Gabriel F. T. Gomes wrote:
> diff --git a/sysdeps/powerpc/powerpc64le/fpu/sfp-machine.h b/sysdeps/powerpc/powerpc64le/fpu/sfp-machine.h
> new file mode 100644
> index 0000000..b5448d8
> --- /dev/null
> +++ b/sysdeps/powerpc/powerpc64le/fpu/sfp-machine.h
> @@ -0,0 +1,158 @@
> +/* Decide whether to use 64 or 32-bit types to do the emulation. If we are
> + doing IEEE-128 with VSX, use 64-bit emulation even if we are compiling for a
> + 32-bit target. */
> +
> +#if defined(_ARCH_PPC64) || defined(__VSX__) || defined(__FLOAT128__)
> +#define _FP_W_TYPE_SIZE 64
> +#define _FP_W_TYPE unsigned long long
> +#define _FP_WS_TYPE signed long long
> +#define _FP_I_TYPE long long
> +
> +#ifdef _ARCH_PPC64
> +typedef int TItype __attribute__ ((mode (TI)));
> +typedef unsigned int UTItype __attribute__ ((mode (TI)));
> +
> +#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype))
> +#endif
> +
> +#else /* 32-bits */
> +#define _FP_W_TYPE_SIZE 32
> +#define _FP_W_TYPE unsigned int
> +#define _FP_WS_TYPE signed int
> +#define _FP_I_TYPE int
> +#endif /* 32-bits */
There are lots of conditionals such as these in this file, that are
irrelevant for powerpc64le. I'd expect it to be cut down so it only has
the cases that actually apply for powerpc64le / float128.
--
Joseph S. Myers
joseph@codesourcery.com