float128: Add conversion from float128 to mpn
commit32bf1d09dadee5b60df869ed3567a2b12c04e3fc
authorGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Thu, 3 Nov 2016 14:26:52 +0000 (3 12:26 -0200)
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Wed, 7 Jun 2017 20:03:43 +0000 (7 17:03 -0300)
tree35384058bf2d5f1f05b893b418a7f339f704629f
parent82c19bdfe39164fda779c79a925c2050b19e421b
float128: Add conversion from float128 to mpn

Reuse the code for __mpn_extract_long_double to implement
__mpn_extract_float128.

* include/gmp.h: Include bits/floatn.h
(__mpn_extract_float128): Declare when __HAVE_DISTINCT_FLOAT128 is 1.
* stdlib/gmp-impl.h: Also check if alloca is not defined before
including stack-alloc.h.  It could have been defined by other header
which not necessarily defines HAVE_ALLOCA.
* sysdeps/ieee754/float128/Makefile: New file.
* sysdeps/ieee754/float128/float1282mpn.c: New file.
* sysdeps/ieee754/float128/float128_private.h: Include gmp.h before
redefining __mpn_extract_long_double to __mpn_extract_float128, then
redefine __mpn_extract_long_double to __mpn_extract_float128.
* sysdeps/ieee754/ldbl-128/ldbl2mpn.c: Replace long double with
_Float128 to allow float128_private.h overrides.
ChangeLog
include/gmp.h
stdlib/gmp-impl.h
sysdeps/ieee754/float128/Makefile [new file with mode: 0644]
sysdeps/ieee754/float128/float1282mpn.c [new file with mode: 0644]
sysdeps/ieee754/float128/float128_private.h
sysdeps/ieee754/ldbl-128/ldbl2mpn.c