diff options
Diffstat (limited to 'sysdeps/x86')
-rw-r--r-- | sysdeps/x86/configure | 4 | ||||
-rw-r--r-- | sysdeps/x86/configure.ac | 4 | ||||
-rw-r--r-- | sysdeps/x86/isa-level.h | 12 |
3 files changed, 17 insertions, 3 deletions
diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure index 1e2325d..04c6ba3 100644 --- a/sysdeps/x86/configure +++ b/sysdeps/x86/configure @@ -141,8 +141,10 @@ libc_cv_have_x86_isa_level=3 libc_cv_have_x86_isa_level=2 #elif defined __x86_64__ libc_cv_have_x86_isa_level=baseline +#elif MINIMUM_X86_ISA_LEVEL == 1 +libc_cv_have_x86_isa_level=1 #else -libc_cv_have_x86_isa_level=MINIMUM_X86_ISA_LEVEL +libc_cv_have_x86_isa_level=0 #endif EOF eval `${CC-cc} $CFLAGS $CPPFLAGS $ISAFLAG -I$srcdir -E conftest.c | grep libc_cv_have_x86_isa_level` diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac index 0b32fdf..8a259d3 100644 --- a/sysdeps/x86/configure.ac +++ b/sysdeps/x86/configure.ac @@ -98,8 +98,10 @@ libc_cv_have_x86_isa_level=3 libc_cv_have_x86_isa_level=2 #elif defined __x86_64__ libc_cv_have_x86_isa_level=baseline +#elif MINIMUM_X86_ISA_LEVEL == 1 +libc_cv_have_x86_isa_level=1 #else -libc_cv_have_x86_isa_level=MINIMUM_X86_ISA_LEVEL +libc_cv_have_x86_isa_level=0 #endif EOF eval `${CC-cc} $CFLAGS $CPPFLAGS $ISAFLAG -I$srcdir -E conftest.c | grep libc_cv_have_x86_isa_level` diff --git a/sysdeps/x86/isa-level.h b/sysdeps/x86/isa-level.h index 2c7f742..03c1fe2 100644 --- a/sysdeps/x86/isa-level.h +++ b/sysdeps/x86/isa-level.h @@ -35,7 +35,17 @@ # define __X86_ISA_V1 0 #endif -#if __X86_ISA_V1 && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 \ +#ifdef __x86_64__ +# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 +# define __GCC_HAVE_SYNC_COMPARE_AND_SWAP +# endif +#else +# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +# define __GCC_HAVE_SYNC_COMPARE_AND_SWAP +# endif +#endif + +#if __X86_ISA_V1 && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP \ && defined HAVE_X86_LAHF_SAHF && defined __POPCNT__ && defined __SSE3__ \ && defined __SSSE3__ && defined __SSE4_1__ && defined __SSE4_2__ /* NB: ISAs in x86-64 ISA level v2 are used. */ |