glibc:hjl/pr21967/master

Last commit made on 2017-08-25
Get this branch:
git clone -b hjl/pr21967/master https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
hjl/pr21967/master
Repository:
lp:glibc

Recent commits

ace0243... by "H.J. Lu" <email address hidden>

x86: Add MathVec_Prefer_No_AVX512 to cpu-features [BZ #21967]

AVX512 functions in mathvec are used on machines with AVX512. An AVX2
wrapper is also provided and it can be used when the AVX512 version
isn't profitable. MathVec_Prefer_No_AVX512 is addded to cpu-features.
If glibc.tune.hwcaps=MathVec_Prefer_No_AVX512 is set in GLIBC_TUNABLES
environment variable, the AVX2 wrapper will be used.

 [BZ #21967]
 * sysdeps/x86/cpu-features.h (bit_arch_MathVec_Prefer_No_AVX512):
 New.
 (index_arch_MathVec_Prefer_No_AVX512): Likewise.
 * sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)):
 Handle MathVec_Prefer_No_AVX512.

7ab70c9... by "H.J. Lu" <email address hidden>

x86: Remove assembly versions of index_cpu_*/index_arch_*

Since assembly versions of HAS_CPU_FEATURE and HAS_ARCH_FEATURE have
been removed, assembly versions of index_cpu_* and index_arch_* can
also be removed.

Tested on i686 and x86-64 with and without --disable-multi-arch.

 * sysdeps/x86/cpu-features.h [__ASSEMBLER__]
 (index_cpu_*, index_arch_*): Removed.

39e7a5a... by Szabolcs Nagy <email address hidden>

[AArch64] Fix elf_greg_t on ILP32

Use uint64_t instead of unsigned long.

a6ccdb0... by Joseph Myers <email address hidden>

Use __HAVE_DISTINCT_FLOAT128 in tgmath.h.

When _Float128 is ABI-equivalent to long double, there is no need for
tgmath.h to have any special _Float128 handling: it's always OK to
call the long double versions of functions for _Float128 arguments in
that case, and the logic to determine return types is generic. Thus,
this patch changes the use of __HAVE_FLOAT128 to
__HAVE_DISTINCT_FLOAT128, as a minor optimization to reduce the size
of the macro expansions in the ABI-equivalent case.

Tested for x86_64.

 * math/tgmath.h [__HAVE_FLOAT128]: Change conditional to
 [__HAVE_DISTINCT_FLOAT128].

2376111... by Joseph Myers <email address hidden>

Clean up bits/math-finite.h for aliasing types.

This patch cleans up how bits/math-finite.h handles types that are
ABI-aliases of other types.

For such types, no __*_finite functions exist; instead,
bits/math-finite.h must redirect calls to a the functions for a
canonical choice of type for each floating-point format. (For the
actual public interfaces, symbols need exporting for each type, even
those that are ABI-aliases, because of standard requirements that
programs can declare the functions themselves without including
<math.h>, but that does not apply to __*_finite.)

At present, there is a special-case conditional in bits/math-finite.h
on __MATH_DECLARING_LDOUBLE && defined __NO_LONG_DOUBLE_MATH to handle
redirecting long double function calls to double __*_finite. This
patch replaces this by a more general mechanism. math.h, before each
inclusion of bits/math-finite.h, defines _MSUFTO_ as the suffix to use
on the target of redirection, in addition to the existing _MSUF_.
This way, __MATH_DECLARING_LDOUBLE can go away, as can the special
conditional in bits/math-finite.h. With this patch, math.h is now
prepared for the case of supporting float128 functions as aliases of
long double ones on platforms where long double is binary128, with
_MSUFTO_ appropriately defined for that case, and appropriate _MSUFTO_
definitions can easily be included when supporting _Float32 / _Float64
/ _Float32x / _Float64x (which will always be ABI-aliases of another
type when supported).

Tested for x86_64, and did a compilation test for ARM with
build-many-glibcs.py to cover the long double = double case.

 * math/math.h (_MSUFTO_): Define and undefine for each inclusion
 of <bits/math-finite.h>.
 (__MATH_DECLARING_LDOUBLE): Do not define and undefine for each
 inclusion of <bits/math-finite.h>.
 * math/bits/math-finite.h (__REDIRTO_X): Do not define
 conditionally on [__MATH_DECLARING_LDOUBLE && defined
 __NO_LONG_DOUBLE_MATH].
 (__MATH_REDIRCALL): Use _MSUFTO_ in __REDIRTO call.
 (__MATH_REDIRCALL_2): Likewise.
 (__MATH_REDIRCALL_INTERNAL): Likewise.
 (__REDIRFROM (lgamma, , _MSUF_)): Likewise.
 (__REDIRFROM (gamma, , _MSUF_)): Likewise.
 (__REDIRFROM (tgamma, , _MSUF_)): Likewise.

