aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/m68k/m680x0/fpu/s_log1p.c
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2018-06-22 18:18:21 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2018-06-22 21:34:28 -0300
commitd93f4ff16b75f77b99cb095c3e83c9b8281261f2 (patch)
treeaf4edc4f3a726aabc8c21d0da4917b260aa96445 /sysdeps/m68k/m680x0/fpu/s_log1p.c
parentf6299d2a103efc46d8f75834f1e38f3eda9f4fcb (diff)
downloadglibc-d93f4ff16b75f77b99cb095c3e83c9b8281261f2.tar
glibc-d93f4ff16b75f77b99cb095c3e83c9b8281261f2.tar.gz
glibc-d93f4ff16b75f77b99cb095c3e83c9b8281261f2.tar.bz2
glibc-d93f4ff16b75f77b99cb095c3e83c9b8281261f2.zip
m68k: Reorganize log1p and significand implementations
Commit 5e79e0292bfb03f40e43379fd92581ad8eae9cb8 broke m68k after s_significand.c became available in the build directory. All m68k implementations of log1p and significand were including s_significand.c and stopped working after the inclusion of the the auto-generated file. This patch reorganizes the implementation of log1p and significand for m680x0 in order to avoid hitting this problem. * sysdeps/m68k/m680x0/fpu/s_log1p.c: Set as the generic file for all log1p and significand functions on m680x0. * sysdeps/m68k/m680x0/fpu/s_log1pf.c: Include s_log1p.c instead of s_significand.c.. * sysdeps/m68k/m680x0/fpu/s_log1pl.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_significandf.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_significandl.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_significand.c: Move all the code to s_log1p.c and include it.. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/m68k/m680x0/fpu/s_log1p.c')
-rw-r--r--sysdeps/m68k/m680x0/fpu/s_log1p.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/sysdeps/m68k/m680x0/fpu/s_log1p.c b/sysdeps/m68k/m680x0/fpu/s_log1p.c
index 7eb2529547..5da96c5834 100644
--- a/sysdeps/m68k/m680x0/fpu/s_log1p.c
+++ b/sysdeps/m68k/m680x0/fpu/s_log1p.c
@@ -1,4 +1,34 @@
-#define FUNC log1p
-#undef weak_alias
-#define weak_alias(a,b)
-#include <s_significand.c>
+/* Implement logp1 for m68k.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC log1p
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+__CONCATX(__,FUNC) (float_type x)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x);
+}