This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

[PATCH 07/12] ldbl-128ibm-compat: Provide a scalb implementation


Reuse the template in order to provide the global symbols
__scalbf128_finite and __scalbieee128.

2018-06-19  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
	    Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>

	* sysdeps/ieee754/ldbl-128ibm-compat/Versions: Add
	__scalbf128_finite and __scalbieee128.
	* sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c: New file.
	* sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c: New file.
---
 sysdeps/ieee754/ldbl-128ibm-compat/Versions      |  2 ++
 sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c | 21 ++++++++++++++++++
 sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c | 27 ++++++++++++++++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c

diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Versions b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
index 322041132e..6496bd9187 100644
--- a/sysdeps/ieee754/ldbl-128ibm-compat/Versions
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
@@ -90,6 +90,8 @@ libm {
     __rintieee128;
     __roundevenieee128;
     __roundieee128;
+    __scalbf128_finite;
+    __scalbieee128;
     __scalblnieee128;
     __scalbnieee128;
     __setpayloadieee128;
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c b/sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c
new file mode 100644
index 0000000000..355be95996
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c
@@ -0,0 +1,21 @@
+/* Get mantissa of long double.
+   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-type-macros-float128.h>
+
+#include <math/e_scalb_template.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c b/sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c
new file mode 100644
index 0000000000..4094fbfb19
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c
@@ -0,0 +1,27 @@
+/* Get mantissa of long double.
+   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 <float128_private.h>
+#include <math-type-macros-float128.h>
+
+#undef declare_mgen_alias
+#define declare_mgen_alias(a,b)
+#define __ieee754_scalbl __ieee754_scalbf128
+#include <w_scalb_template.c>
+
+libm_alias_float128_other_r_ldbl (__scalb, scalb,)
-- 
2.14.4


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