]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
m68k: Reorganize log1p and significand implementations
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Fri, 22 Jun 2018 21:18:21 +0000 (18:18 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Sat, 23 Jun 2018 00:34:28 +0000 (21:34 -0300)
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>
ChangeLog
sysdeps/m68k/m680x0/fpu/s_log1p.c
sysdeps/m68k/m680x0/fpu/s_log1pf.c
sysdeps/m68k/m680x0/fpu/s_log1pl.c
sysdeps/m68k/m680x0/fpu/s_significand.c
sysdeps/m68k/m680x0/fpu/s_significandf.c
sysdeps/m68k/m680x0/fpu/s_significandl.c

index e54d7549ae1ea6f88faae0157496f01457046b0b..c1aafdd7ee3d2f62d28146eaf295f123d108303b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-06-22  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
+
+       * 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..
+
 2018-06-21  Vincent Chen  <vincentc@andestech.com>
 
        * elf/elf.h (R_NDS32_NONE): New define.
index 7eb2529547d00cb950f462fd04fadbf5cf527890..5da96c5834acf638864e077f3a66d5b9f3d5a2e9 100644 (file)
@@ -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);
+}
index 40f332ff36c009b90bfd03785c6cd10d4f5ab99c..1e408ffffe8d0674b45fb1a836ce466d8d029d01 100644 (file)
@@ -1,4 +1,3 @@
 #define        FUNC    log1pf
-#undef weak_alias
-#define weak_alias(a,b)
-#include <s_significandf.c>
+#define float_type float
+#include <s_log1p.c>
index e580bafbc5b3154a1da418b3debed15f6b0449d4..ffe1d8893f5651313d295e22f6412cd5616cc6a1 100644 (file)
@@ -1,4 +1,3 @@
 #define FUNC log1pl
-#undef weak_alias
-#define weak_alias(a,b)
-#include <s_significandl.c>
+#define float_type long double
+#include <s_log1p.c>
index bcc9a8a475e893c8ab2da5369e6295b6948bd6a1..3259d4ee6a56a828c011d4d1e49b423f17b00a2c 100644 (file)
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <math.h>
-
-#ifndef FUNC
 #define FUNC significand
-#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);
-}
-weak_alias (__CONCATX(__,FUNC), FUNC)
+#include <s_log1p.c>
+weak_alias (__significand, significand)
index bbaa64bb13a949f6c23bb269da3a0b978dfacf32..95da7cf9697605c07b567eb5f54530b0185a3ad2 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef FUNC
 #define FUNC significandf
-#endif
 #define float_type float
-#include <s_significand.c>
+#include <s_log1p.c>
+weak_alias (__significandf, significandf)
index f3496ee862cbcb57fae41121a1752cc1ad3ba481..356b48d138715054447e83e12a21af6c0ec8e44d 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef FUNC
 #define FUNC significandl
-#endif
 #define float_type long double
-#include <s_significand.c>
+#include <s_log1p.c>
+weak_alias (__significandl, significandl)