public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Use libm_alias_float for coldfire [committed]
@ 2017-11-30 23:53 Joseph Myers
  0 siblings, 0 replies; only message in thread
From: Joseph Myers @ 2017-11-30 23:53 UTC (permalink / raw)
  To: libc-alpha

Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes coldfire libm function implementations use
libm_alias_float to define function aliases.

Untested, given the currently broken state of GCC for coldfire.  
Committed.

2017-11-30  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/m68k/coldfire/fpu/s_fabsf.c: Include
	<libm-alias-float.h>.
	(fabsf): Define using libm_alias_float.
	* sysdeps/m68k/coldfire/fpu/s_lrintf.c: Include
	<libm-alias-float.h>.
	(lrintf): Define using libm_alias_float.
	* sysdeps/m68k/coldfire/fpu/s_rintf.c: Include
	<libm-alias-float.h>.
	(rintf): Define using libm_alias_float.

diff --git a/sysdeps/m68k/coldfire/fpu/s_fabsf.c b/sysdeps/m68k/coldfire/fpu/s_fabsf.c
index e134c10..eff9888 100644
--- a/sysdeps/m68k/coldfire/fpu/s_fabsf.c
+++ b/sysdeps/m68k/coldfire/fpu/s_fabsf.c
@@ -15,10 +15,12 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-float.h>
+
 float
 __fabsf (float x)
 {
   asm ("fsabs.s %1,%0" : "=f" (x) : "dm" (x));
   return x;
 }
-weak_alias (__fabsf, fabsf)
+libm_alias_float (__fabs, fabs)
diff --git a/sysdeps/m68k/coldfire/fpu/s_lrintf.c b/sysdeps/m68k/coldfire/fpu/s_lrintf.c
index 7f5c9d04..0ec1014 100644
--- a/sysdeps/m68k/coldfire/fpu/s_lrintf.c
+++ b/sysdeps/m68k/coldfire/fpu/s_lrintf.c
@@ -15,6 +15,8 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-float.h>
+
 long int
 __lrintf (float x)
 {
@@ -22,4 +24,4 @@ __lrintf (float x)
   asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x));
   return result;
 }
-weak_alias (__lrintf, lrintf)
+libm_alias_float (__lrint, lrint)
diff --git a/sysdeps/m68k/coldfire/fpu/s_rintf.c b/sysdeps/m68k/coldfire/fpu/s_rintf.c
index ea244e8..aa0e158 100644
--- a/sysdeps/m68k/coldfire/fpu/s_rintf.c
+++ b/sysdeps/m68k/coldfire/fpu/s_rintf.c
@@ -15,6 +15,8 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <libm-alias-float.h>
+
 float
 __rintf (float x)
 {
@@ -22,4 +24,4 @@ __rintf (float x)
   asm ("fint.s %1,%0" : "=f" (result) : "dm" (x));
   return (float) result;
 }
-weak_alias (__rintf, rintf)
+libm_alias_float (__rint, rint)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-30 23:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 23:53 Use libm_alias_float for coldfire [committed] Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).