diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-opt')
-rw-r--r-- | sysdeps/ieee754/ldbl-opt/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-opt/nldbl-dsqrt.c | 28 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-opt/nldbl-fsqrt.c | 28 |
3 files changed, 59 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index 4e41a27e80..dff53cc0d8 100644 --- a/sysdeps/ieee754/ldbl-opt/Makefile +++ b/sysdeps/ieee754/ldbl-opt/Makefile @@ -45,7 +45,7 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \ nextup nextdown totalorder totalordermag getpayload \ canonicalize setpayload setpayloadsig llogb fmaxmag fminmag \ roundeven fromfp ufromfp fromfpx ufromfpx fadd dadd \ - fdiv ddiv fmul dmul fsub dsub + fdiv ddiv fmul dmul fsqrt dsqrt fsub dsub libnldbl-routines = $(libnldbl-calls:%=nldbl-%) libnldbl-inhibit-o = $(object-suffixes) libnldbl-static-only-routines = $(libnldbl-routines) @@ -90,6 +90,7 @@ CFLAGS-nldbl-ctanh.c = -fno-builtin-ctanhl CFLAGS-nldbl-dadd.c = -fno-builtin-daddl CFLAGS-nldbl-ddiv.c = -fno-builtin-ddivl CFLAGS-nldbl-dmul.c = -fno-builtin-dmull +CFLAGS-nldbl-dsqrt.c = -fno-builtin-dsqrtl CFLAGS-nldbl-dsub.c = -fno-builtin-dsubl CFLAGS-nldbl-erf.c = -fno-builtin-erfl CFLAGS-nldbl-erfc.c = -fno-builtin-erfcl @@ -113,6 +114,7 @@ CFLAGS-nldbl-fmul.c = -fno-builtin-fmull CFLAGS-nldbl-frexp.c = -fno-builtin-frexpl CFLAGS-nldbl-fromfp.c = -fno-builtin-fromfpl CFLAGS-nldbl-fromfpx.c = -fno-builtin-fromfpxl +CFLAGS-nldbl-fsqrt.c = -fno-builtin-fsqrtl CFLAGS-nldbl-fsub.c = -fno-builtin-fsubl CFLAGS-nldbl-gamma.c = -fno-builtin-gammal CFLAGS-nldbl-getpayload.c = -fno-builtin-getpayloadl diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-dsqrt.c b/sysdeps/ieee754/ldbl-opt/nldbl-dsqrt.c new file mode 100644 index 0000000000..1d131f083d --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-dsqrt.c @@ -0,0 +1,28 @@ +/* Compatibility routine for IEEE double as long double for dsqrt. + Copyright (C) 2021 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 + <https://www.gnu.org/licenses/>. */ + +#define dsqrtl __hide_dsqrtl +#include "nldbl-compat.h" +#undef dsqrtl + +double +attribute_hidden +dsqrtl (double x) +{ + return sqrt (x); +} diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-fsqrt.c b/sysdeps/ieee754/ldbl-opt/nldbl-fsqrt.c new file mode 100644 index 0000000000..bcdf1aa556 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/nldbl-fsqrt.c @@ -0,0 +1,28 @@ +/* Compatibility routine for IEEE double as long double for fsqrt. + Copyright (C) 2021 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 + <https://www.gnu.org/licenses/>. */ + +#define fsqrtl __hide_fsqrtl +#include "nldbl-compat.h" +#undef fsqrtl + +float +attribute_hidden +fsqrtl (double x) +{ + return fsqrt (x); +} |