about summary refs log tree commit diff
path: root/sysdeps/generic/libm-alias-float.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-12-06 22:14:09 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-12-06 22:14:09 +0000
commit26007a2f689c94477ce9a00986613ccede052388 (patch)
tree678ff9277a80fa8b33d3b124f12afcfc7a129d06 /sysdeps/generic/libm-alias-float.h
parentc191f64cd5e985bba95727c40cf02f3a0eae42e3 (diff)
downloadglibc-26007a2f689c94477ce9a00986613ccede052388.tar.gz
glibc-26007a2f689c94477ce9a00986613ccede052388.tar.xz
glibc-26007a2f689c94477ce9a00986613ccede052388.zip
Support _Float32 in libm_alias_float.
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.
Diffstat (limited to 'sysdeps/generic/libm-alias-float.h')
-rw-r--r--sysdeps/generic/libm-alias-float.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/generic/libm-alias-float.h b/sysdeps/generic/libm-alias-float.h
index 11bd472a53..b4a5f73ed9 100644
--- a/sysdeps/generic/libm-alias-float.h
+++ b/sysdeps/generic/libm-alias-float.h
@@ -19,11 +19,18 @@
 #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.  */