[12/12] ldbl-128ibm-compat: Provide ieee128 symbols to narrow functions
Commit Message
Add ieee128 aliases for faddl, fdivl, fmull, fsubl, daddl, ddivl, dmull, dsubl.
2018-06-19 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* math/math-narrow.h [__HAVE_DISTINCT_FLOAT128 &&
!__HAVE_FLOAT128_UNLIKE_LDBL] (libm_alias_float32_float128,
libm_alias_float64_float128): Provide *ieee128 aliases.
* sysdeps/ieee754/ldbl-128ibm-compat/Versions: Add
__f32addieee128, __f32divieee128, __f32mulieee128,
__f32subieee128, __f64addieee128, __f64divieee128,
__f64mulieee128 and __f64subieee128.
Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
---
math/math-narrow.h | 10 ++++++++++
sysdeps/ieee754/ldbl-128ibm-compat/Versions | 8 ++++++++
2 files changed, 18 insertions(+)
Comments
On Wed, 20 Jun 2018, Tulio Magno Quites Machado Filho wrote:
> Add ieee128 aliases for faddl, fdivl, fmull, fsubl, daddl, ddivl, dmull, dsubl.
>
> 2018-06-19 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
>
> * math/math-narrow.h [__HAVE_DISTINCT_FLOAT128 &&
> !__HAVE_FLOAT128_UNLIKE_LDBL] (libm_alias_float32_float128,
I don't think __HAVE_FLOAT128_UNLIKE_LDBL is logically right here. That's
about the current compilation, i.e. about whether these particular files
end up getting built with IEEE long double. I don't know what files in
the source tree might end up getting built with what long double setting,
but it shouldn't matter for these files whether they are built with IEEE
long double or not.
Your property is something different, "glibc has *ieee128 aliases for
_Float128 functions" (a property of the glibc configuration, not of the
current compilation, but a different property from
__HAVE_DISTINCT_FLOAT128). That suggests to me that either you need some
new macro tested by this file, or you need e.g.
math-narrow-alias-float128.h (included by math-narrow.h) which contains
these float128 alias macros and for which ldbl-128ibm-compat provides a
different version.
@@ -356,6 +356,16 @@
libm_alias_float32_float128_main (func)
# define libm_alias_float64_float128(func) \
libm_alias_float64_float128_main (func)
+#elif __HAVE_DISTINCT_FLOAT128 && !__HAVE_FLOAT128_UNLIKE_LDBL
+# define libm_alias_float32_float128(func) \
+ libm_alias_float32_float128_main (func) \
+ weak_alias (__f32 ## func ## f128, f32 ## func ## f64x) \
+ weak_alias (__f32 ## func ## f128, __ ## f32 ## func ## ieee128)
+# define libm_alias_float64_float128(func) \
+ libm_alias_float64_float128_main (func) \
+ weak_alias (__f64 ## func ## f128, f64 ## func ## f64x) \
+ weak_alias (__f64 ## func ## f128, f32x ## func ## f64x) \
+ weak_alias (__f64 ## func ## f128, __ ## f64 ## func ## ieee128)
#else
# define libm_alias_float32_float128(func) \
libm_alias_float32_float128_main (func) \
@@ -47,6 +47,14 @@ libm {
__exp2ieee128;
__expieee128;
__expm1ieee128;
+ __f32addieee128;
+ __f32divieee128;
+ __f32mulieee128;
+ __f32subieee128;
+ __f64addieee128;
+ __f64divieee128;
+ __f64mulieee128;
+ __f64subieee128;
__fabsieee128;
__fdimieee128;
__floorieee128;