aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2019-10-08 13:00:12 -0700
committerFangrui Song <i@maskray.me>2021-08-27 17:26:02 -0700
commitc4d57c29b55e0dcad0aa6294427c0d09c8507fee (patch)
treea17cc05e0a4ed0b947a44d640ae9c7818dc3a42e /sysdeps
parent66c8103bdf54c1335efe8181f6110358f0277671 (diff)
downloadglibc-c4d57c29b55e0dcad0aa6294427c0d09c8507fee.zip
glibc-c4d57c29b55e0dcad0aa6294427c0d09c8507fee.tar.gz
glibc-c4d57c29b55e0dcad0aa6294427c0d09c8507fee.tar.bz2
Make multi-arch ifunc support work with clang
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile25
-rw-r--r--sysdeps/x86_64/multiarch/strcmp-sse42.S5
2 files changed, 18 insertions, 12 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 9a89bfc..13125c7 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -85,16 +85,21 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
mplog-avx mpa-avx slowexp-avx \
mpexp-avx
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-mpa-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-mpexp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-mplog-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-slowexp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+sse2avx-flags = -msse2avx -DSSE2AVX
+ifeq ($(with-clang),yes)
+sse2avx-flags = -DSSE2AVX
+endif
+
+CFLAGS-e_atan2-avx.c = $(sse2avx-flags)
+CFLAGS-e_exp-avx.c = $(sse2avx-flags)
+CFLAGS-e_log-avx.c = $(sse2avx-flags)
+CFLAGS-mpa-avx.c = $(sse2avx-flags)
+CFLAGS-mpexp-avx.c = $(sse2avx-flags)
+CFLAGS-mplog-avx.c = $(sse2avx-flags)
+CFLAGS-s_atan-avx.c = $(sse2avx-flags)
+CFLAGS-s_sin-avx.c = $(sse2avx-flags)
+CFLAGS-slowexp-avx.c = $(sse2avx-flags)
+CFLAGS-s_tan-avx.c = $(sse2avx-flags)
endif
ifeq ($(subdir),mathvec)
diff --git a/sysdeps/x86_64/multiarch/strcmp-sse42.S b/sysdeps/x86_64/multiarch/strcmp-sse42.S
index 6fa0c2c..8faba15 100644
--- a/sysdeps/x86_64/multiarch/strcmp-sse42.S
+++ b/sysdeps/x86_64/multiarch/strcmp-sse42.S
@@ -1770,8 +1770,9 @@ LABEL(strcmp_exitz):
.p2align 4
// XXX Same as code above
LABEL(Byte0):
- movzx (%rsi), %ecx
- movzx (%rdi), %eax
+ # Clang assembler objects to movzx here.
+ movzbl (%rsi), %ecx
+ movzbl (%rdi), %eax
#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx