]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc64le: Enable support for IEEE long double
authorGabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Thu, 11 Jul 2019 14:48:28 +0000 (11:48 -0300)
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Thu, 30 Apr 2020 13:52:08 +0000 (08:52 -0500)
On platforms where long double may have two different formats, i.e.: the
same format as double (64-bits) or something else (128-bits), building
with -mlong-double-128 is the default and function calls in the user
program match the name of the function in Glibc.  When building with
-mlong-double-64, Glibc installed headers redirect such calls to the
appropriate function.

Likewise, the internals of glibc are now built against IEEE long double.
However, the only (minimally) notable usage of long double is difftime.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
NEWS
sysdeps/powerpc/fpu/libm-test-ulps
sysdeps/powerpc/powerpc64/le/Implies-before
sysdeps/powerpc/powerpc64/le/Makefile
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ldbl-128ibm-compat-abi.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist

diff --git a/NEWS b/NEWS
index e60f83a9472fc8080d339326c79c71c19551e8e2..141078c31924367561cff42c04f9e110b3831065 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,11 @@ Major new features:
 * The GNU C Library now loads audit modules listed in the DT_AUDIT and
   DT_DEPAUDIT dynamic section entries of the main executable.
 
+* powerpc64le supports IEEE128 long double libm/libc redirects when
+  using the -mabi=ieeelongdouble to compile C code on supported GCC
+  toolchains.  It is recommended to use GCC 8 or newer when testing
+  this option.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The deprecated <sys/sysctl.h> header and the sysctl function have been
index 1c989e020f07a70a7052b94fa97afa7bd254f948..cd2a5fed45553bb3014a75f31d0f932d29e3cf14 100644 (file)
@@ -1266,21 +1266,25 @@ ldouble: 1
 Function: "gamma":
 double: 3
 float: 4
+float128: 5
 ldouble: 3
 
 Function: "gamma_downward":
 double: 4
 float: 4
+float128: 8
 ldouble: 15
 
 Function: "gamma_towardzero":
 double: 4
 float: 3
+float128: 5
 ldouble: 16
 
 Function: "gamma_upward":
 double: 4
 float: 5
+float128: 8
 ldouble: 11
 
 Function: "hypot":
index 7c20db4e977ac12f33deb0a76a7cae66a29bb0eb..2139f4dae88b1c4a3f40411d194f1e1aca462181 100644 (file)
@@ -1,4 +1,5 @@
 # On PowerPC we use the IBM extended long double format.
+ieee754/ldbl-128ibm-compat
 ieee754/ldbl-128ibm
 ieee754/ldbl-opt
 ieee754/dbl-64
index 6afa1228ddad4ff835830e62e78c03ae9e2c038b..05ab13d85cb98e32de553eb12bebb14745908943 100644 (file)
@@ -20,6 +20,10 @@ no-gnu-attribute-CFLAGS = -mno-gnu-attribute
 # We built an object file and extract the desired .gnu.attributes section
 # to be inserted into lib{c,m}.so.
 ifeq ($(build-shared),yes)
+
+# Build everything with IEEE 128-bit long double.
+sysdep-CFLAGS += -mabi=ieeelongdouble -Wno-psabi $(no-gnu-attribute-CFLAGS)
+
 before-compile += $(common-objpfx)no_ldbl_gnu_attribute.bin
 
 $(common-objpfx)no_ldbl_gnu_attribute.bin: $(..)sysdeps/powerpc/powerpc64/le/no_ldbl_gnu_attribute.c
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ldbl-128ibm-compat-abi.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ldbl-128ibm-compat-abi.h
new file mode 100644 (file)
index 0000000..34c7b6b
--- /dev/null
@@ -0,0 +1,8 @@
+/* ABI version for long double switch to IEEE 128-bit floating point..
+   This is used by the Versions and math_ldbl_opt.h files in
+   sysdeps/ieee754/ldbl-128ibm-compat/.  It gives the ABI version where
+   long double == ibm128 was replaced with long double == _Float128
+   for libm *l functions and libc functions using long double.  */
+
+#define LDBL_IBM128_VERSION            GLIBC_2.32
+#define LDBL_IBM128_COMPAT_VERSION     GLIBC_2_32
index 2b6a76d9c2186c5e0016d327edf8e1c301b9ab07..0c2513a4b38cca55304ddc3ec2319fbb395b60d3 100644 (file)
@@ -2248,4 +2248,97 @@ GLIBC_2.30 getdents64 F
 GLIBC_2.30 gettid F
 GLIBC_2.30 tgkill F
 GLIBC_2.30 twalk_r F
