This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libm __*_finite aliases for MIPS


libc commit 0ac5ae2335292908f39031b1ea9fe8edce433c0f adds __*_finite 
aliases for libm functions so that use with -ffinite-math-only can bypass 
the wrappers that deal with setting errno and other error handling 
variants.  I've applied this patch to add aliases for the MIPS 
implementations of sqrt functions.  Alpha also has a few sqrt* 
implementations that will need similar fixes, while m68k has lots of e_*.c 
implementations (mostly for m680x0, only e_sqrt.c and e_sqrtf.c for 
coldfire) needing updating.

diff --git a/ChangeLog.mips b/ChangeLog.mips
index 5d9d772..78932d7 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2011-10-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/fpu/e_sqrt.c: Add __sqrt_finite alias.
+	* sysdeps/mips/fpu/e_sqrtf.c: Add __sqrtf_finite alias.
+	* sysdeps/mips/mips64/soft-fp/e_sqrtl.c: Add __sqrtl_finite alias.
+
 2011-10-05  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/mips/dl-machine.h (elf_machine_rel, elf_machine_rela)
diff --git a/sysdeps/mips/fpu/e_sqrt.c b/sysdeps/mips/fpu/e_sqrt.c
index 5449710..d1a8afc 100644
--- a/sysdeps/mips/fpu/e_sqrt.c
+++ b/sysdeps/mips/fpu/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
 
@@ -30,6 +30,7 @@ __ieee754_sqrt (double x)
   __asm__ ("sqrt.d %0,%1" : "=f" (z) : "f" (x));
   return z;
 }
+strong_alias (__ieee754_sqrt, __sqrt_finite)
 
 #else
 
diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/sysdeps/mips/fpu/e_sqrtf.c
index 3590ad4..da58b46 100644
--- a/sysdeps/mips/fpu/e_sqrtf.c
+++ b/sysdeps/mips/fpu/e_sqrtf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
 
@@ -30,6 +30,7 @@ __ieee754_sqrtf (float x)
   __asm__ ("sqrt.s %0,%1" : "=f" (z) : "f" (x));
   return z;
 }
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
 
 #else
 
diff --git a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
index 81fd58a..c2e1faf 100644
--- a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
+++ b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
@@ -1,5 +1,5 @@
 /* long double square root in software floating-point emulation.
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -37,3 +37,4 @@ __ieee754_sqrtl (const long double a)
   FP_HANDLE_EXCEPTIONS;
   return c;
 }
+strong_alias (__ieee754_sqrtl, __sqrtl_finite)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]