From f43cb35c9b3c35addc6dc0f1427caf51786ca1d2 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 1 Jul 2016 05:54:43 -0700 Subject: Require binutils 2.24 to build x86-64 glibc [BZ #20139] If assembler doesn't support AVX512DQ, _dl_runtime_resolve_avx is used to save the first 8 vector registers, which only saves the lower 256 bits of vector register, for lazy binding. When it is called on AVX512 platform, the upper 256 bits of ZMM registers are clobbered. Parameters passed in ZMM registers will be wrong when the function is called the first time. This patch requires binutils 2.24, whose assembler can store and load ZMM registers, to build x86-64 glibc. Since mathvec library needs assembler support for AVX512DQ, we disable mathvec if assembler doesn't support AVX512DQ. [BZ #20139] * config.h.in (HAVE_AVX512_ASM_SUPPORT): Renamed to ... (HAVE_AVX512DQ_ASM_SUPPORT): This. * sysdeps/x86_64/configure.ac: Require assembler from binutils 2.24 or above. (HAVE_AVX512_ASM_SUPPORT): Removed. (HAVE_AVX512DQ_ASM_SUPPORT): New. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/dl-trampoline.S: Make HAVE_AVX512_ASM_SUPPORT check unconditional. * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/x86_64/multiarch/memcpy.S: Likewise. * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S: Likewise. * sysdeps/x86_64/multiarch/memmove-avx512-unaligned-erms.S: Likewise. * sysdeps/x86_64/multiarch/memmove.S: Likewise. * sysdeps/x86_64/multiarch/memmove_chk.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S: Likewise. * sysdeps/x86_64/multiarch/memset-avx512-unaligned-erms.S: Likewise. * sysdeps/x86_64/multiarch/memset.S: Likewise. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S: Check HAVE_AVX512DQ_ASM_SUPPORT instead of HAVE_AVX512_ASM_SUPPORT. * sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx51: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S: Likewise. --- sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S | 4 ++-- sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) (limited to 'sysdeps/x86_64/fpu/multiarch') diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S index 874bd80d23..91e92e96d4 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN8v_cos_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_cos #else /* @@ -236,7 +236,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN4v_cos END (_ZGVeN8v_cos_knl) ENTRY (_ZGVeN8v_cos_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_cos #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S index 456792dec6..ea840911e7 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN8v_exp_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_exp #else /* @@ -238,7 +238,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN4v_exp END (_ZGVeN8v_exp_knl) ENTRY (_ZGVeN8v_exp_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_exp #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S index 4c52a91605..62854bb07d 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN8v_log_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_log #else /* @@ -237,7 +237,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN4v_log END (_ZGVeN8v_log_knl) ENTRY (_ZGVeN8v_log_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_log #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S index fd6a88961e..c6b6474438 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S @@ -82,7 +82,7 @@ .text ENTRY (_ZGVeN8vv_pow_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_ff _ZGVdN4vv_pow #else pushq %rbp @@ -409,7 +409,7 @@ WRAPPER_IMPL_AVX512_ff _ZGVdN4vv_pow END (_ZGVeN8vv_pow_knl) ENTRY (_ZGVeN8vv_pow_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_ff _ZGVdN4vv_pow #else pushq %rbp diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S index d3449e3d29..0bb2008c05 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN8v_sin_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_sin #else /* @@ -237,7 +237,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN4v_sin END (_ZGVeN8v_sin_knl) ENTRY (_ZGVeN8v_sin_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN4v_sin #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S index 12ffb0ce9f..bb8f6180a0 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S @@ -37,7 +37,7 @@ .text ENTRY (_ZGVeN8vl8l8_sincos_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_fFF _ZGVdN4vl8l8_sincos #else pushq %rbp @@ -308,7 +308,7 @@ END (_ZGVeN8vl8l8_sincos_knl) libmvec_hidden_def(_ZGVeN8vl8l8_sincos_knl) ENTRY (_ZGVeN8vl8l8_sincos_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_fFF _ZGVdN4vl8l8_sincos #else pushq %rbp diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S index b39ec3ad2f..ca079a7f35 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN16v_cosf_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_cosf #else /* @@ -239,7 +239,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN8v_cosf END (_ZGVeN16v_cosf_knl) ENTRY (_ZGVeN16v_cosf_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_cosf #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S index 44f61a2d41..18b8a5e3af 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN16v_expf_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_expf #else /* @@ -227,7 +227,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN8v_expf END (_ZGVeN16v_expf_knl) ENTRY (_ZGVeN16v_expf_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_expf #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S index 8d57e65bb7..c714258244 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY (_ZGVeN16v_logf_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_logf #else /* @@ -211,7 +211,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN8v_logf END (_ZGVeN16v_logf_knl) ENTRY (_ZGVeN16v_logf_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_logf #else /* diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S index 299e6ae236..8b0c256432 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S @@ -82,7 +82,7 @@ .text ENTRY (_ZGVeN16vv_powf_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_ff _ZGVdN8vv_powf #else pushq %rbp @@ -359,7 +359,7 @@ WRAPPER_IMPL_AVX512_ff _ZGVdN8vv_powf END (_ZGVeN16vv_powf_knl) ENTRY (_ZGVeN16vv_powf_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_ff _ZGVdN8vv_powf #else pushq %rbp diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S index 7621e87581..c99d14e968 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S @@ -50,7 +50,7 @@ .text ENTRY (_ZGVeN16vl4l4_sincosf_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_fFF _ZGVdN8vl4l4_sincosf #else pushq %rbp @@ -271,7 +271,7 @@ END (_ZGVeN16vl4l4_sincosf_knl) libmvec_hidden_def(_ZGVeN16vl4l4_sincosf_knl) ENTRY (_ZGVeN16vl4l4_sincosf_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512_fFF _ZGVdN8vvv_sincosf #else pushq %rbp diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S index 121714fbd3..530d14361f 100644 --- a/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S +++ b/sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S @@ -22,7 +22,7 @@ .text ENTRY(_ZGVeN16v_sinf_knl) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_sinf #else /* @@ -243,7 +243,7 @@ WRAPPER_IMPL_AVX512 _ZGVdN8v_sinf END(_ZGVeN16v_sinf_knl) ENTRY (_ZGVeN16v_sinf_skx) -#ifndef HAVE_AVX512_ASM_SUPPORT +#ifndef HAVE_AVX512DQ_ASM_SUPPORT WRAPPER_IMPL_AVX512 _ZGVdN8v_sinf #else /* -- cgit 1.4.1