+GLIBC_2.32 __argp_errorieee128 F
+GLIBC_2.32 __argp_failureieee128 F
+GLIBC_2.32 __asprintf_chkieee128 F
+GLIBC_2.32 __asprintfieee128 F
+GLIBC_2.32 __dprintf_chkieee128 F
+GLIBC_2.32 __dprintfieee128 F
+GLIBC_2.32 __errieee128 F
+GLIBC_2.32 __error_at_lineieee128 F
+GLIBC_2.32 __errorieee128 F
+GLIBC_2.32 __errxieee128 F
+GLIBC_2.32 __fprintf_chkieee128 F
+GLIBC_2.32 __fprintfieee128 F
+GLIBC_2.32 __fscanfieee128 F
+GLIBC_2.32 __fwprintf_chkieee128 F
+GLIBC_2.32 __fwprintfieee128 F
+GLIBC_2.32 __fwscanfieee128 F
+GLIBC_2.32 __isoc99_fscanfieee128 F
+GLIBC_2.32 __isoc99_fwscanfieee128 F
+GLIBC_2.32 __isoc99_scanfieee128 F
+GLIBC_2.32 __isoc99_sscanfieee128 F
+GLIBC_2.32 __isoc99_swscanfieee128 F
+GLIBC_2.32 __isoc99_vfscanfieee128 F
+GLIBC_2.32 __isoc99_vfwscanfieee128 F
+GLIBC_2.32 __isoc99_vscanfieee128 F
+GLIBC_2.32 __isoc99_vsscanfieee128 F
+GLIBC_2.32 __isoc99_vswscanfieee128 F
+GLIBC_2.32 __isoc99_vwscanfieee128 F
+GLIBC_2.32 __isoc99_wscanfieee128 F
+GLIBC_2.32 __obstack_printf_chkieee128 F
+GLIBC_2.32 __obstack_printfieee128 F
+GLIBC_2.32 __obstack_vprintf_chkieee128 F
+GLIBC_2.32 __obstack_vprintfieee128 F
+GLIBC_2.32 __printf_chkieee128 F
+GLIBC_2.32 __printf_sizeieee128 F
+GLIBC_2.32 __printfieee128 F
+GLIBC_2.32 __qecvtieee128 F
+GLIBC_2.32 __qecvtieee128_r F
+GLIBC_2.32 __qfcvtieee128 F
+GLIBC_2.32 __qfcvtieee128_r F
+GLIBC_2.32 __qgcvtieee128 F
+GLIBC_2.32 __scanfieee128 F
+GLIBC_2.32 __snprintf_chkieee128 F
+GLIBC_2.32 __snprintfieee128 F
+GLIBC_2.32 __sprintf_chkieee128 F
+GLIBC_2.32 __sprintfieee128 F
+GLIBC_2.32 __sscanfieee128 F
+GLIBC_2.32 __strfmon_lieee128 F
+GLIBC_2.32 __strfmonieee128 F
+GLIBC_2.32 __strfromieee128 F
+GLIBC_2.32 __strtoieee128 F
+GLIBC_2.32 __strtoieee128_l F
+GLIBC_2.32 __swprintf_chkieee128 F
+GLIBC_2.32 __swprintfieee128 F
+GLIBC_2.32 __swscanfieee128 F
+GLIBC_2.32 __syslog_chkieee128 F
+GLIBC_2.32 __syslogieee128 F
+GLIBC_2.32 __vasprintf_chkieee128 F
+GLIBC_2.32 __vasprintfieee128 F
+GLIBC_2.32 __vdprintf_chkieee128 F
+GLIBC_2.32 __vdprintfieee128 F
+GLIBC_2.32 __verrieee128 F
+GLIBC_2.32 __verrxieee128 F
+GLIBC_2.32 __vfprintf_chkieee128 F
+GLIBC_2.32 __vfprintfieee128 F
+GLIBC_2.32 __vfscanfieee128 F
+GLIBC_2.32 __vfwprintf_chkieee128 F
+GLIBC_2.32 __vfwprintfieee128 F
+GLIBC_2.32 __vfwscanfieee128 F
+GLIBC_2.32 __vprintf_chkieee128 F
+GLIBC_2.32 __vprintfieee128 F
+GLIBC_2.32 __vscanfieee128 F
+GLIBC_2.32 __vsnprintf_chkieee128 F
+GLIBC_2.32 __vsnprintfieee128 F
+GLIBC_2.32 __vsprintf_chkieee128 F
+GLIBC_2.32 __vsprintfieee128 F
+GLIBC_2.32 __vsscanfieee128 F
+GLIBC_2.32 __vswprintf_chkieee128 F
+GLIBC_2.32 __vswprintfieee128 F
+GLIBC_2.32 __vswscanfieee128 F
+GLIBC_2.32 __vsyslog_chkieee128 F
+GLIBC_2.32 __vsyslogieee128 F
+GLIBC_2.32 __vwarnieee128 F
+GLIBC_2.32 __vwarnxieee128 F
+GLIBC_2.32 __vwprintf_chkieee128 F
+GLIBC_2.32 __vwprintfieee128 F
+GLIBC_2.32 __vwscanfieee128 F
+GLIBC_2.32 __warnieee128 F
+GLIBC_2.32 __warnxieee128 F
+GLIBC_2.32 __wcstoieee128 F
+GLIBC_2.32 __wcstoieee128_l F
+GLIBC_2.32 __wprintf_chkieee128 F
+GLIBC_2.32 __wprintfieee128 F
+GLIBC_2.32 __wscanfieee128 F
 GLIBC_2.32 pthread_sigmask F
