Commit Graph

1098 Commits

Author SHA1 Message Date
Rajalakshmi Srinivasaraghavan
0059122aa0 ldbl-128ibm-compat: Add tests for IBM long double functions
This patch creates test-ibm128* tests from the long double function tests.
In order to explicitly test IBM long double functions -mabi=ibmlongdouble is
added to CFLAGS.

Likewise, update the test headers to correct choose ULPs when redirects
are enabled.

Co-authored-by: Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
Co-authored-by: Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
2020-03-06 09:17:32 -06:00
Paul E. Murphy
4068b54c70 ldbl-128ibm-compat: link tst-ldbl-efgcvt against loader too
This also requires the linker workaround to ensure everything links
correctly.  See comment in sysdeps/powerpc/powerpc64/le/Makefile
for details.
2020-02-28 08:20:02 -06:00
Paul E. Murphy
77d5bddd8f ldbl-128ibm-compat: enforce ibm128 on compat tests
For lack of a more comprehensive solution, tack on the ibm128 ABI
compiler options for the totalorder{,mag}l compat tests which exist
prior to enabling this feature.
2020-02-28 08:20:02 -06:00
Gabriel F. T. Gomes
d967237443 ldbl-128ibm-compat: Provide nexttoward functions
The functions in the nexttoward family are special, in the sense that
they always have a long double argument, regardless of their suffix
(i.e.: nexttowardf and nexttoward have a long double argument, besides
the float and double arguments).

On top of that, they are also special because nexttoward functions are
not part of the _FloatN API, hence __nexttowardf128 do not exist.

This patch adds 4 new function implementations for the new long double
format:

  __nexttoward_to_ieee128
  __nexttowardf_to_ieee128
  __nexttowardieee128 (as an alias to __nextafterieee128)

Likewise, rename "long double" "_Float128" in shared ldbl-128
files to ensure correct type is used irrespective of ABI
switches.

Thank you to those who helped out with this patch:

Co-Authored-By: Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
2020-02-28 08:20:02 -06:00
Tulio Magno Quites Machado Filho
f1a166b0d7 ldbl-128ibm-compat: Provide a significand implementation
Reuse the template in order to provide the global symbol
__significandieee128.
2020-02-28 08:20:02 -06:00
Tulio Magno Quites Machado Filho
8dbfea3a20 ldbl-128ibm-compat: Redirect long double functions to f128/ieee128 functions
Modify the headers to redirect long double functions to global __*f128
symbols or to __*ieee128 otherwise.

Most of the functions in math.h benefit from the infrastructure already
available for __LDBL_COMPAT.  The only exceptions are nexttowardf and
nexttoward that need especial treatment.

Both math/bits/mathcalls-helper-functions.h and math/bits/mathcalls.h
were modified in order to provide alternative redirection destinations
that are essential to support functions that should not be redirected to
the same name pattern of the rest of the functions, i.e.: __fpclassify,
__signbit, __iseqsig, __issignaling, isinf, finite and isnan, which will
be redirected to __*f128 instead of __*ieee128 used for the rest.
2020-02-28 08:20:02 -06:00
Paul E. Murphy
a92ac9f494 ldbl-128ibm: make ieee754.h work with IEEE 128 long double
Instead of attempting something more creative, just copy
the small struct from ldbl-128 and enable it when IEEE
long double is present, and update the ibm long double
variant if supported.

Likewise, provide a shadow copy of math_ldbl.h to prevent
the ibm128 specific long double header from poisoning
unrelated files due to it's usage in math_private.h.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2020-02-21 08:24:36 -06:00
Paul E. Murphy
bb05281822 ldbl-128ibm-compat: fixup subdir location of several funcs
We want to ensure that if a second file is built to support
ieee128 long double, we built its companion implementation
with ibm128 long double.  The shared object versions of these
files build correctly because the aliasing is sufficiently
complex to prevent the redirects from applying when defining
them.

However, this does not prevent the static object variants
from becoming quietly broken due to redirects.  This is
intentionally avoided by marking such objects to be built
with -mabi=ibmlongdouble.

Shuffle the misplaced routines to build against the subdir
which defines the needed symbols.
2020-02-21 08:24:15 -06:00
Paul E. Murphy
74f614b70a ldbl-128ibm-compat: enforce correct abi flags on internal file
A number of utility files and helper objects should also be
explicitly configured to build with the ibm128 ABI to prevent
gremlins when enabling IEEE long double.
2020-02-21 08:24:04 -06:00
Tulio Magno Quites Machado Filho
218dad29e8 ldbl-128ibm-compat: Provide ieee128 symbols to narrow functions
Move the narrow math aliasing macros into a new sysdep header file
math-narrow-alias-float128.h.  Then, provide an override header
to supply the necessary changes to supply the *ieee128 aliases of
these symbols.

This adds ieee128 aliases for faddl, fdivl, fmull, fsubl, daddl, ddivl,
dmull, dsubl.
2020-02-20 17:12:14 -06:00
Tulio Magno Quites Machado Filho
77ad97356c Undefine redirections after long double definition on __LDBL_COMPAT [BZ #23294]
After defining the long double redirections to double, __MATHDECL_1 has
to be redefined to its previous state in order to avoid redirecting all
subsequent types.
2020-02-20 17:11:06 -06:00
Tulio Magno Quites Machado Filho
2b7dc93f82 ldbl-128ibm-compat: Provide a scalb implementation
Reuse the template in order to provide the redirect for
scalbl to __scalbieee128, but avoid any extra aliasing
as this is intended to support long double redirects only.
2020-02-14 08:24:56 -06:00
Tulio Magno Quites Machado Filho
c624d23260 Add a generic scalb implementation
This is a preparatory patch to enable building a _Float128
variant to ease reuse when building a _Float128 variant to
alias this long double only symbol.

Notably, stubs are added where missing to the native _Float128
sysdep dir to prevent building these newly templated variants
created inside the build directories.

Also noteworthy are the changes around LIBM_SVID_COMPAT.  These
changes are not intuitive.  The templated version is only
enabled when !LIBM_SVID_COMPAT, and the compat version is
predicated entirely on LIBM_SVID_COMPAT.  Thus, exactly one is
stubbed out entirely when building.  The nldbl scalb compat
files are updated to account for this.

Likewise, fixup the reuse of m68k's e_scalb{f,l}.c to include
it's override of e_scalb.c.  Otherwise, the search path finds
the templated copy in the build directory.  This could be
futher simplified by providing an overridden template, but I
lack the hardware to verify.
2020-02-14 08:24:56 -06:00
Joseph Myers
ad180676b8 Adjust thresholds in Bessel function implementations (bug 14469).
A recent discussion in bug 14469 notes that a threshold in float
Bessel function implementations, used to determine when to use a
simpler implementation approach, results in substantially inaccurate
results.

As I discussed in
<https://sourceware.org/ml/libc-alpha/2013-03/msg00345.html>, a
heuristic argument suggests 2^(S+P) as the right order of magnitude
for a suitable threshold, where S is the number of significand bits in
the floating-point type and P is the number of significant bits in the
representation of the floating-point type, and the float and ldbl-96
implementations use thresholds that are too small.  Some threshold
does need using, there or elsewhere in the implementation, to avoid
spurious underflow and overflow for large arguments.

This patch sets the thresholds in the affected implementations to more
heuristically justifiable values.  Results will still be inaccurate
close to zeroes of the functions (thus this patch does *not* fix any
of the bugs for Bessel function inaccuracy); fixing that would require
a different implementation approach, likely along the lines described
in <http://www.cl.cam.ac.uk/~jrh13/papers/bessel.ps.gz>.

So the justification for a change such as this would be statistical
rather than based on particular tests that had excessive errors and no
longer do so (no doubt such tests could be found, but would probably
be too fragile to add to the testsuite, as liable to give large errors
again from very small implementation changes or even from compiler
changes).  See
<https://sourceware.org/ml/libc-alpha/2020-02/msg00638.html> for such
statistics of the resulting improvements for float functions.

Tested (glibc testsuite) for x86_64.
2020-02-14 14:16:25 +00:00
Florian Weimer
c10acd4026 math/test-sinl-pseudo: Use stack protector only if available
This fixes commit 9333498794 ("Avoid ldbl-96 stack
corruption from range reduction of pseudo-zero (bug 25487).").
2020-02-13 17:01:15 +01:00
Joseph Myers
9333498794 Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).
Bug 25487 reports stack corruption in ldbl-96 sinl on a pseudo-zero
argument (an representation where all the significand bits, including
the explicit high bit, are zero, but the exponent is not zero, which
is not a valid representation for the long double type).

Although this is not a valid long double representation, existing
practice in this area (see bug 4586, originally marked invalid but
subsequently fixed) is that we still seek to avoid invalid memory
accesses as a result, in case of programs that treat arbitrary binary
data as long double representations, although the invalid
representations of the ldbl-96 format do not need to be consistently
handled the same as any particular valid representation.

This patch makes the range reduction detect pseudo-zero and unnormal
representations that would otherwise go to __kernel_rem_pio2, and
returns a NaN for them instead of continuing with the range reduction
process.  (Pseudo-zero and unnormal representations whose unbiased
exponent is less than -1 have already been safely returned from the
function before this point without going through the rest of range
reduction.)  Pseudo-zero representations would previously result in
the value passed to __kernel_rem_pio2 being all-zero, which is
definitely unsafe; unnormal representations would previously result in
a value passed whose high bit is zero, which might well be unsafe
since that is not a form of input expected by __kernel_rem_pio2.

Tested for x86_64.
2020-02-12 23:31:56 +00:00
Paul E. Murphy
cd7965bd97 ldbl-128ibm-compat: set PRINTF_CHK flag in {,v}sprintf_chk
This should be unconditionally set to match the common implementation,
and fixes multiple test failures related to sprintf.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2020-02-10 16:51:03 -06:00
Wilco Dijkstra
814309f0c2 Remove a comment claiming that sin/cos round correctly. 2020-02-07 17:15:37 +00:00
Matheus Castanho
9f8b135f76 Fix maybe-uninitialized error on powerpc
The build has been failing on powerpc64le-linux-gnu with GCC 10
due to a maybe-uninitialized error:

../sysdeps/ieee754/dbl-64/mpa.c:875:6: error: ‘w.e’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
  875 |   EY -= EX;
      |      ^~

The warning is thrown because when __inv is called by __dvd *y is not
initialized and if t == 0 before calling __dbl_mp, EY will stay
uninitialized, as the function does not touch it in this case.

However, since t will be set to 1/t before calling __dbl_mp, t == 0 will
never happen, so we can instruct the compiler to ignore this case, which
suppresses the warning.

Tested on powerpc64le.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2020-01-17 21:02:13 -03:00
Wilco Dijkstra
220622dde5 Add libm_alias_finite for _finite symbols
This patch adds a new macro, libm_alias_finite, to define all _finite
symbol.  It sets all _finite symbol as compat symbol based on its first
version (obtained from the definition at built generated first-versions.h).

The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need
special treatment in code that is shared between long double and float128.
It is done by adding a list, similar to internal symbol redifinition,
on sysdeps/ieee754/float128/float128_private.h.

Alpha also needs some tricky changes to ensure we still emit 2 compat
symbols for sqrt(f).

Passes buildmanyglibc.

Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2020-01-03 10:02:04 -03:00
Joseph Myers
d614a75396 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Gabriel F. T. Gomes
9ae967bf45 ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128
Some compiler versions, e.g. GCC 7, complain when -mlong-double-128 is
used together with -mabi=ibmlongdouble or -mabi=ieeelongdouble,
producing the following error message:

  cc1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’

This patch removes -mlong-double-128 from the compilation lines that
explicitly request -mabi=*longdouble.

Tested for powerpc64le.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2019-12-27 15:02:10 -03:00
Tulio Magno Quites Machado Filho
5d73c96f64 ldbl-128ibm-compat: Compiler flags for stdio functions
Some of the files that provide stdio.h and wchar.h functions have a
filename prefixed with 'io', such as 'iovsprintf.c'.  On platforms that
imply ldbl-128ibm-compat, these files must be compiled with the flag
-mabi=ibmlongdouble.  This patch adds this flag to their compilation.

Notice that this is not required for the other files that provide
similar functions, because filenames that are not prefixed with 'io'
have ldbl-128ibm-compat counterparts in the Makefile, which already adds
-mabi=ibmlongdouble to them.

Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
2019-12-27 15:02:10 -03:00
Tulio Magno Quites Machado Filho
1ef9b6e0bf Do not redirect calls to __GI_* symbols, when redirecting to *ieee128
On platforms where long double has IEEE binary128 format as a third
option (initially, only powerpc64le), many exported functions are
redirected to their __*ieee128 equivalents.  This redirection is
provided by installed headers such as stdio-ldbl.h, and is supposed to
work correctly with user code.

However, during the build of glibc, similar redirections are employed,
in internal headers, such as include/stdio.h, in order to avoid extra
PLT entries.  These redirections conflict with the redirections to
__*ieee128, and must be avoided during the build.  This patch protects
the second redirections with a test for __LONG_DOUBLE_USES_FLOAT128, a
new macro that is defined to 1 when functions that deal with long double
typed values reuses the _Float128 implementation (this is currently only
true for powerpc64le).

Tested for powerpc64le, x86_64, and with build-many-glibcs.py.

Co-authored-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2019-12-27 15:02:10 -03:00
Gabriel F. T. Gomes
f8cd102081 Avoid compat symbols for totalorder in powerpc64le IEEE long double
On powerpc64le, the libm_alias_float128_other_r_ldbl macro is
used to create an alias between totalorderf128 and __totalorderlieee128,
as well as between the totalordermagf128 and __totalordermaglieee128.

However, the totalorder* and totalordermag* functions changed their
parameter type since commit ID 42760d7646 and got compat symbols for
their old versions.  With this change, the aforementioned macro would
create two conflicting aliases for __totalorderlieee128 and
__totalordermaglieee128.

This patch avoids the creation of the alias between the IEEE long double
symbols (__totalorderl*ieee128) and the compat symbols, because the IEEE
long double functions have never been exported thus don't need such
compat symbol.

Tested for powerpc64le.

Reviewed-by: Joseph Myers <joseph@codesourcery.com>
2019-12-23 16:32:20 -03:00
Gabriel F. T. Gomes
3021e78178 ldbl-128ibm-compat: Add *cvt functions
This patch adds IEEE long double versions of q*cvt* functions for
powerpc64le.  Unlike all other long double to/from string conversion
functions, these do not rely on internal functions that can take
floating-point numbers with different formats and act on them
accordingly, instead, the related files are rebuilt with the
-mabi=ieeelongdouble compiler flag set.

Having -mabi=ieeelongdouble passed to the compiler causes the object
files to be marked with a .gnu_attribute that is incompatible with the
.gnu_attribute in files built with -mabi=ibmlongdouble (the default).
The difference causes error messages similar to the following:

  ld: libc_pic.a(s_isinfl.os) uses IBM long double,
      libc_pic.a(ieee128-qefgcvt_r.os) uses IEEE long double.
  collect2: error: ld returned 1 exit status
  make[2]: *** [../Makerules:649: libc_pic.os] Error 1

Although this warning is useful in other situations, the library
actually needs to have functions with different long double formats, so
.gnu_attribute generation is explicitly disabled for these files with
the use of -mno-gnu-attribute.

Tested for powerpc64le on the branch that actually enables the
sysdeps/ieee754/ldbl-128ibm-compat for powerpc64le.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
2019-12-23 16:32:20 -03:00
Gabriel F. T. Gomes
f1a0eb5b67 ldbl-128ibm-compat: Add ISO C99 versions of scanf functions
In the format string for *scanf functions, the '%as', '%aS', and '%a[]'
modifiers behave differently depending on ISO C99 compatibility.  When
_GNU_SOURCE is defined and -std=c89 is passed to the compiler, these
functions behave like ascanf, and the modifiers allocate memory for the
output.  Otherwise, the ISO C99 compliant version of these functions is
used, and the modifiers consume a floating-point argument.  This patch
adds the IEEE binary128 variant of ISO C99 compliant functions for the
third long double format on powerpc64le.

Tested for powerpc64le.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
2019-12-13 18:02:09 -03:00
Gabriel F. T. Gomes
348787f069 ldbl-128ibm-compat: Fix selection of GNU and ISO C99 scanf
Since commit

commit 03992356e6
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Feb 10 11:58:35 2018 -0500

    Use C99-compliant scanf under _GNU_SOURCE with modern compilers.

the selection of the GNU versions of scanf functions requires both
_GNU_SOURCE and -std=c89.  This patch changes the tests in
ldbl-128ibm-compat so that they actually test the GNU versions (without
this change, the redirection to the ISO C99 version always happens, so
GNU versions of the new implementation (e.g. __scanfieee128) were left
untested).

Tested for powerpc64le.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
2019-12-13 18:01:25 -03:00
Stefan Liebler
1902d5d5ff Adjust s_copysignl.c regarding code style.
This patch just adjusts the generic implementation regarding code style.
No functional change.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:21 +01:00
Stefan Liebler
171d23d7cb Adjust s_ceilf.c and s_ceill.c regarding code style.
This patch just adjusts the generic implementation regarding code style.
No functional change.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:21 +01:00
Stefan Liebler
d3a0409ab6 Adjust s_floorf.c and s_floorl.c regarding code style.
This patch just adjusts the generic implementation regarding code style.
No functional change.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:20 +01:00
Stefan Liebler
99b39a83e7 Adjust s_rintf.c and s_rintl.c regarding code style.
This patch just adjusts the generic implementation regarding code style.
No functional change.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:20 +01:00
Stefan Liebler
6a3866dae9 Adjust s_nearbyintf.c and s_nearbyintl.c regarding code style.
This patch just adjusts the generic implementation regarding code style.
No functional change.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:19 +01:00
Stefan Liebler
f818afdd3b Use GCC builtins for copysign functions if desired.
This patch is always using the corresponding GCC builtin for copysignf, copysign,
and is using the builtin for copysignl, copysignf128 if the USE_FUNCTION_BUILTIN
macros are defined to one in math-use-builtins.h.

Altough the long double version is enabled by default we still need
the macro and the alternative implementation as the _Float128 version
of the builtin is not available with all supported GCC versions.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:19 +01:00
Stefan Liebler
f82996f815 Use GCC builtins for round functions if desired.
This patch is using the corresponding GCC builtin for roundf, round,
roundl and roundf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.

This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used.  The code of the generic
implementation is not changed.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:18 +01:00
Stefan Liebler
1ac9c1cf87 Use GCC builtins for trunc functions if desired.
This patch is using the corresponding GCC builtin for truncf, trunc,
truncl and truncf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.

This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used.  The code of the generic
implementation is not changed.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:17 +01:00
Stefan Liebler
62560ee840 Use GCC builtins for ceil functions if desired.
This patch is using the corresponding GCC builtin for ceilf, ceil,
ceill and ceilf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.

This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used.  The code of the generic
implementation is not changed.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:17 +01:00
Stefan Liebler
6c1b6a5e8c Use GCC builtins for floor functions if desired.
This patch is using the corresponding GCC builtin for floorf, floor,
floorl and floorf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.

This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used.  The code of the generic
implementation is not changed.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:16 +01:00
Stefan Liebler
a2a9b00429 Use GCC builtins for rint functions if desired.
This patch is using the corresponding GCC builtin for rintf, rint,
rintl and rintf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.

This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used.  The code of the generic
implementation is not changed.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:16 +01:00
Stefan Liebler
ae3577f607 Use GCC builtins for nearbyint functions if desired.
This patch is using the corresponding GCC builtin for nearbyintf, nearbyint,
nearbintl and nearbyintf128 if the USE_FUNCTION_BUILTIN macros are defined to one
in math-use-builtins.h.

This is the case for s390 if build with at least --march=z196 --mzarch.
Otherwise the generic implementation is used.  The code of the generic
implementation is not changed.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:15 +01:00
Stefan Liebler
36e9acbd5c Always use wordsize-64 version of s_round.c.
This patch replaces s_round.c in sysdeps/dbl-64 with the one in
sysdeps/dbl-64/wordsize-64 and removes the latter one.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:14 +01:00
Stefan Liebler
1c94bf0f0a Always use wordsize-64 version of s_trunc.c.
This patch replaces s_trunc.c in sysdeps/dbl-64 with the one in
sysdeps/dbl-64/wordsize-64 and removes the latter one.
The code is not changed except changes in code style.

Also adjusted the include path in x86_64 and sparc64 files.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:14 +01:00
Stefan Liebler
9f234eafe8 Always use wordsize-64 version of s_ceil.c.
This patch replaces s_ceil.c in sysdeps/dbl-64 with the one in
sysdeps/dbl-64/wordsize-64 and removes the latter one.
The code is not changed except changes in code style.

Also adjusted the include path in x86_64 and sparc64 files.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:13 +01:00
Stefan Liebler
95b0c2c431 Always use wordsize-64 version of s_floor.c.
This patch replaces s_floor.c in sysdeps/dbl-64 with the one in
sysdeps/dbl-64/wordsize-64 and removes the latter one.
The code is not changed except changes in code style.

Also adjusted the include path in x86_64 and sparc64 files.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:12 +01:00
Stefan Liebler
ab48bdd098 Always use wordsize-64 version of s_rint.c.
This patch replaces s_rint.c in sysdeps/dbl-64 with the one in
sysdeps/dbl-64/wordsize-64 and removes the latter one.
The code is not changed except changes in code style.

Also adjusted the include path in x86_64 file.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:12 +01:00
Stefan Liebler
af123aa950 Always use wordsize-64 version of s_nearbyint.c.
This patch replaces s_nearbyint.c in sysdeps/dbl-64 with the one in
sysdeps/dbl-64/wordsize-64 and removes the latter one.
The code is not changed except changes in code style.

Also adjusted the include path in x86_64 file.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2019-12-11 15:12:11 +01:00
Gabriel F. T. Gomes
39c977b23e ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold
Since the commit

commit 86a0f56158
Author: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Date:   Thu Jun 28 13:57:50 2018 +0530

    ldbl-128ibm-compat: Introduce ieee128 symbols

IEEE long double versions of strfroml, strtold, and wcstold have been
prepared, but not exposed (which will only happen when the full support
for IEEE long double is complete).  This patch adds tests for these
functions in both IBM and IEEE long double mode.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
2019-12-03 13:30:42 -03:00
Gabriel F. T. Gomes
80a19b003e ldbl-128ibm-compat: Add tests for strfmon and strfmon_l
This patch adds elementary tests to check that strfmon and strfmon_l
correctly evaluate long double values with IBM Extended Precision and
IEEE binary128 format.

Tested for powerpc64le.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
2019-12-03 13:30:42 -03:00
Rajalakshmi Srinivasaraghavan
66fa30828a ldbl-128ibm-compat: Add strfmon_l with IEEE long double format
Similarly to what has been done for printf-like functions, more
specifically to the internal implementation in __vfprintf_internal, this
patch extends __vstrfmon_l_internal to deal with long double values with
binary128 format (as a third format option and reusing the float128
implementation).

Tested for powerpc64le, powerpc64, x86_64, and with build-many-glibcs.

Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
2019-12-03 13:30:37 -03:00
Gabriel F. T. Gomes
5d39f37b26 ldbl-128ibm-compat: Replace http with https in new files
Several commits to the ldbl-128ibm-compat directory added new files
where the URL in the copyright notice pointed to an http, rather than to
an https, address.  This happened because I copied the notices before
commit ID 5a82c74822.  This trivial patch fixes this issue.
2019-12-03 13:00:57 -03:00