This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 5/6] powerpc64le: Require at least POWER8 for powerpc64le
On Thu, 2017-06-22 at 09:20 -0300, Gabriel F. T. Gomes wrote:
> On Wed, 21 Jun 2017 23:29:00 +0000
> Joseph Myers <joseph@codesourcery.com> wrote:
>
> > As far as I'm concerned this is for powerpc maintainers to review. Is the
> > float128 connection that the float128 compiler support needs VSX to build
> > / to build for the desired ABI?
>
> Indeed, compiler support for float128 needs VSX. Once float128 support is
> enabled in glibc, builds for processors that don't provide VSX will fail,
> but will fail late. My intention with this patch is to fail as early as
> possible, and, since powerpc64le support starts with power8, I added this
> check to the powerpc64le-specific configure script.
>
In the PowerISA the IEEE Quad-Precision (IEEE float128) instructions are
all defined as VSX Scalar.
In the OpenPOWER ABI:
1) __float128 shall be recognized as a synonym for the _Float128 data
type, and it is used interchangeably to refer to the same
type. Implementations that do not offer support for _Float128 may
provide this type with the __float128 type only.
2) For the purpose of determining a qualified floating-point argument,
_Float128 shall be considered a vector data type. In addition, _Float128
is like a vector data type for determining if multiple aggregate members
are like.
3) Binary extended precision numbers in IEEE BINARY 128 QUADRUPLE
PRECISION format are passed (and returned) using a VMX register.
Any resent GCC compiler (and certainly any GCC that supports _Float128)
will happily spill any floating point temporary to and of the 64 VSX
registers available. Also as __float128 is VSX scalar and many of the
bit level operations are implemented via Vector logical or power8 direct
move instructions the compiler requires -mvsx. This applies to our
soft-float emulation of float128.
So requiring VSX (capable compiler and hardware) to support float128 is
reasonable.