index d479a64fcaf4e19eb5785b7e529f7b439778f27e..aa45e2639cf5711e8c4403edfc97811afdc1fe49 100644 (file)
@@ -1097,3 +1097,120 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 __acoshieee128 F
+GLIBC_2.32 __acosieee128 F
+GLIBC_2.32 __asinhieee128 F
+GLIBC_2.32 __asinieee128 F
+GLIBC_2.32 __atan2ieee128 F
+GLIBC_2.32 __atanhieee128 F
+GLIBC_2.32 __atanieee128 F
+GLIBC_2.32 __cabsieee128 F
+GLIBC_2.32 __cacoshieee128 F
+GLIBC_2.32 __cacosieee128 F
+GLIBC_2.32 __canonicalizeieee128 F
+GLIBC_2.32 __cargieee128 F
+GLIBC_2.32 __casinhieee128 F
+GLIBC_2.32 __casinieee128 F
+GLIBC_2.32 __catanhieee128 F
+GLIBC_2.32 __catanieee128 F
+GLIBC_2.32 __cbrtieee128 F
+GLIBC_2.32 __ccoshieee128 F
+GLIBC_2.32 __ccosieee128 F
+GLIBC_2.32 __ceilieee128 F
+GLIBC_2.32 __cexpieee128 F
+GLIBC_2.32 __cimagieee128 F
+GLIBC_2.32 __clog10ieee128 F
+GLIBC_2.32 __clogieee128 F
+GLIBC_2.32 __conjieee128 F
+GLIBC_2.32 __copysignieee128 F
+GLIBC_2.32 __coshieee128 F
+GLIBC_2.32 __cosieee128 F
+GLIBC_2.32 __cpowieee128 F
+GLIBC_2.32 __cprojieee128 F
+GLIBC_2.32 __crealieee128 F
+GLIBC_2.32 __csinhieee128 F
+GLIBC_2.32 __csinieee128 F
+GLIBC_2.32 __csqrtieee128 F
+GLIBC_2.32 __ctanhieee128 F
+GLIBC_2.32 __ctanieee128 F
+GLIBC_2.32 __erfcieee128 F
+GLIBC_2.32 __erfieee128 F
+GLIBC_2.32 __exp10ieee128 F
+GLIBC_2.32 __exp2ieee128 F
+GLIBC_2.32 __expieee128 F
+GLIBC_2.32 __expm1ieee128 F
+GLIBC_2.32 __f32addieee128 F
+GLIBC_2.32 __f32divieee128 F
+GLIBC_2.32 __f32mulieee128 F
+GLIBC_2.32 __f32subieee128 F
+GLIBC_2.32 __f64addieee128 F
+GLIBC_2.32 __f64divieee128 F
+GLIBC_2.32 __f64mulieee128 F
+GLIBC_2.32 __f64subieee128 F
+GLIBC_2.32 __fabsieee128 F
+GLIBC_2.32 __fdimieee128 F
+GLIBC_2.32 __floorieee128 F
+GLIBC_2.32 __fmaieee128 F
+GLIBC_2.32 __fmaxieee128 F
+GLIBC_2.32 __fmaxmagieee128 F
+GLIBC_2.32 __fminieee128 F
+GLIBC_2.32 __fminmagieee128 F
+GLIBC_2.32 __fmodieee128 F
+GLIBC_2.32 __frexpieee128 F
+GLIBC_2.32 __fromfpieee128 F
+GLIBC_2.32 __fromfpxieee128 F
+GLIBC_2.32 __getpayloadieee128 F
+GLIBC_2.32 __hypotieee128 F
+GLIBC_2.32 __ilogbieee128 F
+GLIBC_2.32 __j0ieee128 F
+GLIBC_2.32 __j1ieee128 F
+GLIBC_2.32 __jnieee128 F
+GLIBC_2.32 __ldexpieee128 F
+GLIBC_2.32 __lgammaieee128 F
+GLIBC_2.32 __lgammaieee128_r F
+GLIBC_2.32 __llogbieee128 F
+GLIBC_2.32 __llrintieee128 F
+GLIBC_2.32 __llroundieee128 F
+GLIBC_2.32 __log10ieee128 F
+GLIBC_2.32 __log1pieee128 F
+GLIBC_2.32 __log2ieee128 F
+GLIBC_2.32 __logbieee128 F
+GLIBC_2.32 __logieee128 F
+GLIBC_2.32 __lrintieee128 F
+GLIBC_2.32 __lroundieee128 F
+GLIBC_2.32 __modfieee128 F
+GLIBC_2.32 __nanieee128 F
+GLIBC_2.32 __nearbyintieee128 F
+GLIBC_2.32 __nextafterieee128 F
+GLIBC_2.32 __nextdownieee128 F
+GLIBC_2.32 __nexttoward_to_ieee128 F
+GLIBC_2.32 __nexttowardf_to_ieee128 F
+GLIBC_2.32 __nexttowardieee128 F
+GLIBC_2.32 __nextupieee128 F
+GLIBC_2.32 __powieee128 F
+GLIBC_2.32 __remainderieee128 F
+GLIBC_2.32 __remquoieee128 F
+GLIBC_2.32 __rintieee128 F
+GLIBC_2.32 __roundevenieee128 F
+GLIBC_2.32 __roundieee128 F
+GLIBC_2.32 __scalbieee128 F
+GLIBC_2.32 __scalblnieee128 F
+GLIBC_2.32 __scalbnieee128 F
+GLIBC_2.32 __setpayloadieee128 F
+GLIBC_2.32 __setpayloadsigieee128 F
+GLIBC_2.32 __significandieee128 F
+GLIBC_2.32 __sincosieee128 F
+GLIBC_2.32 __sinhieee128 F
+GLIBC_2.32 __sinieee128 F
+GLIBC_2.32 __sqrtieee128 F
+GLIBC_2.32 __tanhieee128 F
+GLIBC_2.32 __tanieee128 F
+GLIBC_2.32 __tgammaieee128 F
+GLIBC_2.32 __totalorderieee128 F
+GLIBC_2.32 __totalordermagieee128 F
+GLIBC_2.32 __truncieee128 F
+GLIBC_2.32 __ufromfpieee128 F
+GLIBC_2.32 __ufromfpxieee128 F
+GLIBC_2.32 __y0ieee128 F
+GLIBC_2.32 __y1ieee128 F
+GLIBC_2.32 __ynieee128 F