diff options
Diffstat (limited to 'sysdeps/i386')
314 files changed, 4339 insertions, 2639 deletions
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index 11f425dc92..168512fc32 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -5,6 +5,10 @@ asm-CPPFLAGS += -DGAS_SYNTAX # The i386 `long double' is a distinct type we support. long-double-fcts = yes +ifeq ($(subdir),string) +sysdep_routines += cacheinfo +endif + ifeq ($(subdir),gmon) sysdep_routines += i386-mcount endif @@ -79,3 +83,17 @@ endif ifeq ($(subdir),csu) gen-as-const-headers += tlsdesc.sym endif + +ifeq ($(subdir),elf) +# Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since +# the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters +# which must be preserved. +CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ + -mno-sse -mno-mmx) + +tests-special += $(objpfx)tst-ld-sse-use.out +$(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so + @echo "Checking ld.so for SSE register use. This will take a few seconds..." + $(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \ + $(evaluate-test) +endif diff --git a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S index affe1e8463..36c692209e 100644 --- a/sysdeps/i386/__longjmp.S +++ b/sysdeps/i386/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for i386. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S index b7bdeb7b74..5ef5afc378 100644 --- a/sysdeps/i386/add_n.S +++ b/sysdeps/i386/add_n.S @@ -1,6 +1,6 @@ /* Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/addmul_1.S b/sysdeps/i386/addmul_1.S index a25633a19e..f211263702 100644 --- a/sysdeps/i386/addmul_1.S +++ b/sysdeps/i386/addmul_1.S @@ -1,6 +1,6 @@ /* i80386 __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/asm-syntax.h b/sysdeps/i386/asm-syntax.h index b45fe32111..ef87d69f53 100644 --- a/sysdeps/i386/asm-syntax.h +++ b/sysdeps/i386/asm-syntax.h @@ -1,5 +1,5 @@ /* Definitions for x86 syntax variations. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in the GNU MP Library. diff --git a/sysdeps/i386/i486/bits/atomic.h b/sysdeps/i386/atomic-machine.h index 59f3d34871..ce62b335af 100644 --- a/sysdeps/i386/i486/bits/atomic.h +++ b/sysdeps/i386/atomic-machine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/sysdeps/i386/backtrace.c b/sysdeps/i386/backtrace.c index 550234f577..1ec51aaf43 100644 --- a/sysdeps/i386/backtrace.c +++ b/sysdeps/i386/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -17,7 +17,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <bits/libc-lock.h> +#include <libc-lock.h> #include <dlfcn.h> #include <execinfo.h> #include <stdlib.h> @@ -109,11 +109,13 @@ struct layout int -__backtrace (array, size) - void **array; - int size; +__backtrace (void **array, int size) { struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; + + if (size <= 0) + return 0; + #ifdef SHARED __libc_once_define (static, once); @@ -122,8 +124,7 @@ __backtrace (array, size) return 0; #endif - if (size >= 1) - unwind_backtrace (backtrace_helper, &arg); + unwind_backtrace (backtrace_helper, &arg); if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL) --arg.cnt; diff --git a/sysdeps/i386/bcopy.S b/sysdeps/i386/bcopy.S new file mode 100644 index 0000000000..12b8ddb886 --- /dev/null +++ b/sysdeps/i386/bcopy.S @@ -0,0 +1,4 @@ +#define USE_AS_MEMMOVE +#define USE_AS_BCOPY +#define MEMCPY bcopy +#include "memcpy.S" diff --git a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S index 006e63e16e..d97964a641 100644 --- a/sysdeps/i386/bsd-_setjmp.S +++ b/sysdeps/i386/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S index 95cd24eab4..a6e7c1ab88 100644 --- a/sysdeps/i386/bsd-setjmp.S +++ b/sysdeps/i386/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/bzero.S b/sysdeps/i386/bzero.S new file mode 100644 index 0000000000..c8dd47b4da --- /dev/null +++ b/sysdeps/i386/bzero.S @@ -0,0 +1,5 @@ +#define USE_AS_BZERO +#define memset __bzero +#include "memset.S" + +weak_alias (__bzero, bzero) diff --git a/sysdeps/i386/bzero.c b/sysdeps/i386/bzero.c deleted file mode 100644 index 1a89444a11..0000000000 --- a/sysdeps/i386/bzero.c +++ /dev/null @@ -1,82 +0,0 @@ -/* bzero -- set a block of memory to zero. For Intel 80x86, x>=3. - This file is part of the GNU C Library. - Copyright (C) 1991-2015 Free Software Foundation, Inc. - Contributed by Torbjorn Granlund (tege@sics.se). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <string.h> -#include <memcopy.h> - -#undef bzero -#undef __bzero - -#ifdef __GNUC__ - -void -__bzero (dstpp, len) - void *dstpp; - size_t len; -{ - /* N.B.: This code is almost verbatim from memset.c. */ - int d0; - unsigned long int dstp = (unsigned long int) dstpp; - - /* This explicit register allocation - improves code very much indeed. */ - register op_t x asm ("ax"); - - x = 0; - - /* Clear the direction flag, so filling will move forward. */ - asm volatile ("cld"); - - /* This threshold value is optimal. */ - if (len >= 12) - { - /* Adjust LEN for the bytes handled in the first loop. */ - len -= (-dstp) % OPSIZ; - - /* There are at least some bytes to set. - No need to test for LEN == 0 in this alignment loop. */ - - /* Fill bytes until DSTP is aligned on a longword boundary. */ - asm volatile ("rep\n" - "stosb" /* %0, %2, %3 */ : - "=D" (dstp), "=c" (d0) : - "0" (dstp), "1" ((-dstp) % OPSIZ), "a" (x) : - "memory"); - - /* Fill longwords. */ - asm volatile ("rep\n" - "stosl" /* %0, %2, %3 */ : - "=D" (dstp), "=c" (d0) : - "0" (dstp), "1" (len / OPSIZ), "a" (x) : - "memory"); - len %= OPSIZ; - } - - /* Write the last few bytes. */ - asm volatile ("rep\n" - "stosb" /* %0, %2, %3 */ : - "=D" (dstp), "=c" (d0) : - "0" (dstp), "c" (len), "a" (x) : - "memory"); -} -weak_alias (__bzero, bzero) - -#else -#include <string/bzero.c> -#endif diff --git a/sysdeps/i386/i686/cacheinfo.c b/sysdeps/i386/cacheinfo.c index 0f869df4d8..0b50c6d346 100644 --- a/sysdeps/i386/i686/cacheinfo.c +++ b/sysdeps/i386/cacheinfo.c @@ -1,4 +1,3 @@ #define DISABLE_PREFETCHW -#define DISABLE_PREFERRED_MEMORY_INSTRUCTION #include <sysdeps/x86_64/cacheinfo.c> diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index ab66c08160..9515719daa 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -1,34 +1,3 @@ - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/i386. @@ -81,165 +50,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_compiler_builtin_inlined" >&5 $as_echo "$libc_compiler_builtin_inlined" >&6; } - -ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ -" -if test "x$ac_cv_header_cpuid_h" = xyes; then : - -else - as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5 -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5 -$as_echo_n "checking for SSE4 support... " >&6; } -if ${libc_cv_cc_sse4+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_cc_sse4=yes -else - libc_cv_cc_sse4=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5 -$as_echo "$libc_cv_cc_sse4" >&6; } -if test $libc_cv_cc_sse4 = yes; then - $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h - -fi -config_vars="$config_vars -config-cflags-sse4 = $libc_cv_cc_sse4" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5 -$as_echo_n "checking for assembler -mtune=i686 support... " >&6; } -if ${libc_cv_as_i686+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_as_i686=yes -else - libc_cv_as_i686=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5 -$as_echo "$libc_cv_as_i686" >&6; } -config_vars="$config_vars -config-asflags-i686 = $libc_cv_as_i686" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5 -$as_echo_n "checking for AVX support... " >&6; } -if ${libc_cv_cc_avx+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_cc_avx=yes -else - libc_cv_cc_avx=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5 -$as_echo "$libc_cv_cc_avx" >&6; } -if test $libc_cv_cc_avx = yes; then - $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h - -fi -config_vars="$config_vars -config-cflags-avx = $libc_cv_cc_avx" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5 -$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; } -if ${libc_cv_cc_sse2avx+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_cc_sse2avx=yes -else - libc_cv_cc_sse2avx=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5 -$as_echo "$libc_cv_cc_sse2avx" >&6; } -if test $libc_cv_cc_sse2avx = yes; then - $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h - -fi -config_vars="$config_vars -config-cflags-sse2avx = $libc_cv_cc_sse2avx" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5 -$as_echo_n "checking for FMA4 support... " >&6; } -if ${libc_cv_cc_fma4+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_cc_fma4=yes -else - libc_cv_cc_fma4=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5 -$as_echo "$libc_cv_cc_fma4" >&6; } -if test $libc_cv_cc_fma4 = yes; then - $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h - -fi -config_vars="$config_vars -have-mfma4 = $libc_cv_cc_fma4" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5 -$as_echo_n "checking for -mno-vzeroupper support... " >&6; } -if ${libc_cv_cc_novzeroupper+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_cc_novzeroupper=yes -else - libc_cv_cc_novzeroupper=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5 -$as_echo "$libc_cv_cc_novzeroupper" >&6; } -config_vars="$config_vars -config-cflags-novzeroupper = $libc_cv_cc_novzeroupper" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Intel MPX support" >&5 $as_echo_n "checking for Intel MPX support... " >&6; } if ${libc_cv_asm_mpx+:} false; then : @@ -267,32 +77,6 @@ if test $libc_cv_asm_mpx == yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX2 support" >&5 -$as_echo_n "checking for AVX2 support... " >&6; } -if ${libc_cv_cc_avx2+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} -mavx2 -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_cc_avx2=yes -else - libc_cv_cc_avx2=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx2" >&5 -$as_echo "$libc_cv_cc_avx2" >&6; } -if test $libc_cv_cc_avx2 = yes; then - $as_echo "#define HAVE_AVX2_SUPPORT 1" >>confdefs.h - -fi -config_vars="$config_vars -config-cflags-avx2 = $libc_cv_cc_avx2" - $as_echo "#define USE_REGPARMS 1" >>confdefs.h diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac index a3f3067fb7..f8f9e44909 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -30,64 +30,6 @@ LIBC_COMPILER_BUILTIN_INLINED( *** Please use host i786, i686, i586, or i486. *** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ...])]) -AC_CHECK_HEADER([cpuid.h], , - [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])], - [/* No default includes. */]) - -dnl Check if -msse4 works. -AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl -LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) -]) -if test $libc_cv_cc_sse4 = yes; then - AC_DEFINE(HAVE_SSE4_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) - -dnl Check if -Wa,-mtune=i686 works. -AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl -LIBC_TRY_CC_OPTION([-Wa,-mtune=i686], - [libc_cv_as_i686=yes], - [libc_cv_as_i686=no]) -]) -LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686]) - -dnl Check if -mavx works. -AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl -LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) -]) -if test $libc_cv_cc_avx = yes; then - AC_DEFINE(HAVE_AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) - -dnl Check if -msse2avx works. -AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl -LIBC_TRY_CC_OPTION([-msse2avx], - [libc_cv_cc_sse2avx=yes], - [libc_cv_cc_sse2avx=no]) -]) -if test $libc_cv_cc_sse2avx = yes; then - AC_DEFINE(HAVE_SSE2AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) - -dnl Check if -mfma4 works. -AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl -LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) -]) -if test $libc_cv_cc_fma4 = yes; then - AC_DEFINE(HAVE_FMA4_SUPPORT) -fi -LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) - -dnl Check if -mno-vzeroupper works. -AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl -LIBC_TRY_CC_OPTION([-mno-vzeroupper], - [libc_cv_cc_novzeroupper=yes], - [libc_cv_cc_novzeroupper=no]) -]) -LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) - dnl Check whether asm supports Intel MPX AC_CACHE_CHECK(for Intel MPX support, libc_cv_asm_mpx, [dnl cat > conftest.s <<\EOF @@ -103,15 +45,6 @@ if test $libc_cv_asm_mpx == yes; then AC_DEFINE(HAVE_MPX_SUPPORT) fi -dnl Check if -mavx2 works. -AC_CACHE_CHECK(for AVX2 support, libc_cv_cc_avx2, [dnl -LIBC_TRY_CC_OPTION([-mavx2], [libc_cv_cc_avx2=yes], [libc_cv_cc_avx2=no]) -]) -if test $libc_cv_cc_avx2 = yes; then - AC_DEFINE(HAVE_AVX2_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-avx2], [$libc_cv_cc_avx2]) - AC_DEFINE(USE_REGPARMS) dnl It is always possible to access static and hidden symbols in an diff --git a/sysdeps/i386/crti.S b/sysdeps/i386/crti.S index c44dd3b6ed..2fbc5711e3 100644 --- a/sysdeps/i386/crti.S +++ b/sysdeps/i386/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for x86. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/crtn.S b/sysdeps/i386/crtn.S index f8cf60ab1f..1445f03ccc 100644 --- a/sysdeps/i386/crtn.S +++ b/sysdeps/i386/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for x86. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h index c629e9c38c..bfdf1b3375 100644 --- a/sysdeps/i386/dl-irel.h +++ b/sysdeps/i386/dl-irel.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF indirect relocation inline functions. i386 version. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/dl-lookupcfg.h b/sysdeps/i386/dl-lookupcfg.h index 310f261fec..033b475889 100644 --- a/sysdeps/i386/dl-lookupcfg.h +++ b/sysdeps/i386/dl-lookupcfg.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ struct link_map; -extern void internal_function _dl_unmap (struct link_map *map); +extern void _dl_unmap (struct link_map *map) + internal_function attribute_hidden; #define DL_UNMAP(map) _dl_unmap (map) diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 04f9247bfa..130bcf56a9 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. i386 version. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,6 +25,7 @@ #include <sysdep.h> #include <tls.h> #include <dl-tlsdesc.h> +#include <cpu-features.c> /* Return nonzero iff ELF header is compatible with the running host. */ static inline int __attribute__ ((unused)) @@ -235,6 +236,8 @@ dl_platform_init (void) if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') /* Avoid an empty string which would disturb us. */ GLRO(dl_platform) = NULL; + + init_cpu_features (&GLRO(dl_x86_cpu_features)); } static inline Elf32_Addr diff --git a/sysdeps/i386/dl-procinfo.c b/sysdeps/i386/dl-procinfo.c index b673b3c848..ffa6b9da0a 100644 --- a/sysdeps/i386/dl-procinfo.c +++ b/sysdeps/i386/dl-procinfo.c @@ -1,5 +1,5 @@ /* Data for i386 version of processor capability information. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -43,6 +43,22 @@ # define PROCINFO_CLASS #endif +#if !IS_IN (ldconfig) +# if !defined PROCINFO_DECL && defined SHARED + ._dl_x86_cpu_features +# else +PROCINFO_CLASS struct cpu_features _dl_x86_cpu_features +# endif +# ifndef PROCINFO_DECL += { } +# endif +# if !defined SHARED || defined PROCINFO_DECL +; +# else +, +# endif +#endif + #if !defined PROCINFO_DECL && defined SHARED ._dl_x86_cap_flags #else diff --git a/sysdeps/i386/dl-procinfo.h b/sysdeps/i386/dl-procinfo.h index e1e0fef193..9fbb58847e 100644 --- a/sysdeps/i386/dl-procinfo.h +++ b/sysdeps/i386/dl-procinfo.h @@ -1,5 +1,5 @@ /* i386 version of processor capability information handling macros. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/i386/dl-tls.h b/sysdeps/i386/dl-tls.h index f8e108f730..1a8c358bfc 100644 --- a/sysdeps/i386/dl-tls.h +++ b/sysdeps/i386/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. i386 version. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/dl-tlsdesc.S b/sysdeps/i386/dl-tlsdesc.S index db02274c16..7c189ab93d 100644 --- a/sysdeps/i386/dl-tlsdesc.S +++ b/sysdeps/i386/dl-tlsdesc.S @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. i386 version. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/dl-tlsdesc.h b/sysdeps/i386/dl-tlsdesc.h index c58423389e..02c4a71d76 100644 --- a/sysdeps/i386/dl-tlsdesc.h +++ b/sysdeps/i386/dl-tlsdesc.h @@ -1,6 +1,6 @@ /* Thread-local storage descriptor handling in the ELF dynamic linker. i386 version. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -50,8 +50,9 @@ extern ptrdiff_t attribute_hidden __attribute__ ((regparm (1))) _dl_tlsdesc_resolve_hold (struct tlsdesc *); # ifdef SHARED -extern void *internal_function _dl_make_tlsdesc_dynamic (struct link_map *map, - size_t ti_offset); +extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, + size_t ti_offset) + internal_function attribute_hidden; extern ptrdiff_t attribute_hidden __attribute__ ((regparm (1))) _dl_tlsdesc_dynamic (struct tlsdesc *); diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S index 8a2fd8ddd6..6a024c8edc 100644 --- a/sysdeps/i386/dl-trampoline.S +++ b/sysdeps/i386/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. i386 version. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/ffs.c b/sysdeps/i386/ffs.c index db08e4ee77..559ee98273 100644 --- a/sysdeps/i386/ffs.c +++ b/sysdeps/i386/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Intel 80x86, x>=3. This file is part of the GNU C Library. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -26,8 +26,7 @@ #ifdef __GNUC__ int -__ffs (x) - int x; +__ffs (int x) { int cnt; int tmp; diff --git a/sysdeps/i386/fpu/e_acosh.S b/sysdeps/i386/fpu/e_acosh.S index c5cd4474ec..f560d255f3 100644 --- a/sysdeps/i386/fpu/e_acosh.S +++ b/sysdeps/i386/fpu/e_acosh.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -91,9 +91,10 @@ ENTRY(__ieee754_acosh) fyl2x // log(2*x+1/(x+sqrt(x^2-1))) ret - // x < 1 => NaN + // x < 1 (or -NaN) => NaN .align ALIGNARG(4) -5: fldz +5: fldl 4(%esp) + fsub %st fdiv %st, %st(0) ret END(__ieee754_acosh) diff --git a/sysdeps/i386/fpu/e_acoshf.S b/sysdeps/i386/fpu/e_acoshf.S index 710267b11e..ff6f25371b 100644 --- a/sysdeps/i386/fpu/e_acoshf.S +++ b/sysdeps/i386/fpu/e_acoshf.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -91,9 +91,10 @@ ENTRY(__ieee754_acoshf) fyl2x // log(2*x+1/(x+sqrt(x^2-1))) ret - // x < 1 => NaN + // x < 1 (or -NaN) => NaN .align ALIGNARG(4) -5: fldz +5: flds 4(%esp) + fsub %st fdiv %st, %st(0) ret END(__ieee754_acoshf) diff --git a/sysdeps/i386/fpu/e_acoshl.S b/sysdeps/i386/fpu/e_acoshl.S index 034b21b968..6a353119b5 100644 --- a/sysdeps/i386/fpu/e_acoshl.S +++ b/sysdeps/i386/fpu/e_acoshl.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/sysdeps/i386/fpu/e_asin.S b/sysdeps/i386/fpu/e_asin.S index ea8cb6f1b2..39c8b47da4 100644 --- a/sysdeps/i386/fpu/e_asin.S +++ b/sysdeps/i386/fpu/e_asin.S @@ -4,15 +4,11 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: e_asin.S,v 1.4 1995/05/08 23:45:40 jtc Exp $") - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +DEFINE_DBL_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -36,20 +32,7 @@ ENTRY(__ieee754_asin) fmulp /* 1 - x^2 */ fsqrt /* sqrt (1 - x^2) */ fpatan - fldl MO(dbl_min) - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -1: ret + DBL_CHECK_FORCE_UFLOW + ret END (__ieee754_asin) strong_alias (__ieee754_asin, __asin_finite) diff --git a/sysdeps/i386/fpu/e_asinf.S b/sysdeps/i386/fpu/e_asinf.S index f7bda77fa6..1102bdedfd 100644 --- a/sysdeps/i386/fpu/e_asinf.S +++ b/sysdeps/i386/fpu/e_asinf.S @@ -5,15 +5,13 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: $") .section .rodata.cst4,"aM",@progbits,4 - .p2align 2 - .type flt_min,@object -flt_min: .byte 0, 0, 0x80, 0 - ASM_SIZE_DIRECTIVE(flt_min) +DEFINE_FLT_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -35,20 +33,7 @@ ENTRY(__ieee754_asinf) fsubp /* 1 - x^2 */ fsqrt /* sqrt (1 - x^2) */ fpatan - flds MO(flt_min) - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $4, %esp - cfi_adjust_cfa_offset (4) - fld %st(0) - fmul %st(0) - fstps (%esp) - addl $4, %esp - cfi_adjust_cfa_offset (-4) -1: ret + FLT_CHECK_FORCE_UFLOW + ret END (__ieee754_asinf) strong_alias (__ieee754_asinf, __asinf_finite) diff --git a/sysdeps/i386/fpu/e_atan2.S b/sysdeps/i386/fpu/e_atan2.S index 6f5481fb5c..25f43bb5a1 100644 --- a/sysdeps/i386/fpu/e_atan2.S +++ b/sysdeps/i386/fpu/e_atan2.S @@ -4,15 +4,11 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: e_atan2.S,v 1.4 1995/05/08 23:46:28 jtc Exp $") - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +DEFINE_DBL_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -28,22 +24,7 @@ ENTRY(__ieee754_atan2) fldl 4(%esp) fldl 12(%esp) fpatan - fldl MO(dbl_min) - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - fstpl (%esp) - fldl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -1: ret + DBL_CHECK_FORCE_UFLOW_NARROW + ret END (__ieee754_atan2) strong_alias (__ieee754_atan2, __atan2_finite) diff --git a/sysdeps/i386/fpu/e_atan2f.S b/sysdeps/i386/fpu/e_atan2f.S index ec0eb3fd71..2bc909a762 100644 --- a/sysdeps/i386/fpu/e_atan2f.S +++ b/sysdeps/i386/fpu/e_atan2f.S @@ -4,15 +4,11 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: e_atan2f.S,v 1.1 1995/05/08 23:35:10 jtc Exp $") - .section .rodata.cst4,"aM",@progbits,4 - - .p2align 2 - .type flt_min,@object -flt_min: .byte 0, 0, 0x80, 0 - ASM_SIZE_DIRECTIVE(flt_min) +DEFINE_FLT_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -28,22 +24,7 @@ ENTRY(__ieee754_atan2f) flds 4(%esp) flds 8(%esp) fpatan - flds MO(flt_min) - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $4, %esp - cfi_adjust_cfa_offset (4) - fld %st(0) - fmul %st(0) - fstps (%esp) - fstps (%esp) - flds (%esp) - addl $4, %esp - cfi_adjust_cfa_offset (-4) -1: ret + FLT_CHECK_FORCE_UFLOW_NARROW + ret END (__ieee754_atan2f) strong_alias (__ieee754_atan2f, __atan2f_finite) diff --git a/sysdeps/i386/fpu/e_atanh.S b/sysdeps/i386/fpu/e_atanh.S index 90d19bc9d6..2242040499 100644 --- a/sysdeps/i386/fpu/e_atanh.S +++ b/sysdeps/i386/fpu/e_atanh.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arctanh function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata @@ -35,12 +36,7 @@ limit: .double 0.29 ln2_2: .tfloat 0.3465735902799726547086160 ASM_SIZE_DIRECTIVE(ln2_2) - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +DEFINE_DBL_MIN #ifdef PIC #define MO(op) op##@GOTOFF(%edx) @@ -59,11 +55,7 @@ ENTRY(__ieee754_atanh) 7: #ifdef PIC - call 1f - cfi_adjust_cfa_offset (4) -1: popl %edx - cfi_adjust_cfa_offset (-4) - addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx + LOAD_PIC_REG (dx) #endif andl $0x80000000, %ecx // ECX == 0 iff X >= 0 @@ -88,18 +80,8 @@ ENTRY(__ieee754_atanh) sahf jae 4f fyl2xp1 // 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|)) - fcoml MO(dbl_min) - fnstsw - sahf - jae 8f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -8: jecxz 3f + DBL_CHECK_FORCE_UFLOW_NONNEG + jecxz 3f fchs // 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x)) 3: ret diff --git a/sysdeps/i386/fpu/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S index 1c8969e5ec..e338e65981 100644 --- a/sysdeps/i386/fpu/e_atanhf.S +++ b/sysdeps/i386/fpu/e_atanhf.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arctanh function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata @@ -36,12 +37,7 @@ limit: .double 0.29 ln2_2: .tfloat 0.3465735902799726547086160 ASM_SIZE_DIRECTIVE(ln2_2) - .section .rodata.cst4,"aM",@progbits,4 - - .p2align 2 - .type flt_min,@object -flt_min: .byte 0, 0, 0x80, 0 - ASM_SIZE_DIRECTIVE(flt_min) +DEFINE_FLT_MIN #ifdef PIC #define MO(op) op##@GOTOFF(%edx) @@ -84,18 +80,8 @@ ENTRY(__ieee754_atanhf) sahf jae 4f fyl2xp1 // 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|)) - fcoms MO(flt_min) - fnstsw - sahf - jae 6f - subl $4, %esp - cfi_adjust_cfa_offset (4) - fld %st(0) - fmul %st(0) - fstps (%esp) - addl $4, %esp - cfi_adjust_cfa_offset (-4) -6: jecxz 3f + FLT_CHECK_FORCE_UFLOW_NONNEG + jecxz 3f fchs // 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x)) 3: ret diff --git a/sysdeps/i386/fpu/e_atanhl.S b/sysdeps/i386/fpu/e_atanhl.S index 1ad6851058..dc5ca51a4b 100644 --- a/sysdeps/i386/fpu/e_atanhl.S +++ b/sysdeps/i386/fpu/e_atanhl.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arctanh function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/sysdeps/i386/fpu/e_exp.S b/sysdeps/i386/fpu/e_exp.S index 2c331d9ed6..a7e7f13f6f 100644 --- a/sysdeps/i386/fpu/e_exp.S +++ b/sysdeps/i386/fpu/e_exp.S @@ -4,10 +4,22 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_DBL_MIN +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text /* e^x = 2^(x * log2(e)) */ ENTRY(__ieee754_exp) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -30,6 +42,7 @@ ENTRY(__ieee754_exp) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) + DBL_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ @@ -41,6 +54,9 @@ END (__ieee754_exp) ENTRY(__exp_finite) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl2e fmull 4(%esp) /* x * log2(e) */ fld %st @@ -52,5 +68,6 @@ ENTRY(__exp_finite) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) + DBL_NARROW_EVAL_UFLOW_NONNEG ret END(__exp_finite) diff --git a/sysdeps/i386/fpu/e_exp10.S b/sysdeps/i386/fpu/e_exp10.S index 1e32b07848..acb5160a3f 100644 --- a/sysdeps/i386/fpu/e_exp10.S +++ b/sysdeps/i386/fpu/e_exp10.S @@ -3,9 +3,22 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_DBL_MIN + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text /* 10^x = 2^(x * log2(10)) */ ENTRY(__ieee754_exp10) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -28,6 +41,7 @@ ENTRY(__ieee754_exp10) faddp /* 2^(fract(x * log2(10))) */ fscale /* e^x */ fstp %st(1) + DBL_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ diff --git a/sysdeps/i386/fpu/e_exp10f.S b/sysdeps/i386/fpu/e_exp10f.S index 614496415e..1812b34398 100644 --- a/sysdeps/i386/fpu/e_exp10f.S +++ b/sysdeps/i386/fpu/e_exp10f.S @@ -3,9 +3,22 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_FLT_MIN + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text /* 10^x = 2^(x * log2(10)) */ ENTRY(__ieee754_exp10f) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif flds 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -28,6 +41,7 @@ ENTRY(__ieee754_exp10f) faddp /* 2^(fract(x * log2(10))) */ fscale /* e^x */ fstp %st(1) + FLT_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ diff --git a/sysdeps/i386/fpu/e_exp2.S b/sysdeps/i386/fpu/e_exp2.S index f802cf8b98..fc16a96053 100644 --- a/sysdeps/i386/fpu/e_exp2.S +++ b/sysdeps/i386/fpu/e_exp2.S @@ -5,8 +5,21 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_DBL_MIN + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text ENTRY(__ieee754_exp2) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -27,6 +40,7 @@ ENTRY(__ieee754_exp2) faddp /* 2^(fract(x)) */ fscale /* e^x */ fstp %st(1) + DBL_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ diff --git a/sysdeps/i386/fpu/e_exp2f.S b/sysdeps/i386/fpu/e_exp2f.S index f867d0d472..30623cd850 100644 --- a/sysdeps/i386/fpu/e_exp2f.S +++ b/sysdeps/i386/fpu/e_exp2f.S @@ -5,8 +5,21 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_FLT_MIN + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text ENTRY(__ieee754_exp2f) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif flds 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -27,6 +40,7 @@ ENTRY(__ieee754_exp2f) faddp /* 2^(fract(x)) */ fscale /* e^x */ fstp %st(1) + FLT_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ diff --git a/sysdeps/i386/fpu/e_exp2l.S b/sysdeps/i386/fpu/e_exp2l.S index 2bf9a25727..c4cb73d589 100644 --- a/sysdeps/i386/fpu/e_exp2l.S +++ b/sysdeps/i386/fpu/e_exp2l.S @@ -5,8 +5,21 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_LDBL_MIN + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text ENTRY(__ieee754_exp2l) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldt 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -35,6 +48,7 @@ ENTRY(__ieee754_exp2l) faddp /* 2^(fract(x)) */ fscale /* e^x */ fstp %st(1) + LDBL_CHECK_FORCE_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ diff --git a/sysdeps/i386/fpu/e_expf.S b/sysdeps/i386/fpu/e_expf.S index 4e4f6a0df7..65cb4ec204 100644 --- a/sysdeps/i386/fpu/e_expf.S +++ b/sysdeps/i386/fpu/e_expf.S @@ -5,10 +5,22 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> +DEFINE_FLT_MIN +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text /* e^x = 2^(x * log2(e)) */ ENTRY(__ieee754_expf) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif flds 4(%esp) /* I added the following ugly construct because exp(+-Inf) resulted in NaN. The ugliness results from the bright minds at Intel. @@ -31,6 +43,7 @@ ENTRY(__ieee754_expf) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) + FLT_NARROW_EVAL_UFLOW_NONNEG_NAN ret 1: testl $0x200, %eax /* Test sign. */ @@ -42,6 +55,9 @@ END (__ieee754_expf) ENTRY(__expf_finite) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl2e fmuls 4(%esp) /* x * log2(e) */ fld %st @@ -53,5 +69,6 @@ ENTRY(__expf_finite) faddp /* 2^(fract(x * log2(e))) */ fscale /* e^x */ fstp %st(1) + FLT_NARROW_EVAL_UFLOW_NONNEG ret END(__expf_finite) diff --git a/sysdeps/i386/fpu/e_expl.S b/sysdeps/i386/fpu/e_expl.S index 711c86a6e8..64e0d96839 100644 --- a/sysdeps/i386/fpu/e_expl.S +++ b/sysdeps/i386/fpu/e_expl.S @@ -23,6 +23,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> #ifdef USE_AS_EXP10L # define IEEE754_EXPL __ieee754_exp10l @@ -65,10 +66,7 @@ c1: .byte 0x20, 0xfa, 0xee, 0xc2, 0x5f, 0x70, 0xa5, 0xec, 0xed, 0x3f csat: .byte 0, 0, 0, 0, 0, 0, 0, 0x80, 0x0e, 0x40 .byte 0, 0, 0, 0, 0, 0 ASM_SIZE_DIRECTIVE(csat) - .type cmin,@object -cmin: .byte 0, 0, 0, 0, 0, 0, 0, 0x80, 0x1, 0 - .byte 0, 0, 0, 0, 0, 0 - ASM_SIZE_DIRECTIVE(cmin) +DEFINE_LDBL_MIN #endif #ifdef PIC @@ -199,18 +197,9 @@ ENTRY(IEEE754_EXPL) fstp %st(1) /* 2 */ fscale /* 2 scale factor is st(1); base^x */ fstp %st(1) /* 1 */ - /* Ensure underflow for tiny result. */ - fldt MO(cmin) /* 2 cmin */ - fld %st(1) /* 3 */ - fcompp /* 1 */ - fnstsw - sahf - jnc 6f - fld %st - fmul %st - fstp %st + LDBL_CHECK_FORCE_UFLOW_NONNEG #endif -6: fstp %st(1) /* 0 */ + fstp %st(1) /* 0 */ jmp 2f 1: #ifdef USE_AS_EXPM1L diff --git a/sysdeps/i386/fpu/e_hypot.S b/sysdeps/i386/fpu/e_hypot.S index 63083ad4c9..0ca788407f 100644 --- a/sysdeps/i386/fpu/e_hypot.S +++ b/sysdeps/i386/fpu/e_hypot.S @@ -1,5 +1,5 @@ /* Compute the hypothenuse of X and Y. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -18,9 +18,21 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <i386-math-asm.h> + +DEFINE_DBL_MIN + +#ifdef PIC +# define MO(op) op##@GOTOFF(%edx) +#else +# define MO(op) op +#endif .text ENTRY(__ieee754_hypot) +#ifdef PIC + LOAD_PIC_REG (dx) +#endif fldl 4(%esp) // x fxam fnstsw @@ -37,6 +49,7 @@ ENTRY(__ieee754_hypot) fmul %st(0) // x * x : y * y faddp // x * x + y * y fsqrt + DBL_NARROW_EVAL_UFLOW_NONNEG 2: ret // We have to test whether any of the parameters is Inf. diff --git a/sysdeps/i386/fpu/e_hypotf.S b/sysdeps/i386/fpu/e_hypotf.S index 4e22d33ebe..58b883bea8 100644 --- a/sysdeps/i386/fpu/e_hypotf.S +++ b/sysdeps/i386/fpu/e_hypotf.S @@ -1,5 +1,5 @@ /* Compute the hypothenuse of X and Y. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <i386-math-asm.h> .text ENTRY(__ieee754_hypotf) @@ -37,6 +38,7 @@ ENTRY(__ieee754_hypotf) fmul %st(0) // x * x : y * y faddp // x * x + y * y fsqrt + FLT_NARROW_EVAL 2: ret // We have to test whether any of the parameters is Inf. diff --git a/sysdeps/i386/fpu/e_log.S b/sysdeps/i386/fpu/e_log.S index 3fa32aad3c..335df22577 100644 --- a/sysdeps/i386/fpu/e_log.S +++ b/sysdeps/i386/fpu/e_log.S @@ -80,7 +80,13 @@ ENTRY(__log_finite) fnstsw // x-1 : x : log(2) andb $0x45, %ah jz 2b - fstp %st(1) // x-1 : log(2) + fxam + fnstsw + andb $0x45, %ah + cmpb $0x40, %ah + jne 6f + fabs // log(1) is +0 in all rounding modes. +6: fstp %st(1) // x-1 : log(2) fyl2xp1 // log(x) ret END(__log_finite) diff --git a/sysdeps/i386/fpu/e_logf.S b/sysdeps/i386/fpu/e_logf.S index ca83d39cef..de967a31f5 100644 --- a/sysdeps/i386/fpu/e_logf.S +++ b/sysdeps/i386/fpu/e_logf.S @@ -81,7 +81,13 @@ ENTRY(__logf_finite) fnstsw // x-1 : x : log(2) andb $0x45, %ah jz 2b - fstp %st(1) // x-1 : log(2) + fxam + fnstsw + andb $0x45, %ah + cmpb $0x40, %ah + jne 6f + fabs // log(1) is +0 in all rounding modes. +6: fstp %st(1) // x-1 : log(2) fyl2xp1 // log(x) ret END(__logf_finite) diff --git a/sysdeps/i386/fpu/e_logl.S b/sysdeps/i386/fpu/e_logl.S index 828e98aa8d..7a6d370e8f 100644 --- a/sysdeps/i386/fpu/e_logl.S +++ b/sysdeps/i386/fpu/e_logl.S @@ -84,7 +84,13 @@ ENTRY(__logl_finite) fnstsw // x-1 : x : log(2) andb $0x45, %ah jz 2b - fstp %st(1) // x-1 : log(2) + fxam + fnstsw + andb $0x45, %ah + cmpb $0x40, %ah + jne 7f + fabs // log(1) is +0 in all rounding modes. +7: fstp %st(1) // x-1 : log(2) fyl2xp1 // log(x) ret END(__logl_finite) diff --git a/sysdeps/i386/fpu/e_pow.S b/sysdeps/i386/fpu/e_pow.S index 40f8227fda..5773394b0e 100644 --- a/sysdeps/i386/fpu/e_pow.S +++ b/sysdeps/i386/fpu/e_pow.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of pow function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata.cst8,"aM",@progbits,8 @@ -53,6 +54,7 @@ minfinity: mzero: .byte 0, 0, 0, 0, 0, 0, 0, 0x80 ASM_SIZE_DIRECTIVE(minf_mzero) +DEFINE_DBL_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -165,6 +167,10 @@ ENTRY(__ieee754_pow) orl %edx, %ecx jnz 6b fstp %st(0) // ST*x +#ifdef PIC + LOAD_PIC_REG (cx) +#endif + DBL_NARROW_EVAL_UFLOW_NONNAN ret /* y is ±NAN */ @@ -257,6 +263,7 @@ ENTRY(__ieee754_pow) cfi_adjust_cfa_offset (-8) 292: fscale // +/- 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x)) fstp %st(1) // +/- 2^fract(y*log2(x))*2^int(y*log2(x)) + DBL_NARROW_EVAL_UFLOW_NONNAN ret diff --git a/sysdeps/i386/fpu/e_powf.S b/sysdeps/i386/fpu/e_powf.S index 02338284f6..ee96c704dc 100644 --- a/sysdeps/i386/fpu/e_powf.S +++ b/sysdeps/i386/fpu/e_powf.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of pow function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata.cst8,"aM",@progbits,8 @@ -50,6 +51,7 @@ minfinity: mzero: .byte 0, 0, 0, 0, 0, 0, 0, 0x80 ASM_SIZE_DIRECTIVE(minf_mzero) +DEFINE_FLT_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -96,7 +98,7 @@ ENTRY(__ieee754_powf) je 15f // x is ±inf cmpb $0x01, %ah - je 32f // x is NaN + je 33f // x is NaN fxch // y : x @@ -148,6 +150,7 @@ ENTRY(__ieee754_powf) testl %edx, %edx jnz 6b fstp %st(0) // ST*x + FLT_NARROW_EVAL_UFLOW_NONNAN ret /* y is ±NAN */ @@ -196,8 +199,15 @@ ENTRY(__ieee754_powf) 32: addl $4, %esp cfi_adjust_cfa_offset (-4) fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x)) + FLT_NARROW_EVAL_UFLOW_NONNAN ret + /* x is NaN. */ + cfi_adjust_cfa_offset (4) +33: addl $4, %esp + cfi_adjust_cfa_offset (-4) + fstp %st(1) + ret // pow(x,±0) = 1 .align ALIGNARG(4) diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S index bdfb5cf635..77d2abfaea 100644 --- a/sysdeps/i386/fpu/e_powl.S +++ b/sysdeps/i386/fpu/e_powl.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of pow function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata.cst8,"aM",@progbits,8 @@ -59,6 +60,7 @@ minfinity: mzero: .byte 0, 0, 0, 0, 0, 0, 0, 0x80 ASM_SIZE_DIRECTIVE(minf_mzero) +DEFINE_LDBL_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -187,6 +189,10 @@ ENTRY(__ieee754_powl) orl %edx, %ecx jnz 6b fstp %st(0) // ST*x +#ifdef PIC + LOAD_PIC_REG (cx) +#endif + LDBL_CHECK_FORCE_UFLOW_NONNAN ret /* y is ±NAN */ diff --git a/sysdeps/i386/fpu/e_scalb.S b/sysdeps/i386/fpu/e_scalb.S index 6a01aa64d6..370924c29f 100644 --- a/sysdeps/i386/fpu/e_scalb.S +++ b/sysdeps/i386/fpu/e_scalb.S @@ -6,6 +6,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata @@ -52,6 +53,7 @@ ENTRY(__ieee754_scalb) jne 4f fscale fstp %st(1) + DBL_NARROW_EVAL ret /* y is -inf */ diff --git a/sysdeps/i386/fpu/e_scalbf.S b/sysdeps/i386/fpu/e_scalbf.S index 12b25159ac..4f2dfa3acf 100644 --- a/sysdeps/i386/fpu/e_scalbf.S +++ b/sysdeps/i386/fpu/e_scalbf.S @@ -7,6 +7,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata @@ -54,6 +55,7 @@ ENTRY(__ieee754_scalbf) jne 4f fscale fstp %st(1) + FLT_NARROW_EVAL ret /* y is -inf */ diff --git a/sysdeps/i386/fpu/fclrexcpt.c b/sysdeps/i386/fpu/fclrexcpt.c index 096d974ce4..68a8f863d6 100644 --- a/sysdeps/i386/fpu/fclrexcpt.c +++ b/sysdeps/i386/fpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c index d048ea41fe..07fd4cfacb 100644 --- a/sysdeps/i386/fpu/fedisblxcpt.c +++ b/sysdeps/i386/fpu/fedisblxcpt.c @@ -1,5 +1,5 @@ /* Disable floating-point exceptions. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1999. diff --git a/sysdeps/i386/fpu/feenablxcpt.c b/sysdeps/i386/fpu/feenablxcpt.c index ffc72b7a6c..0d0377d21a 100644 --- a/sysdeps/i386/fpu/feenablxcpt.c +++ b/sysdeps/i386/fpu/feenablxcpt.c @@ -1,5 +1,5 @@ /* Enable floating-point exceptions. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1999. diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c index 59b4292612..b4b384fe19 100644 --- a/sysdeps/i386/fpu/fegetenv.c +++ b/sysdeps/i386/fpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/fegetexcept.c b/sysdeps/i386/fpu/fegetexcept.c index b09d7ea38b..9d3d090a30 100644 --- a/sysdeps/i386/fpu/fegetexcept.c +++ b/sysdeps/i386/fpu/fegetexcept.c @@ -1,5 +1,5 @@ /* Get enabled floating-point exceptions. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1999. diff --git a/sysdeps/i386/fpu/fegetround.c b/sysdeps/i386/fpu/fegetround.c index 1662e2e66e..8c83d8e017 100644 --- a/sysdeps/i386/fpu/fegetround.c +++ b/sysdeps/i386/fpu/fegetround.c @@ -1,5 +1,5 @@ /* Return current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c index f6db2badbb..a345db3513 100644 --- a/sysdeps/i386/fpu/feholdexcpt.c +++ b/sysdeps/i386/fpu/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c index 9566e092ca..0d8f435f0b 100644 --- a/sysdeps/i386/fpu/fesetenv.c +++ b/sysdeps/i386/fpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -18,12 +18,18 @@ <http://www.gnu.org/licenses/>. */ #include <fenv.h> +#include <fpu_control.h> #include <assert.h> #include <unistd.h> #include <ldsodefs.h> #include <dl-procinfo.h> +/* All exceptions, including the x86-specific "denormal operand" + exception. */ +#define FE_ALL_EXCEPT_X86 (FE_ALL_EXCEPT | __FE_DENORM) + + int __fesetenv (const fenv_t *envp) { @@ -40,22 +46,30 @@ __fesetenv (const fenv_t *envp) if (envp == FE_DFL_ENV) { - temp.__control_word |= FE_ALL_EXCEPT; + temp.__control_word |= FE_ALL_EXCEPT_X86; temp.__control_word &= ~FE_TOWARDZERO; - temp.__status_word &= ~FE_ALL_EXCEPT; + temp.__control_word |= _FPU_EXTENDED; + temp.__status_word &= ~FE_ALL_EXCEPT_X86; } else if (envp == FE_NOMASK_ENV) { temp.__control_word &= ~(FE_ALL_EXCEPT | FE_TOWARDZERO); - temp.__status_word &= ~FE_ALL_EXCEPT; + /* Keep the "denormal operand" exception masked. */ + temp.__control_word |= __FE_DENORM; + temp.__control_word |= _FPU_EXTENDED; + temp.__status_word &= ~FE_ALL_EXCEPT_X86; } else { - temp.__control_word &= ~(FE_ALL_EXCEPT | FE_TOWARDZERO); + temp.__control_word &= ~(FE_ALL_EXCEPT_X86 + | FE_TOWARDZERO + | _FPU_EXTENDED); temp.__control_word |= (envp->__control_word - & (FE_ALL_EXCEPT | FE_TOWARDZERO)); - temp.__status_word &= ~FE_ALL_EXCEPT; - temp.__status_word |= envp->__status_word & FE_ALL_EXCEPT; + & (FE_ALL_EXCEPT_X86 + | FE_TOWARDZERO + | _FPU_EXTENDED)); + temp.__status_word &= ~FE_ALL_EXCEPT_X86; + temp.__status_word |= envp->__status_word & FE_ALL_EXCEPT_X86; } temp.__eip = 0; temp.__cs_selector = 0; @@ -72,19 +86,29 @@ __fesetenv (const fenv_t *envp) if (envp == FE_DFL_ENV) { + /* Clear SSE exceptions. */ + mxcsr &= ~FE_ALL_EXCEPT_X86; /* Set mask for SSE MXCSR. */ - mxcsr |= (FE_ALL_EXCEPT << 7); + mxcsr |= (FE_ALL_EXCEPT_X86 << 7); /* Set rounding to FE_TONEAREST. */ mxcsr &= ~0x6000; mxcsr |= (FE_TONEAREST << 3); + /* Clear the FZ and DAZ bits. */ + mxcsr &= ~0x8040; } else if (envp == FE_NOMASK_ENV) { + /* Clear SSE exceptions. */ + mxcsr &= ~FE_ALL_EXCEPT_X86; /* Do not mask exceptions. */ mxcsr &= ~(FE_ALL_EXCEPT << 7); + /* Keep the "denormal operand" exception masked. */ + mxcsr |= (__FE_DENORM << 7); /* Set rounding to FE_TONEAREST. */ mxcsr &= ~0x6000; mxcsr |= (FE_TONEAREST << 3); + /* Clear the FZ and DAZ bits. */ + mxcsr &= ~0x8040; } else mxcsr = envp->__eip; diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c index 69f8b3efbd..1c1b2fcf26 100644 --- a/sysdeps/i386/fpu/fesetround.c +++ b/sysdeps/i386/fpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c index de461a4d51..9d225cf8bb 100644 --- a/sysdeps/i386/fpu/feupdateenv.c +++ b/sysdeps/i386/fpu/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/fgetexcptflg.c b/sysdeps/i386/fpu/fgetexcptflg.c index 7adb898cab..1cb1ebb3fb 100644 --- a/sysdeps/i386/fpu/fgetexcptflg.c +++ b/sysdeps/i386/fpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/fraiseexcpt.c b/sysdeps/i386/fpu/fraiseexcpt.c index 30bbe6f489..ad980cca32 100644 --- a/sysdeps/i386/fpu/fraiseexcpt.c +++ b/sysdeps/i386/fpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/fsetexcptflg.c b/sysdeps/i386/fpu/fsetexcptflg.c index 4b8bb69a19..cea473e293 100644 --- a/sysdeps/i386/fpu/fsetexcptflg.c +++ b/sysdeps/i386/fpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/ftestexcept.c b/sysdeps/i386/fpu/ftestexcept.c index ca0dc91bc0..0f7408fad0 100644 --- a/sysdeps/i386/fpu/ftestexcept.c +++ b/sysdeps/i386/fpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/i386-math-asm.h b/sysdeps/i386/fpu/i386-math-asm.h new file mode 100644 index 0000000000..20307d3a4a --- /dev/null +++ b/sysdeps/i386/fpu/i386-math-asm.h @@ -0,0 +1,340 @@ +/* Helper macros for x86 libm functions. + Copyright (C) 2015-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _I386_MATH_ASM_H +#define _I386_MATH_ASM_H 1 + +/* Remove excess range and precision by storing a value on the stack + and loading it back. */ +#define FLT_NARROW_EVAL \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fstps (%esp); \ + flds (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); +#define DBL_NARROW_EVAL \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fstpl (%esp); \ + fldl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); + +/* Define constants for the minimum value of a floating-point + type. */ +#define DEFINE_FLT_MIN \ + .section .rodata.cst4,"aM",@progbits,4; \ + .p2align 2; \ + .type flt_min,@object; \ +flt_min: \ + .byte 0, 0, 0x80, 0; \ + .size flt_min, .-flt_min; +#define DEFINE_DBL_MIN \ + .section .rodata.cst8,"aM",@progbits,8; \ + .p2align 3; \ + .type dbl_min,@object; \ +dbl_min: \ + .byte 0, 0, 0, 0, 0, 0, 0x10, 0; \ + .size dbl_min, .-dbl_min; +#define DEFINE_LDBL_MIN \ + .section .rodata.cst16,"aM",@progbits,16; \ + .p2align 4; \ + .type ldbl_min,@object; \ +ldbl_min: \ + .byte 0, 0, 0, 0, 0, 0, 0, 0x80, 0x1, 0; \ + .byte 0, 0, 0, 0, 0, 0; \ + .size ldbl_min, .-ldbl_min; + +/* Remove excess range and precision by storing a value on the stack + and loading it back. The value is given to be nonnegative or NaN; + if it is subnormal, also force an underflow exception. The + relevant constant for the minimum of the type must have been + defined, the MO macro must have been defined for access to memory + operands, and, if PIC, the PIC register must have been loaded. */ +#define FLT_NARROW_EVAL_UFLOW_NONNEG_NAN \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + flds MO(flt_min); \ + fld %st(1); \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ +6424: fstps (%esp); \ + flds (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); +#define DBL_NARROW_EVAL_UFLOW_NONNEG_NAN \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fldl MO(dbl_min); \ + fld %st(1); \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ +6453: fstpl (%esp); \ + fldl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); + +/* Likewise, but the argument is not a NaN (so fcom instructions, + which support memory operands, can be used). */ +#define FLT_NARROW_EVAL_UFLOW_NONNEG \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fcoms MO(flt_min); \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ +6424: fstps (%esp); \ + flds (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); +#define DBL_NARROW_EVAL_UFLOW_NONNEG \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fcoml MO(dbl_min); \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ +6453: fstpl (%esp); \ + fldl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); + +/* Likewise, but the non-NaN argument may be negative. */ +#define FLT_NARROW_EVAL_UFLOW_NONNAN \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fld %st(0); \ + fabs; \ + fcomps MO(flt_min); \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ +6424: fstps (%esp); \ + flds (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); +#define DBL_NARROW_EVAL_UFLOW_NONNAN \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fld %st(0); \ + fabs; \ + fcompl MO(dbl_min); \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ +6453: fstpl (%esp); \ + fldl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); + +/* Force an underflow exception if the given value is subnormal. The + relevant constant for the minimum of the type must have been + defined, the MO macro must have been defined for access to memory + operands, and, if PIC, the PIC register must have been loaded. */ +#define FLT_CHECK_FORCE_UFLOW \ + flds MO(flt_min); \ + fld %st(1); \ + fabs; \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); \ +6424: +#define DBL_CHECK_FORCE_UFLOW \ + fldl MO(dbl_min); \ + fld %st(1); \ + fabs; \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); \ +6453: + +/* Likewise, but also remove excess range and precision if the value + is subnormal. */ +#define FLT_CHECK_FORCE_UFLOW_NARROW \ + flds MO(flt_min); \ + fld %st(1); \ + fabs; \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ + fstps (%esp); \ + flds (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); \ +6424: +#define DBL_CHECK_FORCE_UFLOW_NARROW \ + fldl MO(dbl_min); \ + fld %st(1); \ + fabs; \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ + fstpl (%esp); \ + fldl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); \ +6453: + +/* Likewise, but the argument is nonnegative or NaN. */ +#define LDBL_CHECK_FORCE_UFLOW_NONNEG_NAN \ + fldt MO(ldbl_min); \ + fld %st(1); \ + fucompp; \ + fnstsw; \ + sahf; \ + jnc 6464f; \ + fld %st(0); \ + fmul %st(0); \ + fstp %st(0); \ +6464: + +/* Likewise, but the argument is not a NaN. */ +#define FLT_CHECK_FORCE_UFLOW_NONNAN \ + fld %st(0); \ + fabs; \ + fcomps MO(flt_min); \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); \ +6424: +#define DBL_CHECK_FORCE_UFLOW_NONNAN \ + fld %st(0); \ + fabs; \ + fcompl MO(dbl_min); \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); \ +6453: +#define LDBL_CHECK_FORCE_UFLOW_NONNAN \ + fldt MO(ldbl_min); \ + fld %st(1); \ + fabs; \ + fcompp; \ + fnstsw; \ + sahf; \ + jnc 6464f; \ + fld %st(0); \ + fmul %st(0); \ + fstp %st(0); \ +6464: + +/* Likewise, but the argument is nonnegative and not a NaN. */ +#define FLT_CHECK_FORCE_UFLOW_NONNEG \ + fcoms MO(flt_min); \ + fnstsw; \ + sahf; \ + jnc 6424f; \ + subl $4, %esp; \ + cfi_adjust_cfa_offset (4); \ + fld %st(0); \ + fmul %st(0); \ + fstps (%esp); \ + addl $4, %esp; \ + cfi_adjust_cfa_offset (-4); \ +6424: +#define DBL_CHECK_FORCE_UFLOW_NONNEG \ + fcoml MO(dbl_min); \ + fnstsw; \ + sahf; \ + jnc 6453f; \ + subl $8, %esp; \ + cfi_adjust_cfa_offset (8); \ + fld %st(0); \ + fmul %st(0); \ + fstpl (%esp); \ + addl $8, %esp; \ + cfi_adjust_cfa_offset (-8); \ +6453: +#define LDBL_CHECK_FORCE_UFLOW_NONNEG \ + fldt MO(ldbl_min); \ + fld %st(1); \ + fcompp; \ + fnstsw; \ + sahf; \ + jnc 6464f; \ + fld %st(0); \ + fmul %st(0); \ + fstp %st(0); \ +6464: + +#endif /* i386-math-asm.h. */ diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index 003be8e569..84da4753eb 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -2,6 +2,8 @@ # Maximal error of functions: Function: "acos": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -14,34 +16,50 @@ ildouble: 2 ldouble: 2 Function: "acos_upward": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 Function: "acosh": +double: 1 +idouble: 1 ildouble: 4 ldouble: 2 Function: "acosh_downward": +double: 1 +idouble: 1 ildouble: 6 ldouble: 4 Function: "acosh_towardzero": +double: 1 +idouble: 1 ildouble: 6 ldouble: 4 Function: "acosh_upward": +double: 1 +idouble: 1 ildouble: 4 ldouble: 3 Function: "asin": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "asin_downward": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 Function: "asin_towardzero": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -54,18 +72,22 @@ ildouble: 1 ldouble: 1 Function: "asinh": -ildouble: 2 -ldouble: 2 +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 Function: "asinh_downward": double: 1 float: 1 +idouble: 1 ildouble: 5 ldouble: 5 Function: "asinh_towardzero": double: 1 float: 1 +idouble: 1 ildouble: 4 ldouble: 4 @@ -75,13 +97,17 @@ float: 1 idouble: 1 ifloat: 1 ildouble: 5 -ldouble: 4 +ldouble: 5 Function: "atan": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "atan2": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -134,6 +160,8 @@ ildouble: 1 ldouble: 1 Function: "atanh": +double: 1 +idouble: 1 ildouble: 3 ldouble: 3 @@ -150,28 +178,38 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 4 +ildouble: 5 ldouble: 3 Function: "atanh_upward": +double: 1 +float: 1 idouble: 1 ifloat: 1 ildouble: 5 ldouble: 5 Function: "cabs": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "cabs_downward": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "cabs_towardzero": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "cabs_upward": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -200,9 +238,9 @@ ildouble: 2 ldouble: 2 Function: Imaginary part of "cacos_downward": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -216,9 +254,9 @@ ildouble: 2 ldouble: 2 Function: Imaginary part of "cacos_towardzero": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -256,9 +294,9 @@ ildouble: 1 ldouble: 1 Function: Real part of "cacosh_downward": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -272,9 +310,9 @@ ildouble: 2 ldouble: 2 Function: Real part of "cacosh_towardzero": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -304,6 +342,8 @@ ildouble: 2 ldouble: 2 Function: "carg": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -316,7 +356,9 @@ ildouble: 1 ldouble: 1 Function: "carg_towardzero": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 @@ -354,9 +396,9 @@ ildouble: 2 ldouble: 2 Function: Imaginary part of "casin_downward": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -370,9 +412,9 @@ ildouble: 2 ldouble: 2 Function: Imaginary part of "casin_towardzero": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -410,9 +452,9 @@ ildouble: 1 ldouble: 1 Function: Real part of "casinh_downward": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -426,9 +468,9 @@ ildouble: 2 ldouble: 2 Function: Real part of "casinh_towardzero": -double: 3 +double: 4 float: 3 -idouble: 3 +idouble: 4 ifloat: 3 ildouble: 5 ldouble: 5 @@ -571,33 +613,35 @@ ldouble: 1 Function: "cbrt": double: 1 +float: 1 idouble: 1 -ildouble: 1 -ldouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 Function: "cbrt_downward": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 4 +ldouble: 4 Function: "cbrt_towardzero": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Function: "cbrt_upward": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 4 +ldouble: 4 Function: Real part of "ccos": double: 1 @@ -624,10 +668,10 @@ ildouble: 3 ldouble: 3 Function: Imaginary part of "ccos_downward": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 @@ -640,25 +684,25 @@ ildouble: 3 ldouble: 3 Function: Imaginary part of "ccos_towardzero": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 Function: Real part of "ccos_upward": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 ildouble: 2 ldouble: 2 Function: Imaginary part of "ccos_upward": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 ildouble: 2 ldouble: 2 @@ -688,70 +732,62 @@ ildouble: 3 ldouble: 3 Function: Imaginary part of "ccosh_downward": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 Function: Real part of "ccosh_towardzero": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 3 ldouble: 3 Function: Imaginary part of "ccosh_towardzero": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 Function: Real part of "ccosh_upward": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 ildouble: 2 ldouble: 2 Function: Imaginary part of "ccosh_upward": -double: 1 +double: 3 float: 2 -idouble: 1 +idouble: 3 ifloat: 2 ildouble: 2 ldouble: 2 Function: Real part of "cexp": -double: 1 +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 Function: Imaginary part of "cexp": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 1 ldouble: 1 Function: Real part of "cexp_downward": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -Function: Imaginary part of "cexp_downward": double: 2 float: 2 idouble: 2 @@ -759,15 +795,15 @@ ifloat: 2 ildouble: 3 ldouble: 3 -Function: Real part of "cexp_towardzero": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +Function: Imaginary part of "cexp_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 -Function: Imaginary part of "cexp_towardzero": +Function: Real part of "cexp_towardzero": double: 2 float: 2 idouble: 2 @@ -775,29 +811,37 @@ ifloat: 2 ildouble: 3 ldouble: 3 +Function: Imaginary part of "cexp_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + Function: Real part of "cexp_upward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 Function: Imaginary part of "cexp_upward": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 - -Function: Real part of "clog": double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 4 -ldouble: 4 +ildouble: 3 +ldouble: 3 + +Function: Real part of "clog": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "clog": double: 1 @@ -820,10 +864,10 @@ ildouble: 2 ldouble: 2 Function: Real part of "clog10_downward": -double: 5 -float: 4 -idouble: 5 -ifloat: 4 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 8 ldouble: 8 @@ -832,14 +876,14 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Function: Real part of "clog10_towardzero": -double: 5 -float: 4 -idouble: 5 -ifloat: 4 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 8 ldouble: 8 @@ -852,12 +896,12 @@ ildouble: 3 ldouble: 3 Function: Real part of "clog10_upward": -double: 5 -float: 5 -idouble: 5 -ifloat: 5 -ildouble: 6 -ldouble: 6 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 7 +ldouble: 7 Function: Imaginary part of "clog10_upward": double: 1 @@ -868,12 +912,12 @@ ildouble: 3 ldouble: 3 Function: Real part of "clog_downward": -double: 5 -float: 5 -idouble: 5 -ifloat: 5 -ildouble: 7 -ldouble: 7 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "clog_downward": double: 1 @@ -884,12 +928,12 @@ ildouble: 1 ldouble: 1 Function: Real part of "clog_towardzero": -double: 5 -float: 5 -idouble: 5 -ifloat: 5 -ildouble: 8 -ldouble: 8 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "clog_towardzero": double: 1 @@ -900,12 +944,12 @@ ildouble: 1 ldouble: 1 Function: Real part of "clog_upward": -double: 5 -float: 5 -idouble: 5 -ifloat: 5 -ildouble: 6 -ldouble: 6 +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 Function: Imaginary part of "clog_upward": double: 1 @@ -916,48 +960,61 @@ ildouble: 1 ldouble: 1 Function: "cos": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: "cos_downward": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 3 ldouble: 3 Function: "cos_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Function: "cos_upward": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Function: "cosh": -ildouble: 1 +double: 1 +float: 1 +idouble: 1 +ildouble: 2 ldouble: 2 Function: "cosh_downward": -double: 1 +double: 2 +float: 1 idouble: 1 ifloat: 1 ildouble: 2 ldouble: 3 Function: "cosh_towardzero": -double: 1 +double: 2 +float: 1 idouble: 1 ifloat: 1 ildouble: 2 ldouble: 2 Function: "cosh_upward": -double: 1 -float: 1 +double: 4 +float: 2 idouble: 1 ifloat: 1 ildouble: 2 @@ -972,10 +1029,8 @@ ildouble: 3 ldouble: 3 Function: Imaginary part of "cpow": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +float: 2 +ifloat: 2 ildouble: 4 ldouble: 4 @@ -988,10 +1043,10 @@ ildouble: 7 ldouble: 7 Function: Imaginary part of "cpow_downward": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 ildouble: 2 ldouble: 2 @@ -1004,10 +1059,10 @@ ildouble: 7 ldouble: 7 Function: Imaginary part of "cpow_towardzero": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 ildouble: 1 ldouble: 1 @@ -1021,9 +1076,9 @@ ldouble: 2 Function: Imaginary part of "cpow_upward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 @@ -1036,16 +1091,14 @@ ildouble: 1 ldouble: 1 Function: Imaginary part of "csin": -double: 1 float: 1 -idouble: 1 ifloat: 1 Function: Real part of "csin_downward": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 @@ -1058,10 +1111,10 @@ ildouble: 3 ldouble: 3 Function: Real part of "csin_towardzero": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 @@ -1074,26 +1127,22 @@ ildouble: 3 ldouble: 3 Function: Real part of "csin_upward": -double: 1 +double: 3 float: 2 -idouble: 1 +idouble: 3 ifloat: 2 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "csin_upward": double: 2 float: 2 idouble: 2 ifloat: 2 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Function: Real part of "csinh": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 ildouble: 1 ldouble: 1 @@ -1107,33 +1156,33 @@ ldouble: 1 Function: Real part of "csinh_downward": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 ildouble: 3 ldouble: 3 Function: Imaginary part of "csinh_downward": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 Function: Real part of "csinh_towardzero": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 ildouble: 3 ldouble: 3 Function: Imaginary part of "csinh_towardzero": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 ildouble: 3 ldouble: 3 @@ -1142,16 +1191,16 @@ double: 2 float: 2 idouble: 2 ifloat: 2 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "csinh_upward": -double: 1 +double: 3 float: 2 -idouble: 1 +idouble: 3 ifloat: 2 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 Function: Real part of "csqrt": double: 1 @@ -1161,27 +1210,33 @@ ldouble: 2 Function: Imaginary part of "csqrt": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Function: Real part of "csqrt_downward": double: 1 +float: 1 idouble: 1 -ildouble: 4 -ldouble: 4 +ifloat: 1 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "csqrt_downward": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 4 +ldouble: 4 Function: Real part of "csqrt_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 4 ldouble: 4 @@ -1190,8 +1245,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 4 +ldouble: 4 Function: Real part of "csqrt_upward": double: 1 @@ -1203,11 +1258,11 @@ ldouble: 5 Function: Imaginary part of "csqrt_upward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 -ildouble: 3 -ldouble: 3 +ifloat: 2 +ildouble: 4 +ldouble: 4 Function: Real part of "ctan": double: 1 @@ -1227,33 +1282,33 @@ ldouble: 1 Function: Real part of "ctan_downward": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 +ifloat: 1 ildouble: 5 ldouble: 5 Function: Imaginary part of "ctan_downward": double: 2 -float: 2 +float: 1 idouble: 2 -ifloat: 2 +ifloat: 1 ildouble: 4 ldouble: 4 Function: Real part of "ctan_towardzero": double: 3 -float: 1 +float: 2 idouble: 3 -ifloat: 1 +ifloat: 2 ildouble: 5 ldouble: 5 Function: Imaginary part of "ctan_towardzero": double: 2 -float: 1 +float: 3 idouble: 2 -ifloat: 1 +ifloat: 3 ildouble: 4 ldouble: 4 @@ -1307,17 +1362,17 @@ ldouble: 4 Function: Real part of "ctanh_towardzero": double: 2 -float: 1 +float: 3 idouble: 2 -ifloat: 1 +ifloat: 3 ildouble: 4 ldouble: 4 Function: Imaginary part of "ctanh_towardzero": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 ildouble: 3 ldouble: 3 @@ -1347,17 +1402,25 @@ ldouble: 1 Function: "erf_downward": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: "erf_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: "erf_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 @@ -1366,38 +1429,42 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Function: "erfc_downward": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 +double: 2 +float: 3 +idouble: 2 +ifloat: 3 ildouble: 4 ldouble: 4 Function: "erfc_towardzero": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 ildouble: 4 ldouble: 4 Function: "erfc_upward": double: 2 -float: 2 +float: 3 idouble: 2 -ifloat: 2 -ildouble: 4 -ldouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 Function: "exp": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "exp10": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -1436,6 +1503,8 @@ ildouble: 1 ldouble: 1 Function: "exp2_towardzero": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -1452,14 +1521,18 @@ ldouble: 1 Function: "exp_towardzero": double: 1 idouble: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "exp_upward": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "expm1": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 @@ -1488,38 +1561,40 @@ ildouble: 4 ldouble: 4 Function: "gamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: "gamma_downward": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 -ildouble: 6 -ldouble: 6 +ildouble: 4 +ldouble: 4 + +Function: "gamma_downward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 7 +ldouble: 7 Function: "gamma_towardzero": -double: 2 +double: 4 float: 2 -idouble: 2 +idouble: 4 ifloat: 2 -ildouble: 6 -ldouble: 6 +ildouble: 7 +ldouble: 7 Function: "gamma_upward": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -ildouble: 4 -ldouble: 4 +double: 3 +float: 4 +idouble: 3 +ifloat: 4 +ildouble: 5 +ldouble: 5 Function: "hypot": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -1638,42 +1713,46 @@ ildouble: 5 ldouble: 5 Function: "lgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 - -Function: "lgamma_downward": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 -ildouble: 6 -ldouble: 6 +ildouble: 4 +ldouble: 4 + +Function: "lgamma_downward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 7 +ldouble: 7 Function: "lgamma_towardzero": -double: 2 +double: 4 float: 2 -idouble: 2 +idouble: 4 ifloat: 2 -ildouble: 6 -ldouble: 6 +ildouble: 7 +ldouble: 7 Function: "lgamma_upward": -double: 2 -float: 3 -idouble: 2 -ifloat: 3 -ildouble: 4 -ldouble: 4 +double: 3 +float: 4 +idouble: 3 +ifloat: 4 +ildouble: 5 +ldouble: 5 Function: "log": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "log10": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -1702,6 +1781,8 @@ ildouble: 1 ldouble: 1 Function: "log1p": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 @@ -1710,16 +1791,16 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 4 +ldouble: 4 Function: "log1p_towardzero": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 4 +ldouble: 4 Function: "log1p_upward": double: 1 @@ -1730,10 +1811,14 @@ ildouble: 3 ldouble: 3 Function: "log2": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "log2_downward": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -1754,22 +1839,32 @@ ildouble: 1 ldouble: 1 Function: "log_downward": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 Function: "log_towardzero": +double: 1 +idouble: 1 ildouble: 2 ldouble: 2 Function: "log_upward": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "pow": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 Function: "pow10": +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 @@ -1816,152 +1911,185 @@ ildouble: 2 ldouble: 2 Function: "sin": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: "sin_downward": double: 1 +float: 1 idouble: 1 -ildouble: 2 -ldouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 Function: "sin_towardzero": double: 1 +float: 1 idouble: 1 -ildouble: 1 -ldouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: "sin_upward": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 3 ldouble: 3 Function: "sincos": +float: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Function: "sincos_downward": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 3 ldouble: 3 Function: "sincos_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 2 ldouble: 2 Function: "sincos_upward": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 3 ldouble: 3 Function: "sinh": +double: 1 ildouble: 2 ldouble: 2 Function: "sinh_downward": +double: 2 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 4 ldouble: 5 Function: "sinh_towardzero": +double: 2 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 3 ldouble: 4 Function: "sinh_upward": -double: 1 -float: 1 +double: 4 +float: 2 +idouble: 1 +ifloat: 1 ildouble: 4 ldouble: 5 Function: "tan": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "tan_downward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 Function: "tan_towardzero": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 -ildouble: 2 -ldouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 Function: "tan_upward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 2 ldouble: 2 Function: "tanh": -ildouble: 2 -ldouble: 2 +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 Function: "tanh_downward": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 5 +ildouble: 7 ldouble: 4 Function: "tanh_towardzero": double: 1 float: 1 +idouble: 1 +ifloat: 1 ildouble: 3 ldouble: 3 Function: "tanh_upward": double: 1 float: 1 +idouble: 1 +ifloat: 1 ildouble: 5 ldouble: 4 Function: "tgamma": -double: 2 +double: 3 float: 3 -idouble: 2 +idouble: 3 ifloat: 3 -ildouble: 3 -ldouble: 3 +ildouble: 5 +ldouble: 5 Function: "tgamma_downward": -double: 2 +double: 3 float: 3 -idouble: 2 +idouble: 3 ifloat: 3 -ildouble: 3 -ldouble: 3 +ildouble: 5 +ldouble: 5 Function: "tgamma_towardzero": double: 3 float: 3 idouble: 3 ifloat: 3 -ildouble: 3 -ldouble: 3 +ildouble: 5 +ldouble: 5 Function: "tgamma_upward": double: 3 float: 3 idouble: 3 ifloat: 3 -ildouble: 3 -ldouble: 3 +ildouble: 5 +ldouble: 5 Function: "y0": double: 1 @@ -2021,9 +2149,9 @@ ldouble: 5 Function: "y1_upward": double: 1 -float: 3 +float: 2 idouble: 1 -ifloat: 3 +ifloat: 2 ildouble: 7 ldouble: 7 diff --git a/sysdeps/i386/fpu/math-tests.h b/sysdeps/i386/fpu/math-tests.h index a9be19a361..80492fe632 100644 --- a/sysdeps/i386/fpu/math-tests.h +++ b/sysdeps/i386/fpu/math-tests.h @@ -1,5 +1,5 @@ /* Configuration for math tests. 32-bit x86 version. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/fpu/math_private.h b/sysdeps/i386/fpu/math_private.h index 541a7f8d93..485214391f 100644 --- a/sysdeps/i386/fpu/math_private.h +++ b/sysdeps/i386/fpu/math_private.h @@ -1,4 +1,5 @@ -#ifndef _MATH_PRIVATE_H +#ifndef I386_MATH_PRIVATE_H +#define I386_MATH_PRIVATE_H 1 #include "fenv_private.h" #include_next <math_private.h> diff --git a/sysdeps/i386/fpu/s_asinh.S b/sysdeps/i386/fpu/s_asinh.S index 7123772dee..6a6e5b9004 100644 --- a/sysdeps/i386/fpu/s_asinh.S +++ b/sysdeps/i386/fpu/s_asinh.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/sysdeps/i386/fpu/s_asinhf.S b/sysdeps/i386/fpu/s_asinhf.S index 77ebae46ec..31f25192f3 100644 --- a/sysdeps/i386/fpu/s_asinhf.S +++ b/sysdeps/i386/fpu/s_asinhf.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/sysdeps/i386/fpu/s_asinhl.S b/sysdeps/i386/fpu/s_asinhl.S index 8799da6e53..c9d5714bee 100644 --- a/sysdeps/i386/fpu/s_asinhl.S +++ b/sysdeps/i386/fpu/s_asinhl.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/sysdeps/i386/fpu/s_atan.S b/sysdeps/i386/fpu/s_atan.S index c28b73ce75..644de78feb 100644 --- a/sysdeps/i386/fpu/s_atan.S +++ b/sysdeps/i386/fpu/s_atan.S @@ -4,15 +4,11 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: s_atan.S,v 1.4 1995/05/08 23:50:41 jtc Exp $") - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +DEFINE_DBL_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -28,20 +24,7 @@ ENTRY(__atan) fldl 4(%esp) fld1 fpatan - fldl MO(dbl_min) - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -1: ret + DBL_CHECK_FORCE_UFLOW + ret END (__atan) weak_alias (__atan, atan) diff --git a/sysdeps/i386/fpu/s_atanf.S b/sysdeps/i386/fpu/s_atanf.S index da3c2a64b5..0589c1135e 100644 --- a/sysdeps/i386/fpu/s_atanf.S +++ b/sysdeps/i386/fpu/s_atanf.S @@ -4,15 +4,11 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: s_atanf.S,v 1.3 1995/05/08 23:51:33 jtc Exp $") - .section .rodata.cst4,"aM",@progbits,4 - - .p2align 2 - .type flt_min,@object -flt_min: .byte 0, 0, 0x80, 0 - ASM_SIZE_DIRECTIVE(flt_min) +DEFINE_FLT_MIN #ifdef PIC # define MO(op) op##@GOTOFF(%ecx) @@ -28,20 +24,7 @@ ENTRY(__atanf) flds 4(%esp) fld1 fpatan - flds MO(flt_min) - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $4, %esp - cfi_adjust_cfa_offset (4) - fld %st(0) - fmul %st(0) - fstps (%esp) - addl $4, %esp - cfi_adjust_cfa_offset (-4) -1: ret + FLT_CHECK_FORCE_UFLOW + ret END (__atanf) weak_alias (__atanf, atanf) diff --git a/sysdeps/i386/fpu/s_cbrt.S b/sysdeps/i386/fpu/s_cbrt.S index cb5b11c8b4..6e7e99d9e8 100644 --- a/sysdeps/i386/fpu/s_cbrt.S +++ b/sysdeps/i386/fpu/s_cbrt.S @@ -1,5 +1,5 @@ /* Compute cubic root of double value. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Dirk Alboth <dirka@uni-paderborn.de> and Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_cbrtf.S b/sysdeps/i386/fpu/s_cbrtf.S index ba6a029a35..0a9db49523 100644 --- a/sysdeps/i386/fpu/s_cbrtf.S +++ b/sysdeps/i386/fpu/s_cbrtf.S @@ -1,5 +1,5 @@ /* Compute cubic root of float value. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Dirk Alboth <dirka@uni-paderborn.de> and Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_cbrtl.S b/sysdeps/i386/fpu/s_cbrtl.S index e45295248b..3bf170075b 100644 --- a/sysdeps/i386/fpu/s_cbrtl.S +++ b/sysdeps/i386/fpu/s_cbrtl.S @@ -1,5 +1,5 @@ /* Compute cubic root of long double value. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Dirk Alboth <dirka@uni-paderborn.de> and Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_expm1.S b/sysdeps/i386/fpu/s_expm1.S index 05e5285d7b..0bd227ee7a 100644 --- a/sysdeps/i386/fpu/s_expm1.S +++ b/sysdeps/i386/fpu/s_expm1.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of exp(x)-1. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>. @@ -23,6 +23,7 @@ #include <sysdep.h> #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata @@ -37,12 +38,7 @@ one: .double 1.0 l2e: .tfloat 1.442695040888963407359924681002 ASM_SIZE_DIRECTIVE(l2e) - .section .rodata.cst8,"aM",@progbits,8 - - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +DEFINE_DBL_MIN #ifdef PIC #define MO(op) op##@GOTOFF(%edx) @@ -81,21 +77,6 @@ ENTRY(__expm1) #ifdef PIC LOAD_PIC_REG (dx) #endif - fld %st - fabs - fcoml MO(dbl_min) - fstp %st - fnstsw - sahf - jae 5f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) - ret 5: fldt MO(l2e) // log2(e) : x fmulp // log2(e)*x @@ -122,6 +103,7 @@ ENTRY(__expm1) fsubrl MO(one) // 1-2^int(log2(e)*x) : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) fstp %st(1) // 1-2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) fsubrp %st, %st(1) // 2^(log2(e)*x) + DBL_CHECK_FORCE_UFLOW ret 2: fstp %st diff --git a/sysdeps/i386/fpu/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S index a83e435e22..669140eb75 100644 --- a/sysdeps/i386/fpu/s_expm1f.S +++ b/sysdeps/i386/fpu/s_expm1f.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of exp(x)-1. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. Based on code by John C. Bowman <bowman@ipp-garching.mpg.de>. @@ -23,6 +23,7 @@ #include <sysdep.h> #include <machine/asm.h> +#include <i386-math-asm.h> .section .rodata @@ -37,12 +38,7 @@ one: .double 1.0 l2e: .tfloat 1.442695040888963407359924681002 ASM_SIZE_DIRECTIVE(l2e) - .section .rodata.cst4,"aM",@progbits,4 - - .p2align 2 - .type flt_min,@object -flt_min: .byte 0, 0, 0x80, 0 - ASM_SIZE_DIRECTIVE(flt_min) +DEFINE_FLT_MIN #ifdef PIC #define MO(op) op##@GOTOFF(%edx) @@ -81,21 +77,6 @@ ENTRY(__expm1f) #ifdef PIC LOAD_PIC_REG (dx) #endif - fld %st - fabs - fcoms MO(flt_min) - fstp %st - fnstsw - sahf - jae 5f - subl $4, %esp - cfi_adjust_cfa_offset (4) - fld %st(0) - fmul %st(0) - fstps (%esp) - addl $4, %esp - cfi_adjust_cfa_offset (-4) - ret 5: fldt MO(l2e) // log2(e) : x fmulp // log2(e)*x @@ -122,6 +103,7 @@ ENTRY(__expm1f) fsubrl MO(one) // 1-2^int(log2(e)*x) : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) fstp %st(1) // 1-2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) fsubrp %st, %st(1) // 2^(log2(e)*x) + FLT_CHECK_FORCE_UFLOW ret 2: fstp %st diff --git a/sysdeps/i386/fpu/s_fdim.S b/sysdeps/i386/fpu/s_fdim.S index c929e28680..d62069b039 100644 --- a/sysdeps/i386/fpu/s_fdim.S +++ b/sysdeps/i386/fpu/s_fdim.S @@ -1,5 +1,5 @@ /* Compute positive difference. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fdimf.S b/sysdeps/i386/fpu/s_fdimf.S index 40ca54a27d..d2bd29a233 100644 --- a/sysdeps/i386/fpu/s_fdimf.S +++ b/sysdeps/i386/fpu/s_fdimf.S @@ -1,5 +1,5 @@ /* Compute positive difference. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fdiml.S b/sysdeps/i386/fpu/s_fdiml.S index 1787f240fb..df6e9c047a 100644 --- a/sysdeps/i386/fpu/s_fdiml.S +++ b/sysdeps/i386/fpu/s_fdiml.S @@ -1,5 +1,5 @@ /* Compute positive difference. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fmax.S b/sysdeps/i386/fpu/s_fmax.S index 129f623b9a..a6a236f1e1 100644 --- a/sysdeps/i386/fpu/s_fmax.S +++ b/sysdeps/i386/fpu/s_fmax.S @@ -1,5 +1,5 @@ /* Compute maximum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fmaxf.S b/sysdeps/i386/fpu/s_fmaxf.S index 998b58069c..2cbdbccb87 100644 --- a/sysdeps/i386/fpu/s_fmaxf.S +++ b/sysdeps/i386/fpu/s_fmaxf.S @@ -1,5 +1,5 @@ /* Compute maximum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fmaxl.S b/sysdeps/i386/fpu/s_fmaxl.S index 375b08a5ea..a38a1946bc 100644 --- a/sysdeps/i386/fpu/s_fmaxl.S +++ b/sysdeps/i386/fpu/s_fmaxl.S @@ -1,5 +1,5 @@ /* Compute maximum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fmin.S b/sysdeps/i386/fpu/s_fmin.S index 953c5f0657..022d9cf9f6 100644 --- a/sysdeps/i386/fpu/s_fmin.S +++ b/sysdeps/i386/fpu/s_fmin.S @@ -1,5 +1,5 @@ /* Compute minimum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fminf.S b/sysdeps/i386/fpu/s_fminf.S index 34e32496ac..5ba4ddb138 100644 --- a/sysdeps/i386/fpu/s_fminf.S +++ b/sysdeps/i386/fpu/s_fminf.S @@ -1,5 +1,5 @@ /* Compute minimum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fminl.S b/sysdeps/i386/fpu/s_fminl.S index 80c8758001..fb5169b8f2 100644 --- a/sysdeps/i386/fpu/s_fminl.S +++ b/sysdeps/i386/fpu/s_fminl.S @@ -1,5 +1,5 @@ /* Compute minimum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_fpclassifyl.c b/sysdeps/i386/fpu/s_fpclassifyl.c index be23e66f41..4971f16fff 100644 --- a/sysdeps/i386/fpu/s_fpclassifyl.c +++ b/sysdeps/i386/fpu/s_fpclassifyl.c @@ -1,5 +1,5 @@ /* Return classification value corresponding to argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_frexp.S b/sysdeps/i386/fpu/s_frexp.S index be61be7c9f..23f15dddb3 100644 --- a/sysdeps/i386/fpu/s_frexp.S +++ b/sysdeps/i386/fpu/s_frexp.S @@ -1,5 +1,5 @@ /* ix87 specific frexp implementation for double. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_frexpf.S b/sysdeps/i386/fpu/s_frexpf.S index 840dab7f92..5e3288bede 100644 --- a/sysdeps/i386/fpu/s_frexpf.S +++ b/sysdeps/i386/fpu/s_frexpf.S @@ -1,5 +1,5 @@ /* ix87 specific frexp implementation for float. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S index 6c8e9c09b7..f687ab3c2e 100644 --- a/sysdeps/i386/fpu/s_frexpl.S +++ b/sysdeps/i386/fpu/s_frexpl.S @@ -1,5 +1,5 @@ /* ix87 specific frexp implementation for long double. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_llrint.S b/sysdeps/i386/fpu/s_llrint.S index 87bc27d2af..0c2b99ec0b 100644 --- a/sysdeps/i386/fpu/s_llrint.S +++ b/sysdeps/i386/fpu/s_llrint.S @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_llrintf.S b/sysdeps/i386/fpu/s_llrintf.S index f3f9aefd04..72d1e69528 100644 --- a/sysdeps/i386/fpu/s_llrintf.S +++ b/sysdeps/i386/fpu/s_llrintf.S @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_llrintl.S b/sysdeps/i386/fpu/s_llrintl.S index 8db250a580..a256ca252b 100644 --- a/sysdeps/i386/fpu/s_llrintl.S +++ b/sysdeps/i386/fpu/s_llrintl.S @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_log1p.S b/sysdeps/i386/fpu/s_log1p.S index c2559a3f18..7978e76095 100644 --- a/sysdeps/i386/fpu/s_log1p.S +++ b/sysdeps/i386/fpu/s_log1p.S @@ -4,6 +4,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $") @@ -17,12 +18,13 @@ RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $") limit: .double 0.29 one: .double 1.0 - .section .rodata.cst8,"aM",@progbits,8 +DEFINE_DBL_MIN - .p2align 3 - .type dbl_min,@object -dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 - ASM_SIZE_DIRECTIVE(dbl_min) +#ifdef PIC +# define MO(op) op##@GOTOFF(%edx) +#else +# define MO(op) op +#endif /* * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, @@ -44,43 +46,18 @@ ENTRY(__log1p) sahf jc 3f // in case x is NaN or ±Inf 4: fabs -#ifdef PIC - fcompl limit@GOTOFF(%edx) -#else - fcompl limit -#endif + fcompl MO(limit) fnstsw sahf jc 2f -#ifdef PIC - faddl one@GOTOFF(%edx) -#else - faddl one -#endif + faddl MO(one) fyl2x ret 2: fyl2xp1 -#ifdef PIC - fldl dbl_min@GOTOFF(%edx) -#else - fldl dbl_min -#endif - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $8, %esp - cfi_adjust_cfa_offset (8) - fld %st(0) - fmul %st(0) - fstpl (%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) -1: ret + DBL_CHECK_FORCE_UFLOW_NONNAN + ret 3: jp 4b // in case x is ±Inf fstp %st(1) diff --git a/sysdeps/i386/fpu/s_log1pf.S b/sysdeps/i386/fpu/s_log1pf.S index 8fca22e4ff..acaa299d94 100644 --- a/sysdeps/i386/fpu/s_log1pf.S +++ b/sysdeps/i386/fpu/s_log1pf.S @@ -4,6 +4,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: s_log1pf.S,v 1.4 1995/05/09 00:13:05 jtc Exp $") @@ -17,12 +18,13 @@ RCSID("$NetBSD: s_log1pf.S,v 1.4 1995/05/09 00:13:05 jtc Exp $") limit: .float 0.29 one: .float 1.0 - .section .rodata.cst4,"aM",@progbits,4 +DEFINE_FLT_MIN - .p2align 2 - .type flt_min,@object -flt_min: .byte 0, 0, 0x80, 0 - ASM_SIZE_DIRECTIVE(flt_min) +#ifdef PIC +# define MO(op) op##@GOTOFF(%edx) +#else +# define MO(op) op +#endif /* * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, @@ -44,43 +46,18 @@ ENTRY(__log1pf) sahf jc 3f // in case x is NaN or ±Inf 4: fabs -#ifdef PIC - fcomps limit@GOTOFF(%edx) -#else - fcomps limit -#endif + fcomps MO(limit) fnstsw sahf jc 2f -#ifdef PIC - fadds one@GOTOFF(%edx) -#else - fadds one -#endif + fadds MO(one) fyl2x ret 2: fyl2xp1 -#ifdef PIC - flds flt_min@GOTOFF(%edx) -#else - flds flt_min -#endif - fld %st(1) - fabs - fucompp - fnstsw - sahf - jnc 1f - subl $4, %esp - cfi_adjust_cfa_offset (4) - fld %st(0) - fmul %st(0) - fstps (%esp) - addl $4, %esp - cfi_adjust_cfa_offset (-4) -1: ret + FLT_CHECK_FORCE_UFLOW_NONNAN + ret 3: jp 4b // in case x is ±Inf fstp %st(1) diff --git a/sysdeps/i386/fpu/s_log1pl.S b/sysdeps/i386/fpu/s_log1pl.S index 8f87cf61c6..98965fa48c 100644 --- a/sysdeps/i386/fpu/s_log1pl.S +++ b/sysdeps/i386/fpu/s_log1pl.S @@ -22,6 +22,12 @@ limit: .tfloat 0.29 but it helps to optimize the code. */ one: .double 1.0 +#ifdef PIC +# define MO(op) op##@GOTOFF(%edx) +#else +# define MO(op) op +#endif + /* * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, * otherwise fyl2x with the needed extra computation. @@ -43,11 +49,7 @@ ENTRY(__log1pl) jc 3f // in case x is NaN or ±Inf 4: fabs -#ifdef PIC - fldt limit@GOTOFF(%edx) -#else - fldt limit -#endif + fldt MO(limit) fcompp fnstsw sahf @@ -58,11 +60,7 @@ ENTRY(__log1pl) cmpl $0xc040, %eax jae 5f -#ifdef PIC - faddl one@GOTOFF(%edx) -#else - faddl one -#endif + faddl MO(one) 5: fyl2x ret diff --git a/sysdeps/i386/fpu/s_lrint.S b/sysdeps/i386/fpu/s_lrint.S index 7a72af38c3..263248c7c2 100644 --- a/sysdeps/i386/fpu/s_lrint.S +++ b/sysdeps/i386/fpu/s_lrint.S @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_lrintf.S b/sysdeps/i386/fpu/s_lrintf.S index f46401f729..1bd84fe10b 100644 --- a/sysdeps/i386/fpu/s_lrintf.S +++ b/sysdeps/i386/fpu/s_lrintf.S @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_lrintl.S b/sysdeps/i386/fpu/s_lrintl.S index dbe770cd8c..31acc3e232 100644 --- a/sysdeps/i386/fpu/s_lrintl.S +++ b/sysdeps/i386/fpu/s_lrintl.S @@ -1,6 +1,6 @@ /* Round argument to nearest integral value according to current rounding direction. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_nearbyint.S b/sysdeps/i386/fpu/s_nearbyint.S index 52909139a9..8da8ae9792 100644 --- a/sysdeps/i386/fpu/s_nearbyint.S +++ b/sysdeps/i386/fpu/s_nearbyint.S @@ -8,22 +8,17 @@ ENTRY(__nearbyint) fldl 4(%esp) - pushl %eax - cfi_adjust_cfa_offset (4) - pushl %ecx - cfi_adjust_cfa_offset (4) - fnstcw (%esp) - movl (%esp), %eax + subl $32, %esp + cfi_adjust_cfa_offset (32) + fnstenv 4(%esp) + movl 4(%esp), %eax orl $0x20, %eax - movl %eax, 4(%esp) - fldcw 4(%esp) - frndint - fclex + movl %eax, (%esp) fldcw (%esp) - popl %ecx - cfi_adjust_cfa_offset (-4) - popl %eax - cfi_adjust_cfa_offset (-4) + frndint + fldenv 4(%esp) + addl $32, %esp + cfi_adjust_cfa_offset (-32) ret END (__nearbyint) weak_alias (__nearbyint, nearbyint) diff --git a/sysdeps/i386/fpu/s_nearbyintf.S b/sysdeps/i386/fpu/s_nearbyintf.S index 6a6b1d6c2b..0c51f72364 100644 --- a/sysdeps/i386/fpu/s_nearbyintf.S +++ b/sysdeps/i386/fpu/s_nearbyintf.S @@ -8,22 +8,17 @@ ENTRY(__nearbyintf) flds 4(%esp) - pushl %eax - cfi_adjust_cfa_offset (4) - pushl %ecx - cfi_adjust_cfa_offset (4) - fnstcw (%esp) - movl (%esp), %eax + subl $32, %esp + cfi_adjust_cfa_offset (32) + fnstenv 4(%esp) + movl 4(%esp), %eax orl $0x20, %eax - movl %eax, 4(%esp) - fldcw 4(%esp) - frndint - fclex + movl %eax, (%esp) fldcw (%esp) - popl %ecx - cfi_adjust_cfa_offset (-4) - popl %eax - cfi_adjust_cfa_offset (-4) + frndint + fldenv 4(%esp) + addl $32, %esp + cfi_adjust_cfa_offset (-32) ret END (__nearbyintf) weak_alias (__nearbyintf, nearbyintf) diff --git a/sysdeps/i386/fpu/s_nearbyintl.S b/sysdeps/i386/fpu/s_nearbyintl.S index 819af63a8d..b260ab5914 100644 --- a/sysdeps/i386/fpu/s_nearbyintl.S +++ b/sysdeps/i386/fpu/s_nearbyintl.S @@ -8,22 +8,20 @@ ENTRY(__nearbyintl) fldt 4(%esp) - pushl %eax - cfi_adjust_cfa_offset (4) - pushl %ecx - cfi_adjust_cfa_offset (4) - fnstcw (%esp) - movl (%esp), %eax + subl $32, %esp + cfi_adjust_cfa_offset (32) + fnstenv 4(%esp) + movl 4(%esp), %eax orl $0x20, %eax - movl %eax, 4(%esp) - fldcw 4(%esp) - frndint - fclex + movl %eax, (%esp) fldcw (%esp) - popl %ecx - cfi_adjust_cfa_offset (-4) - popl %eax - cfi_adjust_cfa_offset (-4) + frndint + fnstsw + andl $0x1, %eax + orl %eax, 8(%esp) + fldenv 4(%esp) + addl $32, %esp + cfi_adjust_cfa_offset (-32) ret END (__nearbyintl) weak_alias (__nearbyintl, nearbyintl) diff --git a/sysdeps/i386/fpu/s_nextafterl.c b/sysdeps/i386/fpu/s_nextafterl.c index 66d903f801..188dc2129a 100644 --- a/sysdeps/i386/fpu/s_nextafterl.c +++ b/sysdeps/i386/fpu/s_nextafterl.c @@ -26,6 +26,7 @@ static char rcsid[] = "$NetBSD: $"; * Special cases: */ +#include <errno.h> #include <math.h> #include <math_private.h> @@ -109,10 +110,12 @@ long double __nextafterl(long double x, long double y) if(esy==0x7fff) { long double u = x + x; /* overflow */ math_force_eval (u); + __set_errno (ERANGE); } if(esy==0) { long double u = x*x; /* underflow */ math_force_eval (u); /* raise underflow flag */ + __set_errno (ERANGE); } SET_LDOUBLE_WORDS(x,esx,hx,lx); return x; diff --git a/sysdeps/i386/fpu/s_nexttoward.c b/sysdeps/i386/fpu/s_nexttoward.c index 74147c4f9e..0b47044760 100644 --- a/sysdeps/i386/fpu/s_nexttoward.c +++ b/sysdeps/i386/fpu/s_nexttoward.c @@ -26,6 +26,7 @@ static char rcsid[] = "$NetBSD: $"; * Special cases: */ +#include <errno.h> #include <math.h> #include <math_private.h> #include <float.h> @@ -73,15 +74,14 @@ double __nexttoward(double x, long double y) } hy = hx&0x7ff00000; if(hy>=0x7ff00000) { - x = x+x; /* overflow */ - if (FLT_EVAL_METHOD != 0 && FLT_EVAL_METHOD != 1) - /* Force conversion to double. */ - asm ("" : "+m"(x)); - return x; + double u = x+x; /* overflow */ + math_force_eval (u); + __set_errno (ERANGE); } if(hy<0x00100000) { double u = x*x; /* underflow */ math_force_eval (u); /* raise underflow flag */ + __set_errno (ERANGE); } INSERT_WORDS(x,hx,lx); return x; diff --git a/sysdeps/i386/fpu/s_nexttowardf.c b/sysdeps/i386/fpu/s_nexttowardf.c index 49651bed6f..e1156d1e4f 100644 --- a/sysdeps/i386/fpu/s_nexttowardf.c +++ b/sysdeps/i386/fpu/s_nexttowardf.c @@ -18,6 +18,7 @@ static char rcsid[] = "$NetBSD: $"; #endif +#include <errno.h> #include <math.h> #include <math_private.h> #include <float.h> @@ -61,15 +62,14 @@ float __nexttowardf(float x, long double y) } hy = hx&0x7f800000; if(hy>=0x7f800000) { - x = x+x; /* overflow */ - if (FLT_EVAL_METHOD != 0) - /* Force conversion to float. */ - asm ("" : "+m"(x)); - return x; + float u = x+x; /* overflow */ + math_force_eval (u); + __set_errno (ERANGE); } if(hy<0x00800000) { float u = x*x; /* underflow */ math_force_eval (u); /* raise underflow flag */ + __set_errno (ERANGE); } SET_FLOAT_WORD(x,hx); return x; diff --git a/sysdeps/i386/fpu/s_scalbn.S b/sysdeps/i386/fpu/s_scalbn.S index cc9d708022..4e90903115 100644 --- a/sysdeps/i386/fpu/s_scalbn.S +++ b/sysdeps/i386/fpu/s_scalbn.S @@ -4,6 +4,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: s_scalbn.S,v 1.4 1995/05/09 00:19:06 jtc Exp $") @@ -12,9 +13,9 @@ ENTRY(__scalbn) fldl 4(%esp) fscale fstp %st(1) + DBL_NARROW_EVAL ret END (__scalbn) -weak_alias (__scalbn, scalbn) strong_alias (__scalbn, __scalbln) #include <shlib-compat.h> diff --git a/sysdeps/i386/fpu/s_scalbnf.S b/sysdeps/i386/fpu/s_scalbnf.S index 0de0694c70..f8353c4c75 100644 --- a/sysdeps/i386/fpu/s_scalbnf.S +++ b/sysdeps/i386/fpu/s_scalbnf.S @@ -4,6 +4,7 @@ */ #include <machine/asm.h> +#include <i386-math-asm.h> RCSID("$NetBSD: s_scalbnf.S,v 1.3 1995/05/09 00:19:59 jtc Exp $") @@ -12,9 +13,9 @@ ENTRY(__scalbnf) flds 4(%esp) fscale fstp %st(1) + FLT_NARROW_EVAL ret END (__scalbnf) -weak_alias (__scalbnf, scalbnf) strong_alias (__scalbnf, __scalblnf) #include <shlib-compat.h> diff --git a/sysdeps/i386/fpu/s_scalbnl.S b/sysdeps/i386/fpu/s_scalbnl.S index 8da0b009e0..839b5ff353 100644 --- a/sysdeps/i386/fpu/s_scalbnl.S +++ b/sysdeps/i386/fpu/s_scalbnl.S @@ -15,7 +15,6 @@ ENTRY(__scalbnl) fstp %st(1) ret END (__scalbnl) -weak_alias (__scalbnl, scalbnl) strong_alias (__scalbnl, __scalblnl) #include <shlib-compat.h> diff --git a/sysdeps/i386/fpu/s_trunc.S b/sysdeps/i386/fpu/s_trunc.S index a42a295281..a15e5e5f16 100644 --- a/sysdeps/i386/fpu/s_trunc.S +++ b/sysdeps/i386/fpu/s_trunc.S @@ -1,5 +1,5 @@ /* Truncate double value. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_truncf.S b/sysdeps/i386/fpu/s_truncf.S index 88ee2a7360..cbf257a949 100644 --- a/sysdeps/i386/fpu/s_truncf.S +++ b/sysdeps/i386/fpu/s_truncf.S @@ -1,5 +1,5 @@ /* Truncate float value. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/fpu/s_truncl.S b/sysdeps/i386/fpu/s_truncl.S index 01006bf8bc..f92b474d49 100644 --- a/sysdeps/i386/fpu/s_truncl.S +++ b/sysdeps/i386/fpu/s_truncl.S @@ -1,5 +1,5 @@ /* Truncate long double value. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/gccframe.h b/sysdeps/i386/gccframe.h index b1a5374a68..1145aee6f9 100644 --- a/sysdeps/i386/gccframe.h +++ b/sysdeps/i386/gccframe.h @@ -1,5 +1,5 @@ /* Definition of object in frame unwind info. i386 version. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/gmp-mparam.h b/sysdeps/i386/gmp-mparam.h index 6a7f116c07..c72b1f9f11 100644 --- a/sysdeps/i386/gmp-mparam.h +++ b/sysdeps/i386/gmp-mparam.h @@ -1,6 +1,6 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright (C) 1991-2015 Free Software Foundation, Inc. +Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. diff --git a/sysdeps/i386/htonl.S b/sysdeps/i386/htonl.S index 698e9762fc..cab81f5cb3 100644 --- a/sysdeps/i386/htonl.S +++ b/sysdeps/i386/htonl.S @@ -1,5 +1,5 @@ -/* Change byte order in word. For Intel 80386. - Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Change byte order in word. For Intel 80x86, x >= 4. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,9 +27,7 @@ .text ENTRY (htonl) movl 4(%esp), %eax - rorw $8, %ax - rorl $16, %eax - rorw $8, %ax + bswap %eax ret END (htonl) diff --git a/sysdeps/i386/htons.S b/sysdeps/i386/htons.S index 982970fe37..0ca108266f 100644 --- a/sysdeps/i386/htons.S +++ b/sysdeps/i386/htons.S @@ -1,5 +1,5 @@ /* Change byte order in word. For Intel 80x86, x >= 3. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S index b86d34d217..94fb95e7ed 100644 --- a/sysdeps/i386/i386-mcount.S +++ b/sysdeps/i386/i386-mcount.S @@ -1,5 +1,5 @@ /* i386-specific implemetation of profiling support. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i486/Versions b/sysdeps/i386/i486/Versions deleted file mode 100644 index b33fa127a4..0000000000 --- a/sysdeps/i386/i486/Versions +++ /dev/null @@ -1,13 +0,0 @@ -libc { - GLIBC_2.1.1 { - # extern inline functions used by <bits/string.h> - __memcpy_by2; __memcpy_by4; __memcpy_g; __mempcpy_by2; __mempcpy_by4; - __mempcpy_byn; __memset_ccn_by2; __memset_ccn_by4; __memset_gcn_by2; - __memset_gcn_by4; __stpcpy_g; __strcat_c; __strcat_g; __strchr_c; - __strchr_g; __strchrnul_c; __strchrnul_g; __strcmp_gg; __strcpy_g; - __strcspn_c1; __strcspn_cg; __strcspn_g; __strlen_g; __strncat_g; - __strncmp_g; __strncpy_by2; __strncpy_by4; __strncpy_byn; __strncpy_gg; - __strpbrk_cg; __strpbrk_g; __strrchr_c; __strrchr_g; __strspn_c1; - __strspn_cg; __strspn_g; __strstr_cg; __strstr_g; - } -} diff --git a/sysdeps/i386/i486/string-inlines.c b/sysdeps/i386/i486/string-inlines.c deleted file mode 100644 index 862a431fb5..0000000000 --- a/sysdeps/i386/i486/string-inlines.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -/* <bits/string.h> and <bits/string2.h> declare some extern inline - functions. These functions are declared additionally here if - inlining is not possible. */ - -#undef __USE_STRING_INLINES -#define __USE_STRING_INLINES -#define _FORCE_INLINES -#define __STRING_INLINE /* empty */ -#define __NO_INLINE__ - -/* This is to avoid PLT entries for the x86 version. */ -#define __memcpy_g __memcpy_g_internal -#define __strchr_g __strchr_g_internal - -#include <string.h> -#undef index -#undef rindex - -#undef __NO_INLINE__ -#include <bits/string.h> -#include <bits/string2.h> - -void * -(__memcpy_c) (void *d, const void *s, size_t n) -{ - return memcpy (d, s, n); -} - -void * -__memset_cc (void *s, unsigned long int pattern, size_t n) -{ - return memset (s, pattern & 0xff, n); -} -strong_alias (__memset_cc, __memset_cg) - -void * -__memset_gg (void *s, char c, size_t n) -{ - return memset (s, c, n); -} - -#ifdef __memcpy_c -# undef __memcpy_g -strong_alias (__memcpy_g_internal, __memcpy_g) -# undef __strchr_g -strong_alias (__strchr_g_internal, __strchr_g) -#endif diff --git a/sysdeps/i386/i586/Implies b/sysdeps/i386/i586/Implies deleted file mode 100644 index 477cd741ce..0000000000 --- a/sysdeps/i386/i586/Implies +++ /dev/null @@ -1,2 +0,0 @@ -# Code optimized for i486 is better than simple i386 code. -i386/i486 diff --git a/sysdeps/i386/i586/add_n.S b/sysdeps/i386/i586/add_n.S index b28a39639a..22e9c41f5c 100644 --- a/sysdeps/i386/i586/add_n.S +++ b/sysdeps/i386/i586/add_n.S @@ -1,6 +1,6 @@ /* Pentium __mpn_add_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i586/addmul_1.S b/sysdeps/i386/i586/addmul_1.S index f1fa2f359f..9ab4d7d94b 100644 --- a/sysdeps/i386/i586/addmul_1.S +++ b/sysdeps/i386/i586/addmul_1.S @@ -1,6 +1,6 @@ /* Pentium __mpn_addmul_1 -- Multiply a limb vector with a limb and add the result to a second limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i586/bzero.S b/sysdeps/i386/i586/bzero.S index 84d2f709c1..2a106719a4 100644 --- a/sysdeps/i386/i586/bzero.S +++ b/sysdeps/i386/i586/bzero.S @@ -1,3 +1,4 @@ +#define USE_AS_BZERO #define memset __bzero #include <sysdeps/i386/i586/memset.S> weak_alias (__bzero, bzero) diff --git a/sysdeps/i386/i486/htonl.S b/sysdeps/i386/i586/init-arch.h index d39bca5725..756c0d7895 100644 --- a/sysdeps/i386/i486/htonl.S +++ b/sysdeps/i386/i586/init-arch.h @@ -1,5 +1,4 @@ -/* Change byte order in word. For Intel 80x86, x >= 4. - Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 2015-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,19 +15,5 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include "asm-syntax.h" - -/* - INPUT PARAMETERS: - word (sp + 4) -*/ - - .text -ENTRY (htonl) - movl 4(%esp), %eax - bswap %eax - ret -END (htonl) - -weak_alias (htonl, ntohl) +#define MINIMUM_ISA 586 +#include <sysdeps/x86/init-arch.h> diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S index 4aa0de936e..66d9233d8a 100644 --- a/sysdeps/i386/i586/lshift.S +++ b/sysdeps/i386/i586/lshift.S @@ -1,5 +1,5 @@ /* Pentium optimized __mpn_lshift -- - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i586/memcopy.h b/sysdeps/i386/i586/memcopy.h index 52e19d861b..78f628b89e 100644 --- a/sysdeps/i386/i586/memcopy.h +++ b/sysdeps/i386/i586/memcopy.h @@ -1,5 +1,5 @@ /* memcopy.h -- definitions for memory copy functions. Pentium version. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). This file is part of the GNU C Library. diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S index 97973658b6..25cf98da09 100644 --- a/sysdeps/i386/i586/memcpy.S +++ b/sysdeps/i386/i586/memcpy.S @@ -1,5 +1,5 @@ /* Highly optimized version for i586. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -20,11 +20,6 @@ #include <sysdep.h> #include "asm-syntax.h" -/* BEWARE: `#ifdef memcpy' means that memcpy is redefined as `mempcpy', - and the return value is the byte after the last one copied in - the destination. */ -#define MEMPCPY_P (defined memcpy) - #define PARMS 4+8 /* space for 2 saved regs */ #define RTN PARMS #define DEST RTN @@ -105,13 +100,13 @@ L(3): movl 28(%edi), %edx /* Correct extra loop counter modification. */ L(2): addl $32, %ecx -#if !MEMPCPY_P +#ifndef USE_AS_MEMPCPY movl DEST(%esp), %eax #endif L(1): rep; movsb -#if MEMPCPY_P +#ifdef USE_AS_MEMPCPY movl %edi, %eax #endif @@ -124,6 +119,6 @@ L(1): rep; movsb ret END (memcpy) -#if !MEMPCPY_P +#ifndef USE_AS_MEMPCPY libc_hidden_builtin_def (memcpy) #endif diff --git a/sysdeps/i386/i586/memcpy_chk.S b/sysdeps/i386/i586/memcpy_chk.S deleted file mode 100644 index ab8a95c9b4..0000000000 --- a/sysdeps/i386/i586/memcpy_chk.S +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/i386/i686/memcpy_chk.S> diff --git a/sysdeps/i386/i586/mempcpy.S b/sysdeps/i386/i586/mempcpy.S index afc112d9d7..720a4c0923 100644 --- a/sysdeps/i386/i586/mempcpy.S +++ b/sysdeps/i386/i586/mempcpy.S @@ -1,3 +1,4 @@ +#define USE_AS_MEMPCPY #define memcpy __mempcpy #define __memcpy_chk __mempcpy_chk #include <sysdeps/i386/i586/memcpy.S> diff --git a/sysdeps/i386/i586/mempcpy_chk.S b/sysdeps/i386/i586/mempcpy_chk.S deleted file mode 100644 index 9a1de1dfe3..0000000000 --- a/sysdeps/i386/i586/mempcpy_chk.S +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/i386/i686/mempcpy_chk.S> diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S index bc26501d10..3590ad1183 100644 --- a/sysdeps/i386/i586/memset.S +++ b/sysdeps/i386/i586/memset.S @@ -1,6 +1,6 @@ /* memset/bzero -- set memory area to CH/0 Highly optimized version for ix86, x>=5. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund, <tege@matematik.su.se> @@ -21,13 +21,10 @@ #include <sysdep.h> #include "asm-syntax.h" -/* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */ -#define BZERO_P (defined memset) - #define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS #define DEST RTN -#if BZERO_P +#ifdef USE_AS_BZERO # define LEN DEST+4 #else # define CHR DEST+4 @@ -35,7 +32,7 @@ #endif .text -#if defined PIC && IS_IN (libc) && !BZERO_P +#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO ENTRY (__memset_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) @@ -50,7 +47,7 @@ ENTRY (memset) movl DEST(%esp), %edi cfi_rel_offset (edi, 0) movl LEN(%esp), %edx -#if BZERO_P +#ifdef USE_AS_BZERO xorl %eax, %eax /* we fill with 0 */ #else movb CHR(%esp), %al @@ -104,7 +101,7 @@ L(2): shrl $2, %ecx /* convert byte count to longword count */ rep stosb -#if !BZERO_P +#ifndef USE_AS_BZERO /* Load result (only if used as memset). */ movl DEST(%esp), %eax /* start address of destination is result */ #endif @@ -112,10 +109,13 @@ L(2): shrl $2, %ecx /* convert byte count to longword count */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) -#if BZERO_P - ret -#else ret -#endif END (memset) libc_hidden_builtin_def (memset) + +#if defined SHARED && IS_IN (libc) && !defined __memset_chk \ + && !defined USE_AS_BZERO +strong_alias (__memset_chk, __memset_zero_constant_len_parameter) + .section .gnu.warning.__memset_zero_constant_len_parameter + .string "memset used with constant zero length parameter; this could be due to transposed parameters" +#endif diff --git a/sysdeps/i386/i586/memset_chk.S b/sysdeps/i386/i586/memset_chk.S deleted file mode 100644 index 09f9d42e0d..0000000000 --- a/sysdeps/i386/i586/memset_chk.S +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/i386/i686/memset_chk.S> diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S index 1e2eafab0a..b7958b5e7e 100644 --- a/sysdeps/i386/i586/mul_1.S +++ b/sysdeps/i386/i586/mul_1.S @@ -1,6 +1,6 @@ /* Pentium __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i586/pthread_spin_trylock.S b/sysdeps/i386/i586/pthread_spin_trylock.S deleted file mode 100644 index 0cf8b3ab70..0000000000 --- a/sysdeps/i386/i586/pthread_spin_trylock.S +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/i386/i486/pthread_spin_trylock.S> diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S index 4037013952..3bb9b49c80 100644 --- a/sysdeps/i386/i586/rshift.S +++ b/sysdeps/i386/i586/rshift.S @@ -1,5 +1,5 @@ /* Pentium optimized __mpn_rshift -- - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S index b6564dd955..497e32133d 100644 --- a/sysdeps/i386/i586/strchr.S +++ b/sysdeps/i386/i586/strchr.S @@ -1,6 +1,6 @@ /* Find character CH in a NUL terminated string. Highly optimized version for ix85, x>=5. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>. diff --git a/sysdeps/i386/i586/strcpy.S b/sysdeps/i386/i586/strcpy.S index 848b8ae322..93ff5ac74d 100644 --- a/sysdeps/i386/i586/strcpy.S +++ b/sysdeps/i386/i586/strcpy.S @@ -1,5 +1,5 @@ /* strcpy/stpcpy implementation for i586. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S index b718120e20..707b6888f9 100644 --- a/sysdeps/i386/i586/strlen.S +++ b/sysdeps/i386/i586/strlen.S @@ -1,6 +1,6 @@ /* strlen -- Compute length of NUL terminated string. Highly optimized version for ix86, x>=5. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>. diff --git a/sysdeps/i386/i586/sub_n.S b/sysdeps/i386/i586/sub_n.S index e7dbb1c373..671abca018 100644 --- a/sysdeps/i386/i586/sub_n.S +++ b/sysdeps/i386/i586/sub_n.S @@ -1,6 +1,6 @@ /* Pentium __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store difference in a third limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i586/submul_1.S b/sysdeps/i386/i586/submul_1.S index d8cbefdaa3..cf9208b3d8 100644 --- a/sysdeps/i386/i586/submul_1.S +++ b/sysdeps/i386/i586/submul_1.S @@ -1,6 +1,6 @@ /* Pentium __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i686/Implies b/sysdeps/i386/i686/Implies deleted file mode 100644 index e1fcccd5f4..0000000000 --- a/sysdeps/i386/i686/Implies +++ /dev/null @@ -1,4 +0,0 @@ -# Due to the reordering and the other nifty extensions in the i686 it is -# not really good to use heavily i586 optimized code on a i686. It's -# better to use i486/i386 code. -i386/i486 diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile index 5ce9fc670a..e3a3201c4b 100644 --- a/sysdeps/i386/i686/Makefile +++ b/sysdeps/i386/i686/Makefile @@ -1,11 +1,6 @@ # So that we can test __m128's alignment stack-align-test-flags += -msse -ifeq ($(subdir),string) -sysdep_routines += cacheinfo -endif - -ifeq (yes,$(config-asflags-i686)) CFLAGS-.o += -Wa,-mtune=i686 CFLAGS-.os += -Wa,-mtune=i686 CFLAGS-.op += -Wa,-mtune=i686 @@ -17,4 +12,3 @@ ASFLAGS-.os += -Wa,-mtune=i686 ASFLAGS-.op += -Wa,-mtune=i686 ASFLAGS-.og += -Wa,-mtune=i686 ASFLAGS-.oS += -Wa,-mtune=i686 -endif diff --git a/sysdeps/i386/i686/add_n.S b/sysdeps/i386/i686/add_n.S index 386d9f3fb5..9c89cc02cc 100644 --- a/sysdeps/i386/i686/add_n.S +++ b/sysdeps/i386/i686/add_n.S @@ -1,6 +1,6 @@ /* Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/i686/bzero.S b/sysdeps/i386/i686/bzero.S index 34b0faa91b..c7898f18e0 100644 --- a/sysdeps/i386/i686/bzero.S +++ b/sysdeps/i386/i686/bzero.S @@ -1,3 +1,4 @@ +#define USE_AS_BZERO #define memset __bzero #include <sysdeps/i386/i686/memset.S> weak_alias (__bzero, bzero) diff --git a/sysdeps/i386/i686/dl-hash.h b/sysdeps/i386/i686/dl-hash.h index 0f94bbea84..8ba85d2a71 100644 --- a/sysdeps/i386/i686/dl-hash.h +++ b/sysdeps/i386/i686/dl-hash.h @@ -1,5 +1,5 @@ /* Compute hash alue for given string according to ELF standard. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/i386/i686/ffs.c b/sysdeps/i386/i686/ffs.c index 70f7de7887..b5da4d4266 100644 --- a/sysdeps/i386/i686/ffs.c +++ b/sysdeps/i386/i686/ffs.c @@ -1,7 +1,7 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Intel 80x86, x>=6. This file is part of the GNU C Library. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@cygnus.com>. The GNU C Library is free software; you can redistribute it and/or @@ -26,8 +26,7 @@ #ifdef __GNUC__ int -__ffs (x) - int x; +__ffs (int x) { int cnt; int tmp; diff --git a/sysdeps/i386/i686/fpu/e_logl.S b/sysdeps/i386/i686/fpu/e_logl.S index 0ccc8fc71e..e9ecbcd472 100644 --- a/sysdeps/i386/i686/fpu/e_logl.S +++ b/sysdeps/i386/i686/fpu/e_logl.S @@ -81,7 +81,13 @@ ENTRY(__logl_finite) fcomip %st(1) // |x-1| : x-1 : x : log(2) fstp %st(0) // x-1 : x : log(2) jc 2b - fstp %st(1) // x-1 : log(2) + fxam + fnstsw + andb $0x45, %ah + cmpb $0x40, %ah + jne 6f + fabs // log(1) is +0 in all rounding modes. +6: fstp %st(1) // x-1 : log(2) fyl2xp1 // log(x) ret END(__logl_finite) diff --git a/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S b/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S index 8ceb172f06..2f679f5d72 100644 --- a/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S +++ b/sysdeps/i386/i686/fpu/multiarch/e_expf-ia32.S @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S index be3b145e0f..caedc1fdb0 100644 --- a/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S +++ b/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S @@ -1,5 +1,5 @@ /* SSE2 version of __ieee754_expf and __expf_finite - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -113,11 +113,12 @@ ENTRY(__ieee754_expf_sse2) mulsd MO2(DP_T,%eax,8), %xmm0 /* DP P(y)*T[j] */ addsd MO2(DP_T,%eax,8), %xmm0 /* DP T[j]*(P(y)+1) */ mulsd %xmm1, %xmm0 /* DP result=2^n*(T[j]*(P(y)+1)) */ + cvtsd2ss %xmm0, %xmm1 - lea -8(%esp), %esp /* Borrow 8 bytes of stack frame */ - movsd %xmm0, 0(%esp) /* Move result from sse... */ - fldl 0(%esp) /* ...to FPU. */ - lea 8(%esp), %esp /* Return back 8 bytes of stack frame */ + lea -4(%esp), %esp /* Borrow 4 bytes of stack frame */ + movss %xmm1, 0(%esp) /* Move result from sse... */ + flds 0(%esp) /* ...to FPU. */ + lea 4(%esp), %esp /* Return back 4 bytes of stack frame */ ret .p2align 4 diff --git a/sysdeps/i386/i686/fpu/multiarch/e_expf.c b/sysdeps/i386/i686/fpu/multiarch/e_expf.c index 5102dae3bb..aebd491967 100644 --- a/sysdeps/i386/i686/fpu/multiarch/e_expf.c +++ b/sysdeps/i386/i686/fpu/multiarch/e_expf.c @@ -1,5 +1,5 @@ /* Multiple versions of expf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,11 +23,15 @@ extern double __ieee754_expf_ia32 (double); double __ieee754_expf (double); libm_ifunc (__ieee754_expf, - HAS_SSE2 ? __ieee754_expf_sse2 : __ieee754_expf_ia32); + HAS_CPU_FEATURE (SSE2) + ? __ieee754_expf_sse2 + : __ieee754_expf_ia32); extern double __expf_finite_sse2 (double); extern double __expf_finite_ia32 (double); double __expf_finite (double); libm_ifunc (__expf_finite, - HAS_SSE2 ? __expf_finite_sse2 : __expf_finite_ia32); + HAS_CPU_FEATURE (SSE2) + ? __expf_finite_sse2 + : __expf_finite_ia32); diff --git a/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps b/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps new file mode 100644 index 0000000000..bbb644a591 --- /dev/null +++ b/sysdeps/i386/i686/fpu/multiarch/libm-test-ulps @@ -0,0 +1,2176 @@ +# Begin of automatic generation + +# Maximal error of functions: +Function: "acos": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "acos_downward": +ildouble: 2 +ldouble: 2 + +Function: "acos_towardzero": +ildouble: 2 +ldouble: 2 + +Function: "acos_upward": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "acosh": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 2 + +Function: "acosh_downward": +double: 1 +idouble: 1 +ildouble: 6 +ldouble: 4 + +Function: "acosh_towardzero": +double: 1 +idouble: 1 +ildouble: 6 +ldouble: 4 + +Function: "acosh_upward": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 3 + +Function: "asin": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_downward": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "asin_towardzero": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "asin_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "asinh": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "asinh_downward": +double: 1 +float: 1 +idouble: 1 +ildouble: 5 +ldouble: 5 + +Function: "asinh_towardzero": +double: 1 +float: 1 +idouble: 1 +ildouble: 4 +ldouble: 4 + +Function: "asinh_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: "atan": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan2": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan2_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan2_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan2_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atan_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "atanh": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "atanh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 4 + +Function: "atanh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 3 + +Function: "atanh_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: "cabs": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "cabs_downward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "cabs_towardzero": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "cabs_upward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cacos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cacos_downward": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Real part of "cacos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cacos_towardzero": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Real part of "cacos_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cacos_upward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: Real part of "cacosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cacosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacosh_downward": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "cacosh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cacosh_towardzero": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "cacosh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cacosh_upward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "cacosh_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "carg": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "carg_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "carg_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "carg_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "casin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "casin_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "casin_downward": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Real part of "casin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "casin_towardzero": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Real part of "casin_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "casin_upward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: Real part of "casinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "casinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casinh_downward": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "casinh_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Real part of "casinh_towardzero": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "casinh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "casinh_upward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "casinh_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "catan_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catan_downward": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "catan_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catan_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "catan_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catan_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Real part of "catanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "catanh_downward": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "catanh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "catanh_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "catanh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "catanh_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "catanh_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cbrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "cbrt_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "cbrt_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "cbrt_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccos_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "ccos_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "ccos_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "ccos_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "ccos_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "ccos_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccosh_downward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "ccosh_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "ccosh_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "ccosh_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "ccosh_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "ccosh_upward": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cexp": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cexp": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cexp_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "cexp_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "cexp_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "cexp_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "cexp_upward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cexp_upward": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Real part of "clog": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "clog": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog10": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "clog10": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "clog10_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 8 +ldouble: 8 + +Function: Imaginary part of "clog10_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "clog10_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 8 +ldouble: 8 + +Function: Imaginary part of "clog10_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "clog10_upward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 7 +ldouble: 7 + +Function: Imaginary part of "clog10_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "clog_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "clog_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "clog_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "clog_upward": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "clog_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "cos": +ildouble: 1 +ldouble: 1 + +Function: "cos_downward": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "cos_towardzero": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "cos_upward": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "cosh": +double: 1 +float: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "cosh_downward": +double: 2 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 3 + +Function: "cosh_towardzero": +double: 2 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "cosh_upward": +double: 4 +float: 2 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 3 + +Function: Real part of "cpow": +double: 2 +float: 5 +idouble: 2 +ifloat: 5 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "cpow": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: Real part of "cpow_downward": +double: 5 +float: 8 +idouble: 5 +ifloat: 8 +ildouble: 7 +ldouble: 7 + +Function: Imaginary part of "cpow_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Real part of "cpow_towardzero": +double: 5 +float: 8 +idouble: 5 +ifloat: 8 +ildouble: 7 +ldouble: 7 + +Function: Imaginary part of "cpow_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cpow_upward": +double: 4 +float: 1 +idouble: 4 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cpow_upward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csin": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "csin_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "csin_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "csin_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "csin_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "csin_upward": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "csin_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Real part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "csinh_downward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "csinh_downward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "csinh_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "csinh_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: Real part of "csinh_upward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "csinh_upward": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Real part of "csqrt": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csqrt_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "csqrt_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "csqrt_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "csqrt_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "csqrt_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "csqrt_upward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ctan_downward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "ctan_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: Real part of "ctan_towardzero": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "ctan_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "ctan_upward": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "ctan_upward": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "ctanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ctanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "ctanh_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "ctanh_downward": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Real part of "ctanh_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: Imaginary part of "ctanh_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Real part of "ctanh_upward": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: Imaginary part of "ctanh_upward": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "erf": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "erf_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "erf_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "erf_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "erfc": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "erfc_downward": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "erfc_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: "erfc_upward": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: "exp": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp10": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp10_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp10_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp10_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp2": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp2_downward": +ildouble: 1 +ldouble: 1 + +Function: "exp2_towardzero": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp2_upward": +ildouble: 1 +ldouble: 1 + +Function: "exp_downward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "exp_towardzero": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "exp_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "expm1": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "expm1_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "expm1_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "expm1_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "gamma": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "gamma_downward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 7 +ldouble: 7 + +Function: "gamma_towardzero": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 7 +ldouble: 7 + +Function: "gamma_upward": +double: 3 +float: 4 +idouble: 3 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: "hypot": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "hypot_downward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "hypot_towardzero": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "hypot_upward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "j0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "j0_downward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: "j0_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: "j0_upward": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "j1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "j1_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 4 +ldouble: 4 + +Function: "j1_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "j1_upward": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 3 +ldouble: 3 + +Function: "jn": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "jn_downward": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "jn_towardzero": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: "jn_upward": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: "lgamma": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "lgamma_downward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 7 +ldouble: 7 + +Function: "lgamma_towardzero": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 7 +ldouble: 7 + +Function: "lgamma_upward": +double: 3 +float: 4 +idouble: 3 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: "log": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "log10": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "log10_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "log10_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "log10_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log1p": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "log1p_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "log1p_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 4 + +Function: "log1p_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "log2": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2_downward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log_downward": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "log_towardzero": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "log_upward": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow10": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow10_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "pow10_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "pow10_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "pow_downward": +double: 1 +idouble: 1 +ildouble: 4 +ldouble: 4 + +Function: "pow_towardzero": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "pow_upward": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "sin": +ildouble: 1 +ldouble: 1 + +Function: "sin_downward": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "sin_towardzero": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "sin_upward": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "sincos": +ildouble: 1 +ldouble: 1 + +Function: "sincos_downward": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "sincos_towardzero": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 + +Function: "sincos_upward": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "sinh": +double: 1 +ildouble: 2 +ldouble: 2 + +Function: "sinh_downward": +double: 2 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 5 + +Function: "sinh_towardzero": +double: 2 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 4 + +Function: "sinh_upward": +double: 4 +float: 2 +idouble: 1 +ifloat: 1 +ildouble: 4 +ldouble: 5 + +Function: "tan": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "tan_downward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "tan_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "tan_upward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "tanh": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 + +Function: "tanh_downward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 7 +ldouble: 4 + +Function: "tanh_towardzero": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 3 +ldouble: 3 + +Function: "tanh_upward": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 5 +ldouble: 4 + +Function: "tgamma": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: "tgamma_downward": +double: 3 +float: 4 +idouble: 3 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: "tgamma_towardzero": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: "tgamma_upward": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 +ildouble: 5 +ldouble: 5 + +Function: "y0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "y0_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +Function: "y0_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +Function: "y0_upward": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "y1": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "y1_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 7 +ldouble: 7 + +Function: "y1_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +Function: "y1_upward": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 7 +ldouble: 7 + +Function: "yn": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +Function: "yn_downward": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +Function: "yn_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 5 +ldouble: 5 + +Function: "yn_upward": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 +ildouble: 4 +ldouble: 4 + +# end of automatic generation diff --git a/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S index 0f99edc9e3..66c247e9d0 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S +++ b/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S @@ -1,5 +1,5 @@ /* Optimized with sse2 version of cosf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/fpu/multiarch/s_cosf.c b/sysdeps/i386/i686/fpu/multiarch/s_cosf.c index 0799dca3ef..f46695a2e7 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_cosf.c +++ b/sysdeps/i386/i686/fpu/multiarch/s_cosf.c @@ -1,5 +1,5 @@ /* Multiple versions of cosf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ extern float __cosf_sse2 (float); extern float __cosf_ia32 (float); float __cosf (float); -libm_ifunc (__cosf, HAS_SSE2 ? __cosf_sse2 : __cosf_ia32); +libm_ifunc (__cosf, HAS_CPU_FEATURE (SSE2) ? __cosf_sse2 : __cosf_ia32); weak_alias (__cosf, cosf); #define COSF __cosf_ia32 diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S index f9aa221d9e..93c6dd65b4 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S +++ b/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S @@ -1,5 +1,5 @@ /* Optimized with sse2 version of sincosf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c b/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c index 384d84470f..7338793e9c 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c +++ b/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c @@ -1,5 +1,5 @@ /* Multiple versions of sincosf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,8 @@ extern void __sincosf_sse2 (float, float *, float *); extern void __sincosf_ia32 (float, float *, float *); void __sincosf (float, float *, float *); -libm_ifunc (__sincosf, HAS_SSE2 ? __sincosf_sse2 : __sincosf_ia32); +libm_ifunc (__sincosf, + HAS_CPU_FEATURE (SSE2) ? __sincosf_sse2 : __sincosf_ia32); weak_alias (__sincosf, sincosf); #define SINCOSF __sincosf_ia32 diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S index 1731e4d7be..fbcce73d03 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S +++ b/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S @@ -1,5 +1,5 @@ /* Optimized with sse2 version of sinf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sinf.c b/sysdeps/i386/i686/fpu/multiarch/s_sinf.c index 6b627720cf..4d1d2f41f1 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_sinf.c +++ b/sysdeps/i386/i686/fpu/multiarch/s_sinf.c @@ -1,5 +1,5 @@ /* Multiple versions of sinf - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ extern float __sinf_sse2 (float); extern float __sinf_ia32 (float); float __sinf (float); -libm_ifunc (__sinf, HAS_SSE2 ? __sinf_sse2 : __sinf_ia32); +libm_ifunc (__sinf, HAS_CPU_FEATURE (SSE2) ? __sinf_sse2 : __sinf_ia32); weak_alias (__sinf, sinf); #define SINF __sinf_ia32 #include <sysdeps/ieee754/flt-32/s_sinf.c> diff --git a/sysdeps/i386/i686/fpu/s_fdim.S b/sysdeps/i386/i686/fpu/s_fdim.S index 16fd54476a..2cbf815f98 100644 --- a/sysdeps/i386/i686/fpu/s_fdim.S +++ b/sysdeps/i386/i686/fpu/s_fdim.S @@ -1,5 +1,5 @@ /* Compute positive difference. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fdimf.S b/sysdeps/i386/i686/fpu/s_fdimf.S index e3a69f142c..291433f275 100644 --- a/sysdeps/i386/i686/fpu/s_fdimf.S +++ b/sysdeps/i386/i686/fpu/s_fdimf.S @@ -1,5 +1,5 @@ /* Compute positive difference. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fdiml.S b/sysdeps/i386/i686/fpu/s_fdiml.S index f160f0d19e..8cdfedef0a 100644 --- a/sysdeps/i386/i686/fpu/s_fdiml.S +++ b/sysdeps/i386/i686/fpu/s_fdiml.S @@ -1,5 +1,5 @@ /* Compute positive difference. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fmax.S b/sysdeps/i386/i686/fpu/s_fmax.S index 898ecda44b..71be4a5db1 100644 --- a/sysdeps/i386/i686/fpu/s_fmax.S +++ b/sysdeps/i386/i686/fpu/s_fmax.S @@ -1,5 +1,5 @@ /* Compute maximum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fmaxf.S b/sysdeps/i386/i686/fpu/s_fmaxf.S index 8e6808c56e..8fa796a8a3 100644 --- a/sysdeps/i386/i686/fpu/s_fmaxf.S +++ b/sysdeps/i386/i686/fpu/s_fmaxf.S @@ -1,5 +1,5 @@ /* Compute maximum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fmaxl.S b/sysdeps/i386/i686/fpu/s_fmaxl.S index 346a379334..e5dcd26923 100644 --- a/sysdeps/i386/i686/fpu/s_fmaxl.S +++ b/sysdeps/i386/i686/fpu/s_fmaxl.S @@ -1,5 +1,5 @@ /* Compute maximum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fmin.S b/sysdeps/i386/i686/fpu/s_fmin.S index d788324429..9c8f5af050 100644 --- a/sysdeps/i386/i686/fpu/s_fmin.S +++ b/sysdeps/i386/i686/fpu/s_fmin.S @@ -1,5 +1,5 @@ /* Compute minimum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fminf.S b/sysdeps/i386/i686/fpu/s_fminf.S index 5cb84925c3..b071915399 100644 --- a/sysdeps/i386/i686/fpu/s_fminf.S +++ b/sysdeps/i386/i686/fpu/s_fminf.S @@ -1,5 +1,5 @@ /* Compute minimum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/fpu/s_fminl.S b/sysdeps/i386/i686/fpu/s_fminl.S index 91851a138b..ddbd81115e 100644 --- a/sysdeps/i386/i686/fpu/s_fminl.S +++ b/sysdeps/i386/i686/fpu/s_fminl.S @@ -1,5 +1,5 @@ /* Compute minimum of two numbers, regarding NaN as missing argument. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h index 49a4c19e11..58e53c395f 100644 --- a/sysdeps/i386/i686/hp-timing.h +++ b/sysdeps/i386/i686/hp-timing.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. i686 version. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/i386/i686/init-arch.h b/sysdeps/i386/i686/init-arch.h new file mode 100644 index 0000000000..36c83738d8 --- /dev/null +++ b/sysdeps/i386/i686/init-arch.h @@ -0,0 +1,19 @@ +/* Copyright (C) 2015-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define MINIMUM_ISA 686 +#include <sysdeps/x86/init-arch.h> diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S index b6e375b95f..1dbeadffc3 100644 --- a/sysdeps/i386/i686/memcmp.S +++ b/sysdeps/i386/i686/memcmp.S @@ -1,5 +1,5 @@ /* Compare two memory blocks for differences in the first COUNT bytes. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S index f9f3df73e9..7346b3f16f 100644 --- a/sysdeps/i386/i686/memcpy.S +++ b/sysdeps/i386/i686/memcpy.S @@ -1,7 +1,7 @@ /* Copy memory block and return pointer to beginning of destination block For Intel 80x86, x>=6. This file is part of the GNU C Library. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S index d994b7213a..3b2e34628a 100644 --- a/sysdeps/i386/i686/memmove.S +++ b/sysdeps/i386/i686/memmove.S @@ -1,7 +1,7 @@ /* Copy memory block and return pointer to beginning of destination block For Intel 80x86, x>=6. This file is part of the GNU C Library. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2003. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S index f3a244ac31..9661ce30d6 100644 --- a/sysdeps/i386/i686/mempcpy.S +++ b/sysdeps/i386/i686/mempcpy.S @@ -1,7 +1,7 @@ /* Copy memory block and return pointer to following byte. For Intel 80x86, x>=6. This file is part of the GNU C Library. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S index b6dbf2a56d..9d1c1739f8 100644 --- a/sysdeps/i386/i686/memset.S +++ b/sysdeps/i386/i686/memset.S @@ -1,6 +1,6 @@ /* memset/bzero -- set memory area to CH/0 Highly optimized version for ix86, x>=6. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. @@ -21,11 +21,8 @@ #include <sysdep.h> #include "asm-syntax.h" -/* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */ -#define BZERO_P (defined memset) - #define PARMS 4+4 /* space for 1 saved reg */ -#if BZERO_P +#ifdef USE_AS_BZERO # define DEST PARMS # define LEN DEST+4 #else @@ -36,7 +33,7 @@ #endif .text -#if defined PIC && IS_IN (libc) && !BZERO_P +#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO ENTRY_CHK (__memset_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) @@ -50,7 +47,7 @@ ENTRY (memset) cfi_adjust_cfa_offset (4) movl DEST(%esp), %edx movl LEN(%esp), %ecx -#if BZERO_P +#ifdef USE_AS_BZERO xorl %eax, %eax /* fill with 0 */ #else movzbl CHR(%esp), %eax @@ -74,7 +71,7 @@ ENTRY (memset) 2: movl %ecx, %edx shrl $2, %ecx andl $3, %edx -#if !BZERO_P +#ifndef USE_AS_BZERO imul $0x01010101, %eax #endif rep @@ -84,22 +81,19 @@ ENTRY (memset) stosb 1: -#if !BZERO_P +#ifndef USE_AS_BZERO movl DEST(%esp), %eax /* start address of destination is result */ #endif popl %edi cfi_adjust_cfa_offset (-4) cfi_restore (edi) -#if BZERO_P - ret -#else ret -#endif END (memset) libc_hidden_builtin_def (memset) -#if defined PIC && IS_IN (libc) && !BZERO_P +#if defined SHARED && IS_IN (libc) && !defined __memset_chk \ + && !defined USE_AS_BZERO strong_alias (__memset_chk, __memset_zero_constant_len_parameter) .section .gnu.warning.__memset_zero_constant_len_parameter .string "memset used with constant zero length parameter; this could be due to transposed parameters" diff --git a/sysdeps/i386/i686/memusage.h b/sysdeps/i386/i686/memusage.h index 042f704f38..72e5d9cd67 100644 --- a/sysdeps/i386/i686/memusage.h +++ b/sysdeps/i386/i686/memusage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile index 11ce4ba1e3..700010d969 100644 --- a/sysdeps/i386/i686/multiarch/Makefile +++ b/sysdeps/i386/i686/multiarch/Makefile @@ -1,5 +1,4 @@ ifeq ($(subdir),csu) -aux += init-arch tests += test-multiarch gen-as-const-headers += ifunc-defines.sym endif @@ -25,15 +24,13 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \ strncase_l-c strncase-c strncase_l-ssse3 \ strcasecmp_l-sse4 strncase_l-sse4 \ bcopy-sse2-unaligned memcpy-sse2-unaligned \ - mempcpy-sse2-unaligned memmove-sse2-unaligned -ifeq (yes,$(config-cflags-sse4)) -sysdep_routines += strcspn-c strpbrk-c strspn-c + mempcpy-sse2-unaligned memmove-sse2-unaligned \ + strcspn-c strpbrk-c strspn-c CFLAGS-varshift.c += -msse4 CFLAGS-strcspn-c.c += -msse4 CFLAGS-strpbrk-c.c += -msse4 CFLAGS-strspn-c.c += -msse4 endif -endif ifeq ($(subdir),wcsmbs) sysdep_routines += wcscmp-sse2 wcscmp-c wcslen-sse2 wcslen-c \ @@ -41,7 +38,7 @@ sysdep_routines += wcscmp-sse2 wcscmp-c wcslen-sse2 wcslen-c \ wcschr-c wcsrchr-sse2 wcsrchr-c wcscpy-ssse3 wcscpy-c endif -ifeq (mathyes,$(subdir)$(config-cflags-avx)) +ifeq ($(subdir),math) libm-sysdep_routines += s_fma-fma s_fmaf-fma CFLAGS-s_fma-fma.c += -mavx -mfpmath=sse CFLAGS-s_fmaf-fma.c += -mavx -mfpmath=sse diff --git a/sysdeps/i386/i686/multiarch/Versions b/sysdeps/i386/i686/multiarch/Versions deleted file mode 100644 index 59b185ac8d..0000000000 --- a/sysdeps/i386/i686/multiarch/Versions +++ /dev/null @@ -1,5 +0,0 @@ -libc { - GLIBC_PRIVATE { - __get_cpu_features; - } -} diff --git a/sysdeps/i386/i686/multiarch/bcopy.S b/sysdeps/i386/i686/multiarch/bcopy.S index e767d97019..d5b408dfb8 100644 --- a/sysdeps/i386/i686/multiarch/bcopy.S +++ b/sysdeps/i386/i686/multiarch/bcopy.S @@ -1,6 +1,6 @@ /* Multiple versions of bcopy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,51 +23,24 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(bcopy) .type bcopy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __bcopy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__bcopy_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __bcopy_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__bcopy_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __bcopy_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__bcopy_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __bcopy_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(bcopy) -# else - .text -ENTRY(bcopy) - .type bcopy, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __bcopy_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __bcopy_ssse3, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __bcopy_ssse3_rep, %eax + LOAD_FUNC_GOT_EAX (__bcopy_ssse3_rep) 2: ret END(bcopy) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/bzero.S b/sysdeps/i386/i686/multiarch/bzero.S index e8dc85fc9f..3bad4178eb 100644 --- a/sysdeps/i386/i686/multiarch/bzero.S +++ b/sysdeps/i386/i686/multiarch/bzero.S @@ -1,6 +1,6 @@ /* Multiple versions of bzero All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,46 +23,19 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(__bzero) - .type __bzero, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __bzero_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __bzero_sse2@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __bzero_sse2_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__bzero) -# else .text ENTRY(__bzero) .type __bzero, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __bzero_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__bzero_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __bzero_sse2, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features + LOAD_FUNC_GOT_EAX ( __bzero_sse2) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __bzero_sse2_rep, %eax + LOAD_FUNC_GOT_EAX (__bzero_sse2_rep) 2: ret END(__bzero) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/ifunc-defines.sym b/sysdeps/i386/i686/multiarch/ifunc-defines.sym index eb1538abcc..96e9cfaf61 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-defines.sym +++ b/sysdeps/i386/i686/multiarch/ifunc-defines.sym @@ -4,7 +4,6 @@ -- CPU_FEATURES_SIZE sizeof (struct cpu_features) -KIND_OFFSET offsetof (struct cpu_features, kind) CPUID_OFFSET offsetof (struct cpu_features, cpuid) CPUID_SIZE sizeof (struct cpuid_registers) CPUID_EAX_OFFSET offsetof (struct cpuid_registers, eax) diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c index 92366a7b46..ef30a95432 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c +++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c @@ -1,5 +1,5 @@ /* Enumerate available IFUNC implementations of a function. i686 version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,152 +38,179 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/i386/i686/multiarch/bcopy.S. */ IFUNC_IMPL (i, name, bcopy, - IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, bcopy, HAS_CPU_FEATURE (SSSE3), __bcopy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSSE3, __bcopy_ssse3) - IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, bcopy, HAS_CPU_FEATURE (SSSE3), + __bcopy_ssse3) + IFUNC_IMPL_ADD (array, i, bcopy, HAS_CPU_FEATURE (SSE2), __bcopy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, bcopy, 1, __bcopy_ia32)) /* Support sysdeps/i386/i686/multiarch/bzero.S. */ IFUNC_IMPL (i, name, bzero, - IFUNC_IMPL_ADD (array, i, bzero, HAS_SSE2, __bzero_sse2_rep) - IFUNC_IMPL_ADD (array, i, bzero, HAS_SSE2, __bzero_sse2) + IFUNC_IMPL_ADD (array, i, bzero, HAS_CPU_FEATURE (SSE2), + __bzero_sse2_rep) + IFUNC_IMPL_ADD (array, i, bzero, HAS_CPU_FEATURE (SSE2), + __bzero_sse2) IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ia32)) /* Support sysdeps/i386/i686/multiarch/memchr.S. */ IFUNC_IMPL (i, name, memchr, - IFUNC_IMPL_ADD (array, i, memchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memchr, HAS_CPU_FEATURE (SSE2), __memchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, memchr, HAS_SSE2, __memchr_sse2) + IFUNC_IMPL_ADD (array, i, memchr, HAS_CPU_FEATURE (SSE2), + __memchr_sse2) IFUNC_IMPL_ADD (array, i, memchr, 1, __memchr_ia32)) /* Support sysdeps/i386/i686/multiarch/memcmp.S. */ IFUNC_IMPL (i, name, memcmp, - IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSE4_2), __memcmp_sse4_2) - IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSSE3, __memcmp_ssse3) + IFUNC_IMPL_ADD (array, i, memcmp, HAS_CPU_FEATURE (SSSE3), + __memcmp_ssse3) IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_ia32)) /* Support sysdeps/i386/i686/multiarch/memmove_chk.S. */ IFUNC_IMPL (i, name, __memmove_chk, - IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memmove_chk, + HAS_CPU_FEATURE (SSSE3), __memmove_chk_ssse3_rep) - IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memmove_chk, + HAS_CPU_FEATURE (SSSE3), __memmove_chk_ssse3) - IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memmove_chk, + HAS_CPU_FEATURE (SSE2), __memmove_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __memmove_chk, 1, __memmove_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/memmove.S. */ IFUNC_IMPL (i, name, memmove, - IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), __memmove_ssse3_rep) - IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSSE3), __memmove_ssse3) - IFUNC_IMPL_ADD (array, i, memmove, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memmove, HAS_CPU_FEATURE (SSE2), __memmove_sse2_unaligned) IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_ia32)) /* Support sysdeps/i386/i686/multiarch/memrchr.S. */ IFUNC_IMPL (i, name, memrchr, - IFUNC_IMPL_ADD (array, i, memrchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memrchr, HAS_CPU_FEATURE (SSE2), __memrchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, memrchr, HAS_SSE2, __memrchr_sse2) + IFUNC_IMPL_ADD (array, i, memrchr, HAS_CPU_FEATURE (SSE2), + __memrchr_sse2) IFUNC_IMPL_ADD (array, i, memrchr, 1, __memrchr_ia32)) /* Support sysdeps/i386/i686/multiarch/memset_chk.S. */ IFUNC_IMPL (i, name, __memset_chk, - IFUNC_IMPL_ADD (array, i, __memset_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memset_chk, + HAS_CPU_FEATURE (SSE2), __memset_chk_sse2_rep) - IFUNC_IMPL_ADD (array, i, __memset_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memset_chk, + HAS_CPU_FEATURE (SSE2), __memset_chk_sse2) IFUNC_IMPL_ADD (array, i, __memset_chk, 1, __memset_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/memset.S. */ IFUNC_IMPL (i, name, memset, - IFUNC_IMPL_ADD (array, i, memset, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memset, HAS_CPU_FEATURE (SSE2), __memset_sse2_rep) - IFUNC_IMPL_ADD (array, i, memset, HAS_SSE2, __memset_sse2) + IFUNC_IMPL_ADD (array, i, memset, HAS_CPU_FEATURE (SSE2), + __memset_sse2) IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ia32)) /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */ IFUNC_IMPL (i, name, rawmemchr, - IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_CPU_FEATURE (SSE2), __rawmemchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_CPU_FEATURE (SSE2), __rawmemchr_sse2) IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_ia32)) /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */ IFUNC_IMPL (i, name, stpncpy, - IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, stpncpy, HAS_CPU_FEATURE (SSSE3), __stpncpy_ssse3) - IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSE2, __stpncpy_sse2) + IFUNC_IMPL_ADD (array, i, stpncpy, HAS_CPU_FEATURE (SSE2), + __stpncpy_sse2) IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_ia32)) /* Support sysdeps/i386/i686/multiarch/stpcpy.S. */ IFUNC_IMPL (i, name, stpcpy, - IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSSE3, __stpcpy_ssse3) - IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSE2, __stpcpy_sse2) + IFUNC_IMPL_ADD (array, i, stpcpy, HAS_CPU_FEATURE (SSSE3), + __stpcpy_ssse3) + IFUNC_IMPL_ADD (array, i, stpcpy, HAS_CPU_FEATURE (SSE2), + __stpcpy_sse2) IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */ IFUNC_IMPL (i, name, strcasecmp, - IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcasecmp, + HAS_CPU_FEATURE (SSE4_2), __strcasecmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strcasecmp, + HAS_CPU_FEATURE (SSSE3), __strcasecmp_ssse3) IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_ia32)) /* Support sysdeps/i386/i686/multiarch/strcasecmp_l.S. */ IFUNC_IMPL (i, name, strcasecmp_l, - IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcasecmp_l, + HAS_CPU_FEATURE (SSE4_2), __strcasecmp_l_sse4_2) - IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strcasecmp_l, + HAS_CPU_FEATURE (SSSE3), __strcasecmp_l_ssse3) IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1, __strcasecmp_l_ia32)) /* Support sysdeps/i386/i686/multiarch/strcat.S. */ IFUNC_IMPL (i, name, strcat, - IFUNC_IMPL_ADD (array, i, strcat, HAS_SSSE3, __strcat_ssse3) - IFUNC_IMPL_ADD (array, i, strcat, HAS_SSE2, __strcat_sse2) + IFUNC_IMPL_ADD (array, i, strcat, HAS_CPU_FEATURE (SSSE3), + __strcat_ssse3) + IFUNC_IMPL_ADD (array, i, strcat, HAS_CPU_FEATURE (SSE2), + __strcat_sse2) IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_ia32)) /* Support sysdeps/i386/i686/multiarch/strchr.S. */ IFUNC_IMPL (i, name, strchr, - IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, strchr, HAS_CPU_FEATURE (SSE2), __strchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE2, __strchr_sse2) + IFUNC_IMPL_ADD (array, i, strchr, HAS_CPU_FEATURE (SSE2), + __strchr_sse2) IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_ia32)) /* Support sysdeps/i386/i686/multiarch/strcmp.S. */ IFUNC_IMPL (i, name, strcmp, - IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSE4_2), __strcmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSSE3, __strcmp_ssse3) + IFUNC_IMPL_ADD (array, i, strcmp, HAS_CPU_FEATURE (SSSE3), + __strcmp_ssse3) IFUNC_IMPL_ADD (array, i, strcmp, 1, __strcmp_ia32)) /* Support sysdeps/i386/i686/multiarch/strcpy.S. */ IFUNC_IMPL (i, name, strcpy, - IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSSE3, __strcpy_ssse3) - IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSE2, __strcpy_sse2) + IFUNC_IMPL_ADD (array, i, strcpy, HAS_CPU_FEATURE (SSSE3), + __strcpy_ssse3) + IFUNC_IMPL_ADD (array, i, strcpy, HAS_CPU_FEATURE (SSE2), + __strcpy_sse2) IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strcspn.S. */ IFUNC_IMPL (i, name, strcspn, - IFUNC_IMPL_ADD (array, i, strcspn, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strcspn, HAS_CPU_FEATURE (SSE4_2), __strcspn_sse42) IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_ia32)) /* Support sysdeps/i386/i686/multiarch/strncase.S. */ IFUNC_IMPL (i, name, strncasecmp, - IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strncasecmp, + HAS_CPU_FEATURE (SSE4_2), __strncasecmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncasecmp, + HAS_CPU_FEATURE (SSSE3), __strncasecmp_ssse3) IFUNC_IMPL_ADD (array, i, strncasecmp, 1, __strncasecmp_ia32)) @@ -191,136 +218,156 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/i386/i686/multiarch/strncase_l.S. */ IFUNC_IMPL (i, name, strncasecmp_l, IFUNC_IMPL_ADD (array, i, strncasecmp_l, - HAS_SSE4_2, __strncasecmp_l_sse4_2) + HAS_CPU_FEATURE (SSE4_2), + __strncasecmp_l_sse4_2) IFUNC_IMPL_ADD (array, i, strncasecmp_l, - HAS_SSSE3, __strncasecmp_l_ssse3) + HAS_CPU_FEATURE (SSSE3), + __strncasecmp_l_ssse3) IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, __strncasecmp_l_ia32)) /* Support sysdeps/i386/i686/multiarch/strncat.S. */ IFUNC_IMPL (i, name, strncat, - IFUNC_IMPL_ADD (array, i, strncat, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncat, HAS_CPU_FEATURE (SSSE3), __strncat_ssse3) - IFUNC_IMPL_ADD (array, i, strncat, HAS_SSE2, __strncat_sse2) + IFUNC_IMPL_ADD (array, i, strncat, HAS_CPU_FEATURE (SSE2), + __strncat_sse2) IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_ia32)) /* Support sysdeps/i386/i686/multiarch/strncpy.S. */ IFUNC_IMPL (i, name, strncpy, - IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncpy, HAS_CPU_FEATURE (SSSE3), __strncpy_ssse3) - IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSE2, __strncpy_sse2) + IFUNC_IMPL_ADD (array, i, strncpy, HAS_CPU_FEATURE (SSE2), + __strncpy_sse2) IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strnlen.S. */ IFUNC_IMPL (i, name, strnlen, - IFUNC_IMPL_ADD (array, i, strnlen, HAS_SSE2, __strnlen_sse2) + IFUNC_IMPL_ADD (array, i, strnlen, HAS_CPU_FEATURE (SSE2), + __strnlen_sse2) IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_ia32)) /* Support sysdeps/i386/i686/multiarch/strpbrk.S. */ IFUNC_IMPL (i, name, strpbrk, - IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strpbrk, HAS_CPU_FEATURE (SSE4_2), __strpbrk_sse42) IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_ia32)) /* Support sysdeps/i386/i686/multiarch/strrchr.S. */ IFUNC_IMPL (i, name, strrchr, - IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, strrchr, HAS_CPU_FEATURE (SSE2), __strrchr_sse2_bsf) - IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE2, __strrchr_sse2) + IFUNC_IMPL_ADD (array, i, strrchr, HAS_CPU_FEATURE (SSE2), + __strrchr_sse2) IFUNC_IMPL_ADD (array, i, strrchr, 1, __strrchr_ia32)) /* Support sysdeps/i386/i686/multiarch/strspn.S. */ IFUNC_IMPL (i, name, strspn, - IFUNC_IMPL_ADD (array, i, strspn, HAS_SSE4_2, __strspn_sse42) + IFUNC_IMPL_ADD (array, i, strspn, HAS_CPU_FEATURE (SSE4_2), + __strspn_sse42) IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_ia32)) /* Support sysdeps/i386/i686/multiarch/wcschr.S. */ IFUNC_IMPL (i, name, wcschr, - IFUNC_IMPL_ADD (array, i, wcschr, HAS_SSE2, __wcschr_sse2) + IFUNC_IMPL_ADD (array, i, wcschr, HAS_CPU_FEATURE (SSE2), + __wcschr_sse2) IFUNC_IMPL_ADD (array, i, wcschr, 1, __wcschr_ia32)) /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */ IFUNC_IMPL (i, name, wcscmp, - IFUNC_IMPL_ADD (array, i, wcscmp, HAS_SSE2, __wcscmp_sse2) + IFUNC_IMPL_ADD (array, i, wcscmp, HAS_CPU_FEATURE (SSE2), + __wcscmp_sse2) IFUNC_IMPL_ADD (array, i, wcscmp, 1, __wcscmp_ia32)) /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */ IFUNC_IMPL (i, name, wcscpy, - IFUNC_IMPL_ADD (array, i, wcscpy, HAS_SSSE3, __wcscpy_ssse3) + IFUNC_IMPL_ADD (array, i, wcscpy, HAS_CPU_FEATURE (SSSE3), + __wcscpy_ssse3) IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_ia32)) /* Support sysdeps/i386/i686/multiarch/wcslen.S. */ IFUNC_IMPL (i, name, wcslen, - IFUNC_IMPL_ADD (array, i, wcslen, HAS_SSE2, __wcslen_sse2) + IFUNC_IMPL_ADD (array, i, wcslen, HAS_CPU_FEATURE (SSE2), + __wcslen_sse2) IFUNC_IMPL_ADD (array, i, wcslen, 1, __wcslen_ia32)) /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */ IFUNC_IMPL (i, name, wcsrchr, - IFUNC_IMPL_ADD (array, i, wcsrchr, HAS_SSE2, __wcsrchr_sse2) + IFUNC_IMPL_ADD (array, i, wcsrchr, HAS_CPU_FEATURE (SSE2), + __wcsrchr_sse2) IFUNC_IMPL_ADD (array, i, wcsrchr, 1, __wcsrchr_ia32)) /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */ IFUNC_IMPL (i, name, wmemcmp, - IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSE4_2), __wmemcmp_sse4_2) - IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_CPU_FEATURE (SSSE3), __wmemcmp_ssse3) IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_ia32)) #ifdef SHARED /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */ IFUNC_IMPL (i, name, __memcpy_chk, - IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memcpy_chk, + HAS_CPU_FEATURE (SSSE3), __memcpy_chk_ssse3_rep) - IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __memcpy_chk, + HAS_CPU_FEATURE (SSSE3), __memcpy_chk_ssse3) - IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __memcpy_chk, + HAS_CPU_FEATURE (SSE2), __memcpy_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __memcpy_chk, 1, __memcpy_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/memcpy.S. */ IFUNC_IMPL (i, name, memcpy, - IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), __memcpy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3, __memcpy_ssse3) - IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSSE3), + __memcpy_ssse3) + IFUNC_IMPL_ADD (array, i, memcpy, HAS_CPU_FEATURE (SSE2), __memcpy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */ IFUNC_IMPL (i, name, __mempcpy_chk, - IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __mempcpy_chk, + HAS_CPU_FEATURE (SSSE3), __mempcpy_chk_ssse3_rep) - IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, __mempcpy_chk, + HAS_CPU_FEATURE (SSSE3), __mempcpy_chk_ssse3) - IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, __mempcpy_chk, + HAS_CPU_FEATURE (SSE2), __mempcpy_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __mempcpy_chk, 1, __mempcpy_chk_ia32)) /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */ IFUNC_IMPL (i, name, mempcpy, - IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), __mempcpy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSSE3), __mempcpy_ssse3) - IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, mempcpy, HAS_CPU_FEATURE (SSE2), __mempcpy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_ia32)) /* Support sysdeps/i386/i686/multiarch/strlen.S. */ IFUNC_IMPL (i, name, strlen, - IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE2, + IFUNC_IMPL_ADD (array, i, strlen, HAS_CPU_FEATURE (SSE2), __strlen_sse2_bsf) - IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE2, __strlen_sse2) + IFUNC_IMPL_ADD (array, i, strlen, HAS_CPU_FEATURE (SSE2), + __strlen_sse2) IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_ia32)) /* Support sysdeps/i386/i686/multiarch/strncmp.S. */ IFUNC_IMPL (i, name, strncmp, - IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSE4_2, + IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSE4_2), __strncmp_sse4_2) - IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSSE3, + IFUNC_IMPL_ADD (array, i, strncmp, HAS_CPU_FEATURE (SSSE3), __strncmp_ssse3) IFUNC_IMPL_ADD (array, i, strncmp, 1, __strncmp_ia32)) #endif diff --git a/sysdeps/i386/i686/multiarch/init-arch.c b/sysdeps/i386/i686/multiarch/init-arch.c deleted file mode 100644 index 00a94d83dc..0000000000 --- a/sysdeps/i386/i686/multiarch/init-arch.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/x86_64/multiarch/init-arch.c> diff --git a/sysdeps/i386/i686/multiarch/init-arch.h b/sysdeps/i386/i686/multiarch/init-arch.h deleted file mode 100644 index cd2d0befee..0000000000 --- a/sysdeps/i386/i686/multiarch/init-arch.h +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/x86_64/multiarch/init-arch.h> diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S index a5ae86a7ff..5d48898ffa 100644 --- a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* Optimized memchr with sse2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S index ae40677278..83930b7d38 100644 --- a/sysdeps/i386/i686/multiarch/memchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S @@ -1,5 +1,5 @@ /* Optimized memchr with sse2 without bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memchr.S b/sysdeps/i386/i686/multiarch/memchr.S index 02994d055e..08e7489f3e 100644 --- a/sysdeps/i386/i686/multiarch/memchr.S +++ b/sysdeps/i386/i686/multiarch/memchr.S @@ -1,6 +1,6 @@ /* Multiple versions of memchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -22,46 +22,22 @@ #include <init-arch.h> #if IS_IN (libc) -# define CFI_POP(REG) \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (REG) - -# define CFI_PUSH(REG) \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (REG, 0) - .text ENTRY(__memchr) .type __memchr, @gnu_indirect_function - pushl %ebx - CFI_PUSH (%ebx) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features - -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + HAS_CPU_FEATURE (SSE2) jz 2f - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_BSF) jz 3f - leal __memchr_sse2@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) + LOAD_FUNC_GOT_EAX ( __memchr_sse2) ret - CFI_PUSH (%ebx) - -2: leal __memchr_ia32@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +2: LOAD_FUNC_GOT_EAX (__memchr_ia32) ret - CFI_PUSH (%ebx) - -3: leal __memchr_sse2_bsf@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +3: LOAD_FUNC_GOT_EAX (__memchr_sse2_bsf) ret END(__memchr) diff --git a/sysdeps/i386/i686/multiarch/memcmp-sse4.S b/sysdeps/i386/i686/multiarch/memcmp-sse4.S index b3756f4a00..e3e01600f8 100644 --- a/sysdeps/i386/i686/multiarch/memcmp-sse4.S +++ b/sysdeps/i386/i686/multiarch/memcmp-sse4.S @@ -1,5 +1,5 @@ /* memcmp with SSE4.2, wmemcmp with SSE4.2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S index ea2a25b216..f59bfcb0c5 100644 --- a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S +++ b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S @@ -1,5 +1,5 @@ /* memcmp with SSSE3, wmemcmp with SSSE3 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcmp.S b/sysdeps/i386/i686/multiarch/memcmp.S index 6b607ebd3b..059a78baa7 100644 --- a/sysdeps/i386/i686/multiarch/memcmp.S +++ b/sysdeps/i386/i686/multiarch/memcmp.S @@ -1,6 +1,6 @@ /* Multiple versions of memcmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,46 +23,19 @@ /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(memcmp) - .type memcmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memcmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memcmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memcmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(memcmp) -# else .text ENTRY(memcmp) .type memcmp, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memcmp_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memcmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memcmp_ssse3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features + LOAD_FUNC_GOT_EAX (__memcmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal __memcmp_sse4_2, %eax + LOAD_FUNC_GOT_EAX (__memcmp_sse4_2) 2: ret END(memcmp) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S index 8215c70b15..76f34291a3 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S +++ b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S @@ -1,5 +1,5 @@ /* memcpy optimized with SSE2 unaligned memory access instructions. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S index 08d877c03a..460c37e39a 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S +++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S @@ -1,5 +1,5 @@ /* memcpy with SSSE3 and REP string. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S index 27ab6a2c3e..c694dc3ca9 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S @@ -1,5 +1,5 @@ /* memcpy with SSSE3 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memcpy.S b/sysdeps/i386/i686/multiarch/memcpy.S index c6d20bd8e0..27913ea37a 100644 --- a/sysdeps/i386/i686/multiarch/memcpy.S +++ b/sysdeps/i386/i686/multiarch/memcpy.S @@ -1,6 +1,6 @@ /* Multiple versions of memcpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,29 +28,20 @@ .text ENTRY(memcpy) .type memcpy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memcpy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memcpy_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memcpy_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memcpy_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memcpy_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memcpy_ssse3_rep) +2: ret END(memcpy) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.S b/sysdeps/i386/i686/multiarch/memcpy_chk.S index 93995879f8..39bc3c25be 100644 --- a/sysdeps/i386/i686/multiarch/memcpy_chk.S +++ b/sysdeps/i386/i686/multiarch/memcpy_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __memcpy_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -29,29 +29,20 @@ .text ENTRY(__memcpy_chk) .type __memcpy_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memcpy_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memcpy_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_chk_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memcpy_chk_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memcpy_chk_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memcpy_chk_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memcpy_chk_ssse3_rep) +2: ret END(__memcpy_chk) # else # include "../memcpy_chk.S" diff --git a/sysdeps/i386/i686/multiarch/memmove.S b/sysdeps/i386/i686/multiarch/memmove.S index 70334639ba..725a421eab 100644 --- a/sysdeps/i386/i686/multiarch/memmove.S +++ b/sysdeps/i386/i686/multiarch/memmove.S @@ -1,6 +1,6 @@ /* Multiple versions of memmove All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,37 +23,28 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(memmove) .type memmove, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memmove_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memmove_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memmove_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memmove_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_ssse3) + HAS_ARCH_FEATURE (Fast_Rep_String) jz 2f - leal __memmove_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memmove_ssse3_rep) +2: ret END(memmove) -# undef ENTRY -# define ENTRY(name) \ +# ifdef SHARED +# undef ENTRY +# define ENTRY(name) \ .type __memmove_ia32, @function; \ .p2align 4; \ .globl __memmove_ia32; \ @@ -61,29 +52,8 @@ END(memmove) __memmove_ia32: cfi_startproc; \ CALL_MCOUNT # else - .text -ENTRY(memmove) - .type memmove, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memmove_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal __memmove_sse2_unaligned, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __memmove_ssse3, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __memmove_ssse3_rep, %eax -2: ret -END(memmove) - -# undef ENTRY -# define ENTRY(name) \ +# undef ENTRY +# define ENTRY(name) \ .type __memmove_ia32, @function; \ .globl __memmove_ia32; \ .p2align 4; \ diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.S b/sysdeps/i386/i686/multiarch/memmove_chk.S index 2b576d4960..c27892d41b 100644 --- a/sysdeps/i386/i686/multiarch/memmove_chk.S +++ b/sysdeps/i386/i686/multiarch/memmove_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __memmove_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,56 +23,26 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(__memmove_chk) .type __memmove_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memmove_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memmove_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memmove_chk_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_chk_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __memmove_chk_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memmove_chk_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memmove_chk_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__memmove_chk) -# else - .text -ENTRY(__memmove_chk) - .type __memmove_chk, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memmove_chk_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal __memmove_chk_sse2_unaligned, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __memmove_chk_ssse3, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __memmove_chk_ssse3_rep, %eax + LOAD_FUNC_GOT_EAX (__memmove_chk_ssse3_rep) 2: ret END(__memmove_chk) +# ifndef SHARED .type __memmove_chk_sse2_unaligned, @function .p2align 4; __memmove_chk_sse2_unaligned: diff --git a/sysdeps/i386/i686/multiarch/mempcpy.S b/sysdeps/i386/i686/multiarch/mempcpy.S index 39c934eb49..141ff2e395 100644 --- a/sysdeps/i386/i686/multiarch/mempcpy.S +++ b/sysdeps/i386/i686/multiarch/mempcpy.S @@ -1,6 +1,6 @@ /* Multiple versions of mempcpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,29 +28,20 @@ .text ENTRY(__mempcpy) .type __mempcpy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __mempcpy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__mempcpy_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __mempcpy_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __mempcpy_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __mempcpy_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__mempcpy_ssse3_rep) +2: ret END(__mempcpy) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S index b6fa202833..2788b663c2 100644 --- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S +++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __mempcpy_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -29,29 +29,20 @@ .text ENTRY(__mempcpy_chk) .type __mempcpy_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__mempcpy_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __mempcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_chk_sse2_unaligned) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __mempcpy_chk_ssse3@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__mempcpy_chk_ssse3) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __mempcpy_chk_ssse3_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__mempcpy_chk_ssse3_rep) +2: ret END(__mempcpy_chk) # else # include "../mempcpy_chk.S" diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S index 043e1bbd23..cf5555cf62 100644 --- a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* Optimized memrchr with sse2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2.S b/sysdeps/i386/i686/multiarch/memrchr-sse2.S index 65e3c8bc73..5be8332438 100644 --- a/sysdeps/i386/i686/multiarch/memrchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/memrchr-sse2.S @@ -1,5 +1,5 @@ /* Optimized memrchr with sse2 without bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memrchr.S b/sysdeps/i386/i686/multiarch/memrchr.S index 321e0b7e4e..bc1ff805af 100644 --- a/sysdeps/i386/i686/multiarch/memrchr.S +++ b/sysdeps/i386/i686/multiarch/memrchr.S @@ -1,6 +1,6 @@ /* Multiple versions of memrchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -22,46 +22,22 @@ #include <init-arch.h> #if IS_IN (libc) -# define CFI_POP(REG) \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (REG) - -# define CFI_PUSH(REG) \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (REG, 0) - .text ENTRY(__memrchr) .type __memrchr, @gnu_indirect_function - pushl %ebx - CFI_PUSH (%ebx) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features - -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + HAS_CPU_FEATURE (SSE2) jz 2f - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_BSF) jz 3f - leal __memrchr_sse2@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) + LOAD_FUNC_GOT_EAX (__memrchr_sse2) ret - CFI_PUSH (%ebx) - -2: leal __memrchr_ia32@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +2: LOAD_FUNC_GOT_EAX (__memrchr_ia32) ret - CFI_PUSH (%ebx) - -3: leal __memrchr_sse2_bsf@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +3: LOAD_FUNC_GOT_EAX (__memrchr_sse2_bsf) ret END(__memrchr) diff --git a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S index 9c8f232c42..153ae6fdaf 100644 --- a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S +++ b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S @@ -1,5 +1,5 @@ /* memset with SSE2 and REP string. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memset-sse2.S b/sysdeps/i386/i686/multiarch/memset-sse2.S index d03e647a3f..4cac1c7b22 100644 --- a/sysdeps/i386/i686/multiarch/memset-sse2.S +++ b/sysdeps/i386/i686/multiarch/memset-sse2.S @@ -1,5 +1,5 @@ /* memset with SSE2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/memset.S b/sysdeps/i386/i686/multiarch/memset.S index 6d7d919409..268df0c873 100644 --- a/sysdeps/i386/i686/multiarch/memset.S +++ b/sysdeps/i386/i686/multiarch/memset.S @@ -1,6 +1,6 @@ /* Multiple versions of memset All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,46 +23,19 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(memset) - .type memset, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memset_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memset_sse2@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __memset_sse2_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(memset) -# else .text ENTRY(memset) .type memset, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memset_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memset_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memset_sse2, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features + LOAD_FUNC_GOT_EAX (__memset_sse2) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memset_sse2_rep, %eax + LOAD_FUNC_GOT_EAX (__memset_sse2_rep) 2: ret END(memset) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/memset_chk.S b/sysdeps/i386/i686/multiarch/memset_chk.S index a770c0d9e2..d18b53f7e3 100644 --- a/sysdeps/i386/i686/multiarch/memset_chk.S +++ b/sysdeps/i386/i686/multiarch/memset_chk.S @@ -1,6 +1,6 @@ /* Multiple versions of __memset_chk All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -23,50 +23,26 @@ /* Define multiple versions only for the definition in lib. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(__memset_chk) .type __memset_chk, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __memset_chk_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__memset_chk_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __memset_chk_sse2@GOTOFF(%ebx), %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__memset_chk_sse2) + HAS_CPU_FEATURE (Fast_Rep_String) jz 2f - leal __memset_chk_sse2_rep@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__memset_chk_sse2_rep) +2: ret END(__memset_chk) +# ifdef SHARED strong_alias (__memset_chk, __memset_zero_constant_len_parameter) .section .gnu.warning.__memset_zero_constant_len_parameter .string "memset used with constant zero length parameter; this could be due to transposed parameters" # else .text -ENTRY(__memset_chk) - .type __memset_chk, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __memset_chk_ia32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal __memset_chk_sse2, %eax - testl $bit_Fast_Rep_String, FEATURE_OFFSET+index_Fast_Rep_String+__cpu_features - jz 2f - leal __memset_chk_sse2_rep, %eax -2: ret -END(__memset_chk) - .type __memset_chk_sse2, @function .p2align 4; __memset_chk_sse2: diff --git a/sysdeps/i386/i686/multiarch/rawmemchr.S b/sysdeps/i386/i686/multiarch/rawmemchr.S index c2b7ee647e..f53978348d 100644 --- a/sysdeps/i386/i686/multiarch/rawmemchr.S +++ b/sysdeps/i386/i686/multiarch/rawmemchr.S @@ -1,6 +1,6 @@ /* Multiple versions of rawmemchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -22,46 +22,22 @@ #include <init-arch.h> #if IS_IN (libc) -# define CFI_POP(REG) \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (REG) - -# define CFI_PUSH(REG) \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (REG, 0) - .text ENTRY(__rawmemchr) .type __rawmemchr, @gnu_indirect_function - pushl %ebx - CFI_PUSH (%ebx) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features - -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + HAS_CPU_FEATURE (SSE2) jz 2f - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_BSF) jz 3f - leal __rawmemchr_sse2@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) + LOAD_FUNC_GOT_EAX (__rawmemchr_sse2) ret - CFI_PUSH (%ebx) - -2: leal __rawmemchr_ia32@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +2: LOAD_FUNC_GOT_EAX (__rawmemchr_ia32) ret - CFI_PUSH (%ebx) - -3: leal __rawmemchr_sse2_bsf@GOTOFF(%ebx), %eax - popl %ebx - CFI_POP (%ebx) +3: LOAD_FUNC_GOT_EAX (__rawmemchr_sse2_bsf) ret END(__rawmemchr) diff --git a/sysdeps/i386/i686/multiarch/s_fma-fma.c b/sysdeps/i386/i686/multiarch/s_fma-fma.c index 1a8b48bd58..60e5b9a32d 100644 --- a/sysdeps/i386/i686/multiarch/s_fma-fma.c +++ b/sysdeps/i386/i686/multiarch/s_fma-fma.c @@ -1,5 +1,5 @@ /* FMA version of fma. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,11 +19,9 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT double __fma_fma (double x, double y, double z) { asm ("vfmadd213sd %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z)); return x; } -#endif diff --git a/sysdeps/i386/i686/multiarch/s_fma.c b/sysdeps/i386/i686/multiarch/s_fma.c index dd70f78fd7..acc59a8c93 100644 --- a/sysdeps/i386/i686/multiarch/s_fma.c +++ b/sysdeps/i386/i686/multiarch/s_fma.c @@ -1,5 +1,5 @@ /* Multiple versions of fma. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,17 +19,16 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT #include <math.h> #include <init-arch.h> extern double __fma_ia32 (double x, double y, double z) attribute_hidden; extern double __fma_fma (double x, double y, double z) attribute_hidden; -libm_ifunc (__fma, HAS_FMA ? __fma_fma : __fma_ia32); +libm_ifunc (__fma, + HAS_ARCH_FEATURE (FMA_Usable) ? __fma_fma : __fma_ia32); weak_alias (__fma, fma) -# define __fma __fma_ia32 -#endif +#define __fma __fma_ia32 #include <sysdeps/ieee754/ldbl-96/s_fma.c> diff --git a/sysdeps/i386/i686/multiarch/s_fmaf-fma.c b/sysdeps/i386/i686/multiarch/s_fmaf-fma.c index 1775ef5dd0..ff2de65a80 100644 --- a/sysdeps/i386/i686/multiarch/s_fmaf-fma.c +++ b/sysdeps/i386/i686/multiarch/s_fmaf-fma.c @@ -1,5 +1,5 @@ /* FMA version of fmaf. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,11 +19,9 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT float __fmaf_fma (float x, float y, float z) { asm ("vfmadd213ss %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z)); return x; } -#endif diff --git a/sysdeps/i386/i686/multiarch/s_fmaf.c b/sysdeps/i386/i686/multiarch/s_fmaf.c index 9ffa4f15d9..a4b86cf39e 100644 --- a/sysdeps/i386/i686/multiarch/s_fmaf.c +++ b/sysdeps/i386/i686/multiarch/s_fmaf.c @@ -1,5 +1,5 @@ /* Multiple versions of fmaf. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,17 +19,16 @@ #include <config.h> -#ifdef HAVE_AVX_SUPPORT #include <math.h> #include <init-arch.h> extern float __fmaf_ia32 (float x, float y, float z) attribute_hidden; extern float __fmaf_fma (float x, float y, float z) attribute_hidden; -libm_ifunc (__fmaf, HAS_FMA ? __fmaf_fma : __fmaf_ia32); +libm_ifunc (__fmaf, + HAS_ARCH_FEATURE (FMA_Usable) ? __fmaf_fma : __fmaf_ia32); weak_alias (__fmaf, fmaf) -# define __fmaf __fmaf_ia32 -#endif +#define __fmaf __fmaf_ia32 #include <sysdeps/ieee754/dbl-64/s_fmaf.c> diff --git a/sysdeps/i386/i686/multiarch/strcasecmp.S b/sysdeps/i386/i686/multiarch/strcasecmp.S index c30ac3a8bd..61f17718bc 100644 --- a/sysdeps/i386/i686/multiarch/strcasecmp.S +++ b/sysdeps/i386/i686/multiarch/strcasecmp.S @@ -1,6 +1,6 @@ /* Entry point for multi-version x86 strcasecmp. All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,49 +20,20 @@ #include <sysdep.h> #include <init-arch.h> -#ifdef SHARED .text ENTRY(__strcasecmp) .type __strcasecmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strcasecmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strcasecmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __strcasecmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strcasecmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_SSE4_2) jnz 2f - leal __strcasecmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__strcasecmp) -#else - .text -ENTRY(__strcasecmp) - .type __strcasecmp, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __strcasecmp_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __strcasecmp_ssse3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features - jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features - jnz 2f - leal __strcasecmp_sse4_2, %eax + LOAD_FUNC_GOT_EAX (__strcasecmp_sse4_2) 2: ret END(__strcasecmp) -#endif weak_alias (__strcasecmp, strcasecmp) diff --git a/sysdeps/i386/i686/multiarch/strcasestr-c.c b/sysdeps/i386/i686/multiarch/strcasestr-c.c deleted file mode 100644 index c1d6dac1dd..0000000000 --- a/sysdeps/i386/i686/multiarch/strcasestr-c.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Multiple versions of strcasestr - All versions must be listed in ifunc-impl-list.c. */ -#define __strcasestr_sse2 __strcasestr_ia32 -#include <sysdeps/x86_64/multiarch/strcasestr-c.c> diff --git a/sysdeps/i386/i686/multiarch/strcat-sse2.S b/sysdeps/i386/i686/multiarch/strcat-sse2.S index 0f9e13c6d3..924d1663c6 100644 --- a/sysdeps/i386/i686/multiarch/strcat-sse2.S +++ b/sysdeps/i386/i686/multiarch/strcat-sse2.S @@ -1,5 +1,5 @@ /* strcat with SSE2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcat-ssse3.S b/sysdeps/i386/i686/multiarch/strcat-ssse3.S index a5b0bc6818..ab2f8842a0 100644 --- a/sysdeps/i386/i686/multiarch/strcat-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcat-ssse3.S @@ -1,5 +1,5 @@ /* strcat with SSSE3 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcat.S b/sysdeps/i386/i686/multiarch/strcat.S index 474f753f3f..d8f4132cf3 100644 --- a/sysdeps/i386/i686/multiarch/strcat.S +++ b/sysdeps/i386/i686/multiarch/strcat.S @@ -1,6 +1,6 @@ /* Multiple versions of strcat All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -45,52 +45,22 @@ need strncat before the initialization happened. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(STRCAT) .type STRCAT, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal STRCAT_IA32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal STRCAT_SSE2@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) - jz 2f - leal STRCAT_SSSE3@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(STRCAT) -# else - -ENTRY(STRCAT) - .type STRCAT, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal STRCAT_IA32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (STRCAT_IA32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal STRCAT_SSE2, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features + LOAD_FUNC_GOT_EAX (STRCAT_SSE2) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features + HAS_CPU_FEATURE (SSSE3) jz 2f - leal STRCAT_SSSE3, %eax + LOAD_FUNC_GOT_EAX (STRCAT_SSSE3) 2: ret END(STRCAT) -# endif - # undef ENTRY # define ENTRY(name) \ .type STRCAT_IA32, @function; \ @@ -118,5 +88,5 @@ END(STRCAT) #endif #ifndef USE_AS_STRNCAT -# include "../../i486/strcat.S" +# include "../../strcat.S" #endif diff --git a/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S index ba2723bb51..1b48f3314d 100644 --- a/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* strchr with SSE2 with bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strchr-sse2.S b/sysdeps/i386/i686/multiarch/strchr-sse2.S index 4f387eaeea..b6680d1e7a 100644 --- a/sysdeps/i386/i686/multiarch/strchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/strchr-sse2.S @@ -1,5 +1,5 @@ /* strchr SSE2 without bsf - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strchr.S b/sysdeps/i386/i686/multiarch/strchr.S index 45624fdee0..18ea87209f 100644 --- a/sysdeps/i386/i686/multiarch/strchr.S +++ b/sysdeps/i386/i686/multiarch/strchr.S @@ -1,6 +1,6 @@ /* Multiple versions of strchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,24 +25,15 @@ .text ENTRY(strchr) .type strchr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strchr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strchr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strchr_sse2_bsf@GOTOFF(%ebx), %eax - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strchr_sse2_bsf) + HAS_ARCH_FEATURE (Slow_BSF) jz 2f - leal __strchr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strchr_sse2) +2: ret END(strchr) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S index 38c2317c26..89efb38a40 100644 --- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S +++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S @@ -1,5 +1,5 @@ /* strcmp with SSE4.2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S index fb21288c7d..777f0b7edc 100644 --- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S @@ -1,5 +1,5 @@ /* strcmp with SSSE3 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S index 9df40089a7..41d539ecb9 100644 --- a/sysdeps/i386/i686/multiarch/strcmp.S +++ b/sysdeps/i386/i686/multiarch/strcmp.S @@ -1,6 +1,6 @@ /* Multiple versions of strcmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -51,50 +51,21 @@ define multiple versions for strncmp in static library since we need strncmp before the initialization happened. */ #if (defined SHARED || !defined USE_AS_STRNCMP) && IS_IN (libc) -# ifdef SHARED .text ENTRY(STRCMP) .type STRCMP, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __STRCMP_IA32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__STRCMP_IA32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __STRCMP_SSSE3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__STRCMP_SSSE3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_SSE4_2) jnz 2f - leal __STRCMP_SSE4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(STRCMP) -# else - .text -ENTRY(STRCMP) - .type STRCMP, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __STRCMP_IA32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __STRCMP_SSSE3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features - jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features - jnz 2f - leal __STRCMP_SSE4_2, %eax + LOAD_FUNC_GOT_EAX (__STRCMP_SSE4_2) 2: ret END(STRCMP) -# endif # undef ENTRY # define ENTRY(name) \ diff --git a/sysdeps/i386/i686/multiarch/strcpy-sse2.S b/sysdeps/i386/i686/multiarch/strcpy-sse2.S index a37c44530d..3baa559e01 100644 --- a/sysdeps/i386/i686/multiarch/strcpy-sse2.S +++ b/sysdeps/i386/i686/multiarch/strcpy-sse2.S @@ -1,5 +1,5 @@ /* strcpy with SSE2 and unaligned load - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S index 9f88e7735d..10fda83e7b 100644 --- a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S @@ -1,5 +1,5 @@ /* strcpy with SSSE3 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strcpy.S b/sysdeps/i386/i686/multiarch/strcpy.S index c279d468cb..51525bc091 100644 --- a/sysdeps/i386/i686/multiarch/strcpy.S +++ b/sysdeps/i386/i686/multiarch/strcpy.S @@ -1,6 +1,6 @@ /* Multiple versions of strcpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -61,52 +61,22 @@ need strncpy before the initialization happened. */ #if IS_IN (libc) -# ifdef SHARED .text ENTRY(STRCPY) .type STRCPY, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal STRCPY_IA32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (STRCPY_IA32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal STRCPY_SSE2@GOTOFF(%ebx), %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (STRCPY_SSE2) + HAS_ARCH_FEATURE (Fast_Unaligned_Load) jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal STRCPY_SSSE3@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(STRCPY) -# else - -ENTRY(STRCPY) - .type STRCPY, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal STRCPY_IA32, %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features - jz 2f - leal STRCPY_SSE2, %eax - testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features - jnz 2f - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal STRCPY_SSSE3, %eax + LOAD_FUNC_GOT_EAX (STRCPY_SSSE3) 2: ret END(STRCPY) -# endif - # undef ENTRY # define ENTRY(name) \ .type STRCPY_IA32, @function; \ diff --git a/sysdeps/i386/i686/multiarch/strcspn.S b/sysdeps/i386/i686/multiarch/strcspn.S index e6ea454150..4a7b177727 100644 --- a/sysdeps/i386/i686/multiarch/strcspn.S +++ b/sysdeps/i386/i686/multiarch/strcspn.S @@ -1,6 +1,6 @@ /* Multiple versions of strcspn All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,9 +19,6 @@ <http://www.gnu.org/licenses/>. */ #include <config.h> - -#ifdef HAVE_SSE4_SUPPORT - #include <sysdep.h> #include <init-arch.h> @@ -42,40 +39,16 @@ define multiple versions for strpbrk in static library since we need strpbrk before the initialization happened. */ #if (defined SHARED || !defined USE_AS_STRPBRK) && IS_IN (libc) -# ifdef SHARED - .text -ENTRY(STRCSPN) - .type STRCSPN, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal STRCSPN_IA32@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal STRCSPN_SSE42@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret -END(STRCSPN) -# else .text ENTRY(STRCSPN) .type STRCSPN, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal STRCSPN_IA32, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (STRCSPN_IA32) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal STRCSPN_SSE42, %eax + LOAD_FUNC_GOT_EAX (STRCSPN_SSE42) 2: ret END(STRCSPN) -# endif # undef ENTRY # define ENTRY(name) \ @@ -95,8 +68,6 @@ END(STRCSPN) .globl __GI_STRCSPN; __GI_STRCSPN = STRCSPN_IA32 #endif -#endif /* HAVE_SSE4_SUPPORT */ - #ifdef USE_AS_STRPBRK #include "../../strpbrk.S" #else diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S index 668a2a65fc..e4a82495ec 100644 --- a/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S @@ -1,5 +1,5 @@ /* strlen with SSE2 and BSF - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2.S b/sysdeps/i386/i686/multiarch/strlen-sse2.S index 3d30714b7a..f7724f8a51 100644 --- a/sysdeps/i386/i686/multiarch/strlen-sse2.S +++ b/sysdeps/i386/i686/multiarch/strlen-sse2.S @@ -1,5 +1,5 @@ /* strlen with SSE2 - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strlen.S b/sysdeps/i386/i686/multiarch/strlen.S index 2e6993b738..0218947c49 100644 --- a/sysdeps/i386/i686/multiarch/strlen.S +++ b/sysdeps/i386/i686/multiarch/strlen.S @@ -1,6 +1,6 @@ /* Multiple versions of strlen All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,24 +28,15 @@ .text ENTRY(strlen) .type strlen, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strlen_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strlen_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strlen_sse2_bsf@GOTOFF(%ebx), %eax - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strlen_sse2_bsf) + HAS_ARCH_FEATURE (Slow_BSF) jz 2f - leal __strlen_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strlen_sse2) +2: ret END(strlen) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/strncase.S b/sysdeps/i386/i686/multiarch/strncase.S index c2cb03c2bb..52d4ba5a2a 100644 --- a/sysdeps/i386/i686/multiarch/strncase.S +++ b/sysdeps/i386/i686/multiarch/strncase.S @@ -1,6 +1,6 @@ /* Entry point for multi-version x86 strncasecmp. All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,49 +20,20 @@ #include <sysdep.h> #include <init-arch.h> -#ifdef SHARED .text ENTRY(__strncasecmp) .type __strncasecmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strncasecmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strncasecmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __strncasecmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strncasecmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features@GOTOFF(%ebx) + HAS_ARCH_FEATURE (Slow_SSE4_2) jnz 2f - leal __strncasecmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret -END(__strncasecmp) -#else - .text -ENTRY(__strncasecmp) - .type __strncasecmp, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __strncasecmp_ia32, %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features - jz 2f - leal __strncasecmp_ssse3, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features - jz 2f - testl $bit_Slow_SSE4_2, FEATURE_OFFSET+index_Slow_SSE4_2+__cpu_features - jnz 2f - leal __strncasecmp_sse4_2, %eax + LOAD_FUNC_GOT_EAX (__strncasecmp_sse4_2) 2: ret END(__strncasecmp) -#endif weak_alias (__strncasecmp, strncasecmp) diff --git a/sysdeps/i386/i686/multiarch/strnlen.S b/sysdeps/i386/i686/multiarch/strnlen.S index 56a5136606..e77562d2cf 100644 --- a/sysdeps/i386/i686/multiarch/strnlen.S +++ b/sysdeps/i386/i686/multiarch/strnlen.S @@ -1,6 +1,6 @@ /* Multiple versions of strnlen All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,21 +25,12 @@ .text ENTRY(__strnlen) .type __strnlen, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strnlen_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strnlen_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strnlen_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strnlen_sse2) +2: ret END(__strnlen) weak_alias(__strnlen, strnlen) diff --git a/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S index a3d42ddd4f..e2713ca3fe 100644 --- a/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S +++ b/sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S @@ -1,5 +1,5 @@ /* strrchr with SSE2 with bsf and bsr - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strrchr-sse2.S b/sysdeps/i386/i686/multiarch/strrchr-sse2.S index df36ba0a93..a0c536a5e2 100644 --- a/sysdeps/i386/i686/multiarch/strrchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/strrchr-sse2.S @@ -1,5 +1,5 @@ /* strrchr SSE2 without bsf and bsr - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/strrchr.S b/sysdeps/i386/i686/multiarch/strrchr.S index 91074b4315..39305760e9 100644 --- a/sysdeps/i386/i686/multiarch/strrchr.S +++ b/sysdeps/i386/i686/multiarch/strrchr.S @@ -1,6 +1,6 @@ /* Multiple versions of strrchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,24 +25,15 @@ .text ENTRY(strrchr) .type strrchr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strrchr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strrchr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __strrchr_sse2_bsf@GOTOFF(%ebx), %eax - testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__strrchr_sse2_bsf) + HAS_ARCH_FEATURE (Slow_BSF) jz 2f - leal __strrchr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__strrchr_sse2) +2: ret END(strrchr) # undef ENTRY diff --git a/sysdeps/i386/i686/multiarch/strspn.S b/sysdeps/i386/i686/multiarch/strspn.S index 9d353a2735..6ed4861efe 100644 --- a/sysdeps/i386/i686/multiarch/strspn.S +++ b/sysdeps/i386/i686/multiarch/strspn.S @@ -1,6 +1,6 @@ /* Multiple versions of strspn All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,48 +19,21 @@ <http://www.gnu.org/licenses/>. */ #include <config.h> - -#ifdef HAVE_SSE4_SUPPORT - #include <sysdep.h> #include <init-arch.h> /* Define multiple versions only for the definition in libc. */ #if IS_IN (libc) -# ifdef SHARED - .text -ENTRY(strspn) - .type strspn, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __strspn_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) - jz 2f - leal __strspn_sse42@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret -END(strspn) -# else .text ENTRY(strspn) .type strspn, @gnu_indirect_function - cmpl $0, KIND_OFFSET+__cpu_features - jne 1f - call __init_cpu_features -1: leal __strspn_ia32, %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__strspn_ia32) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal __strspn_sse42, %eax + LOAD_FUNC_GOT_EAX (__strspn_sse42) 2: ret END(strspn) -# endif # undef ENTRY # define ENTRY(name) \ @@ -80,6 +53,4 @@ __strspn_ia32: cfi_startproc; \ .globl __GI_strspn; __GI_strspn = __strspn_ia32 #endif -#endif /* HAVE_SSE4_SUPPORT */ - #include "../../strspn.S" diff --git a/sysdeps/i386/i686/multiarch/wcschr-sse2.S b/sysdeps/i386/i686/multiarch/wcschr-sse2.S index 818eaa3014..4bcc553569 100644 --- a/sysdeps/i386/i686/multiarch/wcschr-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcschr-sse2.S @@ -1,5 +1,5 @@ /* wcschr with SSE2, without using bsf instructions - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcschr.S b/sysdeps/i386/i686/multiarch/wcschr.S index 603d7d79c1..b7f50e46ea 100644 --- a/sysdeps/i386/i686/multiarch/wcschr.S +++ b/sysdeps/i386/i686/multiarch/wcschr.S @@ -1,6 +1,6 @@ /* Multiple versions of wcschr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,21 +25,12 @@ .text ENTRY(__wcschr) .type wcschr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcschr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcschr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcschr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcschr_sse2) +2: ret END(__wcschr) weak_alias (__wcschr, wcschr) #endif diff --git a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S index b25103df2d..ff57063b9b 100644 --- a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S @@ -1,5 +1,5 @@ /* wcscmp with SSE2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcscmp.S b/sysdeps/i386/i686/multiarch/wcscmp.S index 92c2c84ad4..c7d7d51bdd 100644 --- a/sysdeps/i386/i686/multiarch/wcscmp.S +++ b/sysdeps/i386/i686/multiarch/wcscmp.S @@ -1,6 +1,6 @@ /* Multiple versions of wcscmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -28,21 +28,12 @@ .text ENTRY(__wcscmp) .type __wcscmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcscmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcscmp_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcscmp_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcscmp_sse2) +2: ret END(__wcscmp) weak_alias (__wcscmp, wcscmp) #endif diff --git a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S index 8828f6eff1..09e538369f 100644 --- a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S @@ -1,5 +1,5 @@ /* wcscpy with SSSE3 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcscpy.S b/sysdeps/i386/i686/multiarch/wcscpy.S index f7253c7f45..345511530c 100644 --- a/sysdeps/i386/i686/multiarch/wcscpy.S +++ b/sysdeps/i386/i686/multiarch/wcscpy.S @@ -1,6 +1,6 @@ /* Multiple versions of wcscpy All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -26,20 +26,11 @@ .text ENTRY(wcscpy) .type wcscpy, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcscpy_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcscpy_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __wcscpy_ssse3@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcscpy_ssse3) +2: ret END(wcscpy) #endif diff --git a/sysdeps/i386/i686/multiarch/wcslen-sse2.S b/sysdeps/i386/i686/multiarch/wcslen-sse2.S index 1c54b1894c..897debb122 100644 --- a/sysdeps/i386/i686/multiarch/wcslen-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcslen-sse2.S @@ -1,5 +1,5 @@ /* wcslen with SSE2 - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcslen.S b/sysdeps/i386/i686/multiarch/wcslen.S index 3926a50a87..42e0c6b2c0 100644 --- a/sysdeps/i386/i686/multiarch/wcslen.S +++ b/sysdeps/i386/i686/multiarch/wcslen.S @@ -1,6 +1,6 @@ /* Multiple versions of wcslen All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,21 +25,12 @@ .text ENTRY(__wcslen) .type __wcslen, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcslen_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcslen_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcslen_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcslen_sse2) +2: ret END(__wcslen) weak_alias(__wcslen, wcslen) diff --git a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S index f897618a3a..e68004204a 100644 --- a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S +++ b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S @@ -1,5 +1,5 @@ /* wcsrchr with SSE2, without using bsf instructions. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. diff --git a/sysdeps/i386/i686/multiarch/wcsrchr.S b/sysdeps/i386/i686/multiarch/wcsrchr.S index 5c96129fbe..5c9d8f7b5d 100644 --- a/sysdeps/i386/i686/multiarch/wcsrchr.S +++ b/sysdeps/i386/i686/multiarch/wcsrchr.S @@ -1,6 +1,6 @@ /* Multiple versions of wcsrchr All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -25,20 +25,11 @@ .text ENTRY(wcsrchr) .type wcsrchr, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wcsrchr_ia32@GOTOFF(%ebx), %eax - testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wcsrchr_ia32) + HAS_CPU_FEATURE (SSE2) jz 2f - leal __wcsrchr_sse2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4); - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wcsrchr_sse2) +2: ret END(wcsrchr) #endif diff --git a/sysdeps/i386/i686/multiarch/wmemcmp.S b/sysdeps/i386/i686/multiarch/wmemcmp.S index 6ca60531db..ada6c693cb 100644 --- a/sysdeps/i386/i686/multiarch/wmemcmp.S +++ b/sysdeps/i386/i686/multiarch/wmemcmp.S @@ -1,6 +1,6 @@ /* Multiple versions of wmemcmp All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -27,23 +27,14 @@ .text ENTRY(wmemcmp) .type wmemcmp, @gnu_indirect_function - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) - LOAD_PIC_REG(bx) - cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) - jne 1f - call __init_cpu_features -1: leal __wmemcmp_ia32@GOTOFF(%ebx), %eax - testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx) + LOAD_GOT_AND_RTLD_GLOBAL_RO + LOAD_FUNC_GOT_EAX (__wmemcmp_ia32) + HAS_CPU_FEATURE (SSSE3) jz 2f - leal __wmemcmp_ssse3@GOTOFF(%ebx), %eax - testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx) + LOAD_FUNC_GOT_EAX (__wmemcmp_ssse3) + HAS_CPU_FEATURE (SSE4_2) jz 2f - leal __wmemcmp_sse4_2@GOTOFF(%ebx), %eax -2: popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - ret + LOAD_FUNC_GOT_EAX (__wmemcmp_sse4_2) +2: ret END(wmemcmp) #endif diff --git a/sysdeps/i386/i686/nptl/tls.h b/sysdeps/i386/i686/nptl/tls.h index 7512b131d3..06f425d5c1 100644 --- a/sysdeps/i386/i686/nptl/tls.h +++ b/sysdeps/i386/i686/nptl/tls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/sysdeps/i386/i686/pthread_spin_trylock.S b/sysdeps/i386/i686/pthread_spin_trylock.S index 924c4d728e..52af4b34d6 100644 --- a/sysdeps/i386/i686/pthread_spin_trylock.S +++ b/sysdeps/i386/i686/pthread_spin_trylock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -17,4 +17,4 @@ <http://www.gnu.org/licenses/>. */ #define HAVE_CMOV 1 -#include <sysdeps/i386/i486/pthread_spin_trylock.S> +#include <sysdeps/i386/pthread_spin_trylock.S> diff --git a/sysdeps/i386/i686/stack-aliasing.h b/sysdeps/i386/i686/stack-aliasing.h index d49a92b580..cbe276dc76 100644 --- a/sysdeps/i386/i686/stack-aliasing.h +++ b/sysdeps/i386/i686/stack-aliasing.h @@ -1,5 +1,5 @@ /* Define macros for stack address aliasing issues for NPTL. i686 version. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i686/strcmp.S b/sysdeps/i386/i686/strcmp.S index a7b884835e..0507bc4214 100644 --- a/sysdeps/i386/i686/strcmp.S +++ b/sysdeps/i386/i686/strcmp.S @@ -1,5 +1,5 @@ /* Highly optimized version for ix86, x>=6. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. diff --git a/sysdeps/i386/i686/strtok.S b/sysdeps/i386/i686/strtok.S index 3cfc008b59..90b2fd6301 100644 --- a/sysdeps/i386/i686/strtok.S +++ b/sysdeps/i386/i686/strtok.S @@ -1,6 +1,6 @@ /* strtok (str, delim) -- Return next DELIM separated token from STR. For Intel 80686. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/i386/i686/tst-stack-align.h b/sysdeps/i386/i686/tst-stack-align.h index 8cc36814d0..155d467ddb 100644 --- a/sysdeps/i386/i686/tst-stack-align.h +++ b/sysdeps/i386/i686/tst-stack-align.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2015 Free Software Foundation, Inc. +/* Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/init-arch.h b/sysdeps/i386/init-arch.h new file mode 100644 index 0000000000..945352f252 --- /dev/null +++ b/sysdeps/i386/init-arch.h @@ -0,0 +1,19 @@ +/* Copyright (C) 2015-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define MINIMUM_ISA 486 +#include <sysdeps/x86/init-arch.h> diff --git a/sysdeps/i386/jmpbuf-offsets.h b/sysdeps/i386/jmpbuf-offsets.h index 79560d54fd..979d25c42f 100644 --- a/sysdeps/i386/jmpbuf-offsets.h +++ b/sysdeps/i386/jmpbuf-offsets.h @@ -1,5 +1,5 @@ /* Private macros for accessing __jmp_buf contents. i386 version. - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/jmpbuf-unwind.h b/sysdeps/i386/jmpbuf-unwind.h index 4e8b2cec1b..21c2191bcf 100644 --- a/sysdeps/i386/jmpbuf-unwind.h +++ b/sysdeps/i386/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2015 Free Software Foundation, Inc. +/* Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/sysdeps/i386/ldbl2mpn.c b/sysdeps/i386/ldbl2mpn.c index 6274f54cfd..bf3353e406 100644 --- a/sysdeps/i386/ldbl2mpn.c +++ b/sysdeps/i386/ldbl2mpn.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/ldsodefs.h b/sysdeps/i386/ldsodefs.h index d80cf0185e..8933ebd02e 100644 --- a/sysdeps/i386/ldsodefs.h +++ b/sysdeps/i386/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #define _I386_LDSODEFS_H 1 #include <elf.h> +#include <cpu-features.h> struct La_i86_regs; struct La_i86_retval; diff --git a/sysdeps/i386/lshift.S b/sysdeps/i386/lshift.S index 7ab993c638..ca292af979 100644 --- a/sysdeps/i386/lshift.S +++ b/sysdeps/i386/lshift.S @@ -1,5 +1,5 @@ /* i80386 __mpn_lshift -- - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/machine-gmon.h b/sysdeps/i386/machine-gmon.h index b9c72df919..c6a8a93431 100644 --- a/sysdeps/i386/machine-gmon.h +++ b/sysdeps/i386/machine-gmon.h @@ -1,5 +1,5 @@ /* i386-specific implementation of profiling support. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/i386/memchr.S b/sysdeps/i386/memchr.S index b6a89427fb..e8834349e6 100644 --- a/sysdeps/i386/memchr.S +++ b/sysdeps/i386/memchr.S @@ -1,6 +1,6 @@ /* memchr (str, chr, len) -- Return pointer to first occurrence of CHR in STR less than LEN. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/memcmp.S b/sysdeps/i386/memcmp.S index af2ff12c16..bc73005922 100644 --- a/sysdeps/i386/memcmp.S +++ b/sysdeps/i386/memcmp.S @@ -1,5 +1,5 @@ /* Compare two memory blocks for differences in the first COUNT bytes. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/memcopy.h b/sysdeps/i386/memcopy.h index adc650fd47..2fe98fa98b 100644 --- a/sysdeps/i386/memcopy.h +++ b/sysdeps/i386/memcopy.h @@ -1,5 +1,5 @@ /* memcopy.h -- definitions for memory copy functions. i386 version. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). diff --git a/sysdeps/i386/memcpy.S b/sysdeps/i386/memcpy.S new file mode 100644 index 0000000000..e6a8dd8a9d --- /dev/null +++ b/sysdeps/i386/memcpy.S @@ -0,0 +1,95 @@ +/* memcpy with REP MOVSB/STOSB + Copyright (C) 2015-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include "asm-syntax.h" + +#ifndef MEMCPY +# define MEMCPY memcpy +# define MEMCPY_CHK __memcpy_chk +#endif + +#ifdef USE_AS_BCOPY +# define STR2 12 +# define STR1 STR2+4 +# define N STR1+4 +#else +# define STR1 12 +# define STR2 STR1+4 +# define N STR2+4 +#endif + +#define CFI_PUSH(REG) \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (REG, 0) + +#define CFI_POP(REG) \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (REG) + +#define PUSH(REG) pushl REG; CFI_PUSH (REG) +#define POP(REG) popl REG; CFI_POP (REG) + + .text +#if defined SHARED && IS_IN (libc) && !defined USE_AS_BCOPY +ENTRY (MEMCPY_CHK) + movl 12(%esp), %eax + cmpl %eax, 16(%esp) + jb HIDDEN_JUMPTARGET (__chk_fail) +END (MEMCPY_CHK) +#endif +ENTRY (MEMCPY) + PUSH (%esi) + PUSH (%edi) + movl N(%esp), %ecx + movl STR1(%esp), %edi + movl STR2(%esp), %esi + mov %edi, %eax +#ifdef USE_AS_MEMPCPY + add %ecx, %eax +#endif + +#ifdef USE_AS_MEMMOVE + cmp %esi, %edi + ja L(copy_backward) + je L(bwd_write_0bytes) +#endif + + rep movsb + POP (%edi) + POP (%esi) + ret + +#ifdef USE_AS_MEMMOVE +L(copy_backward): + lea -1(%edi,%ecx), %edi + lea -1(%esi,%ecx), %esi + std + rep movsb + cld +L(bwd_write_0bytes): + POP (%edi) + POP (%esi) + ret +#endif + +END (MEMCPY) + +#ifndef USE_AS_BCOPY +libc_hidden_builtin_def (MEMCPY) +#endif diff --git a/sysdeps/i386/i686/memcpy_chk.S b/sysdeps/i386/memcpy_chk.S index cdf807fdad..c40c3d70f5 100644 --- a/sysdeps/i386/i686/memcpy_chk.S +++ b/sysdeps/i386/memcpy_chk.S @@ -1,5 +1,5 @@ -/* Checking memcpy for i686. - Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Checking memcpy for i386. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,10 +16,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include "asm-syntax.h" +#ifndef SHARED +# include <sysdep.h> +# include "asm-syntax.h" -#ifndef PIC /* For libc.so this is defined in memcpy.S. For libc.a, this is a separate source to avoid memcpy bringing in __chk_fail and all routines diff --git a/sysdeps/i386/memmove.S b/sysdeps/i386/memmove.S new file mode 100644 index 0000000000..60a45d21e0 --- /dev/null +++ b/sysdeps/i386/memmove.S @@ -0,0 +1,4 @@ +#define USE_AS_MEMMOVE +#define MEMCPY memmove +#define MEMCPY_CHK __memmove_chk +#include "memcpy.S" diff --git a/sysdeps/i386/i686/memmove_chk.S b/sysdeps/i386/memmove_chk.S index 64bf9e0ed6..2bf59b7093 100644 --- a/sysdeps/i386/i686/memmove_chk.S +++ b/sysdeps/i386/memmove_chk.S @@ -1,5 +1,5 @@ -/* Checking memmove for x86-64. - Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Checking memmove for i386 + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,14 +16,13 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include "asm-syntax.h" +#ifndef SHARED +# include <sysdep.h> +# include "asm-syntax.h" -#ifndef PIC - /* For libc.so this is defined in memmove.S. - For libc.a, this is a separate source to avoid - memmove bringing in __chk_fail and all routines - it calls. */ +/* For libc.so this is defined in memmove.S. For libc.a, this is a + separate source to avoid memmove bringing in __chk_fail and all + routines it calls. */ .text ENTRY (__memmove_chk) movl 12(%esp), %eax diff --git a/sysdeps/i386/mempcpy.S b/sysdeps/i386/mempcpy.S new file mode 100644 index 0000000000..61addb75f4 --- /dev/null +++ b/sysdeps/i386/mempcpy.S @@ -0,0 +1,7 @@ +#define USE_AS_MEMPCPY +#define MEMCPY __mempcpy +#define MEMCPY_CHK __mempcpy_chk +#include "memcpy.S" + +weak_alias (__mempcpy, mempcpy) +libc_hidden_builtin_def (mempcpy) diff --git a/sysdeps/i386/i686/mempcpy_chk.S b/sysdeps/i386/mempcpy_chk.S index a61757b4e0..e0bac6eee7 100644 --- a/sysdeps/i386/i686/mempcpy_chk.S +++ b/sysdeps/i386/mempcpy_chk.S @@ -1,5 +1,5 @@ -/* Checking mempcpy for x86-64. - Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Checking mempcpy for i386 + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,14 +16,13 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include "asm-syntax.h" +#ifndef SHARED +# include <sysdep.h> +# include "asm-syntax.h" -#ifndef PIC - /* For libc.so this is defined in mempcpy.S. - For libc.a, this is a separate source to avoid - mempcpy bringing in __chk_fail and all routines - it calls. */ +/* For libc.so this is defined in mempcpy.S. For libc.a, this is a + separate source to avoid mempcpy bringing in __chk_fail and all + routines it calls. */ .text ENTRY (__mempcpy_chk) movl 12(%esp), %eax diff --git a/sysdeps/i386/memset.S b/sysdeps/i386/memset.S new file mode 100644 index 0000000000..07b0911988 --- /dev/null +++ b/sysdeps/i386/memset.S @@ -0,0 +1,68 @@ +/* memset with REP MOVSB/STOSB + Copyright (C) 2015-2016 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +#define CFI_PUSH(REG) \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (REG, 0) + +#define CFI_POP(REG) \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (REG) + +#define PUSH(REG) pushl REG; CFI_PUSH (REG) +#define POP(REG) popl REG; CFI_POP (REG) + +#define STR1 8 +#ifdef USE_AS_BZERO +#define N STR1+4 +#else +#define STR2 STR1+4 +#define N STR2+4 +#endif + + .text +#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO +ENTRY (__memset_chk) + movl 12(%esp), %eax + cmpl %eax, 16(%esp) + jb HIDDEN_JUMPTARGET (__chk_fail) +END (__memset_chk) +#endif +ENTRY (memset) + PUSH (%edi) + movl N(%esp), %ecx + movl STR1(%esp), %edi +#ifdef USE_AS_BZERO + xor %eax, %eax +#else + movzbl STR2(%esp), %eax + mov %edi, %edx +#endif + rep stosb +#ifndef USE_AS_BZERO + mov %edx, %eax +#endif + POP (%edi) + ret +END (memset) + +#ifndef USE_AS_BZERO +libc_hidden_builtin_def (memset) +#endif diff --git a/sysdeps/i386/memset.c b/sysdeps/i386/memset.c deleted file mode 100644 index bf11590460..0000000000 --- a/sysdeps/i386/memset.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Set a block of memory to some byte value. - For Intel 80x86, x>=3. - Copyright (C) 1991-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Torbjorn Granlund (tege@sics.se). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <string.h> -#include <memcopy.h> - -#ifdef __GNUC__ - -#undef memset - -void * -memset (void *dstpp, int c, size_t len) -{ - int d0; - unsigned long int dstp = (unsigned long int) dstpp; - - /* This explicit register allocation - improves code very much indeed. */ - register op_t x asm("ax"); - - x = (unsigned char) c; - - /* Clear the direction flag, so filling will move forward. */ - asm volatile("cld"); - - /* This threshold value is optimal. */ - if (len >= 12) - { - /* Fill X with four copies of the char we want to fill with. */ - x |= (x << 8); - x |= (x << 16); - - /* Adjust LEN for the bytes handled in the first loop. */ - len -= (-dstp) % OPSIZ; - - /* There are at least some bytes to set. - No need to test for LEN == 0 in this alignment loop. */ - - /* Fill bytes until DSTP is aligned on a longword boundary. */ - asm volatile("rep\n" - "stosb" /* %0, %2, %3 */ : - "=D" (dstp), "=c" (d0) : - "0" (dstp), "1" ((-dstp) % OPSIZ), "a" (x) : - "memory"); - - /* Fill longwords. */ - asm volatile("rep\n" - "stosl" /* %0, %2, %3 */ : - "=D" (dstp), "=c" (d0) : - "0" (dstp), "1" (len / OPSIZ), "a" (x) : - "memory"); - len %= OPSIZ; - } - - /* Write the last few bytes. */ - asm volatile("rep\n" - "stosb" /* %0, %2, %3 */ : - "=D" (dstp), "=c" (d0) : - "0" (dstp), "1" (len), "a" (x) : - "memory"); - - return dstpp; -} -libc_hidden_builtin_def (memset) - -#else -#include <string/memset.c> -#endif diff --git a/sysdeps/i386/i686/memset_chk.S b/sysdeps/i386/memset_chk.S index da982fd916..5e593a2e84 100644 --- a/sysdeps/i386/i686/memset_chk.S +++ b/sysdeps/i386/memset_chk.S @@ -1,5 +1,5 @@ -/* Checking memset for i686. - Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Checking memset for i386. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,14 +16,13 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include "asm-syntax.h" - #ifndef SHARED - /* For libc.so this is defined in memset.S. - For libc.a, this is a separate source to avoid - memset bringing in __chk_fail and all routines - it calls. */ +# include <sysdep.h> +# include "asm-syntax.h" + +/* For libc.so this is defined in memset.S. For libc.a, this is a + separate source to avoid memset bringing in __chk_fail and all + routines it calls. */ .text ENTRY (__memset_chk) movl 12(%esp), %eax diff --git a/sysdeps/i386/memusage.h b/sysdeps/i386/memusage.h index 45889cc400..719275ca35 100644 --- a/sysdeps/i386/memusage.h +++ b/sysdeps/i386/memusage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/mul_1.S b/sysdeps/i386/mul_1.S index 84a68ff83d..6cb992b747 100644 --- a/sysdeps/i386/mul_1.S +++ b/sysdeps/i386/mul_1.S @@ -1,6 +1,6 @@ /* i80386 __mpn_mul_1 -- Multiply a limb vector with a limb and store the result in a second limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/nptl/Makefile b/sysdeps/i386/nptl/Makefile index a5134c30f2..eee3d75ed7 100644 --- a/sysdeps/i386/nptl/Makefile +++ b/sysdeps/i386/nptl/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/nptl/pthread_spin_init.c b/sysdeps/i386/nptl/pthread_spin_init.c index 3a4547f962..b9b33719fd 100644 --- a/sysdeps/i386/nptl/pthread_spin_init.c +++ b/sysdeps/i386/nptl/pthread_spin_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/sysdeps/i386/nptl/pthread_spin_lock.S b/sysdeps/i386/nptl/pthread_spin_lock.S index 6927f37d16..e311d957d4 100644 --- a/sysdeps/i386/nptl/pthread_spin_lock.S +++ b/sysdeps/i386/nptl/pthread_spin_lock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2015 Free Software Foundation, Inc. +/* Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/nptl/pthread_spin_unlock.S b/sysdeps/i386/nptl/pthread_spin_unlock.S index d4231a6947..a552cf92c1 100644 --- a/sysdeps/i386/nptl/pthread_spin_unlock.S +++ b/sysdeps/i386/nptl/pthread_spin_unlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/sysdeps/i386/nptl/pthreaddef.h b/sysdeps/i386/nptl/pthreaddef.h index 15ec14dcae..c22a6e1d10 100644 --- a/sysdeps/i386/nptl/pthreaddef.h +++ b/sysdeps/i386/nptl/pthreaddef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h index 829cd3a008..a6dfa9b377 100644 --- a/sysdeps/i386/nptl/tls.h +++ b/sysdeps/i386/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. nptl/i386 version. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/i486/pthread_spin_trylock.S b/sysdeps/i386/pthread_spin_trylock.S index afa479dfab..36979bdd1d 100644 --- a/sysdeps/i386/i486/pthread_spin_trylock.S +++ b/sysdeps/i386/pthread_spin_trylock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. diff --git a/sysdeps/i386/rawmemchr.S b/sysdeps/i386/rawmemchr.S index 989669a865..9696926bc7 100644 --- a/sysdeps/i386/rawmemchr.S +++ b/sysdeps/i386/rawmemchr.S @@ -1,6 +1,6 @@ /* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/rshift.S b/sysdeps/i386/rshift.S index fae324b417..d88979542f 100644 --- a/sysdeps/i386/rshift.S +++ b/sysdeps/i386/rshift.S @@ -1,5 +1,5 @@ /* i80386 __mpn_rshift -- - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/setfpucw.c b/sysdeps/i386/setfpucw.c index d7cc409495..497a37b23c 100644 --- a/sysdeps/i386/setfpucw.c +++ b/sysdeps/i386/setfpucw.c @@ -1,5 +1,5 @@ /* Set the FPU control word for x86. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S index 5fe4900154..a29da15d45 100644 --- a/sysdeps/i386/setjmp.S +++ b/sysdeps/i386/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for i386. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -55,3 +55,4 @@ ENTRY (__sigsetjmp) jmp __sigjmp_save #endif END (__sigsetjmp) +hidden_def (__sigsetjmp) diff --git a/sysdeps/i386/stackinfo.h b/sysdeps/i386/stackinfo.h index ca9ff851ec..074cd77246 100644 --- a/sysdeps/i386/stackinfo.h +++ b/sysdeps/i386/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/start.S b/sysdeps/i386/start.S index 04c34b6c24..964e6d9e1e 100644 --- a/sysdeps/i386/start.S +++ b/sysdeps/i386/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF i386 ABI. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/stpcpy.S b/sysdeps/i386/stpcpy.S index dd55d656e9..7999e954aa 100644 --- a/sysdeps/i386/stpcpy.S +++ b/sysdeps/i386/stpcpy.S @@ -1,6 +1,6 @@ /* Copy SRC to DEST returning the address of the terminating '\0' in DEST. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper (drepper@gnu.ai.mit.edu). diff --git a/sysdeps/i386/stpncpy.S b/sysdeps/i386/stpncpy.S index fb9ff2f99e..db808ef984 100644 --- a/sysdeps/i386/stpncpy.S +++ b/sysdeps/i386/stpncpy.S @@ -1,7 +1,7 @@ /* copy no more than N bytes from SRC to DEST, returning the address of the terminating '\0' in DEST. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Some bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/i486/strcat.S b/sysdeps/i386/strcat.S index 88c29fb572..3abc35b072 100644 --- a/sysdeps/i386/i486/strcat.S +++ b/sysdeps/i386/strcat.S @@ -1,6 +1,6 @@ /* strcat(dest, src) -- Append SRC on the end of DEST. For Intel 80x86, x>=4. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>. Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/strchr.S b/sysdeps/i386/strchr.S index d94a673ab1..34489f1104 100644 --- a/sysdeps/i386/strchr.S +++ b/sysdeps/i386/strchr.S @@ -1,6 +1,6 @@ /* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/strchrnul.S b/sysdeps/i386/strchrnul.S index da4385dd70..638f989f80 100644 --- a/sysdeps/i386/strchrnul.S +++ b/sysdeps/i386/strchrnul.S @@ -1,7 +1,7 @@ /* strchrnul (str, chr) -- Return pointer to first occurrence of CHR in STR or the final NUL byte. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org> Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/strcspn.S b/sysdeps/i386/strcspn.S index 960bf6b388..88eb029c14 100644 --- a/sysdeps/i386/strcspn.S +++ b/sysdeps/i386/strcspn.S @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segment of STR which contains no characters from SS. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/string-inlines.c b/sysdeps/i386/string-inlines.c index f2f59f8a88..c7de270c0a 100644 --- a/sysdeps/i386/string-inlines.c +++ b/sysdeps/i386/string-inlines.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,6 +25,10 @@ #define __STRING_INLINE /* empty */ #define __NO_INLINE__ +/* This is to avoid PLT entries for the x86 version. */ +#define __memcpy_g __memcpy_g_internal +#define __strchr_g __strchr_g_internal + #include <string.h> #undef index #undef rindex @@ -33,156 +37,28 @@ #include <bits/string.h> #include <bits/string2.h> -/* Functions which are inlines in i486 but not i386. */ void * -__memcpy_by2 (void *dest, const void *src, size_t n) +(__memcpy_c) (void *d, const void *s, size_t n) { - return memcpy (dest, src, n); + return memcpy (d, s, n); } -strong_alias (__memcpy_by2, __memcpy_by4) -strong_alias (__memcpy_by2, __memcpy_g) -strong_alias (__memcpy_by2, __memcpy_g_internal) void * -__memset_ccn_by2 (void *s, unsigned int c, size_t n) +__memset_cc (void *s, unsigned long int pattern, size_t n) { - return memset (s, c & 0xff, n); + return memset (s, pattern & 0xff, n); } -strong_alias (__memset_ccn_by2, __memset_ccn_by4) +strong_alias (__memset_cc, __memset_cg) void * -__memset_gcn_by2 (void *s, int c, size_t n) +__memset_gg (void *s, char c, size_t n) { return memset (s, c, n); } -strong_alias (__memset_gcn_by2, __memset_gcn_by4) - -size_t -__strlen_g (const char *s) -{ - return strlen (s); -} - -char * -__strcpy_g (char *d, const char *s) -{ - return strcpy (d, s); -} - -char * -__mempcpy_by2 (char *d, const char *s, size_t n) -{ - return mempcpy (d, s, n); -} -strong_alias (__mempcpy_by2, __mempcpy_by4) -strong_alias (__mempcpy_by2, __mempcpy_byn) - -char * -__stpcpy_g (char *d, const char *s) -{ - return stpcpy (d, s); -} - -char * -__strncpy_by2 (char *d, const char s[], size_t srclen, size_t n) -{ - return strncpy (d, s, n); -} -strong_alias (__strncpy_by2, __strncpy_by4) -strong_alias (__strncpy_by2, __strncpy_byn) -char * -__strncpy_gg (char *d, const char *s, size_t n) -{ - return strncpy (d, s, n); -} - -char * -__strcat_c (char *d, const char s[], size_t srclen) -{ - return strcat (d, s); -} - -char * -__strcat_g (char *d, const char *s) -{ - return strcat (d, s); -} - -char * -__strncat_g (char *d, const char s[], size_t n) -{ - return strncat (d, s, n); -} - -int -__strcmp_gg (const char *s1, const char *s2) -{ - return strcmp (s1, s2); -} - -int -__strncmp_g (const char *s1, const char *s2, size_t n) -{ - return strncmp (s1, s2, n); -} - -char * -__strrchr_c (const char *s, int c) -{ - return strrchr (s, c >> 8); -} - -char * -__strrchr_g (const char *s, int c) -{ - return strrchr (s, c); -} - -size_t -__strcspn_cg (const char *s, const char reject[], size_t reject_len) -{ - return strcspn (s, reject); -} - -size_t -__strcspn_g (const char *s, const char *reject) -{ - return strcspn (s, reject); -} - -size_t -__strspn_cg (const char *s, const char accept[], size_t accept_len) -{ - return strspn (s, accept); -} - -size_t -__strspn_g (const char *s, const char *accept) -{ - return strspn (s, accept); -} - -char * -__strpbrk_cg (const char *s, const char accept[], size_t accept_len) -{ - return strpbrk (s, accept); -} - -char * -__strpbrk_g (const char *s, const char *accept) -{ - return strpbrk (s, accept); -} - -char * -__strstr_cg (const char *haystack, const char needle[], size_t needle_len) -{ - return strstr (haystack, needle); -} - -char * -__strstr_g (const char *haystack, const char needle[]) -{ - return strstr (haystack, needle); -} +#ifdef __memcpy_c +# undef __memcpy_g +strong_alias (__memcpy_g_internal, __memcpy_g) +# undef __strchr_g +strong_alias (__strchr_g_internal, __strchr_g) +#endif diff --git a/sysdeps/i386/i486/strlen.S b/sysdeps/i386/strlen.S index fa0e0fe6e3..0d0326cefa 100644 --- a/sysdeps/i386/i486/strlen.S +++ b/sysdeps/i386/strlen.S @@ -1,6 +1,6 @@ /* strlen(str) -- determine the length of the string STR. Optimized for Intel 80x86, x>=4. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>. This file is part of the GNU C Library. diff --git a/sysdeps/i386/strlen.c b/sysdeps/i386/strlen.c index 1839c90df4..5506c8a40b 100644 --- a/sysdeps/i386/strlen.c +++ b/sysdeps/i386/strlen.c @@ -1,5 +1,5 @@ /* Determine the length of a string. For Intel 80x86, x>=3. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). diff --git a/sysdeps/i386/strpbrk.S b/sysdeps/i386/strpbrk.S index 7e5961b355..ad2f02c3b8 100644 --- a/sysdeps/i386/strpbrk.S +++ b/sysdeps/i386/strpbrk.S @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segement of STR which contains no characters from SS. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> This file is part of the GNU C Library. diff --git a/sysdeps/i386/strrchr.S b/sysdeps/i386/strrchr.S index c4ae95d4d6..91f02440a8 100644 --- a/sysdeps/i386/strrchr.S +++ b/sysdeps/i386/strrchr.S @@ -1,6 +1,6 @@ /* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/strspn.S b/sysdeps/i386/strspn.S index b68d5a4776..fd8f555f48 100644 --- a/sysdeps/i386/strspn.S +++ b/sysdeps/i386/strspn.S @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segment of STR which contains only characters from SS. For Intel 80x86, x>=3. - Copyright (C) 1994-2015 Free Software Foundation, Inc. + Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au> diff --git a/sysdeps/i386/strtok.S b/sysdeps/i386/strtok.S index b5f5f927ad..a8a4fe45f2 100644 --- a/sysdeps/i386/strtok.S +++ b/sysdeps/i386/strtok.S @@ -1,6 +1,6 @@ /* strtok (str, delim) -- Return next DELIM separated token from STR. For Intel 80x86, x>=3. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S index 43952c7f4d..3b5340036a 100644 --- a/sysdeps/i386/sub_n.S +++ b/sysdeps/i386/sub_n.S @@ -1,6 +1,6 @@ /* i80386 __mpn_sub_n -- Add two limb vectors of the same length > 0 and store sum in a third limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/submul_1.S b/sysdeps/i386/submul_1.S index e86f9422d8..e1ae58f21f 100644 --- a/sysdeps/i386/submul_1.S +++ b/sysdeps/i386/submul_1.S @@ -1,6 +1,6 @@ /* i80386 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract the result from a second limb vector. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify diff --git a/sysdeps/i386/sys/ucontext.h b/sysdeps/i386/sys/ucontext.h index baf1b57220..d08e1a7f56 100644 --- a/sysdeps/i386/sys/ucontext.h +++ b/sysdeps/i386/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index bde11bf26f..95da385842 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for i386. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,17 +30,9 @@ #endif #ifdef __ASSEMBLER__ -# if __GNUC_PREREQ (4, 7) -# define GET_PC_THUNK(reg) __x86.get_pc_thunk.reg -# else -# define GET_PC_THUNK(reg) __i686.get_pc_thunk.reg -# endif +# define GET_PC_THUNK(reg) __x86.get_pc_thunk.reg #else -# if __GNUC_PREREQ (4, 7) -# define GET_PC_THUNK_STR(reg) "__x86.get_pc_thunk." #reg -# else -# define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg -# endif +# define GET_PC_THUNK_STR(reg) "__x86.get_pc_thunk." #reg #endif #ifdef __ASSEMBLER__ diff --git a/sysdeps/i386/tlsdesc.c b/sysdeps/i386/tlsdesc.c index 7ba373a77d..5b9a96f578 100644 --- a/sysdeps/i386/tlsdesc.c +++ b/sysdeps/i386/tlsdesc.c @@ -1,5 +1,5 @@ /* Manage TLS descriptors. i386 version. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/tst-audit.h b/sysdeps/i386/tst-audit.h index b64c2febf9..ab5e090184 100644 --- a/sysdeps/i386/tst-audit.h +++ b/sysdeps/i386/tst-audit.h @@ -1,6 +1,6 @@ /* Definitions for testing PLT entry/exit auditing. i386 version. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/i386/tst-audit3.c b/sysdeps/i386/tst-audit3.c index cb2fb909f5..d4a08649b7 100644 --- a/sysdeps/i386/tst-audit3.c +++ b/sysdeps/i386/tst-audit3.c @@ -1,5 +1,5 @@ /* Test case for i386 preserved registers in dynamic linker. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/tst-audit3.h b/sysdeps/i386/tst-audit3.h index 9395605959..26c443e23e 100644 --- a/sysdeps/i386/tst-audit3.h +++ b/sysdeps/i386/tst-audit3.h @@ -1,5 +1,5 @@ /* Test case for i386 preserved registers in dynamic linker. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/tst-auditmod3a.c b/sysdeps/i386/tst-auditmod3a.c index 72fcfa7af7..36242137d7 100644 --- a/sysdeps/i386/tst-auditmod3a.c +++ b/sysdeps/i386/tst-auditmod3a.c @@ -1,5 +1,5 @@ /* Test case for i386 preserved registers in dynamic linker. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/i386/tst-auditmod3b.c b/sysdeps/i386/tst-auditmod3b.c index 5b26a132fa..9cc733bdb8 100644 --- a/sysdeps/i386/tst-auditmod3b.c +++ b/sysdeps/i386/tst-auditmod3b.c @@ -1,5 +1,5 @@ /* Test case for i386 preserved registers in dynamic linker. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -82,6 +82,7 @@ la_objsearch (const char *name, uintptr_t *cookie, unsigned int flag) break; case LA_SER_DEFAULT: flagstr = "LA_SER_DEFAULT"; + break; case LA_SER_SECURE: flagstr = "LA_SER_SECURE"; break; diff --git a/sysdeps/i386/tst-ld-sse-use.sh b/sysdeps/i386/tst-ld-sse-use.sh new file mode 100755 index 0000000000..2863de6f8b --- /dev/null +++ b/sysdeps/i386/tst-ld-sse-use.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# Make sure no code in ld.so uses xmm/ymm/zmm registers on i386. +# Copyright (C) 2009-2016 Free Software Foundation, Inc. +# This file is part of the GNU C Library. + +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# <http://www.gnu.org/licenses/>. + +set -e + +objpfx="$1" +NM="$2" +OBJDUMP="$3" +READELF="$4" + +tmp=$(mktemp ${objpfx}tst-ld-sse-use.XXXXXX) +trap 'rm -f "$tmp"' 1 2 3 15 + +# List of object files we have to test +rtldobjs=$($READELF -W -wi ${objpfx}dl-allobjs.os | + awk '/^ </ { if ($5 == "(DW_TAG_compile_unit)") c=1; else c=0 } $2 == "DW_AT_name" { if (c == 1) print $NF }' | + sed 's,\(.*/\|\)\([_[:alnum:]-]*[.]\).$,\2os,') +rtldobjs="$rtldobjs $(ar t ${objpfx}rtld-libc.a)" + +# OBJECT symbols can be ignored. +$READELF -sW ${objpfx}dl-allobjs.os ${objpfx}rtld-libc.a | +egrep " OBJECT *GLOBAL " | +awk '{if ($7 != "ABS") print $8 }' | +sort -u > "$tmp" +declare -a objects +objects=($(cat "$tmp")) + +objs="dl-runtime.os" +tocheck="dl-runtime.os" + +while test -n "$objs"; do + this="$objs" + objs="" + + for f in $this; do + undef=$($NM -u "$objpfx"../*/"$f" | awk '{print $2}') + if test -n "$undef"; then + for s in $undef; do + for obj in ${objects[*]} "_GLOBAL_OFFSET_TABLE_"; do + if test "$obj" = "$s"; then + continue 2 + fi + done + for o in $rtldobjs; do + ro=$(echo "$objpfx"../*/"$o") + if $NM -g --defined-only "$ro" | egrep -qs " $s\$"; then + if ! (echo "$tocheck $objs" | fgrep -qs "$o"); then + echo "$o needed for $s" + objs="$objs $o" + fi + break; + fi + done + done + fi + done + tocheck="$tocheck$objs" +done + +echo +echo +echo "object files needed: $tocheck" + +cp /dev/null "$tmp" +for f in $tocheck; do + $OBJDUMP -d "$objpfx"../*/"$f" | + awk 'BEGIN { last="" } /^[[:xdigit:]]* <[_[:alnum:]]*>:$/ { fct=substr($2, 2, length($2)-3) } /,%[xyz]mm[[:digit:]]*$/ { if (last != fct) { print fct; last=fct} }' | + while read fct; do + if test "$fct" = "_dl_runtime_profile" -o "$fct" = "_dl_x86_64_restore_sse"; then + continue; + fi + echo "function $fct in $f modifies xmm/ymm/zmm" >> "$tmp" + result=1 + done +done + +if test -s "$tmp"; then + echo + echo + cat "$tmp" + result=1 +else + result=0 +fi + +rm "$tmp" +exit $result diff --git a/sysdeps/i386/tst-stack-align.h b/sysdeps/i386/tst-stack-align.h index cbd5a68192..821cec860b 100644 --- a/sysdeps/i386/tst-stack-align.h +++ b/sysdeps/i386/tst-stack-align.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or |