]> sourceware.org Git - glibc.git/commitdiff
Support _Float32 in libm_alias_float.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 6 Dec 2017 22:14:09 +0000 (22:14 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 6 Dec 2017 22:14:09 +0000 (22:14 +0000)
This patch makes the libm_alias_float macro support creating _Float32
aliases, in preparation for enabling glibc support for that type.

Tested for x86_64; also tested with build-many-glibcs.py in
conjunction with other _Float32 changes.

* sysdeps/generic/libm-alias-float.h: Include <bits/floatn.h>.
[__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32]
(libm_alias_float_other_r): Create f32 alias.
(libm_alias_float_r): Use semicolon before call to
libm_alias_float_other_r.

ChangeLog
sysdeps/generic/libm-alias-float.h

index efe8ac589c62cb803c47a2ac81df22248a8916ea..1627f78a96a63a5c349bb6d452602ac3f42853bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-12-06  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/generic/libm-alias-float.h: Include <bits/floatn.h>.
+       [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32]
+       (libm_alias_float_other_r): Create f32 alias.
+       (libm_alias_float_r): Use semicolon before call to
+       libm_alias_float_other_r.
+
        * sysdeps/ia64/fpu/e_exp2f.S (__exp2f): Use exp2 not __exp2 as
        second argument to libm_alias_float_other.
        * sysdeps/ia64/fpu/e_log2f.S (__log2f): Use log2 not __log2 as
index 11bd472a5334dcdd1b7b4767e02f2fd0b003542b..b4a5f73ed9a395f243dde3e1b2fd95e75fe03bf2 100644 (file)
 #ifndef _LIBM_ALIAS_FLOAT_H
 #define _LIBM_ALIAS_FLOAT_H
 
+#include <bits/floatn.h>
+
 /* Define _FloatN / _FloatNx aliases for a float libm function that
    has internal name FROM ## f ## R and public names TO ## suffix ## R
    for each suffix of a supported _FloatN / _FloatNx floating-point
    type with the same format as float.  */
-#define libm_alias_float_other_r(from, to, r)
+#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32
+# define libm_alias_float_other_r(from, to, r) \
+  weak_alias (from ## f ## r, to ## f32 ## r)
+#else
+# define libm_alias_float_other_r(from, to, r)
+#endif
 
 /* Likewise, but without the R suffix.  */
 #define libm_alias_float_other(from, to)       \
@@ -37,7 +44,7 @@
    names (where there is one name per format, not per type) or for
    obsolescent functions not provided for _FloatN types.  */
 #define libm_alias_float_r(from, to, r)                \
-  weak_alias (from ## f ## r, to ## f ## r)    \
+  weak_alias (from ## f ## r, to ## f ## r);   \
   libm_alias_float_other_r (from, to, r)
 
 /* Likewise, but without the R suffix.  */
This page took 0.084265 seconds and 5 git commands to generate.