bba5c93... by Joseph Myers <email address hidden>

Remove powerpc32 sqrt wrappers.

This patch removes the powerpc32-specific wrappers for sqrt and sqrtf.

These wrappers, by adding architecture-specific uses of _LIB_VERSION
and __kernel_standard, unnecessarily complicate cleanups of libm error
handling. They also do not serve a useful optimization purpose. GCC
knows about sqrt as a built-in function, and can generate direct calls
to a hardware square root instruction, either on its own, in the
-fno-math-errno case, or together with an inline check for the
argument being negative and a call to the out-of-line sqrt function
for error handling only in that case (and has been able to do so for a
long time). Thus in practice the wrapper will only be called only in
the case of negative arguments, which is not a case it is useful to
optimize for.

Tested with build-many-glibcs.py for powerpc-linux-gnu-power4.

 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S:
 Remove file.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S:
 Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c:
 Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S:
 Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S:
 Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c:
 Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S: Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S: Likewise.
 * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S: Likewise.
 * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S: Likewise.
 * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
 (libm-sysdep-routines): Remove w_sqrt_compat-power5,
 w_sqrt_compat-ppc32, w_sqrtf_compat-power5 and
 w_sqrtf_compat-ppc32.

3d7b66f... by Gabriel F. T. Gomes

Fix the C++ version of issignaling when __NO_LONG_DOUBLE_MATH is defined

When __NO_LONG_DOUBLE_MATH is defined, __issignalingl is not available,
thus issignaling with long double argument should call __issignaling,
instead.

Tested for powerpc64le.

 * math/math.h [defined __cplusplus] (issignaling): In the long
 double case, call __issignalingl only if __NO_LONG_DOUBLE_MATH
 is not defined. Call __issignaling, otherwise.

ebd6f00... by Adhemerval Zanella

Remove cancellation support for syscall generation

This patch removes the cancellation mark from the auto-generation syscall
script. Now all the cancellable syscalls are done throught C code using
the SYSCALL_CANCEL macro. It simplifies the assembly required to each
architecture port, since the SYSCALL_CANCEL uses the already defined
INLINE_SYSCALL macros, and allows a more straigh fix on cancellation
machanism (since no more specific assembly fixes will be required).

Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.A
Also with build-many-glibc.py with remaning touched architectures.

 * sysdeps/unix/make-syscalls.sh: Remove cancellable tagging for
 syscall definitions.
 * sysdeps/unix/syscall-template.S (SYSCALL_CANCELLABLE): Remove
 definition.
 * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (__local_enable_asynccancel): Likewise.
 [IS_IN (libpthread)] (__local_disable_asynccancel): Likewise.
 [IS_IN (libc)] (__local_enable_asynccancel): Likewise.
 [IS_IN (libc)] (__local_enable_asynccancel): Likewise.
 [IS_IN (librt)] (__local_disable_asynccancel): Likewise.
 [IS_IN (librt)] (__local_disable_asynccancel): Likewise.
 (CENABLE): Likewise.
 (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Remove
 defintion.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h (PSEUDO):
 Remove definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Remove file.
 * sysdeps/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
 * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: New file.
 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Remove file.
 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
 * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: New file.
 * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Remove
 definition.
 (PSEUDO_END): Likewise.
 [IS_IN (libpthread)] (CENABLE): Likewise.
 [IS_IN (libpthread)] (CDISABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (libc)] (CENABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [IS_IN (librt)] (CDISABLE): Likewise.
 [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.

8aa4865... by Szabolcs Nagy <email address hidden>

Fix CFLAGS override in sysdeps/ieee754/dbl-64

Use += instead of = to avoid overriding target specific CFLAGS settings.
Ideally the settings in target Makefiles would have precedence, but the
Makefile inclusion order does not allow that, with this fix at least the
target settings are not dropped.

fcaaca4... by "H.J. Lu" <email address hidden>

x86-64: Regenerate libm-test-ulps for AVX512 mathvec tests

Update libm-test-ulps for AVX512 mathvec tests by running
“make regen-ulps” on Intel Xeon processor with AVX512.

 * sysdeps/x86_64/fpu/libm-test-ulps: Regenerated.