]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libm_alias macros in m68k llrint functions.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 30 Nov 2017 19:15:21 +0000 (19:15 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 30 Nov 2017 19:15:21 +0000 (19:15 +0000)
Most m68k libm functions share code via sources for one function
including those for another function or type, in a way that will
require significant changes to create function aliases in a way
friendly to adding _FloatN / _FloatNx aliases.

The llrint function implementations, however, use a conventional
separate implementation for each floating-point type.  Thus preparing
them for _FloatN / _FloatNx aliases is just a matter of changing them
to include the appropriate headers and use the appropriate macros,
which this patch does.  The llrintl changes aren't strictly required,
since m68k long double does not meet the criteria for a _FloatN /
_FloatNx type, but are included anyway to keep consistency between the
implementations for the three types.

Tested with build-many-glibcs.py that installed stripped shared
libraries for m68k-linux-gnu are unchanged by the patch.

* sysdeps/m68k/m680x0/fpu/s_llrint.c: Include
<libm-alias-double.h>.
(llrint): Define using libm_alias_double.
* sysdeps/m68k/m680x0/fpu/s_llrintf.c: Include
<libm-alias-float.h>.
(llrintf): Define using libm_alias_float.
* sysdeps/m68k/m680x0/fpu/s_llrintl.c: Include
<libm-alias-ldouble.h>.
(llrintl): Define using libm_alias_ldouble.

ChangeLog
sysdeps/m68k/m680x0/fpu/s_llrint.c
sysdeps/m68k/m680x0/fpu/s_llrintf.c
sysdeps/m68k/m680x0/fpu/s_llrintl.c

index d2aaf5f789af1c0ea5419596059a815728ee91f6..8c042b8be68380cdc1e9b5e24a5e83516cd84463 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2017-11-30  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/m68k/m680x0/fpu/s_llrint.c: Include
+       <libm-alias-double.h>.
+       (llrint): Define using libm_alias_double.
+       * sysdeps/m68k/m680x0/fpu/s_llrintf.c: Include
+       <libm-alias-float.h>.
+       (llrintf): Define using libm_alias_float.
+       * sysdeps/m68k/m680x0/fpu/s_llrintl.c: Include
+       <libm-alias-ldouble.h>.
+       (llrintl): Define using libm_alias_ldouble.
+
        * sysdeps/m68k/m680x0/fpu/s_ccosh_template.c (ccosh): Use
        declare_mgen_alias instead of weak_alias.
        * sysdeps/m68k/m680x0/fpu/s_cexp_template.c (cexp): Likewise.
index bf80884235c4e999d6ba2cac26a66c665cb7156b..218b745b3573552b5e7c4c8b664f3c7b3e2f7d00 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-double.h>
 #include "mathimpl.h"
 
 long long int
@@ -72,4 +73,4 @@ __llrint (double x)
   return result;
 }
 
-weak_alias (__llrint, llrint)
+libm_alias_double (__llrint, llrint)
index 3f4eeb4eba051a32adff2f5fb44fafa0fe11ccad..dfcd47d61994e39003e49e5c718bfa51f9dbae0b 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-float.h>
 #include "mathimpl.h"
 
 long long int
@@ -62,4 +63,4 @@ __llrintf (float x)
   return result;
 }
 
-weak_alias (__llrintf, llrintf)
+libm_alias_float (__llrint, llrint)
index 69e27b19f993ba70d6e28a34176aada6f1ebcb24..83b1d1f6da7c20935686cb2d5be9ba630f934992 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-ldouble.h>
 #include "mathimpl.h"
 
 long long int
@@ -61,4 +62,4 @@ __llrintl (long double x)
   return result;
 }
 
-weak_alias (__llrintl, llrintl)
+libm_alias_ldouble (__llrint, llrint)