aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86/configure.ac
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-01-14 16:09:20 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-01-14 16:09:20 +0100
commit5732a881aad24fac876f5505a212395048a7a483 (patch)
tree1f24fa2a4c0f428768f4de43c1616e45ac081aee /sysdeps/x86/configure.ac
parent047512374a95b7bc42a996f61def50843f2bd5e7 (diff)
downloadglibc-5732a881aad24fac876f5505a212395048a7a483.zip
glibc-5732a881aad24fac876f5505a212395048a7a483.tar.gz
glibc-5732a881aad24fac876f5505a212395048a7a483.tar.bz2
x86: HAVE_X86_LAHF_SAHF, HAVE_X86_MOVBE and -march=x86-64-vN (bug 28782)
HAVE_X86_LAHF_SAHF is implied by x86-64-v2, and HAVE_X86_MOVBE by x86-64-v3. The individual flag does not appear in -fverbose-asm flag output even if the ISA level implies it. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/x86/configure.ac')
-rw-r--r--sysdeps/x86/configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 04a12ab..10d5c2e 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -110,7 +110,7 @@ if test $libc_cv_include_x86_isa_level = yes; then
AC_CACHE_CHECK([for LAHF/SAHF instruction support],
libc_cv_have_x86_lahf_sahf, [dnl
libc_cv_have_x86_lahf_sahf=no
- if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -q "\-msahf"; then
+ if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -qE '(-msahf\b|-march=x86-64-v)'; then
libc_cv_have_x86_lahf_sahf=yes
fi])
if test $libc_cv_have_x86_lahf_sahf = yes; then
@@ -119,7 +119,7 @@ if test $libc_cv_include_x86_isa_level = yes; then
AC_CACHE_CHECK([for MOVBE instruction support],
libc_cv_have_x86_movbe, [dnl
libc_cv_have_x86_movbe=no
- if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -q "\-mmovbe"; then
+ if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -qE '(-mmovbe\b|-march=x86-64-v(@<:@3-9@:>@|@<:@1-9@:>@@<:@0-9@:>@))'; then
libc_cv_have_x86_movbe=yes
fi])
if test $libc_cv_have_x86_movbe = yes; then