| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
|
|
|
|
|
|
|
| |
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completing the move of macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves the EXCEPTION_SET_FORCES_TRAP macro out to its own
math-tests-trap-force.h header.
Tested with build-many-glibcs.py.
* sysdeps/generic/math-tests-trap-force.h: New file.
* sysdeps/generic/math-tests.h: Include <math-tests-trap-force.h>.
(EXCEPTION_SET_FORCES_TRAP): Do not define here.
* sysdeps/powerpc/math-tests.h: Remove file.
* sysdeps/powerpc/fpu/math-tests-trap-force.h: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing moving macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves the EXCEPTION_ENABLE_SUPPORTED macro out to its own
math-tests-trap.h header.
Tested with build-many-glibcs.py.
* sysdeps/generic/math-tests-trap.h: New file.
* sysdeps/generic/math-tests.h: Include <math-tests-trap.h>.
(EXCEPTION_ENABLE_SUPPORTED): Do not define here.
* sysdeps/aarch64/math-tests.h: Remove file.
* sysdeps/arm/math-tests.h: Likewise.
* sysdeps/riscv/math-tests.h: Likewise.
* sysdeps/aarch64/math-tests-trap.h: New file.
* sysdeps/arm/math-tests-trap.h: Likewise.
* sysdeps/riscv/math-tests-trap.h: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing moving macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves the EXCEPTION_TESTS_* macros for individual types out to their
own sysdeps header.
As with ROUNDING_TESTS_*, there is no need to define these macros if
FE_ALL_EXCEPT == 0 and the individual exception macros are undefined;
thus, math-tests-exceptions.h headers are only needed for soft-float
ARM and RISC-V, while the other cases that defined these macros do not
need to do so (and the associated math-tests.h headers are thus
removed without needing replacement by math-tests-exceptions.h
headers).
Tested with build-many-glibcs.py.
* sysdeps/generic/math-tests-exceptions.h: New file.
* sysdeps/generic/math-tests.h: Include <math-tests-exceptions.h>.
(EXCEPTION_TESTS_float): Do not define here.
(EXCEPTION_TESTS_double): Likewise.
(EXCEPTION_TESTS_long_double): Likewise.
(EXCEPTION_TESTS_float128): Likewise.
* sysdeps/arm/math-tests.h [__SOFTFP__] (EXCEPTION_TESTS_float):
Likewise.
[__SOFTFP__] (EXCEPTION_TESTS_double): Likewise.
[__SOFTFP__] (EXCEPTION_TESTS_long_double): Likewise.
* sysdeps/arm/nofpu/math-tests-exceptions.h: New file.
* sysdeps/m68k/coldfire/math-tests.h: Remove file.
* sysdeps/mips/math-tests.h: Likewise.
* sysdeps/nios2/math-tests.h: Likewise.
* sysdeps/riscv/math-tests.h [!__riscv_flen]
(EXCEPTION_TESTS_float): Do not define here.
[!__riscv_flen] (EXCEPTION_TESTS_double): Likewise.
[!__riscv_flen] (EXCEPTION_TESTS_long_double): Likewise.
* sysdeps/riscv/nofpu/math-tests-exceptions.h: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing moving macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves the ROUNDING_TESTS_* macros for individual types out to their
own sysdeps header.
In the soft-float case where FE_TONEAREST is the only rounding mode
macro defined, there is no need to define ROUNDING_TESTS_*; it is only
necessary when rounding modes macros are defined that may not be
supported at runtime. Thus, the ROUNDING_TESTS_* definitions for some
configurations are just removed, not moved to new
math-tests-rounding.h headers; the only architectures needing
math-tests-rounding.h are those where the macros are defined in
bits/fenv.h because of the possibility of a soft-float compilation
using a hard-float glibc with the same ABI (i.e., ARM and RISC-V).
The test-*-vlen*.h headers, by using #undef, do not yet follow
typo-proof conventions (but they no longer implicitly rely on being
included before math-tests.h, and this area can always be cleaned up
further in future).
Tested with build-many-glibcs.py.
* sysdeps/generic/math-tests-rounding.h: New file.
* sysdeps/generic/math-tests.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Do not define here.
(ROUNDING_TESTS_double): Likewise.
(ROUNDING_TESTS_long_double): Likewise.
(ROUNDING_TESTS_float128): Likewise.
* math/test-double-vlen2.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_double): Undefine before defining.
* math/test-double-vlen4.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_double): Undefine before defining.
* math/test-double-vlen8.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_double): Undefine before defining.
* math/test-float-vlen16.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Undefine before defining.
* math/test-float-vlen4.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Undefine before defining.
* math/test-float-vlen8.h: Include <math-tests-rounding.h>.
(ROUNDING_TESTS_float): Undefine before defining.
* sysdeps/arm/nofpu/math-tests-rounding.h: New file.
* sysdeps/arm/math-tests.h [__SOFTFP__] (ROUNDING_TESTS_float): Do
not define here.
[__SOFTFP__] (ROUNDING_TESTS_double): Likewise.
[__SOFTFP__] (ROUNDING_TESTS_long_double): Likewise.
* sysdeps/riscv/nofpu/math-tests-rounding.h: New file.
* sysdeps/riscv/math-tests.h [!__riscv_flen]
(ROUNDING_TESTS_float): Do not define here.
[!__riscv_flen] (ROUNDING_TESTS_double): Likewise.
[!__risv_flen] (ROUNDING_TESTS_long_double): Likewise.
* sysdeps/m68k/coldfire/math-tests.h [!__mcffpu__]
(ROUNDING_TESTS_float): Likewise.
[!__mcffpu__] (ROUNDING_TESTS_double): Likewise.
[!__mcffpu__] (ROUNDING_TESTS_long_double): Likewise.
* sysdeps/mips/math-tests.h [__mips_soft_float]
(ROUNDING_TESTS_float): Likewise.
[__mips_soft_float] (ROUNDING_TESTS_double): Likewise.
[__mips_soft_float] (ROUNDING_TESTS_long_double): Likewise.
* sysdeps/nios2/math-tests.h (ROUNDING_TESTS_float): Likewise.
(ROUNDING_TESTS_double): Likewise.
(ROUNDING_TESTS_long_double): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing moving macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves the SNAN_TESTS_* macros for individual types out to their own
sysdeps header (while the type-generic SNAN_TESTS wrapper for those
macros remains in math-tests.h).
Tested for x86_64 and x86, and with build-many-glibcs.py.
* sysdeps/generic/math-tests-snan.h: New file.
* sysdeps/generic/math-tests.h: Include <math-tests-snan.h>.
(SNAN_TESTS_float): Do not define here.
(SNAN_TESTS_double): Likewise.
(SNAN_TESTS_long_double): Likewise.
(SNAN_TESTS_float128): Likewise.
* sysdeps/i386/fpu/math-tests-snan.h: New file.
* sysdeps/i386/fpu/math-tests.h: Remove file.
* sysdeps/ia64/math-tests-snan.h: New file.
* sysdeps/ia64/math-tests.h: Remove file.
* sysdeps/x86/math-tests.h: Likewise.
* sysdeps/x86_64/fpu/math-tests-snan.h: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing moving macros out of math-tests.h to smaller headers
following typo-proof conventions instead of using #ifndef, this patch
moves SNAN_TESTS_PRESERVE_PAYLOAD out to its own sysdeps header.
Tested with build-many-glibcs.py.
* sysdeps/generic/math-tests-snan-payload.h: New file.
* sysdeps/hppa/math-tests-snan-payload.h: Likewise.
* sysdeps/mips/math-tests-snan-payload.h: Likewise.
* sysdeps/riscv/math-tests-snan-payload.h: Likewise.
* sysdeps/generic/math-tests.h: Include
<math-tests-snan-payload.h>.
(SNAN_TESTS_PRESERVE_PAYLOAD): Do not define macro here.
* sysdeps/hppa/math-tests.h: Remove file.
* sysdeps/mips/math-tests.h [!__mips_nan2008]
(SNAN_TESTS_PRESERVE_PAYLOAD): Do not define macro here.
* sysdeps/riscv/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The math-tests.h header has many different macros and groups of
macros, defined using #ifndef in the generic version which is included
by architecture versions with #include_next after possibly defining
non-default versions of some of those macros.
This use of #ifndef is contrary to our normal typo-proof conventions
for macro definitions. This patch moves one of the macros,
SNAN_TESTS_TYPE_CAST, out to its own sysdeps header, to follow those
typo-proof conventions more closely.
Tested with build-many-glibcs.py.
2018-08-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/generic/math-tests-snan-cast.h: New file.
* sysdeps/powerpc/math-tests-snan-cast.h: Likewise.
* sysdeps/generic/math-tests.h: Include <math-tests-snan-cast.h>.
(SNAN_TESTS_TYPE_CAST): Do not define macro here.
* sysdeps/powerpc/math-tests.h (SNAN_TESTS_TYPE_CAST): Likewise.
|
|
|
|
|
|
|
| |
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes math-tests.h, as used to describe support of given
floating-point types for sNaNs, rounding modes and exceptions, handle
distinguishing _Float128 from long double. This is needed for x86_64,
where if building with GCC 6 or earlier there is no __builtin_nansq,
so no way to get a signaling NaN of _Float128 type, so associated
tests cannot be run (although glibc itself works fine, as there is
never any need to create such an sNaN with a built-in function inside
glibc).
Tested for x86_64 (in conjunction with float128 patches).
* sysdeps/generic/math-tests.h: Include <bits/floatn.h>.
(MATH_TESTS_TG): New macro.
(SNAN_TESTS_float128): Likewise.
(ROUNDING_TESTS_float128): Likewise.
(EXCEPTION_TESTS_float128): Likewise.
(SNAN_TESTS): Define using MATH_TESTS_TG.
(ROUNDING_TESTS): Likewise.
(EXCEPTION_TESTS): Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TS 18661-1 defines canonicalize functions to produce a canonical
version of a floating-point representation. This patch implements
these functions for glibc.
As with the iscanonical macro, these functions are oriented to the
decimal floating-point case, where some values have both canonical and
noncanonical representations. However, the functions have a return
value that says whether they succeeded in storing a canonical result;
thus, they can fail for the case of an invalid representation (while
still not making any particular choice from among multiple equally
canonical valid representations of the same value). Since no
floating-point formats in glibc actually have noncanonical valid
representations, a type-generic implementation of these functions can
be used that expects iscanonical to return 0 only for invalid
representations. Now that iscanonical is used within libm.so,
libm_hidden_proto / libm_hidden_def are added for __iscanonicall.
The definition of these functions is intended to correspond to a
convertFormat operation to the same floating-point format. Thus, they
convert signaling NaNs to quiet NaNs, raising the "invalid" exception.
Such a conversion "should" produce "the canonical version of that
signaling NaN made quiet".
libm-test.inc is made to check NaN payloads for the output of these
functions, a new feature (at some point manipulation functions such as
fabs and copysign should have tests added that verify payload
preservation for them). As however some architectures may not follow
the recommended practice of preserving NaN payloads when converting a
signaling NaN to quiet, a new math-tests.h macro
SNAN_TESTS_PRESERVE_PAYLOAD is added, and defined to 0 for non-NAN2008
MIPS; any other architectures seeing test failures for lack of payload
preservation in this case should also define this macro to 0. (If any
cases arise where the sign isn't preserved either, those should have a
similar macro added.)
The ldbl-96 and ldbl-128ibm tests of iscanonical are renamed and
adapted to test canonicalizel as well on the same representations.
Tested for x86_64, x86, mips64 and powerpc.
* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]
(canonicalize): New declaration.
* math/Versions (canonicalize): New libm symbol at version
GLIBC_2.25.
(canonicalizef): Likewise.
(canonicalizel): Likewise.
* math/Makefile (gen-libm-calls): Add s_canonicalizeF.
* math/s_canonicalize_template.c: New file.
* math/libm-test.inc: Update comment on functions tested and
testing of NaN payloads.
(TEST_NAN_PAYLOAD): New macro.
(NO_TEST_INLINE): Update value.
(XFAIL_TEST): Likewise.
(ERRNO_UNCHANGED): Likewise.
(ERRNO_EDOM): Likewise.
(ERRNO_ERANGE): Likewise.
(IGNORE_RESULT): Likewise.
(NON_FINITE): Likewise.
(TEST_SNAN): Likewise.
(NO_TEST_MATHVEC): Likewise.
(TEST_NAN_PAYLOAD_CANONICALIZE): New macro.
(check_float_internal): Check NaN payloads if TEST_NAN_PAYLOAD.
(struct test_Ffp_b1_data): New type.
(RUN_TEST_Ffp_b1): New macro.
(RUN_TEST_LOOP_Ffp_b1): Likewise.
(canonicalize_test_data): New array.
(canonicalize_test): New function.
(main): Call canonicalize_test.
* manual/arith.texi (FP Bit Twiddling): Document canonicalize,
canonicalizef and canonicalizel.
* manual/libm-err-tab.pl: Update comment on interfaces without
ulps tabulated.
* sysdeps/ieee754/ldbl-opt/nldbl-canonicalize.c: New file.
* sysdeps/ieee754/ldbl-opt/s_canonicalizel.c: Likewise.
* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
canonicalize.
(CFLAGS-nldbl-canonicalize.c): New variable.
* sysdeps/ieee754/ldbl-128ibm/test-iscanonical-ldbl-128ibm.c: Move
to ...
* sysdeps/ieee754/ldbl-128ibm/test-canonical-ldbl-128ibm.c:
... here.
(do_test): Also test canonicalizel.
* sysdeps/ieee754/ldbl-128ibm/Makefile (tests): Change
test-iscanonical-ldbl-128ibm to test-canonical-ldbl-128ibm.
* sysdeps/ieee754/ldbl-128ibm/include/bits/iscanonical.h: New
file.
* sysdeps/ieee754/ldbl-128ibm/s_iscanonicall.c (__iscanonicall):
Use libm_hidden_def.
* sysdeps/ieee754/ldbl-96/test-iscanonical-ldbl-96.c: Move to ...
* sysdeps/ieee754/ldbl-96/test-canonical-ldbl-96.c: ... here.
(do_test): Also test canonicalizel.
* sysdeps/ieee754/ldbl-96/Makefile (tests): Change
test-iscanonical-ldbl-96 to test-canonical-ldbl-96.
* sysdeps/ieee754/ldbl-96/include/bits/iscanonical.h: New file.
* sysdeps/ieee754/ldbl-96/s_iscanonicall.c (__iscanonicall): Use
libm_hidden_def.
* sysdeps/generic/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD): New
macro.
* sysdeps/mips/math-tests.h [__mips_hard_float && !__mips_nan2008]
(SNAN_TESTS_PRESERVE_PAYLOAD): Likewise.
* sysdeps/nacl/libm.abilist: Update.
* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed that there was no meaningful test coverage for
fegetexceptflag and fesetexceptflag (one test ensures that calls to
them compile and link, but nothing to verify they work correctly).
This patch adds tests for these functions.
fesetexceptflag is meant to set the relevant exception flag bits to
the saved state without causing enabled traps to be taken. On some
architectures, it is not possible to set exception flag bits without
causing enabled traps to occur. Such architectures need to define
EXCEPTION_SET_FORCES_TRAP to 1 in their math-tests.h, as is done in
this patch for powerpc. x86 avoids needing to define this because the
traps resulting from setting exception bits don't occur until the next
floating-point operation or fwait instruction.
Tested for x86_64, x86 and powerpc. Note that test-fexcept fails for
powerpc because of a pre-existing bug in fesetexceptflag for powerpc,
which I'll fix separately.
* math/test-fexcept-traps.c: New file.
* math/test-fexcept.c: Likewise.
* math/Makefile (tests): Add test-fexcept and test-fexcept-traps.
* sysdeps/generic/math-tests.h (EXCEPTION_SET_FORCES_TRAP): New
macro.
* sysdeps/powerpc/math-tests.h [!__NO_FPRS__]
(EXCEPTION_SET_FORCES_TRAP): Likewise.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
It is based on draft TS 18661 and currently enabled as a GNU extension.
|
|
Follow-up to commit 495ded2c8c1eb8c0ac4b54add2dd397852e19cba.
|