diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 23:51:43 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 23:51:43 +0200 |
commit | f878a3f38ab697e9a4e7214ec8813e017f9bf999 (patch) | |
tree | 77609e9d3b37736572ba3e1d0e954c16b68e3783 | |
parent | 91b66605c042fe7a67ea5df24e2556a164bebb75 (diff) | |
parent | b934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff) |
Merge commit 'refs/top-bases/t/EIEIO-fr' into t/EIEIO-fr
881 files changed, 21071 insertions, 12992 deletions
@@ -1,3 +1,2753 @@ +2013-03-28 Roland McGrath <roland@hack.frob.com> + + * sysdeps/posix/libc_fatal.c: Don't include <sys/syslog.h>. + (__libc_message): Never call vsyslog. + +2013-03-28 Alan Modra <amodra@gmail.com> + + * sysdeps/powerpc/powerpc32/start.S (cfi_startproc, cfi_endproc): + Define as empty. + * sysdeps/powerpc/powerpc64/start.S (cfi_startproc, cfi_endproc): + Likewise. + +2013-03-28 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + [BZ #15214] + * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Fix spurious + underflow. + * sysdeps/powerpc/fpu/libm-test-ulps: Update. + +2013-03-28 Siddhesh Poyarekar <siddhesh@redhat.com> + + [BZ #15304] + * hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_initgroups_dyn): + Don't add gid passed as argument. + + * sysdeps/ieee-754/dbl-64/e_atan2.c: Reformat. + +2013-03-27 Joseph Myers <joseph@codesourcery.com> + + [BZ #15307] + * math/k_casinh.c (__kernel_casinh): Handle arguments with + imaginary part between 1.0 and 1.5 and real part less than 0.5 + specially. + * math/k_casinhf.c (__kernel_casinhf): Likewise. + * math/k_casinhl.c (__kernel_casinhl): Likewise. + * math/libm-test.inc (cacos_test): Add more tests. + (casin_test): Likewise. + (casinh_test): Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Update. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + +2013-03-26 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpa.c (__acr): Use integral + constants. + (norm): Likewise. + (denorm): Likewise. + (__dbl_mp): Likewise. + (add_magnitudes): Likewise. + (sub_magnitudes): Likewise. + (__add): Likewise. + (__sub): Likewise. + (__mul): Likewise. + (__sqr): Likewise. + (__inv): Likewise. + (__dvd): Likewise. + + * sysdeps/ieee754/dbl-64/branred.c (__branred): Remove + commented code. + * sysdeps/ieee754/dbl-64/dosincos.c (__dubsin): Likewise. + (__dubcos): Likewise. + * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Likewise. + (__ieee754_acos): Likewise. + * sysdeps/ieee754/dbl-64/e_atan2.c (__ieee754_atan2): Likewise. + * sysdeps/ieee754/dbl-64/e_exp.c (__ieee754_exp): Likewise. + (__exp1): Likewise. + * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Likewise. + * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Likewise. + (log1): Likewise. + (my_log2): Likewise. + (checkint): Likewise. + * sysdeps/ieee754/dbl-64/e_remainder.c + (__ieee754_remainder): Likewise. + * sysdeps/ieee754/dbl-64/s_atan.c (atan): Likewise. + * sysdeps/ieee754/dbl-64/s_sin.c (__sin): Likewise. + (bsloww): Likewise. + * sysdeps/ieee754/dbl-64/s_tan.c (tan): Likewise. + + * sysdeps/ieee754/dbl-64/mpa-arch.h: New file. + * sysdeps/ieee754/dbl-64/mpa.c (norm): Use MANTISSA_T and + MANTISSA_STORE_T to store computations on mantissa. Use + macros for rounding and division. + (denorm): Likewise. + (__dbl_mp): Likewise. + (add_magnitudes): Likewise. + (sub_magnitudes): Likewise. + (__mul): Likewise. + (__sqr): Likewise. + * sysdeps/ieee754/dbl-64/mpa.h: Include mpa-arch.h. Define + powers of two in terms of TWOPOW macro. + (mp_no): Make type of mantissa as MANTISSA_T. + [!RADIXI]: Define RADIXI. + [!TWO52]: Define TWO52. + * sysdeps/powerpc/power4/fpu/mpa-arch.h: New file. + +2013-03-25 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + * sysdeps/powerpc/fpu/s_llround.c: Fix libm ABI issue with missing + llroundl symbol when building for PPC32. + +2013-03-24 Mark H Weaver <mhw@netris.org> + + * manual/arith.texi (Normalization Functions): Fix prototypes for + scalbn, scalbnf, scalbnl, scalbln, scalblnf, and scalblnl. + +2013-03-19 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + [BZ #13889] + * sysdeps/ieee754/ldbl-128ibm/e_expl.c (__ieee754_expl): Increase the + high value to check if expl overflow. + * sysdeps/ieee754/ldbl-128ibm/w_expl.c (__expl): Fix threshold constants + to check for underflow and overflow. + * math/libm-test.inc: Add exp test. + +2013-03-21 Dmitry V. Levin <ldv@altlinux.org> + + [BZ #11120] + * sysdeps/x86_64/strcmp.S: Replace all occurrences of NOT_IN_lib + with NOT_IN_libc. + +2013-03-21 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + * sysdeps/powerpc/fpu/w_sqrt.c (compat_symbol): Add sqrtl compat + symbol. + +2013-03-21 Thomas Schwinge <thomas@codesourcery.com> + + * math/gen-libm-test.pl (parse_args, special_functions): Properly + wrap blocks consisting of several statements. + + * sysdeps/generic/math-tests.h: New file. + * sysdeps/i386/fpu/math-tests.h: Likewise. + * math/test-snan.c: Include it. + (TEST_FUNC): Use SNAN_TESTS to short-circuit certain tests. + +2013-03-21 Joseph Myers <joseph@codesourcery.com> + + [BZ #15285] + * sysdeps/ieee754/ldbl-128/e_j0l.c: Include <float.h>. + (__ieee754_j0l): Do not improve calculations using cos of twice + input for inputs above LDBL_MAX / 2.0L. + (__ieee754_y0l): Likewise. + * sysdeps/ieee754/ldbl-128/e_j1l.c: Include <float.h>. + (__ieee754_j1l): Do not improve calculations using cos of twice + input for inputs above LDBL_MAX / 2.0L. + (__ieee754_y1l): Likewise. + * math/libm-test.inc (j0_test): Add another test. + (j1_test): Likewise. + (y0_test): Likewise. + (y1_test): Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Update. + +2013-03-21 Siddhesh Poyarekar <siddhesh@redhat.com> + + * Rules ($(objpfx)bench-%.c): Include code from a C source + file. + +2013-03-21 Joseph Myers <joseph@codesourcery.com> + + [BZ #15287] + * math/k_casinh.c (__kernel_casinh): Handle arguments with + imaginary part 1.0 and real part less than 0.5 specially. + * math/k_casinhf.c (__kernel_casinhf): Likewise. + * math/k_casinhl.c (__kernel_casinhl): Likewise. + * math/libm-test.inc (cacos_test): Add more tests. + (casin_test): Likewise. + (casinh_test): Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Update. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + +2013-03-21 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpsqrt.c (__mpsqrt): Use HALFRAD. + * sysdeps/ieee754/dbl-64/sincos32.c (__mpranred): Likewise. + +2013-03-20 Joseph Myers <joseph@codesourcery.com> + + * aclocal.m4 (LIBC_CONFIG_VAR): New autoconf macro. + * config.make.in (config-cflags-sse4): Remove variable. + (config-cflags-avx): Likewise. + (config-cflags-sse2avx): Likewise. + (config-cflags-novzeroupper): Likewise. + (config-asflags-i686): Likewise. + (have-mfma4): Likewise. + (have-as-vis3): Likewise. + (MIG): Likewise. + * configure.in (MIG): Do not AC_SUBST. + (libc_cv_cc_nofma): Move AC_SUBST next to configure test. + (libc_cv_cc_sse4): Do not AC_SUBST. + (libc_cv_cc_avx): Likewise. + (libc_cv_cc_sse2avx): Likewise. + (libc_cv_cc_novzeroupper): Likewise. + (libc_cv_cc_fma4): Likewise. + (libc_cv_as_i686): Likewise. + (libc_cv_sparc_as_vis3): Likewise. + * sysdeps/i386/configure.in (config-cflags-sse4): Set using + LIBC_CONFIG_VAR. + (config-asflags-i686): Likewise. + (config-cflags-avx): Likewise. + (config-cflags-sse2avx): Likewise. + (have-mfma4): Likewise. + (config-cflags-novzeroupper): Likewise. + * sysdeps/mach/configure.in (MIG): Likewise. + * sysdeps/sparc/configure.in (have-as-vis3): Likewise. + * sysdeps/x86_64/configure.in (config-cflags-sse4): Set using + LIBC_CONFIG_VAR. + (config-cflags-avx): Likewise. + (config-cflags-sse2avx): Likewise. + (have-mfma4): Likewise. + (config-cflags-novzeroupper): Likewise. + * configure: Regenerated. + * sysdeps/i386/configure: Likewise. + * sysdeps/mach/configure: Likewise. + * sysdeps/sparc/configure: Likewise. + * sysdeps/x86_64/configure: Likewise. + +2013-03-20 Roland McGrath <roland@hack.frob.com> + + [BZ #14812] + * locale/programs/localedef.c (options): Put N_ translation marker + on argument names, not just descriptions. + +2013-03-20 Marcus Shawcroft <marcus.shawcroft@linaro.org> + + * Makerules ($(inst_libdir)/libc.so): Use $(rtlddir). + +2013-03-20 Ondřej Bílka <neleai@seznam.cz> + + [BZ #14176] + * stdlib/stdlib.h (mblen, mbtowc, wctomb): Remove __wur. + +2013-03-19 Roland McGrath <roland@hack.frob.com> + + * sysdeps/posix/libc_fatal.c: Include <sys/mman.h>. + [!WRITEV_FOR_FATAL] (writev_for_fatal): New function. + [!WRITEV_FOR_FATAL] (WRITEV_FOR_FATAL): New macro; call that. + [!BEFORE_ABORT] (before_abort): New function. + [!BEFORE_ABORT] (BEFORE_ABORT): New macro; call that. + * sysdeps/unix/sysv/linux/libc_fatal.c: Trim includes. + (writev_for_fatal): New function. + (WRITEV_FOR_FATAL): New macro; call that. + (backtrace_and_maps): New function. + (BEFORE_ABORT): New macro; call that. + (struct str_list): Type removed. + (__libc_message, __libc_fatal): Functions removed. + Include <sysdeps/posix/libc_fatal.c> instead. + +2013-03-19 Joseph Myers <joseph@codesourcery.com> + + * math/k_casinhf.c (__kernel_casinhf): Consistently use float + constants. + * math/k_casinhl.c (__kernel_casinhl): Consistently use long + double constants. + +2013-03-19 Andreas Schwab <schwab@suse.de> + + * sysdeps/gnu/configure.in: Set libc_cv_rtldir for s390x. + * sysdeps/gnu/configure: Regenerate. + + * configure.in: Substitute libc_cv_rtlddir. + * configure: Regenerate. + * config.make.in (rtlddir): Set from libc_cv_rtlddir. + * Makeconfig (rtlddir, inst_rtlddir): New variables. + (rtld-LDFLAGS): Use them with $(rtld-installed-name). + * elf/Makefile (install-others, CFLAGS-interp.c) + (ldso_install, common-ldd-rewrite): Likewise. + ($(inst_rtlddir)/$(rtld-installed-name)): Renamed from + $(inst_slibdir)/$(rtld-installed-name). + * scripts/rellns-sh: Add -p option. + * Makerules (make-shlib-link): Use rellns-sh to get relative name + for source. + +2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com> + + * manual/nptl.texi: Renamed to ... + * manual/threads.texi: ... this. + * manual/Makefile (chapters): Update. + +2013-03-18 Roland McGrath <roland@hack.frob.com> + + [BZ #14812] + * argp/argp-parse.c (argp_default_options): Put N_ translation marker + on argument names, not just descriptions. + * malloc/memusagestat.c (options): Likewise. + * nss/getent.c (options): Likewise. + +2013-03-18 Benno Schulenberg <bensberg@justemail.net> + + [BZ #14812] + * iconv/iconv_prog.c (options): Put N_ translation marker + on argument names, not just descriptions. + * iconv/iconvconfig.c (options): Likewise. + +2013-03-18 Ondrej Bilka <neleai@seznam.cz> + + * sysdeps/x86_64/strlen.S: Replace with new SSE2 based + implementation which is faster on all x86_64 architectures. + Tested on AMD, Intel Nehalem, SNB, IVB. + * sysdeps/x86_64/strnlen.S: Likewise. + + * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): + Remove all multiarch strlen and strnlen versions. + * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Update. + Remove strlen and strnlen related parts. + + * sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: Update. + Inline strlen part. + * sysdeps/x86_64/multiarch/strcat-ssse3.S: Likewise. + + * sysdeps/x86_64/multiarch/strlen.S: Remove. + * sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S: Likewise. + * sysdeps/x86_64/multiarch/strlen-sse2-pminub.S: Likewise. + * sysdeps/x86_64/multiarch/strlen-sse4.S: Likewise. + * sysdeps/x86_64/multiarch/strnlen.S: Likewise. + * sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S: Likewise. + +2013-03-17 Carlos O'Donell <carlos@redhat.com> + + * manual/memory.texi (Malloc Tunable Parameters): + Sort parameters alphabetically. Add comments for missing entries. + +2013-03-17 David S. Miller <davem@davemloft.net> + + * sysdeps/sparc/fpu/libm-test-ulps: Update. + +2013-03-16 Joseph Myers <joseph@codesourcery.com> + + [BZ #15283] + * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_y1l): Correct test + for arguments at most half maximum finite value. + * math/libm-test.inc (j0_test): Add more tests. + (j1_test): Likewise. + (y0_test): Likewise. + (y1_test): Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Update. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + + [BZ #14155] + * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Do not compute + 1 / x and functions P and Q for arguments above 0x1p256L. + (__ieee754_y0l): Likewise. + * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise. + (__ieee754_y1l): Likewise. + * math/libm-test.inc (j0_test): Do not allow spurious underflows. + (j1_test): Likewise. + (y0_test): Likewise. + (y1_test): Likewise. + +2013-03-16 Thomas Schwinge <thomas@codesourcery.com> + + * math/test-snan.c (TEST_FUNC): Add and use minus_sNaN_var + variable. + +2013-03-15 Roland McGrath <roland@hack.frob.com> + + * elf/dl-support.c (_dl_aux_init): Ignore zero value for AT_PAGESZ. + (_dl_non_dynamic_init): Don't set _dl_pagesize; it will never be + zero since it's initialized to EXEC_PAGESIZE. + + * sysdeps/unix/sysv/linux/ldsodefs.h + (_dl_non_dynamic_init, _dl_aux_init): Move declarations to ... + * sysdeps/generic/ldsodefs.h: ... here. + +2013-03-15 Thomas Schwinge <thomas@codesourcery.com> + + * math/libm-test.inc (ldexp_test): Add missing START/END markers. + + * sysdeps/powerpc/fpu/test-powerpc-snan.c: Rename to + math/test-snan.c. + * math/test-snan.c: Renamed from + sysdeps/powerpc/fpu/test-powerpc-snan.c. + * math/Makefile (tests): Add test-snan. + * sysdeps/powerpc/fpu/Makefile (libm-tests): Don't add + test-powerpc-snan. + + * math/basic-test.c (TEST_FUNC): Replace NANFUNC argument with + SUFFIX. Initialize qNaN_var with __builtin_nan family of + functions. + (TEST_TRUNC): Add SUFFIX argument. Initialize qNaN_var with + __builtin_nan family of functions. + * math/libm-test.inc (initialize): Initialize qnan_value with + __builtin_nan family of functions. + * sysdeps/powerpc/fpu/test-powerpc-snan.c (SNANf, SNAN, SNANl): + Remove variables. + (init_signaling_nan, snan_float, snan_double, snan_ldouble): + Remove functions. + (TEST_FUNC): Add SUFFIX argument. Move sNaN_var into static + storage class. Initialize qNaN_var and sNaN_var with + __builtin_nan and __builtin_nans families of functions, + respectively. + + * math/libm-test.inc (acosh_test): Also test with qNaN input. + (sqrt_test): Remove duplicate test with qNaN input. + (lrint_test, llrint_test, lround_test, llround_test, rint_test) + (round_test, signbit_test, significand_test): Note missing +/-Inf + as well as qNaN tests. + + * math/basic-test.c (TEST_FUNC, TEST_TRUNC): Rename NaN_var to + qNaN_var. Fix a few strings, too. + * math/libm-test.inc (nan_value): Rename to qnan_value. + * math/gen-libm-test.pl (%beautify): Adjust to that. + * math/bits/mathcalls.h (nan): Refer to qNaN instead of NaN. + * math/test-misc.c (main): Likewise. + * sysdeps/ieee754/bits/nan.h (__nan_bytes, __nan_union): Rename + to __qnan_bytes, and __qnan_union, respectively. + * ports/sysdeps/mips/bits/nan.h (__nan_bytes, __nan_union): + Likewise. + * stdio-common/tstdiomisc.c (nanval, lnanval): Rename to qnanval, + and lqnanval, respectively. + * sysdeps/powerpc/bits/fenv.h: Fix usage of NaN/qNaN/sNaN. + * sysdeps/powerpc/fpu/fenv_libc.h: Likewise. + * sysdeps/powerpc/fpu/test-powerpc-snan.c (TEST_FUNC): Likewise, + and rename NaN_var to qNaN_var, and SNaN_var to sNaN_var. + + * math/libm-test.inc (fpstack_test) [__x86_64__]: Enable test. + * math/test-misc.c (main) [__x86_64__]: Enable test for long + doubles. + + * math/test-misc.c (main): Fix copy'n'pastos. + * misc/tst-efgcvt.c (special): Likewise. + + * stdio-common/printf_fp.c (__isinfl_internal, __isnanl_internal): + Remove declarations. + +2013-03-15 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpa-arch.h: Remove. + * sysdeps/ieee754/dbl-64/mpa.c: Revert last change. + * sysdeps/ieee754/dbl-64/mpa.h: Revert last change. + * sysdeps/powerpc/power4/fpu/mpa-arch.h: Remove. + +2013-03-15 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + * sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h (VDSO_IFUNC_RET): Add + macro to return vdso values correctly in IFUNC implementations. + * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (__gettimeofday): + Optimization by using IFUNC. + +2013-03-15 Siddhesh Poyarekar <siddhesh@redhat.com> + Richard Henderson <rth@redhat.com> + Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> + + * Makefile.in (bench): New target. + * NEWS: Mention the benchmark framework. + * Rules (bench): Likewise. + (binaries-bench): Generate binaries for functions to + benchmark. + * benchtests/Makefile: New makefile for benchmark tests. + * benchtests/bench-skeleton.c: New skeleton file for benchmark + programs. + * benchtests/exp-inputs: New input file for EXP function. + * benchtests/pow-inputs: New input file for POW function. + * scripts/bench.pl: New script to generate source files for + benchmark programs. + +2013-03-15 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpa-arch.h: New file. + * sysdeps/ieee754/dbl-64/mpa.c (norm): Use MANTISSA_T to store + computations on mantissa. Use macros for rounding and + division. + (denorm): Likewise. + (__dbl_mp): Likewise. + (add_magnitudes): Likewise. + (sub_magnitudes): Likewise. + (__mul): Likewise. + (__sqr): Likewise. + * sysdeps/ieee754/dbl-64/mpa.h: Include mpa-arch.h. Define + powers of two in terms of TWOPOW macro. + (mp_no): Make type of mantissa as MANTISSA_T. + [!RADIXI]: Define RADIXI. + [!TWO52]: Define TWO52. + * sysdeps/powerpc/power4/fpu/mpa-arch.h: New file. + + * manual/nptl.texi (cindex): Modify threads to pthreads. + +2013-03-15 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/x86_64/preconfigure: Regenerated. + +2013-03-14 Joseph Myers <joseph@codesourcery.com> + + [BZ #14155] + * sysdeps/ieee754/dbl-64/e_j0.c (pzero): Return 1.0 for arguments + 0x1p28 and above. + (qzero): Return -0.125 / x for arguments 0x1p28 and above. + * sysdeps/ieee754/dbl-64/e_j1.c (pzero): Return 1.0 for arguments + 0x1p28 and above. + (qzero): Return 0.375 / x for arguments 0x1p28 and above. + * math/libm-test.inc (j0_test): Do not allow one spurious + underflow exception. + (y1_test): Likewise. + +2013-03-14 Siddhesh Poyarekar <siddhesh@redhat.com> + + * manual/Makefile (chapters): Add nptl. + * manual/debug.texi (Debugging Support): Add link to Threads + chapter. + * manual/nptl.texi: New file. + + * sysdeps/unix/sysv/linux/times.c (__times): Fix formatting. + +2013-03-14 Petr Baudis <pasky@ucw.cz> + + * sysdeps/unix/sysv/linux/times.c (__times): On EFAULT, test + for non-NULL pointer before the memory validity test. Pointed + out by Holger Brunck <holger.brunck@keymile.com>. + +2013-03-13 Andreas Schwab <schwab@suse.de> + + * extra-lib.mk (extra-objs): Add static-only-routines as .oS + instead of .os. + +2013-03-13 Joseph Myers <joseph@codesourcery.com> + + * timezone/zic.c: Update from tzcode 2013b. + +2013-03-12 Carlos O'Donell <carlos@redhat.com> + + * manual/install.texi (Configuring and compiling): + Mention i686 and i586. + * INSTALL: Regenerate. + +2013-03-12 Roland McGrath <roland@hack.frob.com> + + * sysdeps/init_array/elf-init.c: New file. + * csu/elf-init.c + (__libc_csu_init) [!NO_INITFINI]: Conditionalize _init call on this. + (__libc_csu_fini) [!NO_INITFINI]: Conditionalize _fini call on this. + + * csu/gmon-start.c [GMON_START_ARRAY_SECTION]: Don't define + __gmon_start__ as global, but as static with a .preinit_array pointer. + * sysdeps/init_array/gmon-start.c: New file. Use that. + * sysdeps/init_array/crti.S: New file, empty except for comments. + * sysdeps/init_array/crtn.S: Likewise. + +2013-03-11 Ondřej Bílka <neleai@seznam.cz> + + * sysdeps/x86_64/memset.S: Remove USE_MULTIARCH conditional for + definining bcopy. + * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): + Remove Prefer_SSE_for_memop. + * sysdeps/x86_64/multiarch/init-arch.h: Remove + bit_Prefer_SSE_for_memop, index_Prefer_SSE_for_memop, + HAS_PREFER_SSE_FOR_MEMOP. + * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Remove + memset-x86-64. + * sysdeps/x86_64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): + Remove bzero, memset ifunc support. + * sysdeps/x86_64/multiarch/bzero.S: Remove file. + * sysdeps/x86_64/multiarch/memset-x86-64.S: Likewise. + * sysdeps/x86_64/multiarch/memset.S: Likewise. + * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. + +2013-03-11 Andreas Schwab <schwab@suse.de> + + [BZ #15234] + * Versions.def (libpthread): Add GLIBC_2.3, so that it can be used + by SHLIB_COMPAT. + * sysdeps/unix/sysv/linux/x86_64/x32/nptl/libpthread.abilist + (GLIBC_2.16): Remove pthread_atfork. + +2013-03-08 Paul Pluzhnikov <ppluzhnikov@google.com> + + * posix/Makefile (testcases.h): Set LC_ALL=C before sed. + (ptestcases.h): Likewise. + +2013-03-08 Roland McGrath <roland@hack.frob.com> + + * Makeconfig ($(common-objpfx)config.status): Depend on + sysdeps/*/preconfigure{,.in} too. + +2013-03-08 Joseph Myers <joseph@codesourcery.com> + + * malloc/malloc.h (__malloc_ptr_t): Remove macro. + (__free_hook): Use void * instead of __malloc_ptr_t. + (__malloc_hook): Likewise. + (__realloc_hook): Likewise. + (__memalign_hook): Likewise. + (__after_morecore_hook): Likewise. + * malloc/arena.c (save_malloc_hook): Likewise. + (save_free_hook): Likewise. + * malloc/hooks.c (malloc_hook_ini): Likewise. + (realloc_hook_ini): Likewise. + (memalign_hook_ini): Likewise. + * malloc/malloc.c (malloc_hook_ini): Likewise. + (realloc_hook_ini): Likewise. + (memalign_hook_ini): Likewise. + (__free_hook): Likewise. + (__malloc_hook): Likewise. + (__realloc_hook): Likewise. + (__memalign_hook): Likewise. + (__libc_malloc): Likewise. + (__libc_free): Likewise. + (__libc_realloc): Likewise. + (__libc_memalign): Likewise. + (__libc_valloc): Likewise. + (__libc_pvalloc): Likewise. + (__libc_calloc): Likewise. + (__posix_memalign): Likewise. + * malloc/morecore.c (__sbrk): Likewise. + (__default_morecore): Likewise. + + * malloc/morecore.c (__default_morecore): Use ISO C prototype. + + * malloc/malloc.h (__malloc_ptrdiff_t): Remove macro. + * malloc/morecore.c (__default_morecore): Use ptrdiff_t instead of + __malloc_ptrdiff_t. + + * malloc/malloc.h (__malloc_size_t): Remove macro. + * malloc/mcheck.c (old_malloc_hook): Use size_t instead of + __malloc_size_t. + (old_memalign_hook): Likewise. + (old_realloc_hook): Likewise. + (struct hdr): Likewise. + (flood): Likewise. + (mallochook): Likewise. + (memalignhook): Likewise. + (reallochook): Likewise. + * malloc/mtrace.c (tr_old_malloc_hook): Likewise. + (tr_old_realloc_hook): Likewise. + (tr_old_memalign_hook): Likewise. + (tr_mallochook): Likewise. + (tr_reallochook): Likewise. + (tr_memalignhook): Likewise. + +2013-03-08 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h (ldbl_pack): Rename to + default_ldbl_pack and using as default implementation. + (ldbl_unpack): Rename to default_ldbl_unpack and using as default + implementation. + * sysdeps/powerpc/fpu/math_ldbl.h (ldbl_extract_mantissa): Remove + redundant definition. + (ldbl_insert_mantissa): Likewise. + (ldbl_canonicalize): Likewise. + (ldbl_nearbyint): Likewise. + (ldbl_pack): Rename to ldbl_pack_ppc. + (ldbl_unpack): Rename to ldbl_unpack_ppc. + * sysdeps/unix/sysv/linux/powerpc/Implies: Remove file. + * sysdeps/powerpc/Implies: Add ieee754/ldbl-opt after ieee754/ldbl-128ibm. + +2013-03-08 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c: Move file... + * sysdeps/powerpc/power4/fpu/mpa.c: ... here. + * sysdeps/powerpc/powerpc32/power4/fpu/Makefile: Move file... + * sysdeps/powerpc/power4/fpu/Makefile: ... here. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c: Remove file. + * sysdeps/powerpc/powerpc64/power4/fpu/Makefile: Remove file. + * sysdeps/powerpc/powerpc32/power4/Implies: New file. + * sysdeps/powerpc/powerpc64/power4/Implies: New file. + +2013-03-07 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add + bits/mman-linux.h. + +2013-03-07 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/slowexp.c [!USE_LONG_DOUBLE_FOR_MP]: + Include mpa.h and declare __MPEXP. + [USE_LONG_DOUBLE_FOR_MP] (__slowexp): Call __IEEE754_EXPL. + * sysdeps/powerpc/powerpc32/power4/fpu/Makefile + (CPPFLAGS-slowexp.c): Define USE_LONG_DOUBLE_FOR_MP. + * sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c: Remove. + * sysdeps/powerpc/powerpc64/power4/fpu/Makefile + (CPPFLAGS-slowexp.c): Define USE_LONG_DOUBLE_FOR_MP. + * sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c: Remove. + + * sysdeps/ieee754/dbl-64/slowpow.c [USE_LONG_DOUBLE_FOR_MP] + (__slowpow): Use long double EXPL and LOGL functions to + compute POW. + * sysdeps/powerpc/powerpc32/power4/fpu/Makefile + (CPPFLAGS-slowpow.c): Define USE_LONG_DOUBLE_FOR_MP. + * sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c: Remove. + * sysdeps/powerpc/powerpc64/power4/fpu/Makefile + (CPPFLAGS-slowpow.c): Define USE_LONG_DOUBLE_FOR_MP. + * sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c: Remove. + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mul): Use + intermediate variable to calculate exponent. + (__sqr): Likewise. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mul): + Likewise. + (__sqr): Likewise. + + * sysdeps/ieee754/dbl-64/mpa.c [!NO__MUL]: Define __mul. + [!NO__SQR]: Define __sqr. + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c: define NO__MUL + and NO__SQR. Remove all code except __mul and __sqr. Include + sysdeps/ieee754/dbl-64/mpa.c. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c: Likewise. + + [BZ #12723] + * posix/Makefile (tests): Add tst-pathconf. + * posix/tst-pathconf.c: New test case. + * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Remove + _PC_PIPE_BUF. + * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise. + +2013-03-06 Patsy Franklin <pfrankli@redhat.com> + + * io/fcntl.h: Added a comment about AT_EACCESS and AT_REMOVEDIR. + +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS): Allow + definition via __MAP_ANONYMOUS. + + * sysdeps/unix/sysv/linux/s390/bits/mman.h (MAP_GROWSUP): Remove, + it's not part of Linux headers. + + * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_HUGE_SHIFT): Define. + (MAP_HUGE_MASK): Define. + + * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (PTRACE_O_EXIT_KILL): + Define. + (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL. + * sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_O_EXIT_KILL): + Define. + (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL. + * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_O_EXIT_KILL): + Define. + (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL. + * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_O_EXITKILL): + Define. + (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL. + + * sysdeps/unix/sysv/linux/x86/bits/msq.h (MSG_COPY): Likewise. + * sysdeps/unix/sysv/linux/generic/bits/msq.h (MSG_COPY): Define. + * sysdeps/unix/sysv/linux/powerpc/bits/msq.h (MSG_COPY): Likewise. + * sysdeps/unix/sysv/linux/bits/msq.h (MSG_COPY): Likewise. + * sysdeps/unix/sysv/linux/s390/bits/msq.h (MSG_COPY): Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/msq.h (MSG_COPY): Define. + + * sysdeps/unix/sysv/linux/pathconf.c (__statfs_filesize_max): + Handle f2fs. + + * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): + Handle f2fs and efivarfs. + + * sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Handle + f2fs. + + * sysdeps/unix/sysv/linux/linux_fsinfo.h (F2FS_SUPER_MAGIC): Add. + (EFIVARFS_MAGIC): Add. + (F2FS_LINK_MAX): Add. + +2013-03-06 Paul Pluzhnikov <ppluzhnikov@google.com> + + * stdio-common/vfprintf.c: Replace __builtin_expect with + __glibc_unlikely. + +2013-03-06 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/generic/bp-sym.h: Remove file. + * sysdeps/powerpc/powerpc64/bp-asm.h: Likewise. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__longjmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/a2/memcpy.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/cell/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/memcpy.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/memset.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (memset): Don't use BP_SYM. + (memset) [__BOUNDED_POINTERS__]: Remove conditional code. + (memset) [!__BOUNDED_POINTERS__]: Make code unconditional. + (__bzero): Don't use BP_SYM. + (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code. + (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc64/power4/memcmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcmp): Don't use BP_SYM. Remove comment about bounded + pointers. + * sysdeps/powerpc/powerpc64/power4/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power4/memset.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memset): Don't use BP_SYM. + (memset) [__BOUNDED_POINTERS__]: Remove conditional code. + (memset) [!__BOUNDED_POINTERS__]: Make code unconditional. + (__bzero): Don't use BP_SYM. + (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code. + (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc64/power4/strncmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strncmp): Don't use BP_SYM. Remove comment about bounded + pointers. + * sysdeps/powerpc/powerpc64/power6/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power6/memset.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memset): Don't use BP_SYM. + (memset) [__BOUNDED_POINTERS__]: Remove conditional code. + (memset) [!__BOUNDED_POINTERS__]: Make code unconditional. + (__bzero): Don't use BP_SYM. + (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code. + (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc64/power7/memchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__memchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/memcmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcmp): Don't use BP_SYM. Remove comment about bounded + pointers. + * sysdeps/powerpc/powerpc64/power7/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/mempcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__mempcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/memrchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__memrchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/memset.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memset): Don't use BP_SYM. + (__bzero): Likewise. + * sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__rawmemchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/strcasecmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__STRCMP): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/strchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/strchrnul.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__strchrnul): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/strlen.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strlen): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/power7/strncmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strncmp): Don't use BP_SYM. Remove comment about bounded + pointers. + * sysdeps/powerpc/powerpc64/power7/strnlen.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__strnlen): Don't use BP_SYM. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__GI__setjmp): Don't use BP_SYM. + (_setjmp): Likewise. + (__sigsetjmp): Likewise. + * sysdeps/powerpc/powerpc64/start.S: Don't include "bp-sym.h". + (L(start_addresses)): Don't use BP_SYM. + (_start): Likewise. + * sysdeps/powerpc/powerpc64/stpcpy.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__stpcpy): Don't use BP_SYM, CHECK_BOUNDS_LOW, + STORE_RETURN_BOUNDS, CHECK_BOUNDS_HIGH and STORE_RETURN_VALUE. + (__stpcpy) [__BOUNDED_POINTERS__]: Remove conditional code. + (__stpcpy) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc64/strchr.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strchr): Don't use BP_SYM, CHECK_BOUNDS_LOW, STORE_RETURN_BOUNDS, + CHECK_BOUNDS_HIGH_RTN and STORE_RETURN_VALUE. Remove comment + about bounded pointers. + (strchr) [__BOUNDED_POINTERS__]: Remove conditional code. + (strchr) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc64/strcmp.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strcmp): Don't use BP_SYM and CHECK_BOUNDS_LOW. Remove comment + about bounded pointers. Remove GKM FIXME comments. + (strcmp) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc64/strcpy.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strcpy): Don't use BP_SYM, CHECK_BOUNDS_LOW and + STORE_RETURN_BOUNDS. Remove comment about bounded pointers. + Remove GKM FIXME comments. + (strcpy) [__BOUNDED_POINTERS__]: Remove conditional code. + (strcpy) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc64/strlen.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strlen): Don't use BP_SYM and CHECK_BOUNDS_LOW. Remove comment + about bounded pointers. Remove GKM FIXME comment. + * sysdeps/powerpc/powerpc64/strncmp.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (strncmp): Don't use BP_SYM. Remove comment about bounded + pointers. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__brk): Don't use BP_SYM and DISCARD_BOUNDS. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__clone): Don't use BP_SYM and DISCARD_BOUNDS. Remove GKM FIXME + comment. + +2013-03-05 Paul Pluzhnikov <ppluzhnikov@google.com> + + * stdio-common/vfprintf.c (vfprintf): Check malloc return; don't + call free(NULL). + +2013-03-05 David S. Miller <davem@davemloft.net> + + * po/es.po: Update from translation team. + +2013-03-05 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Include + <bits/mman-linux.h>. + (MCL_CURRENT, MCL_FUTURE): Do not define here, the generic value + is fine. + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Move include of + <bits/mman-linux.h> to end of file. + (MCL_CURRENT, MCL_FUTURE): Do not define here, the generic value + is fine. + * sysdeps/unix/sysv/linux/x86/bits/mman.h: Move include of + <bits/mman-linux.h> to end of file. + (MCL_CURRENT, MCL_FUTURE): Do not define here, the generic value + is fine. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Move include of + <bits/mman-linux.h> to end of file. + + * sysdeps/unix/sysv/linux/bits/mman-linux.h [!MCL_CURRENT] + (MCL_CURRENT, MCL_FUTURE): Define here. + +2013-03-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + [BZ #15232] + * sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Use + attribute_hidden. + * sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise. + +2013-03-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Set the + fourth parameter needed for rt_sigprocmask syscall. + * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: + * sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/ucontext_i.sym: Define _NSIG8. + +2013-03-04 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/powerpc/powerpc32/power4/strncmp.S (strncmp): Remove + comment about bounded pointers. + * sysdeps/powerpc/powerpc32/power7/strncmp.S (strncmp): Likewise. + * sysdeps/powerpc/powerpc32/strncmp.S (strncmp): Likewise. + +2013-03-04 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/bits/mman-linux.h: New file, with Linux + common definitions. + + * sysdeps/unix/sysv/linux/sh/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + * sysdeps/unix/sysv/linux/x86/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. + +2013-03-04 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + [BZ #15055] + * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Use + __ieee754_sqrl instead of __sqrl. + +2013-03-01 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/powerpc/fpu/fpu_control.h: Move to ... + * sysdeps/powerpc/fpu_control.h: ... here. + * sysdeps/powerpc/fpu/bits/fenvinline.h: Move to ... + * sysdeps/powerpc/bits/fenvinline.h: ... here. + * sysdeps/powerpc/fpu/bits/mathinline.h: Move to ... + * sysdeps/powerpc/bits/mathinline.h: ... here. + +2013-03-01 Roland McGrath <roland@hack.frob.com> + + * elf/dl-hwcaps.c (_dl_important_hwcaps): + Change [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO] conditionals + to just [NEED_DL_SYSINFO_DSO]. + * elf/dl-support.c: Likewise. + * elf/dl-sysdep.c (_dl_sysdep_start): Likewise. + * elf/rtld.c (dl_main): Likewise. + * elf/setup-vdso.h (setup_vdso): Likewise. + * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Likewise. + * sysdeps/unix/sysv/linux/dl-sysdep.c + (_dl_discover_osversion): Likewise. + +2013-03-01 Carlos O'Donell <carlos@redhat.com> + + * csu/libc-start.c (__pthread_initialize_minimal): Revert last change. + * csu/libc-tls.c (__pthread_initialize_minimal): Likewise. + +2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com> + + * NEWS: Mention libm performance improvements and non-x86 PI + futex support. + + * csu/libc-start.c (__pthread_initialize_minimal): Change + function arguments. + * csu/libc-tls.c (__pthread_initialize_minimal): Likewise. + +2013-02-28 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/powerpc/powerpc32/bp-asm.h: Remove file. + * sysdeps/powerpc/powerpc32/__longjmp-common.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__longjmp): Don't use BP_SYM and CHECK_BOUNDS_BOTH_WIDE_LIT. + * sysdeps/powerpc/powerpc32/a2/memcpy.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/add_n.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__mpn_add_n): Don't use BP_SYM. + (__mpn_add_n) [__BOUNDED_POINTERS_]: Remove conditional code. + * sysdeps/powerpc/powerpc32/addmul_1.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (__mpn_addmul_1): Don't use BP_SYM. + (__mpn_addmul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Don't include + <bp-sym.h>. + (_setjmp): Don't use BP_SYM. + (__novmx_setjmp): Likewise. + (__GI__setjmp): Likewise. + (__vmx_setjmp): Likewise. + * sysdeps/powerpc/powerpc32/bsd-setjmp.S: Don't include + <bp-sym.h>. + * sysdeps/powerpc/powerpc32/bzero.S: Don't include <bp-sym.h>. + (__bzero): Don't use BP_SYM. + (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code. + (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc32/cell/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__longjmp): Don't use BP_SYM and CHECK_BOUNDS_BOTH_WIDE_LIT. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__sigsetjmp): Don't use BP_SYM and CHECK_BOUNDS_BOTH_WIDE_LIT. + * sysdeps/powerpc/powerpc32/lshift.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__mpn_lshift): Don't use BP_SYM. + (__mpn_lshift) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc32/memset.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (memset): Don't use BP_SYM. + (memset) [__BOUNDED_POINTERS__]: Remove conditional code. + (memset) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc32/mul_1.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__mpn_mul_1): Don't use BP_SYM. + (__mpn_mul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc32/power4/memcmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power4/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power4/memset.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memset): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power4/strncmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strncmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power6/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power6/memset.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memset): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/memchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__memchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/memcmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/memcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/mempcpy.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__mempcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/memrchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__memrchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/memset.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (memset): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/rawmemchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__rawmemchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/strcasecmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__STRCMP): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/strchr.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strchr): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/strchrnul.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__strchrnul): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/strlen.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strlen): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/strncmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strncmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/power7/strnlen.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__strnlen): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/rshift.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__mpn_rshift): Don't use BP_SYM. + (__mpn_rshift) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc32/setjmp-common.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__sigsetjmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/start.S: Don't include "bp-sym.h". + (L(start_addresses)): Don't use BP_SYM. + (_start): Likewise. + * sysdeps/powerpc/powerpc32/stpcpy.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__stpcpy): Don't use BP_SYM and macros from bp-asm.h. + (__stpcpy) [__BOUNDED_POINTERS__]: Remove conditional code. + (__stpcpy) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc32/strchr.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strchr): Don't use BP_SYM.h and macros from bp-asm.h. + (strchr) [__BOUNDED_POINTERS__]: Remove conditional code. + (strchr) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc32/strcmp.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strcmp): Don't use BP_SYM and CHECK_BOUNDS_LOW. Remove GKM FIXME + comments. + (strcmp) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc32/strcpy.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strcpy): Don't use BP_SYM and macros from bp-asm.h. Remove GKM + FIXME comments. + (strcpy) [__BOUNDED_POINTERS__]: Remove conditional code. + (strcpy) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/powerpc/powerpc32/strlen.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (strlen): Don't use BP_SYM and CHECK_BOUNDS_LOW. Remove GKM FIXME + comment. + * sysdeps/powerpc/powerpc32/strncmp.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (strncmp): Don't use BP_SYM, + * sysdeps/powerpc/powerpc32/sub_n.S: Don't include <bp-sym.h> and + <bp-asm.h>. + (__mpn_sub_n): Don't use BP_SYM. + (__mpn_sub_n) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/powerpc/powerpc32/submul_1.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (__mpn_submul_1): Don't use BP_SYM. + (__mpn_submul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__brk): Don't use BP_SYM and DISCARD_BOUNDS. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (__clone): Don't use BP_SYM and DISCARD_BOUNDS. Remove GKM FIXME + comment. + +2013-02-28 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (add_magnitudes): + Use ZK to minimize writes to Z. + (sub_magnitudes): Simplify code a bit. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (add_magnitudes): + Use ZK to minimize writes to Z. + (sub_magnitudes): Simplify code a bit. + +2013-02-27 Roland McGrath <roland@hack.frob.com> + + * csu/gmon-start.c: Add special exception to license text. + +2013-02-27 Richard Henderson <rth@redhat.com> + + * scripts/config.guess: Update from config.git. + * scripts/config.sub: Likewise. + +2013-02-27 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpsqrt.c: Reformat. + + * sysdeps/ieee754/dbl-64/mpatan2.c: Reformat. + + * sysdeps/ieee754/dbl-64/mpatan.c: Reformat. + + * sysdeps/ieee754/dbl-64/mptan.c: Reformat. + + * sysdeps/ieee754/dbl-64/mplog.c: Reformat. + +2013-02-26 Roland McGrath <roland@hack.frob.com> + + * Makeconfig (%.v.i, %.v): Move these pattern rules outside of + [$(build-shared = yes]. + +2013-02-26 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpa.c: Include alloca.h. + (__mul): Reduce iterations for calculating mantissa. + + * sysdeps/ieee754/dbl-64/sincos32.c (__c32): Use MPONE and + MPTWO. + (__mpranred): Likewise. + + [BZ #15160] + * malloc/memusagestat.c (main): Draw graphs for heap and stack + only if MAXSIZE_HEAP and MAXSIZE_STACK are non-zero. + +2013-02-26 Paul Eggert <eggert@cs.ucla.edu> + + * posix/regex_internal.h [__GNUC__ < 3 + (__GNUC_MINOR__ < 1]: + Define __attribute__. + +2013-02-26 Siddhesh Poyarekar <siddhesh@redhat.com> + + * locale/elem-hash.h (elem_hash): Mark as pure and possibly + unused. + * posix/regex_internal.h (__attribute): Remove. + [!_LIBC && __i386__]: Use __attribute__ instead of __attribute. + (re_string_context_at): Likewise. + (bitset_not): Use __attribute__ and mark function as possibly + unused. + (bitset_merge): Likewise. + (bitset_mask): Likewise. + (re_string_char_size_at): Likewise. + (re_string_wchar_at): Likewise. + (re_string_elem_size_at): Likewise. + +2013-02-25 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/sincos32.c (ss32): Remove commented + code. + (cc32): Likewise. + + * sysdeps/ieee754/dbl-64/mpa.c (mcr): Use long instead of int. + (__acr): Likewise. + (__cpy): Likewise. + (norm): Likewise. + (denorm): Likewise. + (__dbl_mp): Likewise. + (add_magnitudes): Likewise. + (sub_magnitudes): Likewise. + (__mul): Likewise. + (__inv): Likewise. + + * sysdeps/ieee754/dbl-64/slowexp.c: Reformat in GNU coding + style. + + * sysdeps/ieee754/dbl-64/slowpow.c: Reformat in GNU coding + style. + + * sysdeps/ieee754/dbl-64/slowexp.c (__slowexp): Remove commented + code. + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mp_dbl): Sync + up changes with default code. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mp_dbl): + Likewise. + +2013-02-24 Allan McRae <allan@archlinux.org> + + * manual/socket.texi (The Internet Namespace): Order menu items + to match that in the file. + + * manual/libc-texinfo.sh: Use @detailmenu around the detailed + node listing of the info page menu. + +2013-02-21 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/i386/bp-asm.h: Remove file. + * sysdeps/i386/add_n.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (S2): Likewise. + (SIZE): Likewise. + (__mpn_add_n): Do not use BP_SYM + * sysdeps/i386/addmul_1.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (SIZE): Likewise. + (__mpn_addmul_1): Do not use BP_SYM + * sysdeps/i386/bsd-_setjmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (SIGMSK): Likewise. + (_setjmp): Likewise. Do not use BP_SYM. + * sysdeps/i386/bsd-setjmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (SIGMSK): Likewise. + (setjmp): Likewise. Do not use BP_SYM. + * sysdeps/i386/fpu/s_frexp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (__frexp): Do not use BP_SYM. + (frexp): Likewise. + * sysdeps/i386/fpu/s_frexpf.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (__frexpf): Do not use BP_SYM. + (frexpf): Likewise. + * sysdeps/i386/fpu/s_frexpl.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (__frexpl): Do not use BP_SYM. + (frexpl): Likewise. + * sysdeps/i386/fpu/s_remquo.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (__remquo): Do not use BP_SYM. + (remquo): Likewise. + * sysdeps/i386/fpu/s_remquof.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (__remquof): Do not use BP_SYM. + (remquof): Likewise. + * sysdeps/i386/fpu/s_remquol.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (__remquol): Do not use BP_SYM. + (remquol): Likewise. + * sysdeps/i386/i486/strcat.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (strcat): Remove GKM FIXME comment. Do not use BP_SYM. + * sysdeps/i386/i486/strlen.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (strlen): Do not use BP_SYM. + * sysdeps/i386/i586/add_n.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (S2): Likewise. + (SIZE): Likewise. + (__mpn_add_n): Do not use BP_SYM. + * sysdeps/i386/i586/addmul_1.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (SIZE): Likewise. + (__mpn_addmul_1): Do not use BP_SYM. + * sysdeps/i386/i586/bzero.S (__bzero): Do not use BP_SYM in + weak_alias. + (bzero): Likewise. + * sysdeps/i386/i586/lshift.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S): Likewise. + (SIZE): Likewise. + (__mpn_lshift): Do not use BP_SYM. + * sysdeps/i386/i586/memcpy.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (LEN): Likewise. + (memcpy): Likewise. Do not use BP_SYM. + * sysdeps/i386/i586/mempcpy.S (__mempcpy): Do not use BP_SYM in + libc_hidden_def and weak_alias. + (mempcpy): Do not use BP_SYM in weak_alias. + * sysdeps/i386/i586/memset.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (LEN): Likewise. + [!BZERO_P] (CHR): Likewise. + (memset): Likewise. Do not use BP_SYM. + * sysdeps/i386/i586/mul_1.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (SIZE): Likewise. + (__mpn_mul_1): Do not use BP_SYM. + * sysdeps/i386/i586/rshift.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S): Likewise. + (SIZE): Likewise. + (__mpn_rshift): Do not use BP_SYM. + * sysdeps/i386/i586/strchr.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (CHR): Likewise. + (strchr): Likewise. Do not use BP_SYM. + (index): Do not use BP_SYM in weak_alias. + * sysdeps/i386/i586/strcpy.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (STRCPY): Likewise. Remove GKM FIXME comment. Do not use BP_SYM. + * sysdeps/i386/i586/strlen.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (strlen): Do not use BP_SYM. + * sysdeps/i386/i586/sub_n.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (S2): Likewise. + (SIZE): Likewise. + (__mpn_sub_n): Do not use BP_SYM. + * sysdeps/i386/i586/submul_1.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (SIZE): Likewise. + (__mpn_submul_1): Do not use BP_SYM. + * sysdeps/i386/i686/add_n.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (S2): Likewise. + (SIZE): Likewise. + (__mpn_add_n): Do not use BP_SYM. + * sysdeps/i386/i686/bzero.S (__bzero): Do not use BP_SYM in + weak_alias. + (bzero): Likewise. + * sysdeps/i386/i686/memcmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (BLK2): Likewise. + (LEN): Likewise. + (memcmp): Do not use BP_SYM. + (bcmp): Do not use BP_SYM in weak_alias. + * sysdeps/i386/i686/memcpy.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (LEN): Likewise. + (memcpy): Likewise. Do not use BP_SYM. + * sysdeps/i386/i686/memmove.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (LEN): Likewise. + (memmove): Likewise. Do not use BP_SYM. + * sysdeps/i386/i686/mempcpy.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (LEN): Likewise. + (__mempcpy): Likewise. Do not use BP_SYM. + (mempcpy): Do not use BP_SYM in weak_alias. + * sysdeps/i386/i686/memset.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (LEN): Likewise. + [!BZERO_P] (CHR): Likewise. + (memset): Likewise. Do not use BP_SYM. + * sysdeps/i386/i686/strcmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR2): Likewise. + (strcmp): Do not use BP_SYM. + * sysdeps/i386/i686/strtok.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (DELIM): Likewise. + [USE_AS_STRTOK_R] (SAVE): Likewise. + (FUNCTION): Likewise. Do not use BP_SYM. + * sysdeps/i386/i686/strtok_r.S (__strtok_r): Do not use BP_SYM in + aliases. + (strtok_r): Likewise. + (__GI___strtok_r): Likewise. + * sysdeps/i386/lshift.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S): Likewise. + (SIZE): Likewise. + (__mpn_lshift): Do not use BP_SYM. + * sysdeps/i386/memchr.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (CHR): Likewise. + (__memchr): Do not use BP_SYM. + (memchr): Do not use BP_SYM in weak_alias. + * sysdeps/i386/memcmp.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (BLK2): Likewise. + (LEN): Likewise. + (memcmp): Do not use BP_SYM. + (bcmp): Do not use BP_SYM in weak_alias. + * sysdeps/i386/mul_1.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (SIZE): Likewise. + (__mpn_mul_1): Do not use BP_SYM. + * sysdeps/i386/rawmemchr.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (CHR): Likewise. + (__rawmemchr): Do not use BP_SYM. + (rawmemchr): Do not use BP_SYM in weak_alias. + * sysdeps/i386/rshift.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S): Likewise. + (SIZE): Likewise. + (__mpn_rshift): Do not use BP_SYM. + * sysdeps/i386/setjmp.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (SIGMSK): Likewise. + (__sigsetjmp): Likewise. Do not use BP_SYM. + * sysdeps/i386/start.S: Do not include "bp-sym.h". + (_start): Do not use BP_SYM. + * sysdeps/i386/stpcpy.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (__stpcpy): Likewise. Do not use BP_SYM. + (stpcpy): Do not use BP_SYM in weak_alias. + * sysdeps/i386/stpncpy.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (DEST): Likewise. + (SRC): Likewise. + (LEN): Likewise. + (__stpncpy): Likewise. Do not use BP_SYM. + (stpncpy): Do not use BP_SYM in weak_alias. + * sysdeps/i386/strchr.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (CHR): Likewise. + (strchr): Likewise. Do not use BP_SYM. + * sysdeps/i386/strchrnul.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (CHR): Likewise. + (__strchrnul): Likewise. Do not use BP_SYM. + (strchrnul): Do not use BP_SYM in weak_alias. + * sysdeps/i386/strcspn.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STOP): Likewise. + (strcspn): Do not use BP_SYM. + * sysdeps/i386/strpbrk.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (STOP): Likewise. + (strpbrk): Likewise. Do not use BP_SYM. + * sysdeps/i386/strrchr.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (CHR): Likewise. + (strrchr): Likewise. Do not use BP_SYM. + * sysdeps/i386/strspn.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (SKIP): Likewise. + (strspn): Do not use BP_SYM. + * sysdeps/i386/strtok.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (STR): Likewise. + (DELIM): Likewise. + (SAVE): Likewise. + (FUNCTION): Likewise. Do not use BP_SYM. + * sysdeps/i386/strtok_r.S (__strtok_r): Do not use BP_SYM in + aliases. + (strtok_r): Likewise. + (__GI___strtok_r): Likewise. + * sysdeps/i386/sub_n.S: Do not include "bp-sym.h" and "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (S2): Likewise. + (SIZE): Likewise. + (__mpn_sub_n): Do not use BP_SYM. + * sysdeps/i386/submul_1.S: Do not include "bp-sym.h" and + "bp-asm.h". + (PARMS): Do not use macros from bp-asm.h. + (S1): Likewise. + (SIZE): Likewise. + (__mpn_submul_1): Do not use BP_SYM. + * sysdeps/unix/i386/sysdep.S: Do not include <bp-asm.h> and + <bp-sym.h>. + * sysdeps/unix/sysv/linux/i386/clone.S: Do not include <bp-sym.h> + and <bp-asm.h>. + (PARMS): Do not use macros from bp-asm.h. + (FLAGS): Likewise. + (PTID): Likewise. + (TLS): Likewise. + (CTID): Likewise. + (__clone): Do not use BP_SYM. + (clone): Do not use BP_SYM in weak_alias. + * sysdeps/unix/sysv/linux/i386/mmap64.S: Do not include <bp-sym.h> + and <bp-asm.h>. + (PARMS): Do not use macros from bp-asm.h. + (LEN): Likewise. + (__mmap64): Do not use BP_SYM. + (mmap64): Do not use BP_SYM in weak_alias. + * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Do not include + <bp-sym.h> and <bp-asm.h>. + (PARMS): Do not use macros from bp-asm.h. + (__posix_fadvise64_l64): Do not use BP_SYM. + * sysdeps/unix/sysv/linux/i386/semtimedop.S + (PARMS): Do not use macros from bp-asm.h. + (NSOPS): Likewise. + (semtimedop): Do not use BP_SYM. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Do not include <bp-sym.h> + and <bp-asm.h>. + +2013-02-21 Allan McRae <allan@archlinux.org> + + * manual/message.texi (Charset conversion in gettext): + Move @end statement to beginning of line. + +2013-02-21 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__inv): Mark as + static. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__inv): + Likewise. + + * sysdeps/ieee754/dbl-64/mpa.c (norm): Fix whitespace. + (denorm): Likewise. + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (norm): Likewise. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (norm): Likewise. + +2013-02-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * sysdeps/s390/s390-32/dl-trampoline.S (_dl_runtime_profile): Do a + tail-call to the resolved function if pltexit isn't needed. + +2013-02-21 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mul): Mark X + or Y being zero as being unlikely. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mul): + Likewise. + +2013-02-20 Carlos O'Donell <carlos@redhat.com> + + * manual/nss.texi (System Databases and Name Service Switch): + Remove frobnicate @pxref. + +2013-02-20 Thomas Schwinge <thomas@codesourcery.com> + + * sysdeps/ieee754/bits/nan.h [!__GNUC__] (__nan_union): Change + __attribute__ ((unused)) to __attribute__ ((__unused__)). + +2013-02-20 Petr Machata <pmachata@redhat.com> + + * elf/elf.h (R_ARM_TARGET1): New macro. + (R_ARM_SBREL31, R_ARM_V4BX, R_ARM_TARGET2): Likewise. + (R_ARM_PREL31, R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS): Likewise. + (R_ARM_MOVW_PREL_NC, R_ARM_MOVT_PREL): Likewise. + (R_ARM_THM_MOVW_ABS_NC, R_ARM_THM_MOVT_ABS): Likewise. + (R_ARM_THM_MOVW_PREL_NC, R_ARM_THM_MOVT_PREL): Likewise. + (R_ARM_THM_JUMP19, R_ARM_THM_JUMP6): Likewise. + (R_ARM_THM_ALU_PREL_11_0, R_ARM_THM_PC12): Likewise. + (R_ARM_ABS32_NOI, R_ARM_REL32_NOI): Likewise. + (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G0): Likewise. + (R_ARM_ALU_PC_G1_NC, R_ARM_ALU_PC_G1): Likewise. + (R_ARM_ALU_PC_G2, R_ARM_LDR_PC_G1, R_ARM_LDR_PC_G2): Likewise. + (R_ARM_LDRS_PC_G0, R_ARM_LDRS_PC_G1): Likewise. + (R_ARM_LDRS_PC_G2, R_ARM_LDC_PC_G0): Likewise. + (R_ARM_LDC_PC_G1, R_ARM_LDC_PC_G2): Likewise. + (R_ARM_ALU_SB_G0_NC, R_ARM_ALU_SB_G0): Likewise. + (R_ARM_ALU_SB_G1_NC, R_ARM_ALU_SB_G1): Likewise. + (R_ARM_ALU_SB_G2, R_ARM_LDR_SB_G0, R_ARM_LDR_SB_G1): Likewise. + (R_ARM_LDR_SB_G2, R_ARM_LDRS_SB_G0): Likewise. + (R_ARM_LDRS_SB_G1, R_ARM_LDRS_SB_G2): Likewise. + (R_ARM_LDC_SB_G0, R_ARM_LDC_SB_G1, R_ARM_LDC_SB_G2): Likewise. + (R_ARM_MOVW_BREL_NC, R_ARM_MOVT_BREL): Likewise. + (R_ARM_MOVW_BREL, R_ARM_THM_MOVW_BREL_NC): Likewise. + (R_ARM_THM_MOVT_BREL, R_ARM_THM_MOVW_BREL): Likewise. + (R_ARM_PLT32_ABS, R_ARM_GOT_ABS, R_ARM_GOT_PREL): Likewise. + (R_ARM_GOT_BREL12, R_ARM_GOTOFF12, R_ARM_GOTRELAX): Likewise. + (R_ARM_TLS_LDO12, R_ARM_TLS_LE12, R_ARM_TLS_IE12GP): Likewise. + (R_ARM_PRIVATE_0, R_ARM_PRIVATE_1, R_ARM_PRIVATE_2): Likewise. + (R_ARM_PRIVATE_3, R_ARM_PRIVATE_4, R_ARM_PRIVATE_5): Likewise. + (R_ARM_PRIVATE_6, R_ARM_PRIVATE_7, R_ARM_PRIVATE_8): Likewise. + (R_ARM_PRIVATE_9, R_ARM_PRIVATE_10): Likewise. + (R_ARM_PRIVATE_11, R_ARM_PRIVATE_12): Likewise. + (R_ARM_PRIVATE_13, R_ARM_PRIVATE_14): Likewise. + (R_ARM_PRIVATE_15, R_ARM_ME_TOO): Likewise. + (R_ARM_THM_TLS_DESCSEQ16, R_ARM_THM_TLS_DESCSEQ32): Likewise. + (R_ARM_THM_GOT_BREL12): Likewise. + (R_ARM_PC24, R_ARM_PLT32): Updated a comment at this macro. + (R_ARM_THM_PC11, R_ARM_THM_PC9): Likewise. + (R_ARM_THM_ABS5, R_ARM_THM_PC22): Added a comment to this macro. + (R_ARM_THM_PC8, R_ARM_THM_SWI8, R_ARM_XPC25): Likewise. + (R_ARM_THM_XPC22, R_ARM_ALU_PCREL_7_0): Likewise. + (R_ARM_ALU_PCREL_15_8, R_ARM_ALU_PCREL_23_15): Likewise. + (R_ARM_LDR_SBREL_11_0, R_ARM_ALU_SBREL_19_12): Likewise. + (R_ARM_ALU_SBREL_27_20, R_ARM_TLS_DESCSEQ): Likewise. + (R_ARM_THM_TLS_DESCSEQ): Fixed whitespace. + +2013-02-20 Thomas Schwinge <thomas@codesourcery.com> + + * sysdeps/ieee754/bits/nan.h [!__GNUC__] (__nan_union): Change + __attribute_used__ to __attribute__ ((unused)). + +2013-02-20 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpa.c (__sqr): Copy over comment from + powerpc mpa.c. + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mul): Fix + comment formatting. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mul): Likewise. + +2013-02-19 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/i386/bp-asm.h [__BOUNDED_POINTERS__] (BOUNDS_VIOLATED): + Remove macro. + (ENTER): Remove both macro definitions. + (LEAVE): Likewise. + (CHECK_BOUNDS_LOW): Likewise. + (CHECK_BOUNDS_HIGH): Likewise. + (CHECK_BOUNDS_BOTH): Likewise. + (CHECK_BOUNDS_BOTH_WIDE): Likewise. + (RETURN_BOUNDED_POINTER): Likewise. + (RETURN_NULL_BOUNDED_POINTER): Likewise. + (PUSH_ERRNO_LOCATION_RETURN): Likewise. + (POP_ERRNO_LOCATION_RETURN): Likewise. + * sysdeps/i386/add_n.S (__mpn_add_n): Do not use removed macros. + (__mpn_add_n) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/addmul_1.S (__mpn_addmul_1): Do not use removed + macros. + (__mpn_addmul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/bsd-_setjmp.S (_setjmp): Do not use removed macros. + * sysdeps/i386/bsd-setjmp.S (setjmp): Likewise. + * sysdeps/i386/fpu/s_frexp.S (__frexp): Likewise. + * sysdeps/i386/fpu/s_frexpf.S (__frexpf): Likewise. + * sysdeps/i386/fpu/s_frexpl.S (__frexpl): Likewise. + * sysdeps/i386/fpu/s_remquo.S (__remquo): Likewise. + * sysdeps/i386/fpu/s_remquof.S (__remquof): Likewise. + * sysdeps/i386/fpu/s_remquol.S (__remquol): Likewise. + * sysdeps/i386/i486/strcat.S (strcat): Likewise. + * sysdeps/i386/i486/strlen.S (strlen): Likewise. + * sysdeps/i386/i586/add_n.S (__mpn_add_n): Likewise. + (__mpn_add_n) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i586/addmul_1.S (__mpn_addmul_1): Do not use + removed macros. + (__mpn_addmul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i586/lshift.S (__mpn_lshift): Do not use removed + macros. + (__mpn_lshift) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i586/memcpy.S (memcpy): Do not use removed macros. + * sysdeps/i386/i586/memset.S (memset): Likewise. + * sysdeps/i386/i586/mul_1.S (__mpn_mul_1): Likewise. + (__mpn_mul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i586/rshift.S (__mpn_rshift): Do not use removed + macros. + (__mpn_rshift) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i586/strchr.S (strchr): Do not use removed macros. + Change uses of L(2) to L(out). + * sysdeps/i386/i586/strcpy.S (STRCPY): Do not use removed macros. + * sysdeps/i386/i586/strlen.S (strlen): Likewise. + * sysdeps/i386/i586/sub_n.S (__mpn_sub_n): Likewise. + (__mpn_sub_n) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i586/submul_1.S (__mpn_submul_1): Do not use + removed macros. + (__mpn_submul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i686/add_n.S (__mpn_add_n): Do not use removed + macros. + (__mpn_add_n) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i686/memcmp.S (ENTRANCE): Do not use macro ENTER. + (RETURN): Do not use macro LEAVE. + * sysdeps/i386/i686/memcpy.S (memcpy): Do not use removed macros. + * sysdeps/i386/i686/memmove.S (memmove): Likewise. + * sysdeps/i386/i686/mempcpy.S (mempcpy): Likewise. + * sysdeps/i386/i686/memset.S (memset): Likewise. + * sysdeps/i386/i686/strcmp.S (strcmp): Likewise. + (strcmp) [!__BOUNDED_POINTERS__]: Make code unconditional. + (strcmp) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/i686/strtok.S (save_ptr) [__BOUNDED_POINTERS__]: + Likewise. + (save_ptr) [!__BOUNDED_POINTERS__]: Make code unconditional. + (FUNCTION): Do not use removed macros. Combine labels L(1_1), + L(1_2) and L(1_3) into L(1). + (FUNCTION) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/lshift.S (__mpn_lshift): Do not use removed macros. + (__mpn_lshift) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/memchr.S (__memchr): Do not use removed macros. + (__memchr) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/memcmp.S (memcmp): Do not use removed macros. + * sysdeps/i386/mul_1.S (__mpn_mul_1): Likewise. + (__mpn_mul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/rawmemchr.S (__rawmemchr): Do not use removed + macros. + * sysdeps/i386/rshift.S (__mpn_rshift): Likewise. + (__mpn_rshift) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/setjmp.S (__sigsetjmp): Do not use removed macros. + * sysdeps/i386/stpcpy.S (__stpcpy): Likewise. + * sysdeps/i386/stpncpy.S (__stpncpy): Likewise. + (__stpncpy) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/strchr.S (strchr): Do not use removed macros. + * sysdeps/i386/strchrnul.S (__strchrnul): Likewise. + * sysdeps/i386/strcspn.S (strcspn): Likewise. + * sysdeps/i386/strpbrk.S (strpbrk): Likewise. + * sysdeps/i386/strrchr.S (strrchr): Likewise. + * sysdeps/i386/strspn.S (strspn): Likewise. + * sysdeps/i386/strtok.S (save_ptr) [__BOUNDED_POINTERS__]: Remove + conditional code. + (save_ptr) [!__BOUNDED_POINTERS__]: Make code unconditional. + (FUNCTION) [!__BOUNDED_POINTERS__]: Likewise. + (FUNCTION) [__BOUNDED_POINTERS__]: Remove conditional code. + (FUNCTION): Do not use removed macros. Combine labels L(1_2) and + L(1_3) into L(1_1). + * sysdeps/i386/sub_n.S (__mpn_sub_n): Do not use removed macros. + (__mpn_sub_n) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/i386/submul_1.S (__mpn_submul_1): Do not use removed + macros. + (__mpn_submul_1) [__BOUNDED_POINTERS__]: Remove conditional code. + +2013-02-19 Jakub Jelinek <jakub@redhat.com> + + * stdlib/strtod_l.c (__mpn_lshift_1): Rewritten as function-like + macro. + +2013-02-19 Siddhesh Poyarekar <siddhesh@redhat.com> + + * math/atest-exp.c (exp_mpn): Remove ROUND. + * math/atest-exp2.c (exp_mpn): Likewise. + * math/atest-sincos.c (sincosx_mpn): Remove ROUND and CHK. + + * stdlib/cxa_thread_atexit_impl.c: Fix Copyright year. + * stdlib/tst-tls-atexit-lib.c: Likewise. + * stdlib/tst-tls-atexit.c: Likewise. + +2013-02-18 Mike Frysinger <vapier@gentoo.org> + + * stdlib/stdlib.h (aligned_alloc): Use __attribute_malloc__ + and __attribute_alloc_size__. + +2013-02-18 Mike Frysinger <vapier@gentoo.org> + + * include/programs/xmalloc.h: Change __attribute_alloc_size to + __attribute_alloc_size__. + * include/sys/cdefs.h (__attribute_alloc_size): Macro removed. + * misc/sys/cdefs.h (__attribute_alloc_size__): New macro. + +2013-02-18 Mike Frysinger <vapier@gentoo.org> + + * include/programs/xmalloc.h: New file. + * catgets/gencat.c: Include it. + (xmalloc, xcalloc, xrealloc, xstrdup): Don't declare them. + * elf/pldd.c: Likewise. + * iconv/iconv_charmap.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * iconv/strtab.c: Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.h: Likewise. + * locale/programs/simple-hash.c: Likewise. + * nscd/nscd.h: Likewise. + * nss/makedb.c: Likewise. + * sysdeps/generic/ldconfig.h: Likewise. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * Versions.def: Add GLIBC_2.18. + * include/link.h (struct link_map): New member l_tls_dtor_count. + * include/stdlib.h (__cxa_thread_atexit_impl): Declare. + (__call_tls_dtors): Likewise. + * sysdeps/unix/sysv/linux/i386/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist: Likewise. + * sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist: + Likewise. + * stdlib/Makefile (routines): Add __cxa_thread_atexit_impl. + (tests): Add test case tst-tls-atexit. + (modules-names): Add shared library for tst-tls-atexit. + * stdlib/Versions (GLIBC_2.17): Add __cxa_thread_atexit_impl. + (GLIBC_PRIVATE): Add __call_tls_dtors. + * stdlib/cxa_thread_atexit_impl.c: New file with helper function + for libstdc++. + * stdlib/exit.c (__run_exit_handlers): Call __call_tls_dtors. + * stdlib/tst-tls-atexit.c: New test case. + * stdlib/tst-tls-atexit-lib.c: New test case. + + * misc/tst-pselect.c: Include stdlib.h for declaration of exit. + + * elf/Versions (ld): Add _dl_find_dso_for_object. + * elf/dl-addr.c (_dl_addr): Use _dl_find_dso_for_object. + * elf/dl-open.c (_dl_find_dso_for_object): New function. + (dl_open_worker): Use _dl_find_dso_for_object. + * elf/dl-sym.c (do_sym): Likewise. + * sysdeps/generic/ldsodefs.h: Declare _dl_find_dso_for_object. + +2013-02-18 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * sysdeps/s390/s390-64/dl-trampoline.S (_dl_runtime_resolve): + Syntactic changes only. + (_dl_runtime_profile): Do a tail-call to the resolved function. + +2013-02-17 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/x86_64/bp-asm.h: Remove file. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Do not include + <bp-sym.h> and <bp-asm.h>. + (__clone): Do not use BP_SYM. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Do not include + <bp-sym.h> and <bp-asm.h>. + * sysdeps/unix/x86_64/sysdep.S: Likewise. + * sysdeps/x86_64/bsd-_setjmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (_setjmp): Do not use BP_SYM. + * sysdeps/x86_64/bsd-setjmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (setjmp): Do not use BP_SYM. + * sysdeps/x86_64/mempcpy.S (__mempcpy): Do not use BP_SYM in + libc_hidden_def. + (mempcpy): Do not use BP_SYM in weak_alias. + * sysdeps/x86_64/rtld-strchr.S: Do not include "bp-sym.h" and + "bp-asm.h". + (strchr): Do not use BP_SYM. + * sysdeps/x86_64/rtld-strlen.S: Do not include "bp-sym.h" and + "bp-asm.h". + * sysdeps/x86_64/setjmp.S (__sigsetjmp): Do not use BP_SYM. + * sysdeps/x86_64/start.S: Do not include "bp-sym.h". + (_start): Do not use BP_SYM. + * sysdeps/x86_64/strcat.S: Do not include "bp-sym.h" and + "bp-asm.h". + (strcat): Do not use BP_SYM. + * sysdeps/x86_64/strcmp.S: Do not include "bp-sym.h" and + "bp-asm.h". + (STRCMP): Do not use BP_SYM. + * sysdeps/x86_64/strcpy.S: Do not include "bp-sym.h" and + "bp-asm.h". + (STRCPY): Do not use BP_SYM. + * sysdeps/x86_64/strcpy_chk.S: Do not include "bp-sym.h" and + "bp-asm.h". + * sysdeps/x86_64/strtok.S: Do not include "bp-sym.h" and + "bp-asm.h". + (FUNCTION): Do not use BP_SYM. + * sysdeps/x86_64/strtok_r.S (strtok_r): Do not use BP_SYM in + weak_alias. + (__GI___strtok_r): Do not use BP_SYM in strong_alias. + +2013-02-17 Andreas Jaeger <aj@suse.de> + + * time/Versions: Sort entries. + * string/Versions: Likewise. + * resolv/Versions: Likewise. + * posix/Versions: Likewise. + * iconv/Versions: Likewise. + * elf/Versions: Likewise. + * wcsmbs/Versions: Likewise. + +2013-02-15 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpa.c (__sqr): Avoid using LIM in + loop termination condition. + + * sysdeps/ieee754/dbl-64/mpa.c (__mul): Use intermediate + variable to calculate EZ. + (__sqr): Likewise. + + * sysdeps/ieee754/dbl-64/mpa.c (__mul): Fix determination of + the lower precision input. + +2013-02-15 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * Makeconfig [!+link-bounded] (+link-bounded): Remove variable. + [!link-extra-libs] (link-extra-libs-bounded): Likewise. + (run-via-rtld-prefix): Do not handle %-bp tests. + (test-via-rtld-prefix): Do not mention %-bp tests in comment. + (all-object-suffixes): Remove .ob. + (bppfx): Remove variable. + [$(build-bounded) = yes] (object-suffixes): Do not add .ob. + [$(build-bounded) = yes] (CPPFLAGS-.ob): Remove variable. + [$(build-bounded) = yes] (CFLAGS-.ob): Likewise. + [$(build-bounded) = yes] (libtype.ob): Likewise. + * Makerules (elide-routines.ob): Remove variable. + (do-tests-clean): Do not handle *-bp.out. + (common-mostlyclean): Do not handle *-bp and *-bp.out. + * Rules [$(build-bounded) = yes] (tests-bp.out): Remove variable. + [$(build-bounded) = yes] (xtests-bp.out): Likewise. + (tests): Do not include $(tests-bp.out). + (xtests): Do not include $(xtests-bp.out). + [$(build-bounded) = yes] (binaries-bounded): Remove variable. + [$(build-bounded) = yes] ($(addprefix + $(objpfx),$(binaries-bounded))): Remove rule. + ($(objpfx)%-bp.out): Remove rule. + * config.make.in (build-bounded): Remove variable. + * crypt/Makefile [$(build-bounded) = yes] + ($(tests:%=$(objpfx)%-bp)): Remove dependency. + * csu/Makefile [$(build-bounded) = yes] (extra-objs): Do not + append to variable. + [$(build-bounded) = yes] (install-lib): Likewise. + [$(build-bounded) = yes] (generated): Likewise. + [!start-installed-name-rule] ($(objpfx)b$(start-installed-name)): + Remove rule. + * intl/Makefile [$(build-bounded) = yes] + ($(multithread-test-srcs:%=$(objpfx)%-bp)): Remove dependency. + * math/Makefile [$(build-bounded) = yes] + ($(tests:%=$(objpfx)%-bp): Likewise. + * misc/Makefile [$(build-bounded) = yes] + ($(objpfx)tst-tsearch-bp): Likewise. + * nptl/Makeconfig (bounded-thread-library): Remove variable. + * rt/Makefile [$(build-bounded) = yes] ($(tests:%=$(objpfx)%-bp)): + Remove dependency. + * string/Makefile (o-objects.ob): Remove variable. + * sysdeps/i386/i686/Makefile [$(config-asflags-i686) = yes] + (CFLAGS-.ob): Remove variable. + [$(config-asflags-i686) = yes] (ASFLAGS-.ob): Likewise. + * sysdeps/sparc/sparc32/sparcv9/Makefile (ASFLAGS-.ob): Remove + both definitions of variable. + * sysdeps/sparc/sparc64/Makefile [$(have-as-vis3) = yes] + (ASFLAGS-.ob): Remove variable. + +2013-02-14 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * config.h.in [USE_REGPARMS && !PROF && !__BOUNDED_POINTERS__]: + Remove __BOUNDED_POINTERS__ from condition. + * elf/dl-runtime.c [!PROF && !__BOUNDED_POINTERS__]: Likewise. + * string/bits/string2.h [!__NO_STRING_INLINES && + !__BOUNDED_POINTERS__]: Likewise. + * sysdeps/i386/dl-machine.h [!PROF && !__BOUNDED_POINTERS__]: + Likewise. + * sysdeps/unix/sysv/linux/shmat.c (shmat) [__BOUNDED_POINTERS__]: + Remove conditional code. + * sysdeps/x86/bits/string.h [!__NO_STRING_INLINES && + __USE_STRING_INLINES && __GNUC__ && __GNUC__ >= 2 && + !__BOUNDED_POINTERS__]: Remove __BOUNDED_POINTERS__ from + condition. + + [BZ #13550] + * csu/libc-start.c: Do not include <bp-sym.h>. + [!LIBC_START_MAIN] (LIBC_START_MAIN): Do not use BP_SYM. + * elf/dl-open.c: Do not include <bp-sym.h>. + (_dl_sysdep_start): Do not use BP_SYM in weak_extern. + * math/fegetenv.c: Do not include <bp-sym.h>. + (fegetenv): Do not use BP_SYM in versioned symbols. + * nptl/sysdeps/pthread/bits/libc-lockP.h + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern]: Do not include + <bp-sym.h>. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutex_init): Do not use BP_SYM in weak_extern. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutex_destroy): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutex_lock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutex_trylock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutex_unlock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutexattr_init): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutexattr_destroy): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_mutexattr_settype): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_init): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_destroy): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_rdlock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_tryrdlock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_wrlock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_trywrlock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_rwlock_unlock): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_key_create): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_setspecific): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (__pthread_getspecific): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] (__pthread_once): + Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (_pthread_cleanup_push_defer): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (_pthread_cleanup_pop_restore): Likewise. + [!__NO_WEAK_PTHREAD_ALIASES && weak_extern] + (pthread_setcancelstate): Likewise. + * string/memchr.c [HAVE_BP_SYM_H || _LIBC]: Do not include + <bp-sym.h>. + [!(HAVE_BP_SYM_H || _LIBC)] (BP_SYM): Remove macro definition. + (memchr): Do not use BP_SYM in weak_alias. + * sysdeps/i386/fpu/fegetenv.c: Do not include <bp-sym.h>. + (fegetenv): Do not use BP_SYM in versioned symbols. + * sysdeps/i386/fpu/fesetenv.c: Do not include <bp-sym.h>. + (fesetenv): Do not use BP_SYM in versioned symbols. + * sysdeps/i386/fpu/feupdateenv.c: Do not include <bp-sym.h>. + (feupdateenv): Do not use BP_SYM in versioned symbols. + * sysdeps/i386/fpu/fsetexcptflg.c: Do not include <bp-sym.h>. + (fesetexceptflag): Do not use BP_SYM in versioned symbols. + * sysdeps/posix/open64.c: Do not include <bp-sym.h>. + (__open64): Do not use BP_SYM in weak_alias and libc_hidden_weak. + (open64): Do not use BP_SYM in weak_alias. + * sysdeps/powerpc/fpu/fegetenv.c: Do not include <bp-sym.h>. + (fegetenv): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/fpu/fesetenv.c: Do not include <bp-sym.h>. + (fesetenv): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/fpu/feupdateenv.c: Do not include <bp-sym.h>. + (feupdateenv): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/fpu/fgetexcptflg.c: Do not include <bp-sym.h>. + (fegetexceptflag): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/fpu/fraiseexcpt.c: Do not include <bp-sym.h>. + (feraiseexcept): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/fpu/fsetexcptflg.c: Do not include <bp-sym.h>. + (fesetexceptflag): Do not use BP_SYM in versioned symbols. + * sysdeps/unix/sysv/linux/powerpc/libc-start.c: Do not include + <bp-sym.h>. + (__libc_start_main): Do not use BP_SYM. + +2013-02-14 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__cpy): Remove + redundant return line. + (norm): Likewise. + (denorm): Likewise. + (dbl_mp): Likewise. + (sub_magnitudes): Likewise. + (__add): Likewise. + (__sub): Likewise. + (__mul): Likewise. + (__inv): Likewise. + (__dvd): Likewise. + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__cpy): Likewise. + (norm): Likewise. + (denorm): Likewise. + (dbl_mp): Likewise. + (sub_magnitudes): Likewise. + (__add): Likewise. + (__sub): Likewise. + (__mul): Likewise. + (__inv): Likewise. + (__dvd): Likewise. + + * sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Use __sqr + instead of __mul. + * sysdeps/ieee754/dbl-64/mpsqrt.c (__mpsqrt): Likewise. + * sysdeps/ieee754/dbl-64/sincos32.c (ss32): Likewise. + (cc32): Likewise. + + * sysdeps/ieee754/dbl-64/mpa.c (__sqr): New function. + * sysdeps/ieee754/dbl-64/mpa.h (__sqr): Declare. + * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): use __sqr instead + of __mul for squares. + * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__sqr): New + function + * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__sqr): + Likewise. + * sysdeps/x86_64/fpu/multiarch/mpa-avx.c: Define __sqr. + * sysdeps/x86_64/fpu/multiarch/mpa-fma4.c: Likewise. + +2013-02-13 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * misc/sys/cdefs.h [!__BOUNDED_POINTERS__]: Remove conditional + code. + * csu/libc-start.c (LIBC_START_MAIN): Do not use __unbounded in + prototype or function definition. Rename ubp_* variables and + parameters. Remove argv definitions conditional on + [__BOUNDED_POINTERS__]. + * debug/backtrace.c (__backtrace): Do not use __unbounded. + * elf/dl-runtime.c (_dl_fixup): Likewise. + * include/set-hooks.h (RUN_HOOK): Likewise. + * stdio-common/vfprintf.c (JUMP): Do not use __unbounded in either + definition. + * string/strcpy.c (strcpy): Do not use __unbounded. + * sysdeps/generic/frame.h (struct layout): Likewise. + * sysdeps/gnu/bits/msq.h (struct msqid_ds): Likewise. + * sysdeps/i386/dl-machine.h (_dl_fixup): Likewise. + * sysdeps/powerpc/powerpc32/backtrace.c (struct layout): Likewise. + * sysdeps/powerpc/powerpc64/backtrace.c (struct layout): Likewise. + * sysdeps/sparc/backtrace.c (struct layout): Likewise. + (__backtrace): Likewise. + * sysdeps/unix/sysv/linux/aio_sigqueue.c (__aio_sigqueue): Do not + use __ptrvalue. + * sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise. + * sysdeps/unix/sysv/linux/fxstatat.c (__fxstatat): Likewise. + * sysdeps/unix/sysv/linux/gai_sigqueue.c (__gai_sigqueue): + Likewise. + * sysdeps/unix/sysv/linux/i386/brk.c (__brk): Likewise. + * sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Likewise. + * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise. + * sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise. + * sysdeps/unix/sysv/linux/i386/msgctl.c (struct __old_msqid_ds): + Do not use __unbounded. + * sysdeps/unix/sysv/linux/i386/setrlimit.c (__new_setrlimit): + Rename __unboundedrlimits parameter to rlimits in prototype. + * sysdeps/unix/sysv/linux/i386/shmctl.c (struct __old_shmid_ds): + Do not use __unbounded. + * sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_sigaction): Do + not use __ptrvalue. + * sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise. + * sysdeps/unix/sysv/linux/llseek.c (__llseek): Likewise. + * sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise. + * sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Do not use + __ptrvalue or __unbounded. + (__mmap64) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/unix/sysv/linux/msgctl.c (struct __old_msqid_ds): Do not + use __unbounded. + (__new_msgctl): Do not use __ptrvalue. + * sysdeps/unix/sysv/linux/msgrcv.c (struct ipc_kludge): Do not use + __unbounded. + (__libc_msgrcv): Do not use __ptrvalue. + * sysdeps/unix/sysv/linux/powerpc/libc-start.c (struct + startup_info): Do not use __unbounded. + (__libc_start_main): Likewise. Rename ubp_* variables and + parameters. Remove argv definitions conditional on + [__BOUNDED_POINTERS__]. + * sysdeps/unix/sysv/linux/ptrace.c (ptrace): Do not use + __ptrvalue. + * sysdeps/unix/sysv/linux/semctl.c (struct __old_semid_ds): Do not + use __unbounded. + * sysdeps/unix/sysv/linux/shmat.c (shmat): Do not use __unbounded + or __ptrvalue. + * sysdeps/unix/sysv/linux/shmctl.c (struct __old_shmid_ds): Do not + use __unbounded. + (__new_shmctl): Do not use __ptrvalue. + * sysdeps/unix/sysv/linux/shmdt.c (shmdt): Likewise. + * sysdeps/unix/sysv/linux/sigaction.c (__libc_sigaction): + Likewise. + * sysdeps/unix/sysv/linux/sigqueue.c (__sigqueue): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c + (__libc_sigaction): Likewise. + * sysdeps/unix/sysv/linux/sysctl.c (__sysctl): Likewise. + * sysdeps/unix/sysv/linux/x86_64/sigaction.c (__libc_sigaction): + Likewise. + * sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise. + +2013-02-13 Ondřej Bílka <neleai@seznam.cz> + + * stdlib/Makefile (headers): Add bits/stdlib-bsearch.h. + + * string/mempcpy.c: Implement by calling memcpy. + +2013-02-13 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Remove NFA. + + * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Faster polynomial + evaluation. + + * sysdeps/ieee754/dbl-64/mpa.c (__mul): Don't bother with zero + values in the mantissa. + + * sysdeps/ieee754/dbl-64/mpa.c (add_magnitudes): Use ZK to + minimize writes to Z. + (sub_magnitudes): Simplify code a bit. + +2013-02-12 Roland McGrath <roland@hack.frob.com> + + * include/libc-symbols.h (stub_warning): Remove "warning: " prefix + from the message. The linker prefixes all warnings with that already. + +2013-02-12 Andreas Schwab <schwab@suse.de> + + [BZ #15078] + * posix/regexec.c (extend_buffers): Add parameter min_len. + (check_matching): Pass minimum needed length. + (clean_state_log_if_needed): Likewise. + (get_subexp): Likewise. + * posix/Makefile (tests): Add bug-regex34. + (bug-regex34-ENV): Define. + * posix/bug-regex34.c: New file. + + [BZ #11561] + * posix/regcomp.c (parse_bracket_exp): When looking up collating + elements compare against the byte sequence of it, not its name. + * posix/Makefile (tests): Add bug-regex35. + (bug-regex35-ENV): Define. + * posix/bug-regex35.c: New file. + +2013-02-11 Tom de Vries <tom@codesourcery.com> + + * string/str-two-way.h: Fix typo RESULT_TYPE -> RETURN_TYPE in + comment. + Add RET0_IF_0 and CHECK_EOL to macro list in comment. + (AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J): Remove superfluous undef. + (CHECK_EOL): Add undef. + +2013-02-11 Ondřej Bílka <neleai@seznam.cz> + + * bits/stdlib-bsearch.h: New file. + * stdlib/bsearch.c: Include bits/stdlib-bsearch.h. + * stdlib/stdlib.h: Likewise. + +2013-02-11 Roland McGrath <roland@hack.frob.com> + + * manual/conf.texi (General Limits): Fix SSIZE_MAX type to ssize_t. + * manual/errno.texi (Error Messages): Fix typo in error_print_progname + declaration. + * manual/search.texi (Array Search Function): Add missing const in + lfind prototype. + * manual/resource.texi (Limits on Resources): Fix RLIM_INFINITY + declaration to use rlim_t. + (Basic Scheduling Functions): Remove erroneous const from + sched_getparam prototype. Remove erroneous * from + sched_get_priority_max and sched_get_priority_min prototypes. + (Resource Usage): Fix summary @comment on vtimes to refer to + sys/vtimes.h rather than vtimes.h. + Add missing *s in vtimes prototype. + (Limits on Resources): Fix ulimit prototype to return long int. + * manual/math.texi (SVID Random): Fix lrand48_r and mrand48_r + prototypes to use long int rather than double. + (BSD Random): Fix initstate and setstate to use char *, not void *. + * manual/llio.texi (Asynchronous Reads/Writes): Fix lio_listio64 + prototype to make second argument 'struct aiocb64 *const[]'. + Fix aio_read64 and aio_write64 prototypes to use struct aiocb64. + (Status of AIO Operations): Remove erroneous const in aio_return and + aio_return64 prototypes. + (Synchronizing I/O): Fix sync prototype to return void. + * manual/startup.texi (Suboptions): Remove an erroneous const in + getsubopt prototype. + * manual/getopt.texi (Using Getopt): Add a const in getopt prototype. + * manual/users.texi (Lookup Netgroup): Fix getnetgrent_r prototype to + use size_t rather than int. + (Scanning All Users): Likewise for getpwent_r. + (Setting Groups): Add missing const to setgroups prototype. + * manual/sysinfo.texi (mtab): Fix typo in getmntent_r prototype. + * manual/socket.texi (Host Names): Fix gethostbyaddr and + gethostbyaddr_r prototypes to use socklen_t rather than size_t and + 'const void *' rather than 'const char *'. + (Host Address Functions): Likewise for inet_ntop. + (Networks Database): Fix getnetbyaddr prototype to use uint32_t. + (Receiving Data): Fix recv, recvfrom, recvmsg prototypes to use + ssize_t for return value. + (Sending Data): Likewise for send, sendto, sendmsg. + (Socket Option Functions): Add a missing const in setsockopt prototype. + * manual/stdio.texi (Simple Output): Fix fputwc_unlocked prototype to + use wchar_t for the argument. + (Formatted Input Functions): Fix swscanf prototype to use wchar_t *. + * manual/arith.texi (Control Functions): Fix fegetexcept prototype to + take no arguments. + (Normalization Functions): Fix scalb, scalbf, scalbl prototypes to use + double/float/long double for second argument. + Fix return types of significand, significandf, significandl. + * manual/filesys.texi (Setting Permissions): Use mode_t for second + argument in fchmod prototype. + (File Owner): Use uid_t and gid_t in fchown prototype. + (File Times): Add const to utimes, futimes, and lutimes prototypes. + (Making Special Files): Use mode_t and dev_t in mknod prototype. + (Scanning Directory Content): Fix scandir and scandir64 prototypes to + use 'const struct dirent **' as argument types to CMP function pointer + argument. + (Symbolic Links): Fix readlink prototype with ssize_t as return value. + (File Times): Fix summary magic @comment for struct utimbuf and utime + to refer to utime.h, not time.h. + * manual/string.texi (Argz Functions): Add missing const in + argz_extract and argz_next prototypes. + (Finding Tokens in a String): Likewise for basename. + (String/Array Comparison): Fix typo in wcscasecmp prototype. + (Copying and Concatenation): Fix typo in wmemmove prototype. + * manual/signal.texi (Using Pause): Use (void) in pause prototype. + (Signal Stack): Remove erroneous const in sigstack prototype. + * manual/time.texi (Setting an Alarm): Add missing const in setitimer + prototype. + (Simple Calendar Time): Likewise for stime. + * manual/terminal.texi (BSD Terminal Modes): Add missing const in stty + prototype. + * manual/sysinfo.texi (System Parameters): Fix mentions of sysctl.h to + say sys/sysctl.h instead. + * manual/syslog.texi (syslog; vsyslog): Add missing const in syslog + and vsyslog prototypes. + +2013-02-11 Tom de Vries <tom@codesourcery.com> + + * string/Makefile (CFLAGS-bug-strstr1.c, CFLAGS-bug-strcasestr1.c): + Remove. + +2013-02-11 Roland McGrath <roland@hack.frob.com> + + * misc/sys/mman.h: Fix typo in mremap comment. + +2013-02-08 Roland McGrath <roland@hack.frob.com> + + * manual/examples/mkfsock.c (make_named_socket): Don't add one for + the '\0' terminator. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * debug/segfault.c: Don't include <bp-checks.h>. + * sysdeps/generic/bp-checks.h: Remove file. + * sysdeps/unix/sysv/linux/getdents.c: Don't include <bp-checks.h>. + (__GETDENTS): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/i386/brk.c: Don't include <bp-checks.h>. + * sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise. + (__getgroups): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. + (setgroups): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/mmap64.c: Don't include <bp-checks.h>. + * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. + (__libc_msgrcv): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/msgsnd.c: Don't include <bp-checks.h>. + (__libc_msgsnd): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Don't include + <bp-checks.h>. + (__libc_pread): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Don't + include <bp-checks.h>. + (__libc_pread64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Don't + include <bp-checks.h>. + (__libc_pwrite): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Don't + include <bp-checks.h>. + (__libc_pwrite64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Don't include + <bp-checks.h>. + (__libc_pread): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Don't + include <bp-checks.h>. + (__libc_pread64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Don't + include <bp-checks.h>. + (__libc_pwrite): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Don't + include <bp-checks.h>. + (__libc_pwrite64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/pread.c: Don't include <bp-checks.h>. + (do_pread): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/pread64.c: Don't include <bp-checks.h>. + (do_pread64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/pwrite.c: Don't include <bp-checks.h>. + (do_pwrite): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/pwrite64.c: Don't include <bp-checks.h>. + (do_pwrite64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/readv.c: Don't include <bp-checks.h>. + (__libc_readv): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/semop.c: Don't include <bp-checks.h>. + (semop): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/semtimedop.c: Don't include + <bp-checks.h>. + (semtimedop): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/sh/pread.c: Don't include <bp-checks.h>. + (__libc_pread): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/sh/pread64.c: Don't include + <bp-checks.h>. + (__libc_pread64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/sh/pwrite.c: Don't include + <bp-checks.h>. + (__libc_pwrite): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/sh/pwrite64.c: Don't include + <bp-checks.h>. + (__libc_pwrite64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c: Don't include + <bp-checks.h>. + (__libc_msgrcv): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/sysctl.c: Don't include <bp-checks.h>. + (__sysctl): Don't use CHECK_N. Remove GKM FIXME comment. + * sysdeps/unix/sysv/linux/writev.c: Don't include <bp-checks.h>. + (__libc_writev): Don't use CHECK_N. + +2013-02-08 Roland McGrath <roland@hack.frob.com> + + * string/strcpy.c: Removed unused variable. + + * Makeconfig (+sysdep-includes): Define with := rather than =. + Use an existing include/ subdir of each sysdeps dir before it. + +2013-02-08 Carlos O'Donell <carlos@redhat.com> + + * nscd/connection.c (register_traced_file): Comment function. + [HAVE_INOTIFY] (union __inev): Define. + [HAVE_INOTIFY] (inotify_check_files): New function. + [HAVE_INOTIFY] (clear_db_cache): Likewise. + [HAVE_INOTIFY] (main_loop_poll): Call inotify_check_files and + clear_db_cache. + [HAVE_INOTIFY] (main_loop_epoll): Likewise. + +2013-02-08 Carlos O'Donell <carlos@redhat.com> + + * elf/dl-cache.c (_dl_load_cache_lookup): Comment that cache is + loaded if not already and that a failure is permanent. + +2013-02-08 Carlos O'Donell <carlos@redhat.com> + + [BZ #15006] + * sysdeps/generic/ldconfig.h: Define FLAG_ARM_LIBSF. + * elf/cache.c (print_entry): Add FLAG_ARM_LIBSF support. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/generic/bp-checks.h (CHECK_1): Remove all definitions. + (CHECK_1_NULL_OK): Likewise. + * sysdeps/unix/sysv/linux/fxstat.c: Do not include <bp-checks.h>. + (__fxstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/fxstat64.c: Do not include + <bp-checks.h>. + (___fxstat64): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/fxstatat.c: Do not include + <bp-checks.h>. + (__fxstatat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/fxstatat64.c: Do not include + <bp-checks.h>. + (__fxstatat64): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/fxstat.c: Do not include + <bp-checks.h>. + (__fxstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/fxstatat.c: Do not include + <bp-checks.h>. + (__fxstatat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/getresgid.c: Do not include + <bp-checks.h>. + (__getresgid): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/getresuid.c: Do not include + <bp-checks.h>. + (__getresuid): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/lxstat.c: Do not include + <bp-checks.h>. + (__lxstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/msgctl.c: Do not include + <bp-checks.h>. + (__old_msgctl): Do not use CHECK_1. + (__new_msgctl): Likewise. + * sysdeps/unix/sysv/linux/i386/setrlimit.c: Do not include + <bp-checks.h>. + (__new_setrlimit): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/i386/shmctl.c: Do not include + <bp-checks.h>. + (__old_shmctl): Do not use CHECK_1. + (__new_shmctl): Likewise. + * sysdeps/unix/sysv/linux/i386/xstat.c: Do not include + <bp-checks.h>. + (__xstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/lxstat.c: Do not include <bp-checks.h>. + (__lxstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/lxstat64.c: Do not include + <bp-checks.h>. + (___lxstat64): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/msgctl.c: Do not include <bp-checks.h>. + (__old_msgctl): Do not use CHECK_1. + (__new_msgctl): Likewise. + * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c: Do not include + <bp-checks.h>. + (__gettimeofday): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/ptrace.c: Do not include <bp-checks.h>. + (ptrace) [__BOUNDED_POINTERS__]: Remove conditional code. + * sysdeps/unix/sysv/linux/s390/gettimeofday.c: Do not include + <bp-checks.h>. + (__gettimeofday): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/shmctl.c: Do not include <bp-checks.h>. + (__old_shmctl): Do not use CHECK_1_NULL_OK. + (__new_shmctl): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/sigtimedwait.c: Do not include + <bp-checks.h>. + (do_sigtimedwait): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/sigwaitinfo.c: Do not include + <bp-checks.h>. + (do_sigwaitinfo): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c: Do not include + <bp-checks.h>. + (msgctl): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c: Do not include + <bp-checks.h>. + (shmctl): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/ustat.c: Do not include <bp-checks.h>. + (ustat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/wordsize-64/fxstat.c: Do not include + <bp-checks.h>. + (__fxstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Do not include + <bp-checks.h>. + (__fxstatat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/wordsize-64/lxstat.c: Do not include + <bp-checks.h>. + (__lxstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/wordsize-64/xstat.c: Do not include + <bp-checks.h>. + (__xstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/xstat.c: Do not include <bp-checks.h>. + (__xstat): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/xstat64.c: Do not include <bp-checks.h>. + (___xstat64): Do not use CHECK_1. + + [BZ #13550] + * sysdeps/generic/bp-checks.h (CHECK_BOUNDS_LOW): Remove all + definitions. + (CHECK_BOUNDS_HIGH): Likewise. + * string/strcpy.c: Do not include <bp-checks.h>. + (strcpy): Do not use CHECK_BOUNDS_LOW and CHECK_BOUNDS_HIGH. + +2013-02-07 Roland McGrath <roland@hack.frob.com> + + * nscd/nscd-client.h (__nscd_drop_map_ref): + Add __attribute__ ((unused)). + * nis/nss-nisplus.h (niserr2nss): Likewise. + + * sysdeps/x86_64/multiarch/strstr.c (__m128i_strloadu): Define it only + under [!(USE_AS_STRCASESTR && STRCASESTR_NONASCII)]. + + * csu/libc-tls.c (init_static_tls, init_slotinfo): + Remove inline keyword. + * include/rounding-mode.h (round_away): Likewise. + * libio/wfileops.c (adjust_wide_data): Likewise. + * sysdeps/x86_64/multiarch/strstr.c (__m128i_strloadu): Likewise. + (__m128i_strloadu_tolower): Likewise. + * sysdeps/x86_64/multiarch/strcasestr-nonascii.c + (__m128i_strloadu_tolower): Likewise. + * time/mktime.c (ydhms_diff): Likewise. + * locale/elem-hash.h (elem_hash): Likewise. + * locale/setlocale.c (setdata): Likewise. + * posix/regex_internal.h (re_string_char_size_at): Likewise. + (re_string_wchar_at): Likewise. + (bitset_not, bitset_merge, bitset_mask): Likewise. + [!(__GNUC__ > 3)] (inline): Remove macro. + * nscd/nscd-client.h (__nscd_drop_map_ref): Remove inline keyword. + * elf/dl-deps.c (_dl_map_object_deps: preload): Likewise. + * elf/tlsdeschtab.h (_dl_tlsdesc_resolve_early_return_p): Likewise. + (_dl_tlsdesc_wake_up_held_fixups): Likewise. + * string/memcmp.c (memcmp_bytes): Likewise. + * locale/programs/locarchive.c (compute_hashval): Likewise. + * sysdeps/ieee754/dbl-64/x2y2m1.c (mul_split): Likewise. + * sysdeps/unix/sysv/linux/fips-private.h (fips_enabled_p): Likewise. + * resolv/res_send.c (evNowTime, evCmpTime): Likewise. + * nss/getent.c (print_rpc, print_protocols): Likewise. + (print_passwd, print_group, print_aliases): Likewise. + * nis/nss-nisplus.h (niserr2nss): Likewise. + * nscd/connections.c (restart_p): Likewise. + Change return type to bool. + +2013-02-05 Roland McGrath <roland@hack.frob.com> + + * Makeconfig (all-Depend-files): Add existing + $(sorted-subdirs:=/Depend) files. + (all-subdirs): Remove nss. + * sysdeps/unix/inet/Subdirs: Add it here instead. + * hesiod/Depend: New file. + + * elf/dl-hwcaps.c (_dl_important_hwcaps): Use a variable-length array + instead of calling alloca. + + * io/lseek.c (__lseek): Rename to __libc_lseek. + Define __lseek as an alias. + + * sysdeps/generic/malloc-sysdep.h: Include <stdbool.h> and <unistd.h>. + +2013-02-04 Carlos O'Donell <carlos@redhat.com> + + * stdlib/getenv.c (getenv): Assume __BIG_ENDIAN in the + else clause and remove check for non-standard endianness. + +2013-02-04 David S. Miller <davem@davemloft.net> + + * sysdeps/sparc/fpu/libm-test-ulps: Update. + +2013-02-04 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/generic/bp-checks.h [__BOUNDED_POINTERS__] + (__ubp_memchr): Remove prototype. + [__BOUNDED_POINTERS__] (_CHECK_STRING): Remove macro. + [__BOUNDED_POINTERS__] (CHECK_STRING): Likewise. + [__BOUNDED_POINTERS__] (CHECK_STRING_NULL_OK): Likewise. + [!__BOUNDED_POINTERS__] (CHECK_STRING): Likewise. + * sysdeps/i386/memchr.S [!__BOUNDED_POINTERS__] (__ubp_memchr): + Remove alias. + * sysdeps/sparc/sparc32/memchr.S [!__BOUNDED_POINTERS__] + (__ubp_memchr): Likewise. + * sysdeps/sparc/sparc64/memchr.S [!__BOUNDED_POINTERS__] + (__ubp_memchr): Likewise. + * sysdeps/unix/sysv/linux/execve.c: Do not include <bp-checks.h>. + (__execve) [__BOUNDED_POINTERS__]: Remove conditional code. + (__execve) [!__BOUNDED_POINTERS__]: Make code unconditional. + * sysdeps/unix/sysv/linux/fxstatat.c (__fxstatat): Do not use + CHECK_STRING. + * sysdeps/unix/sysv/linux/fxstatat64.c (__fxstatat64): Likewise. + * sysdeps/unix/sysv/linux/getcwd.c: Do not include <bp-checks.h>. + (__getcwd): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/i386/chown.c: Do not include + <bp-checks.h>. + (__real_chown): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/i386/fchownat.c: Do not include + <bp-checks.h>. + (fchownat): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Do not use + CHECK_STRING. + * sysdeps/unix/sysv/linux/i386/lchown.c: Do not include + <bp-checks.h>. + (__lchown): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise. + * sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise. + * sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise. + * sysdeps/unix/sysv/linux/lxstat64.c (___lxstat64): Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Do not + include <bp-checks.h>. + (truncate64): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Do not include + <bp-checks.h>. + (__real_chown): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Do not include + <bp-checks.h>. + (__lchown): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/sh/chown.c: Do not include + <bp-checks.h>. + (__chown): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/truncate64.c: Do not include + <bp-checks.h>. + (truncate64): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/wordsize-64/lxstat.c (__lxstat): + Likewise. + * sysdeps/unix/sysv/linux/xmknod.c: Do not include <bp-checks.h>. + (__xmknod): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/xmknodat.c: Do not include + <bp-checks.h>. + (__xmknodat): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise. + * sysdeps/unix/sysv/linux/xstat64.c (___xstat64): Likewise. + +2013-02-04 Andreas Schwab <schwab@suse.de> + + [BZ #14142] + * include/errno.h: Redefine errno only if !NOT_IN_libc || IN_LIB. + * include/netdb.h: Likewise for h_errno. + * elf/tst-stackguard1.c: Include <tls.h>. + 2013-02-02 Jan Kratochvil <jan.kratochvil@redhat.com> * elf/link.h (struct link_map): Extend the l_addr comment. @@ -4772,7 +7522,7 @@ (do_one_test): Call check_result. (test_main): Call check1. * string/bug-strstr1.c (main): Moved to ... - * string/test-strchr.c (check1): Here. New function. + * string/test-strstr.c (check1): Here. New function. (do_one_test): Break out result checking code into ... (check_result): This. New function. (do_one_test): Call check_result. @@ -128,6 +128,11 @@ will be used, and CFLAGS sets optimization options for the compiler. this can be prevented though there generally is no reason since it creates compatibility problems. +`--enable-hardcoded-path-in-tests' + By default, dynamic tests are linked to run with the installed C + library. This option hardcodes the newly built C library path in + dynamic tests so that they can be invoked directly. + `--build=BUILD-SYSTEM' `--host=HOST-SYSTEM' These options are for cross-compiling. If you specify both @@ -141,9 +146,9 @@ will be used, and CFLAGS sets optimization options for the compiler. native compile but use what you specify instead of guessing what your system is. This is most useful to change the CPU submodel. For example, if `configure' guesses your machine as - `i586-pc-linux-gnu' but you want to compile a library for 386es, - give `--host=i386-pc-linux-gnu' or just `--host=i386-linux' and add - the appropriate compiler flags (`-mcpu=i386' will do the trick) to + `i686-pc-linux-gnu' but you want to compile a library for 586es, + give `--host=i586-pc-linux-gnu' or just `--host=i586-linux' and add + the appropriate compiler flags (`-mcpu=i586' will do the trick) to CFLAGS. If you specify just `--build', `configure' will get confused. diff --git a/Makeconfig b/Makeconfig index 8da4ad3b4a..70deb1e182 100644 --- a/Makeconfig +++ b/Makeconfig @@ -90,10 +90,14 @@ $(common-objpfx)config.status: $(..)version.h $(..)configure \ $(firstword $(wildcard \ $(addprefix $(dir)/,configure configure.in))))) \ $(patsubst %.in,%,\ + $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.in)) \ + $(patsubst %.in,%,\ $(foreach add-on,$(add-ons),\ $(firstword $(wildcard \ $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\ - configure configure.in))))) + configure configure.in))) \ + $(wildcard $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\ + sysdeps/*/preconfigure sysdeps/*/preconfigure.in)))) @cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \ echo The GNU C library has not been configured. >&2; \ echo Run \`configure\' to configure it before building. >&2; \ @@ -147,12 +151,18 @@ libdir = $(exec_prefix)/lib endif inst_libdir = $(install_root)$(libdir) -# Where to install the shared library and dynamic linker. +# Where to install the shared library. ifndef slibdir slibdir = $(exec_prefix)/lib endif inst_slibdir = $(install_root)$(slibdir) +# Where to install the dynamic linker. +ifndef rtlddir +rtlddir = $(slibdir) +endif +inst_rtlddir = $(install_root)$(rtlddir) + # Prefix to put on files installed in $(libdir). For libraries `libNAME.a', # the prefix is spliced between `lib' and the name, so the linker switch # `-l$(libprefix)NAME' finds the library; for other files the prefix is @@ -435,21 +445,9 @@ else +link-tests = $(+link-static-tests) endif endif -# Command for statically linking bounded-pointer programs with the C library. -ifndef +link-bounded -+link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \ - $(sysdep-LDFLAGS) $(LDFLAGS) \ - $(addprefix $(csu-objpfx),b$(static-start-installed-name)) \ - $(+preinit) $(+prectorT) \ - $(filter-out $(addprefix $(csu-objpfx),start.ob \ - $(start-installed-name))\ - $(+preinit) $(link-extra-libs-bounded) \ - $(common-objpfx)libc% $(+postinit),$^) \ - $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctorT) $(+postinit) -endif ifeq (yes,$(build-shared)) ifndef rtld-LDFLAGS -rtld-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name) +rtld-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name) endif ifndef rtld-tests-LDFLAGS ifeq (yes,$(build-hardcoded-path-in-tests)) @@ -506,13 +504,11 @@ endif ifndef link-extra-libs link-extra-libs = $(LDLIBS-$(@F)) link-extra-libs-static = $(link-extra-libs) -link-extra-libs-bounded = $(link-extra-libs) endif # The static libraries. link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib-tests) -Wl,--end-group -link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a # How to link against libgcc. Some libgcc functions, such as those # for "long long" arithmetic or software floating point, can always be @@ -617,12 +613,11 @@ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\ # $(run-via-rtld-prefix) is a command that, when prepended to the name # of a program built with the newly built library, produces a command # that, executed on the host for which the library is built, runs that -# program. For the statically-linked %-bp test programs, and for -# tests listed in tests-static or xtests-static, it is empty. +# program. For tests listed in tests-static or xtests-static, it is +# empty. run-via-rtld-prefix = \ $(if $(strip $(filter $(notdir $(built-program-file)), \ - $(tests-static) $(xtests-static)) \ - $(filter %-bp,$(built-program-file))),, \ + $(tests-static) $(xtests-static))),, \ $(elf-objpfx)$(rtld-installed-name) \ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))) else @@ -652,9 +647,9 @@ endif # $(test-via-rtld-prefix) is a command that, when prepended to the name # of a test program built with the newly built library, produces a command # that, executed on the host for which the library is built, runs that -# program. For the statically-linked %-bp test programs, and for -# tests listed in tests-static or xtests-static as well as when test -# programs are hardcoded to the newly built libraries, it is empty. +# program. For tests listed in tests-static or xtests-static as well +# as when test programs are hardcoded to the newly built libraries, it +# is empty. # $(test-program-prefix) is a command that, when prepended to the name # of a test program built with the newly built library, produces a command @@ -765,11 +760,18 @@ endif # $(+cflags) == "" # Don't duplicate options if we inherited variables from the parent. +cflags := $(sort $(+cflags)) +# Each sysdeps directory can contain header files that both will be +# used to compile and will be installed. Each can also contain an +# include/ subdirectory, whose header files will be used to compile +# but will not be installed, and will take precedence over the +# installed files. This mirrors the top-level include/ subdirectory. ++sysdep-includes := $(foreach dir,$(+sysdep_dirs),\ + $(addprefix -I,$(wildcard $(dir)/include) $(dir))) + # These are flags given to the C compiler to tell it to look for # include files (including ones given in angle brackets) in the parent # library source directory, in the include directory, and in the # current directory. -+sysdep-includes = $(addprefix -I,$(+sysdep_dirs)) +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \ $(+sysdep-includes) $(includes) \ $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes) @@ -810,7 +812,7 @@ endif # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) # to pass different flags for each flavor. libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) -all-object-suffixes := .o .os .op .og .ob .oS +all-object-suffixes := .o .os .op .og .oS object-suffixes := CPPFLAGS-.o = $(pic-default) CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) @@ -845,18 +847,6 @@ endif # differently from the rest. object-suffixes-noshared := $(filter-out .os,$(object-suffixes)) -bppfx = BP- -ifeq (yes,$(build-bounded)) -# Under --enable-bounded, we build the library with `-fbounded-pointers -g' -# to runtime bounds checking. The bounded-pointer objects are named foo.ob. -# We disable sibling-call optimizations so that stack traces will be complete -# and thus aid debugging, since after all, BPs are a debugging tool. -object-suffixes += .ob -CPPFLAGS-.ob = -fbounded-pointers $(pic-default) -CFLAGS-.ob = -g -O2 -fno-optimize-sibling-calls -fno-strict-aliasing -libtype.ob = lib%_b.a -endif - object-suffixes-for-libc := $(object-suffixes) ifeq (yes,$(build-shared)) @@ -888,8 +878,6 @@ subdirs = $(sorted-subdirs) subdir-srcdirs = $(foreach dir,$(subdirs),\ $(firstword $($(dir)-srcdir) $(..)$(dir))) -ifeq (yes, $(build-shared)) - # This is a pair of implicit rules to preprocess a file with # comments, # %ifdef et al, based on config.h settings or other %include'd files. # We use chained rules instead of a pipeline here so that we can properly @@ -908,6 +896,8 @@ ifeq (yes, $(build-shared)) sed '/^[ ]*#/d;/^[ ]*$$/d' $< > $@T mv -f $@T $@ +ifeq (yes, $(build-shared)) + # To generate a header to support more than one ABI for different # architecture variants, the CPU/Makefile defines abi-variants to be a # list of names for those variants (e.g. 32 64), and, for each variant, @@ -1041,13 +1031,19 @@ all-subdirs = csu assert ctype locale intl catgets math setjmp signal \ stdlib stdio-common libio malloc string wcsmbs time dirent \ grp pwd posix io termios resource misc socket sysvipc gmon \ gnulib iconv iconvdata wctype manual shadow gshadow po argp \ - crypt nss localedata timezone rt conform debug \ + crypt localedata timezone rt conform debug \ $(add-on-subdirs) dlfcn elf ifndef avoid-generated -all-Depend-files := $(wildcard $(foreach dir,$(all-subdirs),\ - $(firstword $($(dir)-srcdir) \ - $(..)$(dir))/Depend)) +# sysd-sorted itself will contain rules making the sysd-sorted target +# depend on Depend files. But if you just added a Depend file to an +# existing directory not in all-subdirs, then sysd-sorted needs to +# be regenerated, so it depends on existing $(sorted-subdirs:=/Depend) files. +all-Depend-files := $(wildcard $(sort \ + $(foreach dir,$(all-subdirs),\ + $(firstword $($(dir)-srcdir) \ + $(..)$(dir))/Depend) \ + $(sorted-subdirs:=/Depend))) $(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk \ $(common-objpfx)config.make $(..)Makeconfig \ $(wildcard $(sysdirs:=/Subdirs)) \ diff --git a/Makefile.in b/Makefile.in index d73a78f8e9..df75b8f0c4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,7 @@ srcdir = @srcdir@ # Uncomment the line below if you want to do parallel build. # PARALLELMFLAGS = -j 4 -.PHONY: all install +.PHONY: all install bench all .DEFAULT: $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@ @@ -11,3 +11,6 @@ all .DEFAULT: install: LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \ $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@ + +bench: + $(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@ @@ -418,7 +418,6 @@ elide-routines.os += $(static-only-routines) elide-routines.o += $(shared-only-routines) elide-routines.op += $(shared-only-routines) elide-routines.og += $(shared-only-routines) -elide-routines.ob += $(shared-only-routines) # Shared library building. @@ -865,7 +864,7 @@ ifeq (no,$(cross-compiling)) symbolic-link-prog := $(common-objpfx)elf/sln symbolic-link-list := $(common-objpfx)elf/symlink.list define make-shlib-link -echo $(<F) $@ >> $(symbolic-link-list) +echo `$(..)scripts/rellns-sh -p $< $@` $@ >> $(symbolic-link-list) endef else # cross-compiling # We need a definition that can be used by elf/Makefile's install rules. @@ -875,7 +874,7 @@ endif ifndef make-shlib-link define make-shlib-link rm -f $@ -$(LN_S) $(<F) $@ +$(LN_S) `$(..)scripts/rellns-sh -p $< $@` $@ endef endif @@ -929,7 +928,7 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ cat $<; \ echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \ ) > $@.new mv -f $@.new $@ @@ -1265,9 +1264,7 @@ mostlyclean: common-mostlyclean do-tests-clean: -rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) $(xtests) \ - $(test-srcs)) \ - $(addsuffix -bp.out,$(tests) $(xtests) \ - $(test-srcs))) + $(test-srcs))) # Remove the object files. common-mostlyclean: @@ -1276,12 +1273,8 @@ common-mostlyclean: $(addsuffix .o,$(tests) $(xtests) \ $(test-srcs) $(others) \ $(sysdep-others)) \ - $(addsuffix -bp,$(tests) $(xtests) \ - $(test-srcs)) \ $(addsuffix .out,$(tests) $(xtests) \ - $(test-srcs)) \ - $(addsuffix -bp.out,$(tests) $(xtests) \ - $(test-srcs))) + $(test-srcs))) -rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \ $(install-lib) $(install-lib.so) \ $(install-lib.so:%.so=%_pic.a)) @@ -9,8 +9,22 @@ Version 2.18 * The following bugs are resolved with this release: - 13951, 14200, 14317, 14327, 14496, 14964, 14981, 14982, 14985, 14994, - 14996, 15003, 15020, 15023, 15036, 15062. + 11120, 11561, 12723, 13550, 13889, 13951, 14142, 14176, 14200, 14317, + 14327, 14496, 14812, 14920, 14964, 14981, 14982, 14985, 14994, 14996, + 15003, 15006, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15160, + 15214, 15232, 15234, 15283, 15285, 15287, 15304, 15307. + +* Add support for calling C++11 thread_local object destructors on thread + and program exit. This needs compiler support for offloading C++11 + destructor calls to glibc. + +* Improved worst case performance of libm functions with double inputs and + output. + +* Support for priority inherited mutexes in pthread condition variables on + non-x86 architectures. + +* Added a benchmark framework to track performance of functions in glibc. Version 2.17 @@ -111,23 +125,23 @@ Version 2.16 4822, 5077, 5461, 5805, 5993, 6471, 6486, 6578, 6649, 6730, 6770, 6794, 6884, 6890, 6894, 6895, 6907, 6911, 6959, 7064, 9739, 9902, 10110, 10135, 10140, 10153, 10210, 10254, 10346, 10375, 10545, 10716, 10846, 11174, - 11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047, 12097, - 12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495, 13058, - 13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, - 13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563, 13566, - 13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656, 13658, - 13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738, 13739, - 13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806, - 13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854, 13871, - 13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892, 13895, - 13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, - 13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938, - 13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, 13973, - 13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036, 14040, - 14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075, - 14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134, - 14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277, - 14278. + 11261, 11322, 11365, 11451, 11494, 11521, 11677, 11837, 11959, 12047, + 12097, 12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495, + 13058, 13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531, + 13532, 13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563, + 13566, 13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656, + 13658, 13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738, + 13739, 13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, + 13806, 13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854, + 13871, 13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892, + 13895, 13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, + 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, + 13938, 13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, + 13973, 13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036, + 14040, 14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, + 14075, 14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, + 14134, 14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, + 14277, 14278. * Support for the x32 ABI on x86-64 added. The x32 target is selected by configuring glibc with: @@ -358,10 +372,10 @@ Version 2.12 * The following bugs are resolved with this release: - 3662, 4457, 5553, 10162, 10401, 10414, 10554, 10824, 10864, 10915, 10918, - 10936, 10939, 10958, 10968, 10969, 10972, 10992, 11000, 11001, 11007, - 11010, 11027, 11039, 11040, 11041, 11043, 11046, 11056, 11070, 11093, - 11115, 11120, 11125, 11126, 11127, 11134, 11141, 11149, 11183, 11184, + 3662, 4457, 5553, 10162, 10401, 10414, 10554, 10824, 10864, 10915, + 10918, 10936, 10939, 10958, 10968, 10969, 10972, 10992, 11000, 11001, + 11007, 11010, 11027, 11039, 11040, 11041, 11043, 11046, 11056, 11070, + 11093, 11115, 11125, 11126, 11127, 11134, 11141, 11149, 11183, 11184, 11185, 11186, 11187, 11188, 11189, 11190, 11191, 11192, 11193, 11194, 11200, 11230, 11235, 11242, 11254, 11258, 11271, 11272, 11276, 11279, 11287, 11292, 11319, 11332, 11333, 11387, 11389, 11390, 11394, 11397, @@ -83,7 +83,7 @@ common-generated += dummy.o dummy.c # This makes all the auxiliary and test programs. -.PHONY: others tests +.PHONY: others tests bench ifeq ($(multi-arch),no) tests := $(filter-out $(tests-ifunc), $(tests)) xtests := $(filter-out $(xtests-ifunc), $(xtests)) @@ -98,12 +98,8 @@ ifeq ($(run-built-tests),no) tests: $(addprefix $(objpfx),$(tests) $(test-srcs)) xtests: tests else -ifeq ($(build-bounded),yes) -tests-bp.out = $(tests:%=$(objpfx)%-bp.out) -xtests-bp.out = $(xtests:%=$(objpfx)%-bp.out) -endif -tests: $(tests:%=$(objpfx)%.out) $(tests-bp.out) -xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-bp.out) +tests: $(tests:%=$(objpfx)%.out) +xtests: tests $(xtests:%=$(objpfx)%.out) endif ifeq ($(build-programs),yes) @@ -179,14 +175,6 @@ $(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \ $(+link-static-tests) endif -ifeq ($(build-bounded),yes) -binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs)) -$(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \ - $(sort $(filter $(common-objpfx)lib%,$(link-libc-bounded))) \ - $(addprefix $(csu-objpfx),start.ob) $(+preinit) $(+postinit) - $(+link-bounded) -endif - ifneq "$(strip $(tests) $(xtests) $(test-srcs))" "" # These are the implicit rules for making test outputs # from the test programs and whatever input files are present. @@ -194,14 +182,41 @@ ifneq "$(strip $(tests) $(xtests) $(test-srcs))" "" make-test-out = $(test-wrapper-env) \ GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ $($*-ENV) $(host-test-program-cmd) $($*-ARGS) -$(objpfx)%-bp.out: %.input $(objpfx)%-bp - $(make-test-out) > $@ < $(word 1,$^) $(objpfx)%.out: %.input $(objpfx)% $(make-test-out) > $@ < $(word 1,$^) $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence. $(make-test-out) > $@ endif # tests + +# Build and run benchmark programs. +binaries-bench := $(addprefix $(objpfx)bench-,$(bench)) + +run-bench = $(test-wrapper-env) \ + GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ + $($*-ENV) $(run-via-rtld-prefix) $${run} + +bench: $(binaries-bench) + if [ -f $(objpfx)bench.out ]; then \ + mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \ + fi + for run in $^; do \ + eval $(run-bench) >> $(objpfx)bench.out; \ + done + +$(binaries-bench): %: %.o \ + $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ + $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) + $(+link) + +$(objpfx)bench-%.c: %-inputs bench-skeleton.c + { if [ -n "$($*-INCLUDE)" ]; then \ + cat $($*-INCLUDE); \ + fi; \ + $(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \ + $($*-ITER) $($*-ARGLIST) $($*-RET); } > $@-tmp + mv -f $@-tmp $@ + .PHONY: distclean realclean subdir_distclean subdir_realclean \ subdir_clean subdir_mostlyclean subdir_testclean diff --git a/Versions.def b/Versions.def index 3c9e0aedbc..7c7d1f89d3 100644 --- a/Versions.def +++ b/Versions.def @@ -34,6 +34,7 @@ libc { GLIBC_2.15 GLIBC_2.16 GLIBC_2.17 + GLIBC_2.18 HURD_CTHREADS_0.3 %ifdef EXPORT_UNWIND_FIND_FDE GCC_3.0 @@ -92,6 +93,7 @@ libpthread { GLIBC_2.2 GLIBC_2.2.3 GLIBC_2.2.6 + GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 diff --git a/aclocal.m4 b/aclocal.m4 index 956ea8616c..042a7e3c38 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -241,3 +241,10 @@ else $4 fi AC_MSG_RESULT($libc_linker_feature)]) + +dnl Add a makefile variable, with value set from a shell string +dnl (expanded by the shell inside double quotes), to config.make. +dnl LIBC_CONFIG_VAR(make-variable, shell-value) +AC_DEFUN([LIBC_CONFIG_VAR], +[config_vars="$config_vars +$1 = $2"]) diff --git a/argp/argp-parse.c b/argp/argp-parse.c index e9de396c16..f68ebab0df 100644 --- a/argp/argp-parse.c +++ b/argp/argp-parse.c @@ -100,9 +100,10 @@ static const struct argp_option argp_default_options[] = { {"help", '?', 0, 0, N_("Give this help list"), -1}, {"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")}, - {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")}, - {"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN, - N_("Hang for SECS seconds (default 3600)")}, + {"program-name",OPT_PROGNAME, N_("NAME"), OPTION_HIDDEN, + N_("Set the program name")}, + {"HANG", OPT_HANG, N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN, + N_("Hang for SECS seconds (default 3600)")}, {0, 0} }; diff --git a/benchtests/Makefile b/benchtests/Makefile new file mode 100644 index 0000000000..74938b925c --- /dev/null +++ b/benchtests/Makefile @@ -0,0 +1,59 @@ +# Copyright (C) 2013 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/>. + + +# Makefile for benchmark tests. The only useful target here is `bench`. + +# Adding a new function `foo`: +# --------------------------- + +# - Append the function name to the bench variable + +# - Define foo-ITER with the number of iterations you want to run. Keep it +# high enough that the overhead of clock_gettime is only a small fraction of +# the total run time of the test. + +# - Define foo-ARGLIST as a colon separated list of types of the input +# arguments. Use `void` if function does not take any inputs. Put in quotes +# if the input argument is a pointer, e.g.: + +# malloc-ARGLIST: "void *" + +# - Define foo-RET as the type the function returns. Skip if the function +# returns void. One could even skip foo-ARGLIST if the function does not +# take any inputs AND the function returns void. + + +# - Make a file called `foo-inputs` with one input value per line, an input +# being a comma separated list of arguments to be passed into the function. +# See pow-inputs for an example. + +subdir := benchtests +bench := exp pow + +exp-ITER = 100000 +exp-ARGLIST = double +exp-RET = double +LDFLAGS-bench-exp = -lm + +pow-ITER = 100000 +pow-ARGLIST = double:double +pow-RET = double +LDFLAGS-bench-pow = -lm + +include ../Makeconfig +include ../Rules diff --git a/benchtests/bench-skeleton.c b/benchtests/bench-skeleton.c new file mode 100644 index 0000000000..13f986d817 --- /dev/null +++ b/benchtests/bench-skeleton.c @@ -0,0 +1,75 @@ +/* Skeleton for benchmark programs. + Copyright (C) 2013 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 <string.h> +#include <stdint.h> +#include <stdio.h> +#include <time.h> +#include <inttypes.h> + +int +main (int argc, char **argv) +{ + unsigned long i, j, k; + uint64_t total = 0, max = 0, min = 0x7fffffffffffffff; + struct timespec start, end; + + memset (&start, 0, sizeof (start)); + memset (&end, 0, sizeof (end)); + + clock_getres (CLOCK_PROCESS_CPUTIME_ID, &start); + + /* Measure 1000 times the resolution of the clock. So for a 1ns resolution + clock, we measure 1000 iterations of the function call at a time. + Measurements close to the minimum clock resolution won't make much sense, + but it's better than having nothing at all. */ + unsigned long iters = 1000 * start.tv_nsec; + unsigned long total_iters = ITER / iters; + + for (i = 0; i < NUM_SAMPLES; i++) + { + for (j = 0; j < total_iters; j ++) + { + clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &start); + for (k = 0; k < iters; k++) + BENCH_FUNC(i); + clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &end); + + uint64_t cur = (end.tv_nsec - start.tv_nsec + + ((end.tv_sec - start.tv_sec) + * (uint64_t) 1000000000)); + + if (cur > max) + max = cur; + + if (cur < min) + min = cur; + + total += cur; + } + } + + double d_total_s = total * 1e-9; + double d_iters = iters; + double d_total_i = (double)ITER * NUM_SAMPLES; + printf (FUNCNAME ": ITERS:%g: TOTAL:%gs, MAX:%gns, MIN:%gns, %g iter/s\n", + d_total_i, d_total_s, max / d_iters, min / d_iters, + d_total_i / d_total_s); + + return 0; +} diff --git a/benchtests/exp-inputs b/benchtests/exp-inputs new file mode 100644 index 0000000000..a2086baa86 --- /dev/null +++ b/benchtests/exp-inputs @@ -0,0 +1 @@ +708.00096423260981737257679924368858 diff --git a/benchtests/pow-inputs b/benchtests/pow-inputs new file mode 100644 index 0000000000..dbb1270b75 --- /dev/null +++ b/benchtests/pow-inputs @@ -0,0 +1 @@ +1.0000000000000020, 1.5 diff --git a/bits/stdlib-bsearch.h b/bits/stdlib-bsearch.h new file mode 100644 index 0000000000..4cb58abe6c --- /dev/null +++ b/bits/stdlib-bsearch.h @@ -0,0 +1,43 @@ +/* Perform binary search - inline version. + Copyright (C) 1991-2013 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/>. */ + +__extern_inline void * +bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) +{ + size_t __l, __u, __idx; + const void *__p; + int __comparison; + + __l = 0; + __u = __nmemb; + while (__l < __u) + { + __idx = (__l + __u) / 2; + __p = (void *) (((const char *) __base) + (__idx * __size)); + __comparison = (*__compar) (__key, __p); + if (__comparison < 0) + __u = __idx; + else if (__comparison > 0) + __l = __idx + 1; + else + return (void *) __p; + } + + return NULL; +} diff --git a/catgets/gencat.c b/catgets/gencat.c index 4db52ceb2b..ae0a643ac0 100644 --- a/catgets/gencat.c +++ b/catgets/gencat.c @@ -137,13 +137,7 @@ static struct argp argp = /* Wrapper functions with error checking for standard functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); -extern void *xrealloc (void *o, size_t n) - __attribute_malloc__ __attribute_alloc_size (2); -extern char *xstrdup (const char *) __attribute_malloc__; +#include <programs/xmalloc.h> /* Prototypes for local functions. */ static void error_print (void); diff --git a/config.h.in b/config.h.in index f3fe6b88be..8c2479ef48 100644 --- a/config.h.in +++ b/config.h.in @@ -115,7 +115,7 @@ /* Defined to some form of __attribute__ ((...)) if the compiler supports a different, more efficient calling convention. */ -#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__ +#if defined USE_REGPARMS && !defined PROF # define internal_function __attribute__ ((regparm (3), stdcall)) #endif diff --git a/config.make.in b/config.make.in index ed27163859..b01b70be2b 100644 --- a/config.make.in +++ b/config.make.in @@ -11,6 +11,7 @@ exec_prefix = @exec_prefix@ datadir = @datadir@ libdir = @libdir@ slibdir = @libc_cv_slibdir@ +rtlddir = @libc_cv_rtlddir@ localedir = @libc_cv_localedir@ sysconfdir = @libc_cv_sysconfdir@ libexecdir = @libexecdir@ @@ -36,12 +37,7 @@ cflags-cpu = @libc_cv_cc_submachine@ asflags-cpu = @libc_cv_cc_submachine@ config-extra-cflags = @libc_extra_cflags@ -config-cflags-sse4 = @libc_cv_cc_sse4@ -config-cflags-avx = @libc_cv_cc_avx@ -config-cflags-sse2avx = @libc_cv_cc_sse2avx@ -config-cflags-novzeroupper = @libc_cv_cc_novzeroupper@ config-cflags-nofma = @libc_cv_cc_nofma@ -config-asflags-i686 = @libc_cv_as_i686@ defines = @DEFINES@ sysheaders = @sysheaders@ @@ -57,8 +53,6 @@ old-glibc-headers = @old_glibc_headers@ unwind-find-fde = @libc_cv_gcc_unwind_find_fde@ have-forced-unwind = @libc_cv_forced_unwind@ have-fpie = @libc_cv_fpie@ -have-mfma4 = @libc_cv_cc_fma4@ -have-as-vis3 = @libc_cv_sparc_as_vis3@ gnu89-inline-CFLAGS = @gnu89_inline@ have-ssp = @libc_cv_ssp@ have-selinux = @have_selinux@ @@ -91,7 +85,6 @@ nss-crypt = @libc_cv_nss_crypt@ build-shared = @shared@ build-pic-default= @libc_cv_pic_default@ build-profile = @profile@ -build-bounded = no build-static-nss = @static_nss@ add-ons = @add_ons@ add-on-subdirs = @add_on_subdirs@ @@ -115,7 +108,6 @@ AR = @AR@ NM = @NM@ MAKEINFO = @MAKEINFO@ AS = $(CC) -c -MIG = @MIG@ BISON = @BISON@ AUTOCONF = @AUTOCONF@ OBJDUMP = @OBJDUMP@ @@ -581,19 +581,12 @@ shared static ldd_rewrite_script use_ldconfig -libc_cv_sparc_as_vis3 -libc_cv_as_i686 -libc_cv_cc_nofma -libc_cv_cc_fma4 -libc_cv_cc_novzeroupper -libc_cv_cc_sse2avx -libc_cv_cc_avx -libc_cv_cc_sse4 libc_cv_forced_unwind libc_cv_rootsbindir libc_cv_localstatedir libc_cv_sysconfdir libc_cv_localedir +libc_cv_rtlddir libc_cv_slibdir old_glibc_headers use_nscd @@ -606,6 +599,7 @@ have_libcap have_libaudit LIBGD libc_cv_cc_submachine +libc_cv_cc_nofma exceptions gnu89_inline libc_cv_ssp @@ -638,7 +632,6 @@ MSGFMT MAKE LD AS -MIG OBJCOPY OBJDUMP AR @@ -6911,6 +6904,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_nofma" >&5 $as_echo "$libc_cv_cc_nofma" >&6; } + if test -n "$submachine"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5 $as_echo_n "checking for compiler option for CPU variant... " >&6; } @@ -7366,14 +7360,6 @@ fi - - - - - - - - if test x$use_ldconfig = xyes; then $as_echo "#define USE_LDCONFIG 1" >>confdefs.h diff --git a/configure.in b/configure.in index c57897974c..bbdf156b09 100644 --- a/configure.in +++ b/configure.in @@ -954,7 +954,6 @@ fi AC_PROG_LN_S LIBC_PROG_BINUTILS -AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in # Accept binutils 2.20 or newer. AC_CHECK_PROG_VER(AS, $AS, --version, @@ -1948,6 +1947,7 @@ libc_cv_cc_nofma= for opt in -ffp-contract=off -mno-fused-madd; do LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break]) done]) +AC_SUBST(libc_cv_cc_nofma) if test -n "$submachine"; then AC_CACHE_CHECK([for compiler option for CPU variant], @@ -2153,22 +2153,13 @@ fi AC_SUBST(old_glibc_headers) AC_SUBST(libc_cv_slibdir) +AC_SUBST(libc_cv_rtlddir) AC_SUBST(libc_cv_localedir) AC_SUBST(libc_cv_sysconfdir) AC_SUBST(libc_cv_localstatedir) AC_SUBST(libc_cv_rootsbindir) AC_SUBST(libc_cv_forced_unwind) -dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests -AC_SUBST(libc_cv_cc_sse4) -AC_SUBST(libc_cv_cc_avx) -AC_SUBST(libc_cv_cc_sse2avx) -AC_SUBST(libc_cv_cc_novzeroupper) -AC_SUBST(libc_cv_cc_fma4) -AC_SUBST(libc_cv_cc_nofma) -AC_SUBST(libc_cv_as_i686) -AC_SUBST(libc_cv_sparc_as_vis3) - if test x$use_ldconfig = xyes; then AC_DEFINE(USE_LDCONFIG) fi diff --git a/crypt/Makefile b/crypt/Makefile index 208579a0ca..0f5f0992f5 100644 --- a/crypt/Makefile +++ b/crypt/Makefile @@ -69,9 +69,6 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so else $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a endif -ifeq (yes,$(build-bounded)) -$(tests:%=$(objpfx)%-bp): $(objpfx)libcrypt_b.a -endif # Depend on libc.so so a DT_NEEDED is generated in the shared objects. # This ensures they will load libc.so for needed symbols if loaded by diff --git a/csu/Makefile b/csu/Makefile index bf0b4c4ada..24f0974b54 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -53,12 +53,6 @@ install-lib += S$(start-installed-name) generated += start.os endif -ifeq (yes,$(build-bounded)) -extra-objs += b$(start-installed-name) -install-lib += b$(start-installed-name) -generated += start.ob -endif - ifneq ($(start-installed-name),$(static-start-installed-name)) extra-objs += $(static-start-installed-name) g$(static-start-installed-name) omit-deps += $(patsubst %.o,%,$(static-start-installed-name) \ @@ -98,9 +92,6 @@ $(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o \ $(objpfx)S$(start-installed-name): $(objpfx)start.os $(objpfx)abi-note.o \ $(objpfx)init.o $(link-relocatable) -$(objpfx)b$(start-installed-name): $(objpfx)start.ob $(objpfx)abi-note.ob \ - $(objpfx)init.ob - $(link-relocatable) endif # The profiling startfile is made by linking together the normal diff --git a/csu/elf-init.c b/csu/elf-init.c index 1e231c1a08..84700e6fff 100644 --- a/csu/elf-init.c +++ b/csu/elf-init.c @@ -49,10 +49,13 @@ extern void (*__fini_array_start []) (void) attribute_hidden; extern void (*__fini_array_end []) (void) attribute_hidden; +#ifndef NO_INITFINI /* These function symbols are provided for the .init/.fini section entry points automagically by the linker. */ extern void _init (void); extern void _fini (void); +#endif + /* These functions are passed to __libc_start_main by the startup code. These get statically linked into each program. For dynamically linked @@ -76,7 +79,9 @@ __libc_csu_init (int argc, char **argv, char **envp) } #endif +#ifndef NO_INITFINI _init (); +#endif const size_t size = __init_array_end - __init_array_start; for (size_t i = 0; i < size; i++) @@ -94,6 +99,8 @@ __libc_csu_fini (void) while (i-- > 0) (*__fini_array_start [i]) (); +# ifndef NO_INITFINI _fini (); +# endif #endif } diff --git a/csu/gmon-start.c b/csu/gmon-start.c index 3710379809..0c18321095 100644 --- a/csu/gmon-start.c +++ b/csu/gmon-start.c @@ -7,6 +7,23 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + 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 @@ -42,10 +59,17 @@ extern char etext[]; # endif #endif +#ifdef GMON_START_ARRAY_SECTION +static void __gmon_start__ (void); +static void (*const gmon_start_initializer) (void) + __attribute__ ((used, section (GMON_START_ARRAY_SECTION))) = &__gmon_start__; +static +#else /* We cannot use the normal constructor mechanism to call __gmon_start__ because gcrt1.o appears before crtbegin.o in the link. Instead crti.o calls it specially. */ extern void __gmon_start__ (void); +#endif void __gmon_start__ (void) diff --git a/csu/libc-start.c b/csu/libc-start.c index d4a135f21b..9c4c01d9fd 100644 --- a/csu/libc-start.c +++ b/csu/libc-start.c @@ -19,7 +19,6 @@ #include <stdio.h> #include <unistd.h> #include <ldsodefs.h> -#include <bp-sym.h> extern void __libc_init_first (int argc, char **argv, char **envp); #ifndef SHARED @@ -86,7 +85,7 @@ apply_irel (void) # endif #else # define STATIC -# define LIBC_START_MAIN BP_SYM (__libc_start_main) +# define LIBC_START_MAIN __libc_start_main #endif #ifdef MAIN_AUXVEC_ARG @@ -101,14 +100,14 @@ apply_irel (void) STATIC int LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), int argc, - char *__unbounded *__unbounded ubp_av, + char **argv, #ifdef LIBC_START_MAIN_AUXVEC_ARG - ElfW(auxv_t) *__unbounded auxvec, + ElfW(auxv_t) *auxvec, #endif __typeof (main) init, void (*fini) (void), void (*rtld_fini) (void), - void *__unbounded stack_end) + void *stack_end) __attribute__ ((noreturn)); @@ -117,29 +116,23 @@ STATIC int LIBC_START_MAIN (int (*main) (int, char **, char ** finalizers were called in more than one place. */ STATIC int LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), - int argc, char *__unbounded *__unbounded ubp_av, + int argc, char **argv, #ifdef LIBC_START_MAIN_AUXVEC_ARG - ElfW(auxv_t) *__unbounded auxvec, + ElfW(auxv_t) *auxvec, #endif __typeof (main) init, void (*fini) (void), - void (*rtld_fini) (void), void *__unbounded stack_end) + void (*rtld_fini) (void), void *stack_end) { -#if __BOUNDED_POINTERS__ - char **argv; -#else -# define argv ubp_av -#endif - /* Result of the 'main' function. */ int result; __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; #ifndef SHARED - char *__unbounded *__unbounded ubp_ev = &ubp_av[argc + 1]; + char **ev = &argv[argc + 1]; - __environ = ubp_ev; + __environ = ev; /* Store the lowest stack address. This is done in ld.so if this is the code for the DSO. */ @@ -149,12 +142,12 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), /* First process the auxiliary vector since we need to find the program header to locate an eventually present PT_TLS entry. */ # ifndef LIBC_START_MAIN_AUXVEC_ARG - ElfW(auxv_t) *__unbounded auxvec; + ElfW(auxv_t) *auxvec; { - char *__unbounded *__unbounded evp = ubp_ev; + char **evp = ev; while (*evp++ != NULL) ; - auxvec = (ElfW(auxv_t) *__unbounded) evp; + auxvec = (ElfW(auxv_t) *) evp; } # endif _dl_aux_init (auxvec); diff --git a/csu/libc-tls.c b/csu/libc-tls.c index 90daaa61c1..5fa39eb8d1 100644 --- a/csu/libc-tls.c +++ b/csu/libc-tls.c @@ -75,7 +75,7 @@ size_t _dl_tls_generation; TLS_INIT_HELPER #endif -static inline void +static void init_slotinfo (void) { /* Create the slotinfo list. */ @@ -90,7 +90,7 @@ init_slotinfo (void) GL(dl_tls_dtv_slotinfo_list) = &static_slotinfo.si; } -static inline void +static void init_static_tls (size_t memsz, size_t align) { /* That is the size of the TLS memory for this object. The initialized diff --git a/debug/backtrace.c b/debug/backtrace.c index ca80797fc9..84594986cf 100644 --- a/debug/backtrace.c +++ b/debug/backtrace.c @@ -63,8 +63,8 @@ __backtrace (array, size) int size; { struct layout *current; - void *__unbounded top_frame; - void *__unbounded top_stack; + void *top_frame; + void *top_stack; int cnt = 0; top_frame = FIRST_FRAME_POINTER; diff --git a/debug/segfault.c b/debug/segfault.c index 99c65a7f13..e1d058f0c7 100644 --- a/debug/segfault.c +++ b/debug/segfault.c @@ -31,8 +31,6 @@ #include <_itoa.h> #include <ldsodefs.h> -#include <bp-checks.h> - /* This file defines macros to access the content of the sigcontext element passed up by the signal handler. */ #include <sigcontextinfo.h> diff --git a/elf/Makefile b/elf/Makefile index 6d4b365fbb..9477a4d96b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -66,7 +66,7 @@ endif ifeq (yes,$(build-shared)) extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os generated += librtld.os dl-allobjs.os ld.so ldd -install-others = $(inst_slibdir)/$(rtld-installed-name) +install-others = $(inst_rtlddir)/$(rtld-installed-name) install-bin-script = ldd endif @@ -340,7 +340,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map) | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }' # interp.c exists just to get this string into the libraries. -CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \ +CFLAGS-interp.c = -D'RUNTIME_LINKER="$(rtlddir)/$(rtld-installed-name)"' \ -DNOT_IN_libc=1 $(objpfx)interp.os: $(common-objpfx)config.make @@ -372,18 +372,19 @@ $(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force) $(make-target-directory) $(do-install-program) -$(inst_slibdir)/$(rtld-installed-name): \ +$(inst_rtlddir)/$(rtld-installed-name): \ $(inst_slibdir)/$(rtld-version-installed-name) \ $(inst_slibdir)/libc-$(version).so + $(make-target-directory) $(make-shlib-link) # Special target called by parent to install just the dynamic linker. .PHONY: ldso_install -ldso_install: $(inst_slibdir)/$(rtld-installed-name) +ldso_install: $(inst_rtlddir)/$(rtld-installed-name) endif -common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \ +common-ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \ -e 's%@VERSION@%$(version)%g' \ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' diff --git a/elf/Versions b/elf/Versions index 87e27c5a7a..238399232d 100644 --- a/elf/Versions +++ b/elf/Versions @@ -1,7 +1,7 @@ libc { GLIBC_2.0 { %ifdef EXPORT_UNWIND_FIND_FDE - __register_frame_info; __deregister_frame_info; + __deregister_frame_info; __register_frame_info; %endif } GLIBC_2.1 { @@ -13,23 +13,23 @@ libc { } %ifdef EXPORT_UNWIND_FIND_FDE GCC_3.0 { - __register_frame_info_bases; __deregister_frame_info_bases; + __deregister_frame_info_bases; __register_frame_info_bases; __register_frame_info_table_bases; _Unwind_Find_FDE; } %endif GLIBC_PRIVATE { # functions used in other libraries _dl_addr; - _dl_sym; _dl_vsym; _dl_open_hook; - __libc_dlopen_mode; __libc_dlsym; __libc_dlclose; + _dl_sym; _dl_vsym; + __libc_dlclose; __libc_dlopen_mode; __libc_dlsym; } } ld { GLIBC_2.0 { # Function from libc.so which must be shared with libc. - calloc; free; malloc; realloc; __libc_memalign; + __libc_memalign; calloc; free; malloc; realloc; _r_debug; } @@ -50,16 +50,15 @@ ld { GLIBC_PRIVATE { # Those are in the dynamic linker, but used by libc.so. __libc_enable_secure; - _dl_argv; - _dl_out_of_memory; - _dl_starting_up; + _dl_allocate_tls; _dl_allocate_tls_init; + _dl_argv; _dl_find_dso_for_object; _dl_get_tls_static_info; + _dl_deallocate_tls; _dl_make_stack_executable; _dl_out_of_memory; + _dl_rtld_di_serinfo; _dl_starting_up; _dl_tls_setup; _rtld_global; _rtld_global_ro; - _dl_allocate_tls; _dl_deallocate_tls; - _dl_get_tls_static_info; _dl_allocate_tls_init; - _dl_tls_setup; _dl_rtld_di_serinfo; - _dl_make_stack_executable; + # Only here for gdb while a better method is developed. _dl_debug_state; + # Pointer protection. __pointer_chk_guard; } diff --git a/elf/cache.c b/elf/cache.c index 9901952722..699550bb60 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -100,6 +100,10 @@ print_entry (const char *lib, int flag, unsigned int osversion, case FLAG_AARCH64_LIB64: fputs (",AArch64", stdout); break; + /* Uses the ARM soft-float ABI. */ + case FLAG_ARM_LIBSF: + fputs (",soft-float", stdout); + break; case 0: break; default: diff --git a/elf/dl-addr.c b/elf/dl-addr.c index 91cc443439..a53346627f 100644 --- a/elf/dl-addr.c +++ b/elf/dl-addr.c @@ -130,18 +130,14 @@ _dl_addr (const void *address, Dl_info *info, /* Protect against concurrent loads and unloads. */ __rtld_lock_lock_recursive (GL(dl_load_lock)); - /* Find the highest-addressed object that ADDRESS is not below. */ - for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) - for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l; l = l->l_next) - if (addr >= l->l_map_start && addr < l->l_map_end - && (l->l_contiguous || _dl_addr_inside_object (l, addr))) - { - determine_info (addr, l, info, mapp, symbolp); - result = 1; - goto out; - } + struct link_map *l = _dl_find_dso_for_object (addr); + + if (l) + { + determine_info (addr, l, info, mapp, symbolp); + result = 1; + } - out: __rtld_lock_unlock_recursive (GL(dl_load_lock)); return result; diff --git a/elf/dl-cache.c b/elf/dl-cache.c index 2c4bcc6cb9..030fdcaffe 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c @@ -172,8 +172,9 @@ _dl_cache_libcmp (const char *p1, const char *p2) } -/* Look up NAME in ld.so.cache and return the file name stored there, - or null if none is found. */ +/* Look up NAME in ld.so.cache and return the file name stored there, or null + if none is found. The cache is loaded if it was not already. If loading + the cache previously failed there will be no more attempts to load it. */ const char * internal_function diff --git a/elf/dl-deps.c b/elf/dl-deps.c index fe90df61b1..cd1c236b2e 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -155,9 +155,7 @@ _dl_map_object_deps (struct link_map *map, const char *errstring; const char *objname; - auto inline void preload (struct link_map *map); - - inline void preload (struct link_map *map) + void preload (struct link_map *map) { known[nlist].done = 0; known[nlist].map = map; diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c index 3805949e8a..8d49383d76 100644 --- a/elf/dl-hwcaps.c +++ b/elf/dl-hwcaps.c @@ -42,7 +42,6 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, size_t cnt = platform != NULL; size_t n, m; size_t total; - struct r_strlenpair *temp; struct r_strlenpair *result; struct r_strlenpair *rp; char *cp; @@ -52,7 +51,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, if ((masked & (1ULL << n)) != 0) ++cnt; -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO /* The system-supplied DSO can contain a note of type 2, vendor "GNU". This gives us a list of names to treat as fake hwcap bits. */ @@ -103,9 +102,9 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, ++cnt; /* Create temporary data structure to generate result table. */ - temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp)); + struct r_strlenpair temp[cnt]; m = 0; -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO if (dsocaps != NULL) { const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1]; @@ -199,7 +198,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, } /* Fill in the information. This follows the following scheme - (indeces from TEMP for four strings): + (indices from TEMP for four strings): entry #0: 0, 1, 2, 3 binary: 1111 #1: 0, 1, 3 1101 #2: 0, 2, 3 1011 diff --git a/elf/dl-open.c b/elf/dl-open.c index 385a6c1f35..201d95d1be 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -28,7 +28,6 @@ #include <sys/param.h> #include <bits/libc-lock.h> #include <ldsodefs.h> -#include <bp-sym.h> #include <caller.h> #include <sysdep-cancel.h> #include <tls.h> @@ -43,7 +42,7 @@ extern ElfW(Addr) _dl_sysdep_start (void **start_argptr, ElfW(Word) phnum, ElfW(Addr) *user_entry, ElfW(auxv_t) *auxv)); -weak_extern (BP_SYM (_dl_sysdep_start)) +weak_extern (_dl_sysdep_start) extern int __libc_multiple_libcs; /* Defined in init-first.c. */ @@ -166,6 +165,29 @@ add_to_global (struct link_map *new) return 0; } +/* Search link maps in all namespaces for the DSO that containes the object at + address ADDR. Returns the pointer to the link map of the matching DSO, or + NULL if a match is not found. */ +struct link_map * +internal_function +_dl_find_dso_for_object (const ElfW(Addr) addr) +{ + struct link_map *l; + + /* Find the highest-addressed object that ADDR is not below. */ + for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) + for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next) + if (addr >= l->l_map_start && addr < l->l_map_end + && (l->l_contiguous + || _dl_addr_inside_object (l, (ElfW(Addr)) addr))) + { + assert (ns == l->l_ns); + return l; + } + return NULL; +} +rtld_hidden_def (_dl_find_dso_for_object); + static void dl_open_worker (void *a) { @@ -195,20 +217,11 @@ dl_open_worker (void *a) call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded; #endif - struct link_map *l; - for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) - for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next) - if (caller_dlopen >= (const void *) l->l_map_start - && caller_dlopen < (const void *) l->l_map_end - && (l->l_contiguous - || _dl_addr_inside_object (l, (ElfW(Addr)) caller_dlopen))) - { - assert (ns == l->l_ns); - call_map = l; - goto found_caller; - } + struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen); + + if (l) + call_map = l; - found_caller: if (args->nsid == __LM_ID_CALLER) { #ifndef SHARED diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c index 9ac2726102..828474838c 100644 --- a/elf/dl-runtime.c +++ b/elf/dl-runtime.c @@ -62,9 +62,7 @@ _dl_fixup ( # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS ELF_MACHINE_RUNTIME_FIXUP_ARGS, # endif - /* GKM FIXME: Fix trampoline to pass bounds so we can do - without the `__unbounded' qualifier. */ - struct link_map *__unbounded l, ElfW(Word) reloc_arg) + struct link_map *l, ElfW(Word) reloc_arg) { const ElfW(Sym) *const symtab = (const void *) D_PTR (l, l_info[DT_SYMTAB]); @@ -150,7 +148,7 @@ _dl_fixup ( return elf_machine_fixup_plt (l, result, reloc, rel_addr, value); } -#if !defined PROF && !__BOUNDED_POINTERS__ +#ifndef PROF DL_FIXUP_VALUE_TYPE __attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE _dl_profile_fixup ( diff --git a/elf/dl-support.c b/elf/dl-support.c index 507568784b..ad9b4c40b0 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -158,7 +158,7 @@ struct dl_scope_free_list *_dl_scope_free_list; /* Needed for improved syscall handling on at least x86/Linux. */ uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT; #endif -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO /* Address of the ELF headers in the vsyscall page. */ const ElfW(Ehdr) *_dl_sysinfo_dso; @@ -198,7 +198,8 @@ _dl_aux_init (ElfW(auxv_t) *av) switch (av->a_type) { case AT_PAGESZ: - GLRO(dl_pagesize) = av->a_un.a_val; + if (av->a_un.a_val != 0) + GLRO(dl_pagesize) = av->a_un.a_val; break; case AT_CLKTCK: GLRO(dl_clktck) = av->a_un.a_val; @@ -217,7 +218,7 @@ _dl_aux_init (ElfW(auxv_t) *av) GL(dl_sysinfo) = av->a_un.a_val; break; #endif -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO case AT_SYSINFO_EHDR: GL(dl_sysinfo_dso) = (void *) av->a_un.a_val; break; @@ -266,9 +267,6 @@ _dl_non_dynamic_init (void) if (HP_TIMING_AVAIL) HP_TIMING_NOW (_dl_cpuclock_offset); - if (!_dl_pagesize) - _dl_pagesize = __getpagesize (); - _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; /* Set up the data structures for the system-supplied DSO early, diff --git a/elf/dl-sym.c b/elf/dl-sym.c index d2b4db7ec0..05de6c1c06 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -91,20 +91,10 @@ do_sym (void *handle, const char *name, void *who, lookup_t result; ElfW(Addr) caller = (ElfW(Addr)) who; + struct link_map *l = _dl_find_dso_for_object (caller); /* If the address is not recognized the call comes from the main program (we hope). */ - struct link_map *match = GL(dl_ns)[LM_ID_BASE]._ns_loaded; - - /* Find the highest-addressed object that CALLER is not below. */ - for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) - for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL; - l = l->l_next) - if (caller >= l->l_map_start && caller < l->l_map_end - && (l->l_contiguous || _dl_addr_inside_object (l, caller))) - { - match = l; - break; - } + struct link_map *match = l ? l : GL(dl_ns)[LM_ID_BASE]._ns_loaded; if (handle == RTLD_DEFAULT) { diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index 42bc8145d7..d8f3dd2fb9 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -167,7 +167,7 @@ _dl_sysdep_start (void **start_argptr, new_sysinfo = av->a_un.a_val; break; #endif -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO case AT_SYSINFO_EHDR: GLRO(dl_sysinfo_dso) = (void *) av->a_un.a_val; break; @@ -2343,23 +2343,25 @@ typedef Elf32_Addr Elf32_Conflict; /* ARM relocs. */ #define R_ARM_NONE 0 /* No reloc */ -#define R_ARM_PC24 1 /* PC relative 26 bit branch */ +#define R_ARM_PC24 1 /* Deprecated PC relative 26 + bit branch. */ #define R_ARM_ABS32 2 /* Direct 32 bit */ #define R_ARM_REL32 3 /* PC relative 32 bit */ #define R_ARM_PC13 4 #define R_ARM_ABS16 5 /* Direct 16 bit */ #define R_ARM_ABS12 6 /* Direct 12 bit */ -#define R_ARM_THM_ABS5 7 +#define R_ARM_THM_ABS5 7 /* Direct & 0x7C (LDR, STR). */ #define R_ARM_ABS8 8 /* Direct 8 bit */ #define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 -#define R_ARM_THM_PC8 11 +#define R_ARM_THM_PC22 10 /* PC relative 24 bit (Thumb32 BL). */ +#define R_ARM_THM_PC8 11 /* PC relative & 0x3FC + (Thumb16 LDR, ADD, ADR). */ #define R_ARM_AMP_VCALL9 12 #define R_ARM_SWI24 13 /* Obsolete static relocation. */ #define R_ARM_TLS_DESC 13 /* Dynamic relocation. */ -#define R_ARM_THM_SWI8 14 -#define R_ARM_XPC25 15 -#define R_ARM_THM_XPC22 16 +#define R_ARM_THM_SWI8 14 /* Reserved. */ +#define R_ARM_XPC25 15 /* Reserved. */ +#define R_ARM_THM_XPC22 16 /* Reserved. */ #define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */ #define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */ #define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */ @@ -2370,21 +2372,109 @@ typedef Elf32_Addr Elf32_Conflict; #define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ #define R_ARM_GOT32 26 /* 32 bit GOT entry */ -#define R_ARM_PLT32 27 /* 32 bit PLT address */ -#define R_ARM_ALU_PCREL_7_0 32 -#define R_ARM_ALU_PCREL_15_8 33 -#define R_ARM_ALU_PCREL_23_15 34 -#define R_ARM_LDR_SBREL_11_0 35 -#define R_ARM_ALU_SBREL_19_12 36 -#define R_ARM_ALU_SBREL_27_20 37 +#define R_ARM_PLT32 27 /* Deprecated, 32 bit PLT address. */ +#define R_ARM_CALL 28 /* PC relative 24 bit (BL, BLX). */ +#define R_ARM_JUMP24 29 /* PC relative 24 bit + (B, BL<cond>). */ +#define R_ARM_THM_JUMP24 30 /* PC relative 24 bit (Thumb32 B.W). */ +#define R_ARM_BASE_ABS 31 /* Adjust by program base. */ +#define R_ARM_ALU_PCREL_7_0 32 /* Obsolete. */ +#define R_ARM_ALU_PCREL_15_8 33 /* Obsolete. */ +#define R_ARM_ALU_PCREL_23_15 34 /* Obsolete. */ +#define R_ARM_LDR_SBREL_11_0 35 /* Deprecated, prog. base relative. */ +#define R_ARM_ALU_SBREL_19_12 36 /* Deprecated, prog. base relative. */ +#define R_ARM_ALU_SBREL_27_20 37 /* Deprecated, prog. base relative. */ +#define R_ARM_TARGET1 38 +#define R_ARM_SBREL31 39 /* Program base relative. */ +#define R_ARM_V4BX 40 +#define R_ARM_TARGET2 41 +#define R_ARM_PREL31 42 /* 32 bit PC relative. */ +#define R_ARM_MOVW_ABS_NC 43 /* Direct 16-bit (MOVW). */ +#define R_ARM_MOVT_ABS 44 /* Direct high 16-bit (MOVT). */ +#define R_ARM_MOVW_PREL_NC 45 /* PC relative 16-bit (MOVW). */ +#define R_ARM_MOVT_PREL 46 /* PC relative (MOVT). */ +#define R_ARM_THM_MOVW_ABS_NC 47 /* Direct 16 bit (Thumb32 MOVW). */ +#define R_ARM_THM_MOVT_ABS 48 /* Direct high 16 bit + (Thumb32 MOVT). */ +#define R_ARM_THM_MOVW_PREL_NC 49 /* PC relative 16 bit + (Thumb32 MOVW). */ +#define R_ARM_THM_MOVT_PREL 50 /* PC relative high 16 bit + (Thumb32 MOVT). */ +#define R_ARM_THM_JUMP19 51 /* PC relative 20 bit + (Thumb32 B<cond>.W). */ +#define R_ARM_THM_JUMP6 52 /* PC relative X & 0x7E + (Thumb16 CBZ, CBNZ). */ +#define R_ARM_THM_ALU_PREL_11_0 53 /* PC relative 12 bit + (Thumb32 ADR.W). */ +#define R_ARM_THM_PC12 54 /* PC relative 12 bit + (Thumb32 LDR{D,SB,H,SH}). */ +#define R_ARM_ABS32_NOI 55 /* Direct 32-bit. */ +#define R_ARM_REL32_NOI 56 /* PC relative 32-bit. */ +#define R_ARM_ALU_PC_G0_NC 57 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G0 58 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G1_NC 59 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G1 60 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G2 61 /* PC relative (ADD, SUB). */ +#define R_ARM_LDR_PC_G1 62 /* PC relative (LDR,STR,LDRB,STRB). */ +#define R_ARM_LDR_PC_G2 63 /* PC relative (LDR,STR,LDRB,STRB). */ +#define R_ARM_LDRS_PC_G0 64 /* PC relative (STR{D,H}, + LDR{D,SB,H,SH}). */ +#define R_ARM_LDRS_PC_G1 65 /* PC relative (STR{D,H}, + LDR{D,SB,H,SH}). */ +#define R_ARM_LDRS_PC_G2 66 /* PC relative (STR{D,H}, + LDR{D,SB,H,SH}). */ +#define R_ARM_LDC_PC_G0 67 /* PC relative (LDC, STC). */ +#define R_ARM_LDC_PC_G1 68 /* PC relative (LDC, STC). */ +#define R_ARM_LDC_PC_G2 69 /* PC relative (LDC, STC). */ +#define R_ARM_ALU_SB_G0_NC 70 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G0 71 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G1_NC 72 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G1 73 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G2 74 /* Program base relative (ADD,SUB). */ +#define R_ARM_LDR_SB_G0 75 /* Program base relative (LDR, + STR, LDRB, STRB). */ +#define R_ARM_LDR_SB_G1 76 /* Program base relative + (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDR_SB_G2 77 /* Program base relative + (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDRS_SB_G0 78 /* Program base relative + (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDRS_SB_G1 79 /* Program base relative + (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDRS_SB_G2 80 /* Program base relative + (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDC_SB_G0 81 /* Program base relative (LDC,STC). */ +#define R_ARM_LDC_SB_G1 82 /* Program base relative (LDC,STC). */ +#define R_ARM_LDC_SB_G2 83 /* Program base relative (LDC,STC). */ +#define R_ARM_MOVW_BREL_NC 84 /* Program base relative 16 + bit (MOVW). */ +#define R_ARM_MOVT_BREL 85 /* Program base relative high + 16 bit (MOVT). */ +#define R_ARM_MOVW_BREL 86 /* Program base relative 16 + bit (MOVW). */ +#define R_ARM_THM_MOVW_BREL_NC 87 /* Program base relative 16 + bit (Thumb32 MOVW). */ +#define R_ARM_THM_MOVT_BREL 88 /* Program base relative high + 16 bit (Thumb32 MOVT). */ +#define R_ARM_THM_MOVW_BREL 89 /* Program base relative 16 + bit (Thumb32 MOVW). */ #define R_ARM_TLS_GOTDESC 90 #define R_ARM_TLS_CALL 91 -#define R_ARM_TLS_DESCSEQ 92 +#define R_ARM_TLS_DESCSEQ 92 /* TLS relaxation. */ #define R_ARM_THM_TLS_CALL 93 +#define R_ARM_PLT32_ABS 94 +#define R_ARM_GOT_ABS 95 /* GOT entry. */ +#define R_ARM_GOT_PREL 96 /* PC relative GOT entry. */ +#define R_ARM_GOT_BREL12 97 /* GOT entry relative to GOT + origin (LDR). */ +#define R_ARM_GOTOFF12 98 /* 12 bit, GOT entry relative + to GOT origin (LDR, STR). */ +#define R_ARM_GOTRELAX 99 #define R_ARM_GNU_VTENTRY 100 #define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_THM_PC11 102 /* thumb unconditional branch */ -#define R_ARM_THM_PC9 103 /* thumb conditional branch */ +#define R_ARM_THM_PC11 102 /* PC relative & 0xFFE (Thumb16 B). */ +#define R_ARM_THM_PC9 103 /* PC relative & 0x1FE + (Thumb16 B/B<cond>). */ #define R_ARM_TLS_GD32 104 /* PC-rel 32 bit for global dynamic thread local data */ #define R_ARM_TLS_LDM32 105 /* PC-rel 32 bit for local dynamic @@ -2395,7 +2485,18 @@ typedef Elf32_Addr Elf32_Conflict; static TLS block offset */ #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static TLS block */ -#define R_ARM_THM_TLS_DESCSEQ 129 +#define R_ARM_TLS_LDO12 109 /* 12 bit relative to TLS + block (LDR, STR). */ +#define R_ARM_TLS_LE12 110 /* 12 bit relative to static + TLS block (LDR, STR). */ +#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative + to GOT origin (LDR). */ +#define R_ARM_ME_TOO 128 /* Obsolete. */ +#define R_ARM_THM_TLS_DESCSEQ 129 +#define R_ARM_THM_TLS_DESCSEQ16 129 +#define R_ARM_THM_TLS_DESCSEQ32 130 +#define R_ARM_THM_GOT_BREL12 131 /* GOT entry relative to GOT + origin, 12 bit (Thumb32 LDR). */ #define R_ARM_IRELATIVE 160 #define R_ARM_RXPC25 249 #define R_ARM_RSBREL32 250 diff --git a/elf/pldd.c b/elf/pldd.c index b09252d39c..d9388a19c2 100644 --- a/elf/pldd.c +++ b/elf/pldd.c @@ -43,10 +43,7 @@ extern char *program_invocation_short_name; #define PACKAGE _libc_intl_domainname /* External functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xrealloc (void *o, size_t n) - __attribute_malloc__ __attribute_alloc_size (2); +#include <programs/xmalloc.h> /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); diff --git a/elf/rtld.c b/elf/rtld.c index 4014ef1042..23238ad3fc 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1768,7 +1768,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", GL(dl_rtld_map).l_next = (i + 1 < main_map->l_searchlist.r_nlist ? main_map->l_searchlist.r_list[i + 1] : NULL); -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO if (GLRO(dl_sysinfo_map) != NULL && GL(dl_rtld_map).l_prev->l_next == GLRO(dl_sysinfo_map) && GL(dl_rtld_map).l_next != GLRO(dl_sysinfo_map)) @@ -1880,7 +1880,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", if (dyn->d_tag == DT_NEEDED) { l = l->l_next; -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO /* Skip the VDSO since it's not part of the list of objects we brought in via DT_NEEDED entries. */ if (l == GLRO(dl_sysinfo_map)) diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h index 1878fae151..a98dfeca33 100644 --- a/elf/setup-vdso.h +++ b/elf/setup-vdso.h @@ -20,7 +20,7 @@ static inline void __attribute__ ((always_inline)) setup_vdso (struct link_map *main_map __attribute__ ((unused)), struct link_map ***first_preload __attribute__ ((unused))) { -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO if (GLRO(dl_sysinfo_dso) == NULL) return; diff --git a/elf/tlsdeschtab.h b/elf/tlsdeschtab.h index 8de9861110..155f4fdd9b 100644 --- a/elf/tlsdeschtab.h +++ b/elf/tlsdeschtab.h @@ -129,7 +129,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset) or a futex wake to wake up any waiting threads, but let's try to avoid introducing such dependencies. */ -inline static int +static int _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller) { if (caller != td->entry) @@ -147,7 +147,7 @@ _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller) return 0; } -inline static void +static void _dl_tlsdesc_wake_up_held_fixups (void) { __rtld_lock_unlock_recursive (GL(dl_load_lock)); diff --git a/elf/tst-stackguard1.c b/elf/tst-stackguard1.c index 2b4fd9a780..fba60bdc90 100644 --- a/elf/tst-stackguard1.c +++ b/elf/tst-stackguard1.c @@ -23,6 +23,7 @@ #include <string.h> #include <sys/wait.h> #include <stackguard-macros.h> +#include <tls.h> #include <unistd.h> static const char *command; diff --git a/extra-lib.mk b/extra-lib.mk index a2293c5c6e..247946f6aa 100644 --- a/extra-lib.mk +++ b/extra-lib.mk @@ -34,7 +34,12 @@ extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ $($(lib)-shared-only-routines),\ $(all-$(lib)-routines)))) ifneq (,$(filter .os,$(object-suffixes-$(lib)))) -extra-objs += $(all-$(lib)-routines:%=%.os) +extra-objs += $(patsubst %,%.os,$(filter-out $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) +endif +ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) +extra-objs += $(patsubst %,%.oS,$(filter $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) endif alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\ $(objpfx)$(patsubst %,$(libtype$o),\ diff --git a/hesiod/Depend b/hesiod/Depend new file mode 100644 index 0000000000..0554b47da6 --- /dev/null +++ b/hesiod/Depend @@ -0,0 +1,2 @@ +nss +resolv diff --git a/hesiod/nss_hesiod/hesiod-grp.c b/hesiod/nss_hesiod/hesiod-grp.c index c2ae16612d..b11952fadf 100644 --- a/hesiod/nss_hesiod/hesiod-grp.c +++ b/hesiod/nss_hesiod/hesiod-grp.c @@ -191,33 +191,6 @@ _nss_hesiod_initgroups_dyn (const char *user, gid_t group, long int *start, return errno == ENOENT ? NSS_STATUS_NOTFOUND : NSS_STATUS_UNAVAIL; } - if (!internal_gid_in_list (groups, group, *start)) - { - if (__builtin_expect (*start == *size, 0)) - { - /* Need a bigger buffer. */ - gid_t *newgroups; - long int newsize; - - if (limit > 0 && *size == limit) - /* We reached the maximum. */ - goto done; - - if (limit <= 0) - newsize = 2 * *size; - else - newsize = MIN (limit, 2 * *size); - - newgroups = realloc (groups, newsize * sizeof (*groups)); - if (newgroups == NULL) - goto done; - *groupsp = groups = newgroups; - *size = newsize; - } - - groups[(*start)++] = group; - } - save_errno = errno; p = *list; diff --git a/iconv/Versions b/iconv/Versions index 7f09ed49c4..5d50cf11e2 100644 --- a/iconv/Versions +++ b/iconv/Versions @@ -1,10 +1,10 @@ libc { GLIBC_2.1 { # i* - iconv_open; iconv; iconv_close; + iconv; iconv_open; iconv_close; } GLIBC_PRIVATE { # functions shared with iconv program - __gconv_get_alias_db; __gconv_get_modules_db; __gconv_get_cache; + __gconv_get_alias_db; __gconv_get_cache; __gconv_get_modules_db; } } diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c index 7a4067b811..b1a0610976 100644 --- a/iconv/iconv_charmap.c +++ b/iconv/iconv_charmap.c @@ -32,10 +32,7 @@ /* Prototypes for a few program-wide used functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); +#include <programs/xmalloc.h> struct convtable diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index 4142020954..a42cc5b375 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -57,13 +57,13 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; static const struct argp_option options[] = { { NULL, 0, NULL, 0, N_("Input/Output format specification:") }, - { "from-code", 'f', "NAME", 0, N_("encoding of original text") }, - { "to-code", 't', "NAME", 0, N_("encoding for output") }, + { "from-code", 'f', N_("NAME"), 0, N_("encoding of original text") }, + { "to-code", 't', N_("NAME"), 0, N_("encoding for output") }, { NULL, 0, NULL, 0, N_("Information:") }, { "list", 'l', NULL, 0, N_("list all known coded character sets") }, { NULL, 0, NULL, 0, N_("Output control:") }, { NULL, 'c', NULL, 0, N_("omit invalid characters from output") }, - { "output", 'o', "FILE", 0, N_("output file") }, + { "output", 'o', N_("FILE"), 0, N_("output file") }, { "silent", 's', NULL, 0, N_("suppress warnings") }, { "verbose", OPT_VERBOSE, NULL, 0, N_("print progress information") }, { NULL, 0, NULL, 0, NULL } diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c index 318c917e92..9e871d279c 100644 --- a/iconv/iconvconfig.c +++ b/iconv/iconvconfig.c @@ -123,8 +123,9 @@ static char *more_help (int key, const char *text, void *input); #define OPT_NOSTDLIB 301 static const struct argp_option options[] = { - { "prefix", OPT_PREFIX, "PATH", 0, N_("Prefix used for all file accesses") }, - { "output", 'o', "FILE", 0, N_("\ + { "prefix", OPT_PREFIX, N_("PATH"), 0, + N_("Prefix used for all file accesses") }, + { "output", 'o', N_("FILE"), 0, N_("\ Put output in FILE instead of installed location\ (--prefix does not apply to FILE)") }, { "nostdlib", OPT_NOSTDLIB, NULL, 0, @@ -247,12 +248,7 @@ static struct static const char gconv_module_ext[] = MODULE_EXT; -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); -extern void *xrealloc (void *o, size_t n) - __attribute_malloc__ __attribute_alloc_size (2); +#include <programs/xmalloc.h> /* C string table handling. */ diff --git a/iconv/strtab.c b/iconv/strtab.c index 7160ac88a5..c62553e2e0 100644 --- a/iconv/strtab.c +++ b/iconv/strtab.c @@ -65,8 +65,7 @@ struct Strtab static size_t ps; -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); +#include <programs/xmalloc.h> /* Prototypes for our functions that are used from iconvconfig.c. If you change these, change also iconvconfig.c. */ diff --git a/include/errno.h b/include/errno.h index 98c6080528..f1b93a881b 100644 --- a/include/errno.h +++ b/include/errno.h @@ -17,7 +17,7 @@ # define errno rtld_errno extern int rtld_errno attribute_hidden; -# else +# elif !defined NOT_IN_libc || defined IN_LIB # include <tls.h> @@ -29,7 +29,7 @@ extern int rtld_errno attribute_hidden; # endif extern __thread int errno attribute_tls_model_ie; -# endif /* RTLD_PRIVATE_ERRNO */ +# endif /* !NOT_IN_libc || IN_LIB */ # define __set_errno(val) (errno = (val)) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 0608320afc..f043ce0850 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -228,8 +228,7 @@ /* A canned warning for sysdeps/stub functions. */ #define stub_warning(name) \ __make_section_unallocated (".gnu.glibc-stub." #name) \ - link_warning (name, \ - "warning: " #name " is not implemented and will always fail") + link_warning (name, #name " is not implemented and will always fail") /* Warning for linking functions calling dlopen into static binaries. */ #ifdef SHARED diff --git a/include/link.h b/include/link.h index 230e95d6c8..7dc3cd1e32 100644 --- a/include/link.h +++ b/include/link.h @@ -302,6 +302,9 @@ struct link_map /* Index of the module in the dtv array. */ size_t l_tls_modid; + /* Number of thread_local objects constructed by this DSO. */ + size_t l_tls_dtor_count; + /* Information used to change permission after the relocations are done. */ ElfW(Addr) l_relro_addr; diff --git a/include/netdb.h b/include/netdb.h index 3f2ae06451..8a569baef3 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -3,18 +3,20 @@ #ifndef _ISOMAC /* Macros for accessing h_errno from inside libc. */ -# undef h_errno -# ifdef _LIBC_REENTRANT -# include <tls.h> -# ifndef NOT_IN_libc -# define h_errno __libc_h_errno -# else -# define h_errno h_errno /* For #ifndef h_errno tests. */ -# endif +# if !defined NOT_IN_libc || defined IN_LIB +# undef h_errno +# ifdef _LIBC_REENTRANT +# include <tls.h> +# ifndef NOT_IN_libc +# define h_errno __libc_h_errno +# else +# define h_errno h_errno /* For #ifndef h_errno tests. */ +# endif extern __thread int h_errno attribute_tls_model_ie; -# else +# else extern int h_errno; -# endif /* _LIBC_REENTRANT */ +# endif /* _LIBC_REENTRANT */ +# endif /* !NOT_IN_libc || IN_LIB */ # define __set_h_errno(x) (h_errno = (x)) libc_hidden_proto (hstrerror) diff --git a/include/programs/xmalloc.h b/include/programs/xmalloc.h new file mode 100644 index 0000000000..f4278852be --- /dev/null +++ b/include/programs/xmalloc.h @@ -0,0 +1,33 @@ +/* Memory related definitions for program modules. + Copyright (C) 1998-2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _XMALLOC_H +#define _XMALLOC_H 1 + +#include <sys/cdefs.h> +#include <stddef.h> + +/* Prototypes for a few program-wide used functions. */ +extern void *xmalloc (size_t n) + __attribute_malloc__ __attribute_alloc_size__ ((1)); +extern void *xcalloc (size_t n, size_t s) + __attribute_malloc__ __attribute_alloc_size__ ((1, 2)); +extern void *xrealloc (void *o, size_t n) + __attribute_malloc__ __attribute_alloc_size__ ((2)); +extern char *xstrdup (const char *) __attribute_malloc__; + +#endif /* xmalloc.h */ diff --git a/include/rounding-mode.h b/include/rounding-mode.h index 2f1ab55a80..c765551979 100644 --- a/include/rounding-mode.h +++ b/include/rounding-mode.h @@ -39,7 +39,7 @@ MORE_BITS is true if the number is not exactly equal to the truncated value or the half-way value, false otherwise. */ -static inline bool +static bool round_away (bool negative, bool last_digit_odd, bool half_bit, bool more_bits, int mode) { diff --git a/include/set-hooks.h b/include/set-hooks.h index 5c751ee372..e58f444d42 100644 --- a/include/set-hooks.h +++ b/include/set-hooks.h @@ -41,7 +41,7 @@ # define RUN_HOOK(NAME, ARGS) \ do { \ - void *const *__unbounded ptr; \ + void *const *ptr; \ for (ptr = (void *const *) symbol_set_first_element (NAME); \ ! symbol_set_end_p (NAME, ptr); ++ptr) \ (*(__##NAME##_hook_function_t *) *ptr) ARGS; \ diff --git a/include/stdlib.h b/include/stdlib.h index 2e536641b9..db1812d85a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -100,6 +100,11 @@ extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d) attribute_hidden; +extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg, + void *d); +extern void __call_tls_dtors (void); +libc_hidden_proto (__call_tls_dtors); + extern void __cxa_finalize (void *d); extern int __posix_memalign (void **memptr, size_t alignment, size_t size); diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 71baa1a2d2..524fe57a25 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -13,8 +13,6 @@ extern void __chk_fail (void) __attribute__ ((__noreturn__)); libc_hidden_proto (__chk_fail) rtld_hidden_proto (__chk_fail) - -# define __attribute_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__))) #endif #endif diff --git a/intl/Makefile b/intl/Makefile index d8bff4a799..b1572a7d9f 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -117,9 +117,6 @@ $(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library) else $(addprefix $(objpfx),$(multithread-test-srcs)): $(static-thread-library) endif -ifeq (yes,$(build-bounded)) -$(multithread-test-srcs:%=$(objpfx)%-bp): $(bounded-thread-library) -endif endif $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out diff --git a/io/fcntl.h b/io/fcntl.h index 61834cef1b..14ccae0d26 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -129,6 +129,12 @@ typedef __pid_t pid_t; # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ +/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EASSESS + is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to + unlinkat. The two functions do completely different things and therefore, + the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to + faccessat would be undefined behavior and thus treating it equivalent to + AT_EACCESS is valid undefined behavior. */ #ifdef __USE_ATFILE # define AT_FDCWD -100 /* Special value used to indicate the *at functions should use the diff --git a/io/lseek.c b/io/lseek.c index b65c50dae1..63cd75fd54 100644 --- a/io/lseek.c +++ b/io/lseek.c @@ -21,7 +21,7 @@ /* Seek to OFFSET on FD, starting from WHENCE. */ off_t -__lseek (fd, offset, whence) +__libc_lseek (fd, offset, whence) int fd; off_t offset; int whence; @@ -45,7 +45,8 @@ __lseek (fd, offset, whence) __set_errno (ENOSYS); return -1; } +weak_alias (__libc_lseek, __lseek) +weak_alias (__libc_lseek, lseek) stub_warning (lseek) -libc_hidden_def (__lseek) -weak_alias (__lseek, lseek) +libc_hidden_def (__lseek) diff --git a/libio/wfileops.c b/libio/wfileops.c index 9cd039921d..d59abbdce7 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -551,7 +551,7 @@ libc_hidden_def (_IO_wfile_sync) fp->_wide_data->_IO_read_base and fp->_wide_data->_IO_read_end. Returns 0 on success and -1 on error with the _IO_ERR_SEEN flag set. */ -static inline int +static int adjust_wide_data (_IO_FILE *fp, bool do_convert) { struct _IO_codecvt *cv = fp->_codecvt; diff --git a/locale/elem-hash.h b/locale/elem-hash.h index 4343ef561c..eb53c1ee38 100644 --- a/locale/elem-hash.h +++ b/locale/elem-hash.h @@ -18,7 +18,7 @@ /* The hashing function used for the table with collation symbols. */ -static inline int32_t +static int32_t __attribute__ ((pure, unused)) elem_hash (const char *str, int_fast32_t n) { int32_t result = n; diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 13e5234954..8dc528c115 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -42,10 +42,7 @@ #include "localeinfo.h" #include "charmap-dir.h" #include "../locarchive.h" - -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern char *xstrdup (const char *) __attribute_malloc__; +#include <programs/xmalloc.h> #define ARCHIVE_NAME LOCALEDIR "/locale-archive" diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index 16129bb8f7..5a14f2ce32 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -117,17 +117,18 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; static const struct argp_option options[] = { { NULL, 0, NULL, 0, N_("Input Files:") }, - { "charmap", 'f', "FILE", 0, + { "charmap", 'f', N_("FILE"), 0, N_("Symbolic character names defined in FILE") }, - { "inputfile", 'i', "FILE", 0, N_("Source definitions are found in FILE") }, - { "repertoire-map", 'u', "FILE", 0, + { "inputfile", 'i', N_("FILE"), 0, + N_("Source definitions are found in FILE") }, + { "repertoire-map", 'u', N_("FILE"), 0, N_("FILE contains mapping from symbolic names to UCS4 values") }, { NULL, 0, NULL, 0, N_("Output control:") }, { "force", 'c', NULL, 0, N_("Create output even if warning messages were issued") }, { "old-style", OPT_OLDSTYLE, NULL, 0, N_("Create old-style tables") }, - { "prefix", OPT_PREFIX, "PATH", 0, N_("Optional output file prefix") }, + { "prefix", OPT_PREFIX, N_("PATH"), 0, N_("Optional output file prefix") }, { "posix", OPT_POSIX, NULL, 0, N_("Strictly conform to POSIX") }, { "quiet", OPT_QUIET, NULL, 0, N_("Suppress warnings and information messages") }, @@ -141,7 +142,7 @@ static const struct argp_option options[] = { "delete-from-archive", OPT_DELETE_FROM_ARCHIVE, NULL, 0, N_("Remove locales named by parameters from archive") }, { "list-archive", OPT_LIST_ARCHIVE, NULL, 0, N_("List content of archive") }, - { "alias-file", 'A', "FILE", 0, + { "alias-file", 'A', N_("FILE"), 0, N_("locale.alias file to consult when making archive")}, { NULL, 0, NULL, 0, NULL } }; diff --git a/locale/programs/localedef.h b/locale/programs/localedef.h index 7ca65c6639..e010c72983 100644 --- a/locale/programs/localedef.h +++ b/locale/programs/localedef.h @@ -120,13 +120,7 @@ extern const char *alias_file; /* Prototypes for a few program-wide used functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); -extern void *xrealloc (void *o, size_t n) - __attribute_malloc__ __attribute_alloc_size (2); -extern char *xstrdup (const char *) __attribute_malloc__; +#include <programs/xmalloc.h> /* Wrapper to switch LC_CTYPE back to the locale specified in the diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c index d50ac2b6b7..70dce9bfd5 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -45,7 +45,7 @@ /* Define the hash function. We define the function as static inline. We must change the name so as not to conflict with simple-hash.h. */ -#define compute_hashval static inline archive_hashval +#define compute_hashval static archive_hashval #define hashval_t uint32_t #include "hashval.h" #undef compute_hashval diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c index 530ba724e8..d65b6fb3f0 100644 --- a/locale/programs/simple-hash.c +++ b/locale/programs/simple-hash.c @@ -52,10 +52,7 @@ #define hashval_t uint32_t #include "hashval.h" -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); +#include <programs/xmalloc.h> typedef struct hash_entry { diff --git a/locale/setlocale.c b/locale/setlocale.c index 31f6585272..be95519e9f 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -204,7 +204,7 @@ setname (int category, const char *name) } /* Put DATA in *_nl_current[CATEGORY]. */ -static inline void +static void setdata (int category, struct __locale_data *data) { if (CATEGORY_USED (category)) diff --git a/malloc/arena.c b/malloc/arena.c index 7d51a9dd14..12a48ad7ba 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -144,11 +144,9 @@ int __malloc_initialized = -1; /* atfork support. */ -static __malloc_ptr_t (*save_malloc_hook) (size_t __size, - const __malloc_ptr_t); -static void (*save_free_hook) (__malloc_ptr_t __ptr, - const __malloc_ptr_t); -static void* save_arena; +static void *(*save_malloc_hook) (size_t __size, const void *); +static void (*save_free_hook) (void *__ptr, const void *); +static void *save_arena; #ifdef ATFORK_MEM ATFORK_MEM; diff --git a/malloc/hooks.c b/malloc/hooks.c index 05cc35e849..8e4a6ed033 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -25,7 +25,7 @@ initialization routine, then do the normal work. */ static void* -malloc_hook_ini(size_t sz, const __malloc_ptr_t caller) +malloc_hook_ini(size_t sz, const void *caller) { __malloc_hook = NULL; ptmalloc_init(); @@ -33,7 +33,7 @@ malloc_hook_ini(size_t sz, const __malloc_ptr_t caller) } static void* -realloc_hook_ini(void* ptr, size_t sz, const __malloc_ptr_t caller) +realloc_hook_ini(void* ptr, size_t sz, const void *caller) { __malloc_hook = NULL; __realloc_hook = NULL; @@ -42,7 +42,7 @@ realloc_hook_ini(void* ptr, size_t sz, const __malloc_ptr_t caller) } static void* -memalign_hook_ini(size_t alignment, size_t sz, const __malloc_ptr_t caller) +memalign_hook_ini(size_t alignment, size_t sz, const void *caller) { __memalign_hook = NULL; ptmalloc_init(); diff --git a/malloc/malloc.c b/malloc/malloc.c index bbb035393f..70b9329cc3 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1841,22 +1841,22 @@ static void malloc_consolidate(mstate); /* Forward declarations. */ static void* malloc_hook_ini (size_t sz, - const __malloc_ptr_t caller) __THROW; + const void *caller) __THROW; static void* realloc_hook_ini (void* ptr, size_t sz, - const __malloc_ptr_t caller) __THROW; + const void *caller) __THROW; static void* memalign_hook_ini (size_t alignment, size_t sz, - const __malloc_ptr_t caller) __THROW; + const void *caller) __THROW; void weak_variable (*__malloc_initialize_hook) (void) = NULL; -void weak_variable (*__free_hook) (__malloc_ptr_t __ptr, - const __malloc_ptr_t) = NULL; -__malloc_ptr_t weak_variable (*__malloc_hook) - (size_t __size, const __malloc_ptr_t) = malloc_hook_ini; -__malloc_ptr_t weak_variable (*__realloc_hook) - (__malloc_ptr_t __ptr, size_t __size, const __malloc_ptr_t) +void weak_variable (*__free_hook) (void *__ptr, + const void *) = NULL; +void *weak_variable (*__malloc_hook) + (size_t __size, const void *) = malloc_hook_ini; +void *weak_variable (*__realloc_hook) + (void *__ptr, size_t __size, const void *) = realloc_hook_ini; -__malloc_ptr_t weak_variable (*__memalign_hook) - (size_t __alignment, size_t __size, const __malloc_ptr_t) +void *weak_variable (*__memalign_hook) + (size_t __alignment, size_t __size, const void *) = memalign_hook_ini; void weak_variable (*__after_morecore_hook) (void) = NULL; @@ -2842,7 +2842,7 @@ __libc_malloc(size_t bytes) mstate ar_ptr; void *victim; - __malloc_ptr_t (*hook) (size_t, const __malloc_ptr_t) + void *(*hook) (size_t, const void *) = force_reg (__malloc_hook); if (__builtin_expect (hook != NULL, 0)) return (*hook)(bytes, RETURN_ADDRESS (0)); @@ -2873,7 +2873,7 @@ __libc_free(void* mem) mstate ar_ptr; mchunkptr p; /* chunk corresponding to mem */ - void (*hook) (__malloc_ptr_t, const __malloc_ptr_t) + void (*hook) (void *, const void *) = force_reg (__free_hook); if (__builtin_expect (hook != NULL, 0)) { (*hook)(mem, RETURN_ADDRESS (0)); @@ -2912,7 +2912,7 @@ __libc_realloc(void* oldmem, size_t bytes) void* newp; /* chunk to return */ - __malloc_ptr_t (*hook) (__malloc_ptr_t, size_t, const __malloc_ptr_t) = + void *(*hook) (void *, size_t, const void *) = force_reg (__realloc_hook); if (__builtin_expect (hook != NULL, 0)) return (*hook)(oldmem, bytes, RETURN_ADDRESS (0)); @@ -3004,7 +3004,7 @@ __libc_memalign(size_t alignment, size_t bytes) mstate ar_ptr; void *p; - __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) = + void *(*hook) (size_t, size_t, const void *) = force_reg (__memalign_hook); if (__builtin_expect (hook != NULL, 0)) return (*hook)(alignment, bytes, RETURN_ADDRESS (0)); @@ -3046,7 +3046,7 @@ __libc_valloc(size_t bytes) size_t pagesz = GLRO(dl_pagesize); - __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) = + void *(*hook) (size_t, size_t, const void *) = force_reg (__memalign_hook); if (__builtin_expect (hook != NULL, 0)) return (*hook)(pagesz, bytes, RETURN_ADDRESS (0)); @@ -3082,7 +3082,7 @@ __libc_pvalloc(size_t bytes) size_t page_mask = GLRO(dl_pagesize) - 1; size_t rounded_bytes = (bytes + page_mask) & ~(page_mask); - __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) = + void *(*hook) (size_t, size_t, const void *) = force_reg (__memalign_hook); if (__builtin_expect (hook != NULL, 0)) return (*hook)(pagesz, rounded_bytes, RETURN_ADDRESS (0)); @@ -3125,7 +3125,7 @@ __libc_calloc(size_t n, size_t elem_size) } } - __malloc_ptr_t (*hook) (size_t, const __malloc_ptr_t) = + void *(*hook) (size_t, const void *) = force_reg (__malloc_hook); if (__builtin_expect (hook != NULL, 0)) { sz = bytes; @@ -4916,7 +4916,7 @@ __posix_memalign (void **memptr, size_t alignment, size_t size) /* Call the hook here, so that caller is posix_memalign's caller and not posix_memalign itself. */ - __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) = + void *(*hook) (size_t, size_t, const void *) = force_reg (__memalign_hook); if (__builtin_expect (hook != NULL, 0)) mem = (*hook)(alignment, size, RETURN_ADDRESS (0)); diff --git a/malloc/malloc.h b/malloc/malloc.h index 9fe7ab26bc..b8b0ca34ca 100644 --- a/malloc/malloc.h +++ b/malloc/malloc.h @@ -22,11 +22,6 @@ #include <features.h> #include <stddef.h> #include <stdio.h> -# define __malloc_ptr_t void * - -/* Used by GNU libc internals. */ -#define __malloc_size_t size_t -#define __malloc_ptrdiff_t ptrdiff_t #ifdef _LIBC # define __MALLOC_HOOK_VOLATILE @@ -153,18 +148,18 @@ extern void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void) __MALLOC_DEPRECATED; /* Hooks for debugging and user-defined versions. */ extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr, - const __malloc_ptr_t) + const void *) __MALLOC_DEPRECATED; extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook) (size_t __size, - const __malloc_ptr_t) + const void *) __MALLOC_DEPRECATED; extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook) (void *__ptr, size_t __size, - const __malloc_ptr_t) + const void *) __MALLOC_DEPRECATED; extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook) (size_t __alignment, size_t __size, - const __malloc_ptr_t) + const void *) __MALLOC_DEPRECATED; extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); diff --git a/malloc/mcheck.c b/malloc/mcheck.c index b6eb3b31e5..2e5eadd80a 100644 --- a/malloc/mcheck.c +++ b/malloc/mcheck.c @@ -29,11 +29,10 @@ /* Old hook values. */ static void (*old_free_hook) (__ptr_t ptr, const __ptr_t); -static __ptr_t (*old_malloc_hook) (__malloc_size_t size, const __ptr_t); -static __ptr_t (*old_memalign_hook) (__malloc_size_t alignment, - __malloc_size_t size, +static __ptr_t (*old_malloc_hook) (size_t size, const __ptr_t); +static __ptr_t (*old_memalign_hook) (size_t alignment, size_t size, const __ptr_t); -static __ptr_t (*old_realloc_hook) (__ptr_t ptr, __malloc_size_t size, +static __ptr_t (*old_realloc_hook) (__ptr_t ptr, size_t size, const __ptr_t); /* Function to call when something awful happens. */ @@ -48,7 +47,7 @@ static void (*abortfunc) (enum mcheck_status); struct hdr { - __malloc_size_t size; /* Exact size requested by user. */ + size_t size; /* Exact size requested by user. */ unsigned long int magic; /* Magic number to check header integrity. */ struct hdr *prev; struct hdr *next; @@ -69,12 +68,12 @@ static int pedantic; # include <string.h> # define flood memset #else -static void flood (__ptr_t, int, __malloc_size_t); +static void flood (__ptr_t, int, size_t); static void flood (ptr, val, size) __ptr_t ptr; int val; - __malloc_size_t size; + size_t size; { char *cp = ptr; while (size--) @@ -202,7 +201,7 @@ freehook (__ptr_t ptr, const __ptr_t caller) } static __ptr_t -mallochook (__malloc_size_t size, const __ptr_t caller) +mallochook (size_t size, const __ptr_t caller) { struct hdr *hdr; @@ -235,11 +234,11 @@ mallochook (__malloc_size_t size, const __ptr_t caller) } static __ptr_t -memalignhook (__malloc_size_t alignment, __malloc_size_t size, +memalignhook (size_t alignment, size_t size, const __ptr_t caller) { struct hdr *hdr; - __malloc_size_t slop; + size_t slop; char *block; if (pedantic) @@ -274,7 +273,7 @@ memalignhook (__malloc_size_t alignment, __malloc_size_t size, } static __ptr_t -reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller) +reallochook (__ptr_t ptr, size_t size, const __ptr_t caller) { if (size == 0) { @@ -283,7 +282,7 @@ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller) } struct hdr *hdr; - __malloc_size_t osize; + size_t osize; if (pedantic) mcheck_check_all (); diff --git a/malloc/memusagestat.c b/malloc/memusagestat.c index f561e0dbbc..daeba1dc0a 100644 --- a/malloc/memusagestat.c +++ b/malloc/memusagestat.c @@ -52,12 +52,15 @@ /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = { - { "output", 'o', "FILE", 0, N_("Name output file") }, - { "string", 's', "STRING", 0, N_("Title string used in output graphic") }, - { "time", 't', NULL, 0, N_("Generate output linear to time (default is linear to number of function calls)") }, + { "output", 'o', N_("FILE"), 0, N_("Name output file") }, + { "string", 's', N_("STRING"), 0, N_("Title string used in output graphic") }, + { "time", 't', NULL, 0, N_("\ +Generate output linear to time (default is linear to number of function calls)\ +") }, { "total", 'T', NULL, 0, N_("Also draw graph for total memory consumption") }, - { "x-size", 'x', "VALUE", 0, N_("Make output graphic VALUE pixels wide") }, + { "x-size", 'x', N_("VALUE"), 0, + N_("Make output graphic VALUE pixels wide") }, { "y-size", 'y', "VALUE", 0, N_("Make output graphic VALUE pixels high") }, { NULL, 0, NULL, 0, NULL } }; @@ -319,17 +322,26 @@ main (int argc, char *argv[]) for (line = 1; line <= 3; ++line) { - cnt = ((ysize - 40) * (maxsize_heap / 4 * line / heap_scale)) / - (maxsize_heap / heap_scale); - gdImageDashedLine (im_out, 40, ysize - 20 - cnt, xsize - 40, - ysize - 20 - cnt, red); - snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line / - heap_scale); - gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, - ysize - 26 - cnt, (unsigned char *) buf, red); - - cnt2 = ((ysize - 40) * (maxsize_stack / 4 * line / stack_scale)) / - (maxsize_stack / stack_scale); + if (maxsize_heap > 0) + { + cnt = (((ysize - 40) * (maxsize_heap / 4 * line / heap_scale)) + / (maxsize_heap / heap_scale)); + gdImageDashedLine (im_out, 40, ysize - 20 - cnt, xsize - 40, + ysize - 20 - cnt, red); + snprintf (buf, sizeof (buf), heap_format, + maxsize_heap / 4 * line / heap_scale); + gdImageString (im_out, gdFontSmall, 39 - strlen (buf) * 6, + ysize - 26 - cnt, (unsigned char *) buf, red); + } + else + cnt = 0; + + if (maxsize_stack > 0) + cnt2 = (((ysize - 40) * (maxsize_stack / 4 * line / stack_scale)) + / (maxsize_stack / stack_scale)); + else + cnt2 = 0; + if (cnt != cnt2) gdImageDashedLine (im_out, 40, ysize - 20 - cnt2, xsize - 40, ysize - 20 - cnt2, green); @@ -372,7 +384,7 @@ main (int argc, char *argv[]) ysize - 14, yellow); previously = now; - if (also_total) + if (also_total && maxsize_heap > 0) { size_t new3; @@ -386,21 +398,27 @@ main (int argc, char *argv[]) last_total = new3; } - // assert (entry.heap <= maxsize_heap); - new[0] = (ysize - 20) - ((((unsigned long long int) (ysize - 40)) - * entry.heap) / maxsize_heap); - gdImageLine (im_out, 40 + ((xsize - 80) * (cnt - 1)) / total, - last_heap, 40 + ((xsize - 80) * cnt) / total, new[0], - red); - last_heap = new[0]; - - // assert (entry.stack <= maxsize_stack); - new[1] = (ysize - 20) - ((((unsigned long long int) (ysize - 40)) - * entry.stack) / maxsize_stack); - gdImageLine (im_out, 40 + ((xsize - 80) * (cnt - 1)) / total, - last_stack, 40 + ((xsize - 80) * cnt) / total, new[1], - green); - last_stack = new[1]; + if (maxsize_heap > 0) + { + new[0] = ((ysize - 20) + - ((((unsigned long long int) (ysize - 40)) + * entry.heap) / maxsize_heap)); + gdImageLine (im_out, 40 + ((xsize - 80) * (cnt - 1)) / total, + last_heap, 40 + ((xsize - 80) * cnt) / total, + new[0], red); + last_heap = new[0]; + } + + if (maxsize_stack > 0) + { + new[1] = ((ysize - 20) + - ((((unsigned long long int) (ysize - 40)) + * entry.stack) / maxsize_stack)); + gdImageLine (im_out, 40 + ((xsize - 80) * (cnt - 1)) / total, + last_stack, 40 + ((xsize - 80) * cnt) / total, + new[1], green); + last_stack = new[1]; + } } cnt = 0; @@ -448,7 +466,7 @@ main (int argc, char *argv[]) next_tick += MAX (1, total / 20); } - if (also_total) + if (also_total && maxsize_heap > 0) { size_t new3; @@ -459,16 +477,24 @@ main (int argc, char *argv[]) last_total = new3; } - new[0] = (ysize - 20) - ((((unsigned long long int) (ysize - 40)) - * entry.heap) / maxsize_heap); - gdImageLine (im_out, last_xpos, last_heap, xpos, new[0], red); - last_heap = new[0]; + if (maxsize_heap > 0) + { + new[0] = ((ysize - 20) + - ((((unsigned long long int) (ysize - 40)) + * entry.heap) / maxsize_heap)); + gdImageLine (im_out, last_xpos, last_heap, xpos, new[0], red); + last_heap = new[0]; + } - // assert (entry.stack <= maxsize_stack); - new[1] = (ysize - 20) - ((((unsigned long long int) (ysize - 40)) - * entry.stack) / maxsize_stack); - gdImageLine (im_out, last_xpos, last_stack, xpos, new[1], green); - last_stack = new[1]; + if (maxsize_stack > 0) + { + new[1] = ((ysize - 20) + - ((((unsigned long long int) (ysize - 40)) + * entry.stack) / maxsize_stack)); + gdImageLine (im_out, last_xpos, last_stack, xpos, new[1], + green); + last_stack = new[1]; + } last_xpos = xpos; } diff --git a/malloc/morecore.c b/malloc/morecore.c index 3b19406347..0a644c36ad 100644 --- a/malloc/morecore.c +++ b/malloc/morecore.c @@ -30,7 +30,7 @@ #include <stddef.h> #include <stdlib.h> -extern __malloc_ptr_t __sbrk (ptrdiff_t increment) __THROW; +extern void *__sbrk (ptrdiff_t increment) __THROW; libc_hidden_proto (__sbrk) #endif @@ -41,12 +41,11 @@ libc_hidden_proto (__sbrk) /* Allocate INCREMENT more bytes of data space, and return the start of data space, or NULL on errors. If INCREMENT is negative, shrink data space. */ -__malloc_ptr_t -__default_morecore (increment) - __malloc_ptrdiff_t increment; +void * +__default_morecore (ptrdiff_t increment) { - __malloc_ptr_t result = (__malloc_ptr_t) __sbrk (increment); - if (result == (__malloc_ptr_t) -1) + void *result = (void *) __sbrk (increment); + if (result == (void *) -1) return NULL; return result; } diff --git a/malloc/mtrace.c b/malloc/mtrace.c index e9ccfa299d..62867b1182 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -58,11 +58,10 @@ __ptr_t mallwatch; /* Old hook values. */ static void (*tr_old_free_hook) (__ptr_t ptr, const __ptr_t); -static __ptr_t (*tr_old_malloc_hook) (__malloc_size_t size, const __ptr_t); -static __ptr_t (*tr_old_realloc_hook) (__ptr_t ptr, __malloc_size_t size, +static __ptr_t (*tr_old_malloc_hook) (size_t size, const __ptr_t); +static __ptr_t (*tr_old_realloc_hook) (__ptr_t ptr, size_t size, const __ptr_t); -static __ptr_t (*tr_old_memalign_hook) (__malloc_size_t __alignment, - __malloc_size_t __size, +static __ptr_t (*tr_old_memalign_hook) (size_t __alignment, size_t __size, const __ptr_t); /* This function is called when the block being alloc'd, realloc'd, or @@ -160,10 +159,10 @@ tr_freehook (ptr, caller) __libc_lock_unlock (lock); } -static __ptr_t tr_mallochook (__malloc_size_t, const __ptr_t) __THROW; +static __ptr_t tr_mallochook (size_t, const __ptr_t) __THROW; static __ptr_t tr_mallochook (size, caller) - __malloc_size_t size; + size_t size; const __ptr_t caller; { __ptr_t hdr; @@ -190,12 +189,12 @@ tr_mallochook (size, caller) return hdr; } -static __ptr_t tr_reallochook (__ptr_t, __malloc_size_t, const __ptr_t) +static __ptr_t tr_reallochook (__ptr_t, size_t, const __ptr_t) __THROW; static __ptr_t tr_reallochook (ptr, size, caller) __ptr_t ptr; - __malloc_size_t size; + size_t size; const __ptr_t caller; { __ptr_t hdr; @@ -243,11 +242,11 @@ tr_reallochook (ptr, size, caller) return hdr; } -static __ptr_t tr_memalignhook (__malloc_size_t, __malloc_size_t, +static __ptr_t tr_memalignhook (size_t, size_t, const __ptr_t) __THROW; static __ptr_t tr_memalignhook (alignment, size, caller) - __malloc_size_t alignment, size; + size_t alignment, size; const __ptr_t caller; { __ptr_t hdr; diff --git a/manual/Makefile b/manual/Makefile index c1a304cc80..44c0fd4f68 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -42,7 +42,7 @@ chapters = $(addsuffix .texi, \ message search pattern io stdio llio filesys \ pipe socket terminal syslog math arith time \ resource setjmp signal startup process job nss \ - users sysinfo conf crypt debug) + users sysinfo conf crypt debug threads) add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi)) appendices = lang.texi header.texi install.texi maint.texi platform.texi \ contrib.texi diff --git a/manual/arith.texi b/manual/arith.texi index f387c8f1ad..d060ff9463 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -1086,7 +1086,7 @@ operation was successful, @code{-1} otherwise. @comment fenv.h @comment GNU -@deftypefun int fegetexcept (int @var{excepts}) +@deftypefun int fegetexcept (void) The function returns a bitmask of all currently enabled exceptions. It returns @code{-1} in case of failure. @end deftypefun @@ -1248,51 +1248,51 @@ equivalent to those of @code{ldexp} and @code{frexp}. See also the @comment math.h @comment BSD -@deftypefun double scalb (double @var{value}, int @var{exponent}) +@deftypefun double scalb (double @var{value}, double @var{exponent}) @comment math.h @comment BSD -@deftypefunx float scalbf (float @var{value}, int @var{exponent}) +@deftypefunx float scalbf (float @var{value}, float @var{exponent}) @comment math.h @comment BSD -@deftypefunx {long double} scalbl (long double @var{value}, int @var{exponent}) +@deftypefunx {long double} scalbl (long double @var{value}, long double @var{exponent}) The @code{scalb} function is the BSD name for @code{ldexp}. @end deftypefun @comment math.h @comment BSD -@deftypefun {long long int} scalbn (double @var{x}, int @var{n}) +@deftypefun double scalbn (double @var{x}, int @var{n}) @comment math.h @comment BSD -@deftypefunx {long long int} scalbnf (float @var{x}, int @var{n}) +@deftypefunx float scalbnf (float @var{x}, int @var{n}) @comment math.h @comment BSD -@deftypefunx {long long int} scalbnl (long double @var{x}, int @var{n}) +@deftypefunx {long double} scalbnl (long double @var{x}, int @var{n}) @code{scalbn} is identical to @code{scalb}, except that the exponent @var{n} is an @code{int} instead of a floating-point number. @end deftypefun @comment math.h @comment BSD -@deftypefun {long long int} scalbln (double @var{x}, long int @var{n}) +@deftypefun double scalbln (double @var{x}, long int @var{n}) @comment math.h @comment BSD -@deftypefunx {long long int} scalblnf (float @var{x}, long int @var{n}) +@deftypefunx float scalblnf (float @var{x}, long int @var{n}) @comment math.h @comment BSD -@deftypefunx {long long int} scalblnl (long double @var{x}, long int @var{n}) +@deftypefunx {long double} scalblnl (long double @var{x}, long int @var{n}) @code{scalbln} is identical to @code{scalb}, except that the exponent @var{n} is a @code{long int} instead of a floating-point number. @end deftypefun @comment math.h @comment BSD -@deftypefun {long long int} significand (double @var{x}) +@deftypefun double significand (double @var{x}) @comment math.h @comment BSD -@deftypefunx {long long int} significandf (float @var{x}) +@deftypefunx float significandf (float @var{x}) @comment math.h @comment BSD -@deftypefunx {long long int} significandl (long double @var{x}) +@deftypefunx {long double} significandl (long double @var{x}) @code{significand} returns the mantissa of @var{x} scaled to the range @math{[1, 2)}. It is equivalent to @w{@code{scalb (@var{x}, (double) -ilogb (@var{x}))}}. diff --git a/manual/conf.texi b/manual/conf.texi index 55ca4d10cd..7eb8b3625a 100644 --- a/manual/conf.texi +++ b/manual/conf.texi @@ -114,7 +114,7 @@ more (@pxref{Sysconf}). @comment limits.h @comment POSIX.1 -@deftypevr Macro int SSIZE_MAX +@deftypevr Macro ssize_t SSIZE_MAX The largest value that can fit in an object of type @code{ssize_t}. Effectively, this is the limit on the number of bytes that can be read or written in a single operation. @@ -1121,7 +1121,7 @@ Each parameter also has another macro, with a name starting with have on @emph{any} POSIX system. @xref{File Minimums}. @cindex limits, link count of files -@comment limits.h +@comment limits.h (optional) @comment POSIX.1 @deftypevr Macro int LINK_MAX The uniform system limit (if any) for the number of names for a given diff --git a/manual/debug.texi b/manual/debug.texi index b2bcb31a10..1db9c180f9 100644 --- a/manual/debug.texi +++ b/manual/debug.texi @@ -1,5 +1,5 @@ @node Debugging Support -@c @node Debugging Support, , Cryptographic Functions, Top +@c @node Debugging Support, POSIX Threads, Cryptographic Functions, Top @c %MENU% Functions to help debugging applications @chapter Debugging support diff --git a/manual/errno.texi b/manual/errno.texi index fa88b1e8a1..2a3c004b2a 100644 --- a/manual/errno.texi +++ b/manual/errno.texi @@ -1507,7 +1507,7 @@ can be customized by defining a variable named @comment error.h @comment GNU -@deftypevar {void (*) error_print_progname } (void) +@deftypevar {void (*error_print_progname)} (void) If the @code{error_print_progname} variable is defined to a non-zero value the function pointed to is called by @code{error} or @code{error_at_line}. It is expected to print the program name or do diff --git a/manual/examples/mkfsock.c b/manual/examples/mkfsock.c index 1469e02fc4..1a2b7f19fb 100644 --- a/manual/examples/mkfsock.c +++ b/manual/examples/mkfsock.c @@ -45,13 +45,12 @@ make_named_socket (const char *filename) /* The size of the address is the offset of the start of the filename, - plus its length, - plus one for the terminating null byte. + plus its length (not including the terminating null byte). Alternatively you can just do: size = SUN_LEN (&name); */ size = (offsetof (struct sockaddr_un, sun_path) - + strlen (name.sun_path) + 1); + + strlen (name.sun_path)); if (bind (sock, (struct sockaddr *) &name, size) < 0) { diff --git a/manual/filesys.texi b/manual/filesys.texi index 1b77f069e6..1df9cf2b34 100644 --- a/manual/filesys.texi +++ b/manual/filesys.texi @@ -615,7 +615,7 @@ the result. @comment dirent.h @comment BSD/SVID -@deftypefun int scandir (const char *@var{dir}, struct dirent ***@var{namelist}, int (*@var{selector}) (const struct dirent *), int (*@var{cmp}) (const void *, const void *)) +@deftypefun int scandir (const char *@var{dir}, struct dirent ***@var{namelist}, int (*@var{selector}) (const struct dirent *), int (*@var{cmp}) (const struct dirent **, const struct dirent **)) The @code{scandir} function scans the contents of the directory selected by @var{dir}. The result in *@var{namelist} is an array of pointers to @@ -669,7 +669,7 @@ dirent64}}. To use this we need a new function. @comment dirent.h @comment GNU -@deftypefun int scandir64 (const char *@var{dir}, struct dirent64 ***@var{namelist}, int (*@var{selector}) (const struct dirent64 *), int (*@var{cmp}) (const void *, const void *)) +@deftypefun int scandir64 (const char *@var{dir}, struct dirent64 ***@var{namelist}, int (*@var{selector}) (const struct dirent64 *), int (*@var{cmp}) (const struct dirent64 **, const struct dirent64 **)) The @code{scandir64} function works like the @code{scandir} function except that the directory entries it returns are described by elements of type @w{@code{struct dirent64}}. The function pointed to by @@ -1189,7 +1189,7 @@ exceeded. @comment unistd.h @comment BSD -@deftypefun int readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size}) +@deftypefun ssize_t readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size}) The @code{readlink} function gets the value of the symbolic link @var{filename}. The file name that the link points to is copied into @var{buffer}. This file name string is @emph{not} null-terminated; @@ -2189,7 +2189,7 @@ The file is on a read-only file system. @comment unistd.h @comment BSD -@deftypefun int fchown (int @var{filedes}, int @var{owner}, int @var{group}) +@deftypefun int fchown (int @var{filedes}, uid_t @var{owner}, gid_t @var{group}) This is like @code{chown}, except that it changes the owner of the open file with descriptor @var{filedes}. @@ -2541,7 +2541,7 @@ for full details on the sticky bit. @comment sys/stat.h @comment BSD -@deftypefun int fchmod (int @var{filedes}, int @var{mode}) +@deftypefun int fchmod (int @var{filedes}, mode_t @var{mode}) This is like @code{chmod}, except that it changes the permissions of the currently open file given by @var{filedes}. @@ -2713,7 +2713,7 @@ the @code{utime} function---all except the attribute change time. You need to include the header file @file{utime.h} to use this facility. @pindex utime.h -@comment time.h +@comment utime.h @comment POSIX.1 @deftp {Data Type} {struct utimbuf} The @code{utimbuf} structure is used with the @code{utime} function to @@ -2729,7 +2729,7 @@ This is the modification time for the file. @end table @end deftp -@comment time.h +@comment utime.h @comment POSIX.1 @deftypefun int utime (const char *@var{filename}, const struct utimbuf *@var{times}) This function is used to modify the file times associated with the file @@ -2782,7 +2782,7 @@ in the header file @file{sys/time.h}. @comment sys/time.h @comment BSD -@deftypefun int utimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]}) +@deftypefun int utimes (const char *@var{filename}, const struct timeval @var{tvp}@t{[2]}) This function sets the file access and modification times of the file @var{filename}. The new file access time is specified by @code{@var{tvp}[0]}, and the new modification time by @@ -2796,7 +2796,7 @@ function. @comment sys/time.h @comment BSD -@deftypefun int lutimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]}) +@deftypefun int lutimes (const char *@var{filename}, const struct timeval @var{tvp}@t{[2]}) This function is like @code{utimes}, except that it does not follow symbolic links. If @var{filename} is the name of a symbolic link, @code{lutimes} sets the file access and modification times of the @@ -2812,7 +2812,7 @@ function. @comment sys/time.h @comment BSD -@deftypefun int futimes (int @var{fd}, struct timeval @var{tvp}@t{[2]}) +@deftypefun int futimes (int @var{fd}, const struct timeval @var{tvp}@t{[2]}) This function is like @code{utimes}, except that it takes an open file descriptor as an argument instead of a file name. @xref{Low-Level I/O}. This function comes from FreeBSD, and is not available on all @@ -3049,7 +3049,7 @@ The prototype for @code{mknod} is declared in @file{sys/stat.h}. @comment sys/stat.h @comment BSD -@deftypefun int mknod (const char *@var{filename}, int @var{mode}, int @var{dev}) +@deftypefun int mknod (const char *@var{filename}, mode_t @var{mode}, dev_t @var{dev}) The @code{mknod} function makes a special file with name @var{filename}. The @var{mode} specifies the mode of the file, and may include the various special file bits, such as @code{S_IFCHR} (for a character special file) diff --git a/manual/getopt.texi b/manual/getopt.texi index 77045157ef..f0b7283c8e 100644 --- a/manual/getopt.texi +++ b/manual/getopt.texi @@ -59,7 +59,7 @@ option argument, for those options that accept arguments. @comment unistd.h @comment POSIX.2 -@deftypefun int getopt (int @var{argc}, char **@var{argv}, const char *@var{options}) +@deftypefun int getopt (int @var{argc}, char *const *@var{argv}, const char *@var{options}) The @code{getopt} function gets the next option argument from the argument list specified by the @var{argv} and @var{argc} arguments. Normally these values come directly from the arguments received by diff --git a/manual/install.texi b/manual/install.texi index e36fb052ab..e6c1bafe67 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -172,10 +172,10 @@ the compiler and/or binutils. If you only specify @samp{--host}, @code{configure} will prepare for a native compile but use what you specify instead of guessing what your system is. This is most useful to change the CPU submodel. For example, -if @code{configure} guesses your machine as @code{i586-pc-linux-gnu} but -you want to compile a library for 386es, give -@samp{--host=i386-pc-linux-gnu} or just @samp{--host=i386-linux} and add -the appropriate compiler flags (@samp{-mcpu=i386} will do the trick) to +if @code{configure} guesses your machine as @code{i686-pc-linux-gnu} but +you want to compile a library for 586es, give +@samp{--host=i586-pc-linux-gnu} or just @samp{--host=i586-linux} and add +the appropriate compiler flags (@samp{-mcpu=i586} will do the trick) to @var{CFLAGS}. If you specify just @samp{--build}, @code{configure} will get confused. diff --git a/manual/libc-texinfo.sh b/manual/libc-texinfo.sh index 60e224bb8d..1ef09fcbb4 100644 --- a/manual/libc-texinfo.sh +++ b/manual/libc-texinfo.sh @@ -91,9 +91,11 @@ Indices * Variable Index:: Index of variables and variable-like macros. * File Index:: Index of programs and files. + @detailmenu --- The Detailed Node Listing --- EOF cat ${OUTDIR}lmenu.$$ + echo '@end detailmenu' echo '@end menu'; } >${OUTDIR}top-menu.texi.$$ mv -f ${OUTDIR}top-menu.texi.$$ ${OUTDIR}top-menu.texi diff --git a/manual/llio.texi b/manual/llio.texi index acafed315e..90bd2d71f7 100644 --- a/manual/llio.texi +++ b/manual/llio.texi @@ -1669,15 +1669,13 @@ they return. @comment unistd.h @comment X/Open -@deftypefun int sync (void) +@deftypefun void sync (void) A call to this function will not return as long as there is data which has not been written to the device. All dirty buffers in the kernel will be written and so an overall consistent system can be achieved (if no other process in parallel writes data). A prototype for @code{sync} can be found in @file{unistd.h}. - -The return value is zero to indicate no error. @end deftypefun Programs more often want to ensure that data written to a given file is @@ -1989,7 +1987,7 @@ replaces the normal implementation. @comment aio.h @comment Unix98 -@deftypefun int aio_read64 (struct aiocb *@var{aiocbp}) +@deftypefun int aio_read64 (struct aiocb64 *@var{aiocbp}) This function is similar to the @code{aio_read} function. The only difference is that on @w{32 bit} machines, the file descriptor should be opened in the large file mode. Internally, @code{aio_read64} uses @@ -2073,7 +2071,7 @@ replaces the normal implementation. @comment aio.h @comment Unix98 -@deftypefun int aio_write64 (struct aiocb *@var{aiocbp}) +@deftypefun int aio_write64 (struct aiocb64 *@var{aiocbp}) This function is similar to the @code{aio_write} function. The only difference is that on @w{32 bit} machines the file descriptor should be opened in the large file mode. Internally @code{aio_write64} uses @@ -2177,7 +2175,7 @@ transparently replaces the normal implementation. @comment aio.h @comment Unix98 -@deftypefun int lio_listio64 (int @var{mode}, struct aiocb *const @var{list}, int @var{nent}, struct sigevent *@var{sig}) +@deftypefun int lio_listio64 (int @var{mode}, struct aiocb64 *const @var{list}[], int @var{nent}, struct sigevent *@var{sig}) This function is similar to the @code{lio_listio} function. The only difference is that on @w{32 bit} machines, the file descriptor should be opened in the large file mode. Internally, @code{lio_listio64} uses @@ -2239,7 +2237,7 @@ machines. @comment aio.h @comment POSIX.1b -@deftypefun ssize_t aio_return (const struct aiocb *@var{aiocbp}) +@deftypefun ssize_t aio_return (struct aiocb *@var{aiocbp}) This function can be used to retrieve the return status of the operation carried out by the request described in the variable pointed to by @var{aiocbp}. As long as the error status of this request as returned @@ -2262,7 +2260,7 @@ transparently replaces the normal implementation. @comment aio.h @comment Unix98 -@deftypefun int aio_return64 (const struct aiocb64 *@var{aiocbp}) +@deftypefun ssize_t aio_return64 (struct aiocb64 *@var{aiocbp}) This function is similar to @code{aio_return} with the only difference that the argument is a reference to a variable of type @code{struct aiocb64}. @@ -2929,19 +2927,19 @@ access modes. These names are preferred when writing GNU-specific code. But most programs will want to be portable to other POSIX.1 systems and should use the POSIX.1 names above instead. -@comment fcntl.h +@comment fcntl.h (optional) @comment GNU @deftypevr Macro int O_READ Open the file for reading. Same as @code{O_RDONLY}; only defined on GNU. @end deftypevr -@comment fcntl.h +@comment fcntl.h (optional) @comment GNU @deftypevr Macro int O_WRITE Open the file for writing. Same as @code{O_WRONLY}; only defined on GNU. @end deftypevr -@comment fcntl.h +@comment fcntl.h (optional) @comment GNU @deftypevr Macro int O_EXEC Open the file for executing. Only defined on GNU. @@ -3045,7 +3043,7 @@ to be portable, use @code{O_NOCTTY} when it is important to avoid this. The following three file name translation flags exist only on @gnuhurdsystems{}. -@comment fcntl.h +@comment fcntl.h (optional) @comment GNU @deftypevr Macro int O_IGNORE_CTTY Do not recognize the named file as the controlling terminal, even if it @@ -3054,7 +3052,7 @@ on the new file descriptor will never induce job control signals. @xref{Job Control}. @end deftypevr -@comment fcntl.h +@comment fcntl.h (optional) @comment GNU @deftypevr Macro int O_NOLINK If the named file is a symbolic link, open the link itself instead of @@ -3063,7 +3061,7 @@ return the information returned by @code{lstat} on the link's name.) @cindex symbolic link, opening @end deftypevr -@comment fcntl.h +@comment fcntl.h (optional) @comment GNU @deftypevr Macro int O_NOTRANS If the named file is specially translated, do not invoke the translator. @@ -3095,7 +3093,7 @@ compatibility. The remaining operating modes are BSD extensions. They exist only on some systems. On other systems, these macros are not defined. -@comment fcntl.h +@comment fcntl.h (optional) @comment BSD @deftypevr Macro int O_SHLOCK Acquire a shared lock on the file, as with @code{flock}. @@ -3106,7 +3104,7 @@ creating the file. You are guaranteed that no other process will get the lock on the new file first. @end deftypevr -@comment fcntl.h +@comment fcntl.h (optional) @comment BSD @deftypevr Macro int O_EXLOCK Acquire an exclusive lock on the file, as with @code{flock}. diff --git a/manual/math.texi b/manual/math.texi index 9242b539ad..193d415fba 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -1387,7 +1387,7 @@ program runs, do @code{srandom (time (0))}. @comment stdlib.h @comment BSD -@deftypefun {void *} initstate (unsigned int @var{seed}, void *@var{state}, size_t @var{size}) +@deftypefun {char *} initstate (unsigned int @var{seed}, char *@var{state}, size_t @var{size}) The @code{initstate} function is used to initialize the random number generator state. The argument @var{state} is an array of @var{size} bytes, used to hold the state information. It is initialized based on @@ -1401,7 +1401,7 @@ restore that state. @comment stdlib.h @comment BSD -@deftypefun {void *} setstate (void *@var{state}) +@deftypefun {char *} setstate (char *@var{state}) The @code{setstate} function restores the random number state information @var{state}. The argument must have been the result of a previous call to @var{initstate} or @var{setstate}. @@ -1692,7 +1692,7 @@ programs. @comment stdlib.h @comment GNU -@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, double *@var{result}) +@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, long int *@var{result}) This function is similar to @code{lrand48}, but in addition it takes a pointer to a buffer describing the state of the random number generator just like @code{drand48}. @@ -1722,7 +1722,7 @@ programs. @comment stdlib.h @comment GNU -@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, double *@var{result}) +@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, long int *@var{result}) This function is similar to @code{mrand48} but like the other reentrant functions it uses the random number generator described by the value in the buffer pointed to by @var{buffer}. diff --git a/manual/memory.texi b/manual/memory.texi index 5b14aa69b9..0c3d39efa8 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -683,25 +683,21 @@ parameter to be set, and @var{value} the new value to be set. Possible choices for @var{param}, as defined in @file{malloc.h}, are: @table @code -@item M_TRIM_THRESHOLD -This is the minimum size (in bytes) of the top-most, releasable chunk -that will cause @code{sbrk} to be called with a negative argument in -order to return memory to the system. -@item M_TOP_PAD -This parameter determines the amount of extra memory to obtain from the -system when a call to @code{sbrk} is required. It also specifies the -number of bytes to retain when shrinking the heap by calling @code{sbrk} -with a negative argument. This provides the necessary hysteresis in -heap size such that excessive amounts of system calls can be avoided. +@comment TODO: @item M_ARENA_MAX +@comment - Document ARENA_MAX env var. +@comment TODO: @item M_ARENA_TEST +@comment - Document ARENA_TEST env var. +@comment TODO: @item M_CHECK_ACTION +@item M_MMAP_MAX +The maximum number of chunks to allocate with @code{mmap}. Setting this +to zero disables all use of @code{mmap}. @item M_MMAP_THRESHOLD All chunks larger than this value are allocated outside the normal heap, using the @code{mmap} system call. This way it is guaranteed that the memory for these chunks can be returned to the system on @code{free}. Note that requests smaller than this threshold might still be allocated via @code{mmap}. -@item M_MMAP_MAX -The maximum number of chunks to allocate with @code{mmap}. Setting this -to zero disables all use of @code{mmap}. +@comment TODO: @item M_MXFAST @item M_PERTURB If non-zero, memory blocks are filled with values depending on some low order bits of this parameter when they are allocated (except when @@ -710,6 +706,16 @@ use of uninitialized or freed heap memory. Note that this option does not guarantee that the freed block will have any specific values. It only guarantees that the content the block had before it was freed will be overwritten. +@item M_TOP_PAD +This parameter determines the amount of extra memory to obtain from the +system when a call to @code{sbrk} is required. It also specifies the +number of bytes to retain when shrinking the heap by calling @code{sbrk} +with a negative argument. This provides the necessary hysteresis in +heap size such that excessive amounts of system calls can be avoided. +@item M_TRIM_THRESHOLD +This is the minimum size (in bytes) of the top-most, releasable chunk +that will cause @code{sbrk} to be called with a negative argument in +order to return memory to the system. @end table @end deftypefun diff --git a/manual/message.texi b/manual/message.texi index 2b186ee119..ea5e1a1326 100644 --- a/manual/message.texi +++ b/manual/message.texi @@ -1441,7 +1441,8 @@ string containing the name of the selected codeset. The string is allocated internally in the function and must not be changed by the user. If the system went out of core during the execution of @code{bind_textdomain_codeset}, the return value is @code{NULL} and the -global variable @var{errno} is set accordingly. @end deftypefun +global variable @var{errno} is set accordingly. +@end deftypefun @node GUI program problems diff --git a/manual/nss.texi b/manual/nss.texi index 29fa4cc8d9..bf3e69dee5 100644 --- a/manual/nss.texi +++ b/manual/nss.texi @@ -10,7 +10,7 @@ correctly in the local environment. Traditionally, this was done by using files (e.g., @file{/etc/passwd}), but other nameservices (like the Network Information Service (NIS) and the Domain Name Service (DNS)) became popular, and were hacked into the C library, usually with a fixed -search order (@pxref{frobnicate, , ,jargon, The Jargon File}). +search order. @Theglibc{} contains a cleaner solution of this problem. It is designed after a method used by Sun Microsystems in the C library of diff --git a/manual/resource.texi b/manual/resource.texi index cb25d2440c..1ec7af29f0 100644 --- a/manual/resource.texi +++ b/manual/resource.texi @@ -129,9 +129,9 @@ scheduled). @code{vtimes} and its @code{vtimes} data structure are declared in @file{sys/vtimes.h}. @pindex sys/vtimes.h -@comment vtimes.h -@deftypefun int vtimes (struct vtimes @var{current}, struct vtimes @var{child}) +@comment sys/vtimes.h +@deftypefun int vtimes (struct vtimes *@var{current}, struct vtimes *@var{child}) @code{vtimes} reports resource usage totals for a process. @@ -419,7 +419,7 @@ operand must be less than @code{RLIM_NLIMITS}. @comment sys/resource.h @comment BSD -@deftypevr Constant int RLIM_INFINITY +@deftypevr Constant rlim_t RLIM_INFINITY This constant stands for a value of ``infinity'' when supplied as the limit value in @code{setrlimit}. @end deftypevr @@ -433,7 +433,7 @@ above do. The functions above are better choices. @comment ulimit.h @comment BSD -@deftypefun int ulimit (int @var{cmd}, @dots{}) +@deftypefun {long int} ulimit (int @var{cmd}, @dots{}) @code{ulimit} gets the current limit or sets the current and maximum limit for a particular resource for the calling process according to the @@ -893,7 +893,7 @@ It is functionally identical to @code{sched_setscheduler} with @comment sched.h @comment POSIX -@deftypefun int sched_getparam (pid_t @var{pid}, const struct sched_param *@var{param}) +@deftypefun int sched_getparam (pid_t @var{pid}, struct sched_param *@var{param}) This function returns a process' absolute priority. @@ -922,7 +922,7 @@ There is no process with pid @var{pid} and it is not zero. @comment sched.h @comment POSIX -@deftypefun int sched_get_priority_min (int *@var{policy}) +@deftypefun int sched_get_priority_min (int @var{policy}) This function returns the lowest absolute priority value that is allowable for a process with scheduling policy @var{policy}. @@ -942,7 +942,7 @@ to this function are: @comment sched.h @comment POSIX -@deftypefun int sched_get_priority_max (int *@var{policy}) +@deftypefun int sched_get_priority_max (int @var{policy}) This function returns the highest absolute priority value that is allowable for a process that with scheduling policy @var{policy}. diff --git a/manual/search.texi b/manual/search.texi index 498832bdd9..efd3604790 100644 --- a/manual/search.texi +++ b/manual/search.texi @@ -71,7 +71,7 @@ two functions can be found in @file{search.h}. @comment search.h @comment SVID -@deftypefun {void *} lfind (const void *@var{key}, void *@var{base}, size_t *@var{nmemb}, size_t @var{size}, comparison_fn_t @var{compar}) +@deftypefun {void *} lfind (const void *@var{key}, const void *@var{base}, size_t *@var{nmemb}, size_t @var{size}, comparison_fn_t @var{compar}) The @code{lfind} function searches in the array with @code{*@var{nmemb}} elements of @var{size} bytes pointed to by @var{base} for an element which matches the one pointed to by @var{key}. The function pointed to diff --git a/manual/signal.texi b/manual/signal.texi index 18db3d2266..adcda37520 100644 --- a/manual/signal.texi +++ b/manual/signal.texi @@ -2921,7 +2921,7 @@ you use it. @comment unistd.h @comment POSIX.1 -@deftypefun int pause () +@deftypefun int pause (void) The @code{pause} function suspends program execution until a signal arrives whose action is either to execute a handler function, or to terminate the process. @@ -3195,7 +3195,7 @@ This field is true if the process is currently using this stack. @comment signal.h @comment BSD -@deftypefun int sigstack (const struct sigstack *@var{stack}, struct sigstack *@var{oldstack}) +@deftypefun int sigstack (struct sigstack *@var{stack}, struct sigstack *@var{oldstack}) The @code{sigstack} function specifies an alternate stack for use during signal handling. When a signal is received by the process and its action indicates that the signal stack is used, the system arranges a diff --git a/manual/socket.texi b/manual/socket.texi index b12c591311..e187402abd 100644 --- a/manual/socket.texi +++ b/manual/socket.texi @@ -726,12 +726,12 @@ for information about this. * Internet Address Formats:: How socket addresses are specified in the Internet namespace. * Host Addresses:: All about host addresses of Internet host. -* Protocols Database:: Referring to protocols by name. * Ports:: Internet port numbers. * Services Database:: Ports may have symbolic names. * Byte Order:: Different hosts may use different byte ordering conventions; you need to canonicalize host address and port number. +* Protocols Database:: Referring to protocols by name. * Inet Example:: Putting it all together. @end menu @@ -1127,7 +1127,7 @@ responsibility to make sure the buffer is large enough. @comment arpa/inet.h @comment IPv6 basic API -@deftypefun {const char *} inet_ntop (int @var{af}, const void *@var{cp}, char *@var{buf}, size_t @var{len}) +@deftypefun {const char *} inet_ntop (int @var{af}, const void *@var{cp}, char *@var{buf}, socklen_t @var{len}) This function converts an Internet address (either IPv4 or IPv6) from network (binary) to presentation (textual) form. @var{af} should be either @code{AF_INET} or @code{AF_INET6}, as appropriate. @var{cp} is a @@ -1225,7 +1225,7 @@ allows the caller to specify the desired address family (e.g.@: @comment netdb.h @comment BSD -@deftypefun {struct hostent *} gethostbyaddr (const char *@var{addr}, size_t @var{length}, int @var{format}) +@deftypefun {struct hostent *} gethostbyaddr (const void *@var{addr}, socklen_t @var{length}, int @var{format}) The @code{gethostbyaddr} function returns information about the host with Internet address @var{addr}. The parameter @var{addr} is not really a pointer to char - it can be a pointer to an IPv4 or an IPv6 @@ -1339,7 +1339,7 @@ allows the caller to specify the desired address family (e.g.@: @comment netdb.h @comment GNU -@deftypefun int gethostbyaddr_r (const char *@var{addr}, size_t @var{length}, int @var{format}, struct hostent *restrict @var{result_buf}, char *restrict @var{buf}, size_t @var{buflen}, struct hostent **restrict @var{result}, int *restrict @var{h_errnop}) +@deftypefun int gethostbyaddr_r (const void *@var{addr}, socklen_t @var{length}, int @var{format}, struct hostent *restrict @var{result_buf}, char *restrict @var{buf}, size_t @var{buflen}, struct hostent **restrict @var{result}, int *restrict @var{h_errnop}) The @code{gethostbyaddr_r} function returns information about the host with Internet address @var{addr}. The parameter @var{addr} is not really a pointer to char - it can be a pointer to an IPv4 or an IPv6 @@ -2248,7 +2248,7 @@ you get a @code{SIGPIPE} signal for any use of @code{send} or @comment sys/socket.h @comment BSD -@deftypefun int send (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}) +@deftypefun ssize_t send (int @var{socket}, const void *@var{buffer}, size_t @var{size}, int @var{flags}) The @code{send} function is like @code{write}, but with the additional flags @var{flags}. The possible values of @var{flags} are described in @ref{Socket Data Options}. @@ -2315,7 +2315,7 @@ Primitives}. @comment sys/socket.h @comment BSD -@deftypefun int recv (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}) +@deftypefun ssize_t recv (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}) The @code{recv} function is like @code{read}, but with the additional flags @var{flags}. The possible values of @var{flags} are described in @ref{Socket Data Options}. @@ -2643,7 +2643,7 @@ more information about the @code{connect} function. @comment sys/socket.h @comment BSD -@deftypefun int sendto (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t @var{length}) +@deftypefun ssize_t sendto (int @var{socket}, const void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t @var{length}) The @code{sendto} function transmits the data in the @var{buffer} through the socket @var{socket} to the destination address specified by the @var{addr} and @var{length} arguments. The @var{size} argument @@ -2678,7 +2678,7 @@ also tells you where it was sent from. This function is declared in @comment sys/socket.h @comment BSD -@deftypefun int recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr}) +@deftypefun ssize_t recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr}) The @code{recvfrom} function reads one packet from the socket @var{socket} into the buffer @var{buffer}. The @var{size} argument specifies the maximum number of bytes to be read. @@ -2725,7 +2725,7 @@ you don't want to specify @var{flags} (@pxref{I/O Primitives}). @comment sys/socket.h @comment BSD -@deftypefun int sendmsg (int @var{socket}, const struct msghdr *@var{message}, int @var{flags}) +@deftypefun ssize_t sendmsg (int @var{socket}, const struct msghdr *@var{message}, int @var{flags}) This function is defined as a cancellation point in multi-threaded programs, so one has to be prepared for this and make sure that @@ -2736,7 +2736,7 @@ whatever) are freed even if the thread is cancel. @comment sys/socket.h @comment BSD -@deftypefun int recvmsg (int @var{socket}, struct msghdr *@var{message}, int @var{flags}) +@deftypefun ssize_t recvmsg (int @var{socket}, struct msghdr *@var{message}, int @var{flags}) This function is defined as a cancellation point in multi-threaded programs, so one has to be prepared for this and make sure that @@ -2953,7 +2953,7 @@ The @var{optname} doesn't make sense for the given @var{level}. @comment sys/socket.h @comment BSD -@deftypefun int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, socklen_t @var{optlen}) +@deftypefun int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, const void *@var{optval}, socklen_t @var{optlen}) This function is used to set the socket option @var{optname} at level @var{level} for socket @var{socket}. The value of the option is passed in the buffer @var{optval} of size @var{optlen}. @@ -3157,7 +3157,7 @@ network. @comment netdb.h @comment BSD -@deftypefun {struct netent *} getnetbyaddr (unsigned long int @var{net}, int @var{type}) +@deftypefun {struct netent *} getnetbyaddr (uint32_t @var{net}, int @var{type}) The @code{getnetbyaddr} function returns information about the network of type @var{type} with number @var{net}. You should specify a value of @code{AF_INET} for the @var{type} argument for Internet networks. diff --git a/manual/startup.texi b/manual/startup.texi index d0be5e65f4..a2777141c2 100644 --- a/manual/startup.texi +++ b/manual/startup.texi @@ -220,7 +220,7 @@ programming of code like this the function @code{getsubopt} is available. @comment stdlib.h -@deftypefun int getsubopt (char **@var{optionp}, const char* const *@var{tokens}, char **@var{valuep}) +@deftypefun int getsubopt (char **@var{optionp}, char *const *@var{tokens}, char **@var{valuep}) The @var{optionp} parameter must be a pointer to a variable containing the address of the string to process. When the function returns the diff --git a/manual/stdio.texi b/manual/stdio.texi index 7b436f080b..3f9be9bc58 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -834,7 +834,7 @@ function except that it does not implicitly lock the stream. @comment wchar.h @comment POSIX -@deftypefun wint_t fputwc_unlocked (wint_t @var{wc}, FILE *@var{stream}) +@deftypefun wint_t fputwc_unlocked (wchar_t @var{wc}, FILE *@var{stream}) The @code{fputwc_unlocked} function is equivalent to the @code{fputwc} function except that it does not implicitly lock the stream. @@ -3853,7 +3853,7 @@ as an argument to receive a string read under control of the @samp{%s}, @comment wchar.h @comment ISO -@deftypefun int swscanf (const wchar_t *@var{ws}, const char *@var{template}, @dots{}) +@deftypefun int swscanf (const wchar_t *@var{ws}, const wchar_t *@var{template}, @dots{}) This is like @code{wscanf}, except that the characters are taken from the null-terminated string @var{ws} instead of from a stream. Reaching the end of the string is treated as an end-of-file condition. diff --git a/manual/string.texi b/manual/string.texi index 2844bc61e5..246be84457 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -479,7 +479,7 @@ The value returned by @code{memmove} is the value of @var{to}. @comment wchar.h @comment ISO -@deftypefun {wchar_t *} wmemmove (wchar *@var{wto}, const wchar_t *@var{wfrom}, size_t @var{size}) +@deftypefun {wchar_t *} wmemmove (wchar_t *@var{wto}, const wchar_t *@var{wfrom}, size_t @var{size}) @code{wmemmove} copies the @var{size} wide characters at @var{wfrom} into the @var{size} wide characters at @var{wto}, even if those two blocks of space overlap. In the case of overlap, @code{memmove} is @@ -1065,7 +1065,7 @@ If the contents of the two blocks are equal, @code{memcmp} returns @code{0}. @end deftypefun -@comment wcjar.h +@comment wchar.h @comment ISO @deftypefun int wmemcmp (const wchar_t *@var{a1}, const wchar_t *@var{a2}, size_t @var{size}) The function @code{wmemcmp} compares the @var{size} wide characters @@ -1171,7 +1171,7 @@ regards these characters as parts of the alphabet they do match. @comment wchar.h @comment GNU -@deftypefun int wcscasecmp (const wchar_t *@var{ws1}, const wchar_T *@var{ws2}) +@deftypefun int wcscasecmp (const wchar_t *@var{ws1}, const wchar_t *@var{ws2}) This function is like @code{wcscmp}, except that differences in case are ignored. How uppercase and lowercase characters are related is determined by the currently selected locale. In the standard @code{"C"} @@ -1978,7 +1978,7 @@ separately. The function is not locale-dependent. @comment wchar.h @comment ISO -@deftypefun {wchar_t *} wcstok (wchar_t *@var{newstring}, const char *@var{delimiters}) +@deftypefun {wchar_t *} wcstok (wchar_t *@var{newstring}, const wchar_t *@var{delimiters}) A string can be split into tokens by making a series of calls to the function @code{wcstok}. @@ -2175,7 +2175,7 @@ on different systems. @comment libgen.h @comment XPG -@deftypefun {char *} basename (char *@var{path}) +@deftypefun {char *} basename (const char *@var{path}) This is the standard XPG defined @code{basename}. It is similar in spirit to the GNU version, but may modify the @var{path} by removing trailing '/' characters. If the @var{path} is made up entirely of '/' @@ -2483,7 +2483,7 @@ Returns the number of elements in the argz vector @var{argz} and @comment argz.h @comment GNU -@deftypefun {void} argz_extract (char *@var{argz}, size_t @var{argz_len}, char **@var{argv}) +@deftypefun {void} argz_extract (const char *@var{argz}, size_t @var{argz_len}, char **@var{argv}) The @code{argz_extract} function converts the argz vector @var{argz} and @var{argz_len} into a Unix-style argument vector stored in @var{argv}, by putting pointers to every element in @var{argz} into successive @@ -2561,7 +2561,7 @@ is @code{0}, @var{entry} is added to the end instead (as if by @comment argz.h @comment GNU -@deftypefun {char *} argz_next (char *@var{argz}, size_t @var{argz_len}, const char *@var{entry}) +@deftypefun {char *} argz_next (const char *@var{argz}, size_t @var{argz_len}, const char *@var{entry}) The @code{argz_next} function provides a convenient way of iterating over the elements in the argz vector @var{argz}. It returns a pointer to the next element in @var{argz} after the element @var{entry}, or diff --git a/manual/sysinfo.texi b/manual/sysinfo.texi index 1733bc3b58..5df2a0f243 100644 --- a/manual/sysinfo.texi +++ b/manual/sysinfo.texi @@ -691,7 +691,7 @@ used in situations where multiple threads access the file. @comment mntent.h @comment BSD -@deftypefun {struct mntent *} getmntent_r (FILE *@var{stream}, struct mentent *@var{result}, char *@var{buffer}, int @var{bufsize}) +@deftypefun {struct mntent *} getmntent_r (FILE *@var{stream}, struct mntent *@var{result}, char *@var{buffer}, int @var{bufsize}) The @code{getmntent_r} function is the reentrant variant of @code{getmntent}. It also returns the next entry from the file and returns a pointer. The actual variable the values are stored in is not @@ -1062,9 +1062,9 @@ when @code{umount2} is also available. This section describes the @code{sysctl} function, which gets and sets a variety of system parameters. -The symbols used in this section are declared in the file @file{sysctl.h}. +The symbols used in this section are declared in the file @file{sys/sysctl.h}. -@comment sysctl.h +@comment sys/sysctl.h @comment BSD @deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldval}, size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen}) @@ -1090,7 +1090,7 @@ in a hierarchical structure like a hierarchical filesystem. To identify a particular parameter, you specify a path through the structure in a way analogous to specifying the pathname of a file. Each component of the path is specified by an integer and each of these integers has a -macro defined for it by @file{sysctl.h}. @var{names} is the path, in +macro defined for it by @file{sys/sysctl.h}. @var{names} is the path, in the form of an array of integers. Each component of the path is one element of the array, in order. @var{nlen} is the number of components in the path. diff --git a/manual/syslog.texi b/manual/syslog.texi index 15f5e42bdc..4e64d2a5e6 100644 --- a/manual/syslog.texi +++ b/manual/syslog.texi @@ -275,7 +275,7 @@ The symbols referred to in this section are declared in the file @c syslog() is implemented as a call to vsyslog(). @comment syslog.h @comment BSD -@deftypefun void syslog (int @var{facility_priority}, char *@var{format}, @dots{}) +@deftypefun void syslog (int @var{facility_priority}, const char *@var{format}, @dots{}) @code{syslog} submits a message to the Syslog facility. It does this by writing to the Unix domain socket @code{/dev/log}. @@ -403,7 +403,7 @@ syslog (LOG_MAKEPRI(LOG_LOCAL1, LOG_ERROR), @comment syslog.h @comment BSD -@deftypefun void vsyslog (int @var{facility_priority}, char *@var{format}, va_list @var{arglist}) +@deftypefun void vsyslog (int @var{facility_priority}, const char *@var{format}, va_list @var{arglist}) This is functionally identical to @code{syslog}, with the BSD style variable length argument. diff --git a/manual/terminal.texi b/manual/terminal.texi index 8321237f60..9e9c057095 100644 --- a/manual/terminal.texi +++ b/manual/terminal.texi @@ -621,7 +621,7 @@ If this bit is set, convert the newline character on output into a pair of characters, carriage return followed by linefeed. @end deftypevr -@comment termios.h +@comment termios.h (optional) @comment BSD @deftypevr Macro tcflag_t OXTABS If this bit is set, convert tab characters on output into the appropriate @@ -630,7 +630,7 @@ exists only on BSD systems and @gnuhurdsystems{}; on @gnulinuxsystems{} it is available as @code{XTABS}. @end deftypevr -@comment termios.h +@comment termios.h (optional) @comment BSD @deftypevr Macro tcflag_t ONOEOT If this bit is set, discard @kbd{C-d} characters (code @code{004}) on @@ -962,7 +962,7 @@ This is the bit that toggles when the user types the DISCARD character. While this bit is set, all output is discarded. @xref{Other Special}. @end deftypevr -@comment termios.h +@comment termios.h (optional) @comment BSD @deftypevr Macro tcflag_t NOKERNINFO Setting this bit disables handling of the STATUS character. @@ -1686,7 +1686,7 @@ of the terminal which is open with file descriptor @var{filedes}. @comment sgtty.h @comment BSD -@deftypefun int stty (int @var{filedes}, struct sgttyb *@var{attributes}) +@deftypefun int stty (int @var{filedes}, const struct sgttyb *@var{attributes}) This function sets the attributes of a terminal. diff --git a/manual/threads.texi b/manual/threads.texi new file mode 100644 index 0000000000..9a1df1a862 --- /dev/null +++ b/manual/threads.texi @@ -0,0 +1,44 @@ +@node POSIX Threads +@c @node POSIX Threads, , Cryptographic Functions, Top +@chapter POSIX Threads +@c %MENU% POSIX Threads +@cindex pthreads + +This chapter describes the @glibcadj{} POSIX Thread implementation. + +@menu +* Thread-specific Data:: Support for creating and + managing thread-specific data +@end menu + +@node Thread-specific Data +@section Thread-specific Data + +The @glibcadj{} implements functions to allow users to create and manage +data specific to a thread. Such data may be destroyed at thread exit, +if a destructor is provided. The following functions are defined: + +@table @code + +@item int pthread_key_create (pthread_key_t *@var{key}, void (*@var{destructor})(void*)) +Create a thread-specific data key for the calling thread, referenced by +@var{key}. + +Objects declared with the C++11 @code{thread_local} keyword are destroyed +before thread-specific data, so they should not be used in thread-specific +data destructors or even as members of the thread-specific data, since the +latter is passed as an argument to the destructor function. + +@item int pthread_key_delete (pthread_key_t @var{key}) +Destroy the thread-specific data @var{key} in the calling thread. The +destructor for the thread-specific data is not called during destruction, nor +is it called during thread exit. + +@item void *pthread_getspecific (pthread_key_t @var{key}) +Return the thread-specific data associated with @var{key} in the calling +thread. + +@item int pthread_setspecific (pthread_key_t @var{key}, const void *@var{value}) +Associate the thread-specific @var{value} with @var{key} in the calling thread. + +@end table diff --git a/manual/time.texi b/manual/time.texi index 7dff44f42c..ff31e284fd 100644 --- a/manual/time.texi +++ b/manual/time.texi @@ -420,7 +420,7 @@ current calendar time is not available, the value @c Linux. @comment time.h @comment SVID, XPG -@deftypefun int stime (time_t *@var{newtime}) +@deftypefun int stime (const time_t *@var{newtime}) @code{stime} sets the system clock, i.e., it tells the system that the current calendar time is @var{newtime}, where @code{newtime} is interpreted as described in the above definition of @code{time_t}. @@ -2314,7 +2314,7 @@ The @code{struct timeval} data type is described in @ref{Elapsed Time}. @comment sys/time.h @comment BSD -@deftypefun int setitimer (int @var{which}, struct itimerval *@var{new}, struct itimerval *@var{old}) +@deftypefun int setitimer (int @var{which}, const struct itimerval *@var{new}, struct itimerval *@var{old}) The @code{setitimer} function sets the timer specified by @var{which} according to @var{new}. The @var{which} argument can have a value of @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL}, or @code{ITIMER_PROF}. diff --git a/manual/users.texi b/manual/users.texi index 1ee5a0b178..957e34659c 100644 --- a/manual/users.texi +++ b/manual/users.texi @@ -437,7 +437,7 @@ should include the header file @file{grp.h}. @comment grp.h @comment BSD -@deftypefun int setgroups (size_t @var{count}, gid_t *@var{groups}) +@deftypefun int setgroups (size_t @var{count}, const gid_t *@var{groups}) This function sets the process's supplementary group IDs. It can only be called from privileged processes. The @var{count} argument specifies the number of group IDs in the array @var{groups}. @@ -1655,7 +1655,7 @@ A null pointer is returned when no more entries are available. @comment pwd.h @comment GNU -@deftypefun int getpwent_r (struct passwd *@var{result_buf}, char *@var{buffer}, int @var{buflen}, struct passwd **@var{result}) +@deftypefun int getpwent_r (struct passwd *@var{result_buf}, char *@var{buffer}, size_t @var{buflen}, struct passwd **@var{result}) This function is similar to @code{getpwent} in that it returns the next entry from the stream initialized by @code{setpwent}. Like @code{fgetpwent_r}, it uses the user-supplied buffers in @@ -2005,7 +2005,7 @@ value of @code{0} means no further entries exist or internal errors occurred. @comment netdb.h @comment GNU -@deftypefun int getnetgrent_r (char **@var{hostp}, char **@var{userp}, char **@var{domainp}, char *@var{buffer}, int @var{buflen}) +@deftypefun int getnetgrent_r (char **@var{hostp}, char **@var{userp}, char **@var{domainp}, char *@var{buffer}, size_t @var{buflen}) This function is similar to @code{getnetgrent} with only one exception: the strings the three string pointers @var{hostp}, @var{userp}, and @var{domainp} point to, are placed in the buffer of @var{buflen} bytes diff --git a/math/Makefile b/math/Makefile index da18b56d4b..e216dfb96a 100644 --- a/math/Makefile +++ b/math/Makefile @@ -88,7 +88,7 @@ long-c-yes = $(calls:=l) tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \ test-misc test-fpucw tst-definitions test-tgmath test-tgmath-ret \ bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int \ - test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 + test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 test-snan # We do the `long double' tests only if this data type is available and # distinct from `double'. test-longdouble-yes = test-ldouble test-ildoubl @@ -193,9 +193,6 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libm.so$(libm.so-version) else $(addprefix $(objpfx),$(tests)): $(objpfx)libm.a endif -ifeq ($(build-bounded),yes) -$(tests:%=$(objpfx)%-bp): $(objpfx)libm_b.a -endif gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%.o,\ add_n sub_n cmp addmul_1 mul_1 mul_n divmod_1 \ diff --git a/math/atest-exp.c b/math/atest-exp.c index 2678e743ce..d76b9125ca 100644 --- a/math/atest-exp.c +++ b/math/atest-exp.c @@ -61,7 +61,7 @@ exp_mpn (mp1 ex, mp1 x) unsigned n; mp1 xp; mp2 tmp; - mp_limb_t chk, round; + mp_limb_t chk; mp1 tol; memset (xp, 0, sizeof (mp1)); @@ -79,7 +79,7 @@ exp_mpn (mp1 ex, mp1 x) mpn_mul_n (tmp, xp, x, SZ); assert (tmp[SZ * 2 - 1] == 0); if (n > 0) - round = mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n); + mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n); chk = mpn_add_n (ex, ex, xp, SZ); assert (chk == 0); n++; diff --git a/math/atest-exp2.c b/math/atest-exp2.c index b05d43b407..20836ca0dc 100644 --- a/math/atest-exp2.c +++ b/math/atest-exp2.c @@ -102,7 +102,7 @@ exp_mpn (mp1 ex, mp1 x) unsigned int n; mp1 xp; mp2 tmp; - mp_limb_t chk, round; + mp_limb_t chk; mp1 tol; memset (xp, 0, sizeof (mp1)); @@ -120,7 +120,7 @@ exp_mpn (mp1 ex, mp1 x) mpn_mul_n (tmp, xp, x, SZ); assert(tmp[SZ * 2 - 1] == 0); if (n > 0) - round = mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n); + mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n); chk = mpn_add_n (ex, ex, xp, SZ); assert (chk == 0); ++n; diff --git a/math/atest-sincos.c b/math/atest-sincos.c index bea157c288..313bccb884 100644 --- a/math/atest-sincos.c +++ b/math/atest-sincos.c @@ -64,7 +64,6 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix) int i; mp2 s[4], c[4]; mp1 tmp, x; - mp_limb_t chk, round; if (ix == NULL) { @@ -79,34 +78,38 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix) for (i = 0; i < 1 << N; i++) { #define add_shift_mulh(d,x,s1,s2,sh,n) \ - /* d = (n ? -1 : 1) * (s1 + (s2>>sh)) * x / (1>>N); */ \ do { \ if (s2 != NULL) { \ if (sh > 0) { \ assert (sh < mpbpl); \ mpn_lshift (tmp, s1, SZ, sh); \ - chk = (n ? mpn_sub_n : mpn_add_n)(tmp,tmp,s2+FRAC/mpbpl,SZ); \ - } else \ - chk = (n ? mpn_sub_n : mpn_add_n)(tmp,s1,s2+FRAC/mpbpl,SZ); \ - /* assert(chk == 0); */ \ + if (n) \ + mpn_sub_n (tmp,tmp,s2+FRAC/mpbpl,SZ); \ + else \ + mpn_add_n (tmp,tmp,s2+FRAC/mpbpl,SZ); \ + } else { \ + if (n) \ + mpn_sub_n (tmp,s1,s2+FRAC/mpbpl,SZ); \ + else \ + mpn_add_n (tmp,s1,s2+FRAC/mpbpl,SZ); \ + } \ mpn_mul_n(d,tmp,x,SZ); \ } else \ mpn_mul_n(d,s1,x,SZ); \ - /* assert(d[SZ*2-1] == 0); */ \ assert(N+sh < mpbpl); \ if (N+sh > 0) mpn_rshift(d,d,2*SZ,N+sh); \ } while(0) #define summ(d,ss,s,n) \ - /* d = ss +/- (s[0]+2*s[1]+2*s[2]+s[3])/6; */ \ do { \ - chk = mpn_add_n(tmp,s[1]+FRAC/mpbpl,s[2]+FRAC/mpbpl,SZ); \ + mpn_add_n(tmp,s[1]+FRAC/mpbpl,s[2]+FRAC/mpbpl,SZ); \ mpn_lshift(tmp,tmp,SZ,1); \ - chk |= mpn_add_n(tmp,tmp,s[0]+FRAC/mpbpl,SZ); \ - chk |= mpn_add_n(tmp,tmp,s[3]+FRAC/mpbpl,SZ); \ - round = mpn_divmod_1(tmp,tmp,SZ,6); \ - /* chk |= mpn_add_1(tmp,tmp,SZ, (round > 3) ); */ \ - chk |= (n ? mpn_sub_n : mpn_add_n)(d,ss,tmp,SZ); \ - /* assert(chk == 0); */ \ + mpn_add_n(tmp,tmp,s[0]+FRAC/mpbpl,SZ); \ + mpn_add_n(tmp,tmp,s[3]+FRAC/mpbpl,SZ); \ + mpn_divmod_1(tmp,tmp,SZ,6); \ + if (n) \ + mpn_sub_n (d,ss,tmp,SZ); \ + else \ + mpn_add_n (d,ss,tmp,SZ); \ } while (0) add_shift_mulh (s[0], x, co, NULL, 0, 0); /* s0 = h * c; */ diff --git a/math/basic-test.c b/math/basic-test.c index f9b9752dea..ffead2ec0f 100644 --- a/math/basic-test.c +++ b/math/basic-test.c @@ -32,40 +32,40 @@ check (const char *testname, int result) } } -#define TEST_FUNC(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \ +#define TEST_FUNC(NAME, FLOAT, SUFFIX, EPSILON, HUGEVAL) \ static void \ NAME (void) \ { \ /* Variables are declared volatile to forbid some compiler \ optimizations. */ \ - volatile FLOAT Inf_var, NaN_var, zero_var, one_var; \ + volatile FLOAT Inf_var, qNaN_var, zero_var, one_var; \ FLOAT x1, x2; \ \ zero_var = 0.0; \ one_var = 1.0; \ - NaN_var = zero_var / zero_var; \ + qNaN_var = __builtin_nan ## SUFFIX (""); \ Inf_var = one_var / zero_var; \ \ (void) &zero_var; \ (void) &one_var; \ - (void) &NaN_var; \ + (void) &qNaN_var; \ (void) &Inf_var; \ \ \ check (#FLOAT " isinf (inf) == 1", isinf (Inf_var) == 1); \ check (#FLOAT " isinf (-inf) == -1", isinf (-Inf_var) == -1); \ check (#FLOAT " !isinf (1)", !(isinf (one_var))); \ - check (#FLOAT " !isinf (NaN)", !(isinf (NaN_var))); \ + check (#FLOAT " !isinf (qNaN)", !(isinf (qNaN_var))); \ \ - check (#FLOAT " isnan (NaN)", isnan (NaN_var)); \ - check (#FLOAT " isnan (-NaN)", isnan (-NaN_var)); \ + check (#FLOAT " isnan (qNaN)", isnan (qNaN_var)); \ + check (#FLOAT " isnan (-qNaN)", isnan (-qNaN_var)); \ check (#FLOAT " !isnan (1)", !(isnan (one_var))); \ check (#FLOAT " !isnan (inf)", !(isnan (Inf_var))); \ \ check (#FLOAT " inf == inf", Inf_var == Inf_var); \ check (#FLOAT " -inf == -inf", -Inf_var == -Inf_var); \ check (#FLOAT " inf != -inf", Inf_var != -Inf_var); \ - check (#FLOAT " NaN != NaN", NaN_var != NaN_var); \ + check (#FLOAT " qNaN != qNaN", qNaN_var != qNaN_var); \ \ /* \ the same tests but this time with NAN from <bits/nan.h> \ @@ -80,11 +80,12 @@ NAME (void) \ /* \ And again with the value returned by the `nan' function. \ */ \ - check (#FLOAT " isnan (NAN)", isnan (NANFUNC (""))); \ - check (#FLOAT " isnan (-NAN)", isnan (-NANFUNC (""))); \ - check (#FLOAT " !isinf (NAN)", !(isinf (NANFUNC ("")))); \ - check (#FLOAT " !isinf (-NAN)", !(isinf (-NANFUNC ("")))); \ - check (#FLOAT " NAN != NAN", NANFUNC ("") != NANFUNC ("")); \ + check (#FLOAT " isnan (nan (\"\"))", isnan (nan ## SUFFIX (""))); \ + check (#FLOAT " isnan (-nan (\"\"))", isnan (-nan ## SUFFIX (""))); \ + check (#FLOAT " !isinf (nan (\"\"))", !(isinf (nan ## SUFFIX ("")))); \ + check (#FLOAT " !isinf (-nan (\"\"))", !(isinf (-nan ## SUFFIX ("")))); \ + check (#FLOAT " nan (\"\") != nan (\"\")", \ + nan ## SUFFIX ("") != nan ## SUFFIX ("")); \ \ /* test if EPSILON is ok */ \ x1 = 1.0; \ @@ -102,34 +103,34 @@ NAME (void) \ check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \ } -#define TEST_TRUNC(NAME, FLOAT, DOUBLE) \ +#define TEST_TRUNC(NAME, FLOAT, DOUBLE, SUFFIX) \ void \ NAME (void) \ { \ - volatile DOUBLE Inf_var, NaN_var, zero_var, one_var; \ + volatile DOUBLE Inf_var, qNaN_var, zero_var, one_var; \ FLOAT x1, x2; \ \ zero_var = 0.0; \ one_var = 1.0; \ - NaN_var = zero_var / zero_var; \ + qNaN_var = __builtin_nan ## SUFFIX (""); \ Inf_var = one_var / zero_var; \ \ - (void) &NaN_var; \ + (void) &qNaN_var; \ (void) &Inf_var; \ \ - x1 = (FLOAT) NaN_var; \ - check (" "#FLOAT" x = ("#FLOAT") ("#DOUBLE") NaN", isnan (x1) != 0); \ + x1 = (FLOAT) qNaN_var; \ + check (" "#FLOAT" x = ("#FLOAT") ("#DOUBLE") qNaN", isnan (x1) != 0); \ x2 = (FLOAT) Inf_var; \ check (" "#FLOAT" x = ("#FLOAT") ("#DOUBLE") Inf", isinf (x2) != 0); \ } -TEST_FUNC (float_test, float, nanf, FLT_EPSILON, HUGE_VALF) -TEST_FUNC (double_test, double, nan, DBL_EPSILON, HUGE_VAL) -TEST_TRUNC (truncdfsf_test, float, double) +TEST_FUNC (float_test, float, f, FLT_EPSILON, HUGE_VALF) +TEST_FUNC (double_test, double, , DBL_EPSILON, HUGE_VAL) +TEST_TRUNC (truncdfsf_test, float, double, ) #ifndef NO_LONG_DOUBLE -TEST_FUNC (ldouble_test, long double, nanl, LDBL_EPSILON, HUGE_VALL) -TEST_TRUNC (trunctfsf_test, float, long double) -TEST_TRUNC (trunctfdf_test, double, long double) +TEST_FUNC (ldouble_test, long double, l, LDBL_EPSILON, HUGE_VALL) +TEST_TRUNC (trunctfsf_test, float, long double, l) +TEST_TRUNC (trunctfdf_test, double, long double, l) #endif int diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h index e90a34b0f7..e5af507257 100644 --- a/math/bits/mathcalls.h +++ b/math/bits/mathcalls.h @@ -220,7 +220,7 @@ __END_NAMESPACE_C99 #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 -/* Return representation of NaN for double type. */ +/* Return representation of qNaN for double type. */ __MATHCALLX (nan,, (const char *__tagb), (__const__)); __END_NAMESPACE_C99 #endif diff --git a/math/fegetenv.c b/math/fegetenv.c index fe08edaa78..14bb801237 100644 --- a/math/fegetenv.c +++ b/math/fegetenv.c @@ -19,7 +19,6 @@ #include <fenv.h> #include <shlib-compat.h> -#include <bp-sym.h> int __fegetenv (fenv_t *envp) @@ -29,9 +28,9 @@ __fegetenv (fenv_t *envp) } #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2); +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); stub_warning (fegetenv) diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl index 998a9e5e32..f50f1d9e02 100755 --- a/math/gen-libm-test.pl +++ b/math/gen-libm-test.pl @@ -58,7 +58,7 @@ use vars qw ($output_dir $ulps_file); "plus_zero" => "+0", "minus_infty" => "-inf", "plus_infty" => "inf", - "nan_value" => "NaN", + "qnan_value" => "qNaN", "M_El" => "e", "M_E2l" => "e^2", "M_E3l" => "e^3", @@ -203,22 +203,24 @@ sub special_functions { unless ($args[0] =~ /sincos/) { die ("Don't know how to handle $args[0] extra."); } - print $file " FUNC (sincos) ($args[1], &sin_res, &cos_res);\n"; + print $file " {\n"; + print $file " FUNC (sincos) ($args[1], &sin_res, &cos_res);\n"; $str = 'sincos (' . &beautify ($args[1]) . ', &sin_res, &cos_res)'; # handle sin $test = $str . ' puts ' . &beautify ($args[2]) . ' in sin_res'; - $cline = " check_float (\"$test\", sin_res, $args[2]"; + $cline = " check_float (\"$test\", sin_res, $args[2]"; $cline .= &new_test ($test, $args[4]); print $file $cline; # handle cos $test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res'; - $cline = " check_float (\"$test\", cos_res, $args[3]"; + $cline = " check_float (\"$test\", cos_res, $args[3]"; # only tests once for exception $cline .= &new_test ($test, undef); print $file $cline; + print $file " }\n"; } # Parse the arguments to TEST_x_y @@ -398,11 +400,15 @@ sub parse_args { } } - print $file $pre if (defined $pre); - - print $file " $cline"; - - print $file $post if (defined $post); + if (defined $pre or defined $post) { + print $file " {\n"; + print $file " $pre" if (defined $pre); + print $file " $cline"; + print $file " $post" if (defined $post); + print $file " }\n"; + } else { + print $file " $cline"; + } } # Generate libm-test.c diff --git a/math/k_casinh.c b/math/k_casinh.c index 41cd5ec47d..4cb232a17a 100644 --- a/math/k_casinh.c +++ b/math/k_casinh.c @@ -77,6 +77,63 @@ __kernel_casinh (__complex__ double x, int adj) else __imag__ res = __ieee754_atan2 (s, rx); } + else if (ix > 1.0 && ix < 1.5 && rx < 0.5) + { + if (rx < DBL_EPSILON * DBL_EPSILON) + { + double ix2m1 = (ix + 1.0) * (ix - 1.0); + double s = __ieee754_sqrt (ix2m1); + + __real__ res = __log1p (2.0 * (ix2m1 + ix * s)) / 2.0; + if (adj) + __imag__ res = __ieee754_atan2 (rx, __copysign (s, __imag__ x)); + else + __imag__ res = __ieee754_atan2 (s, rx); + } + else + { + double ix2m1 = (ix + 1.0) * (ix - 1.0); + double rx2 = rx * rx; + double f = rx2 * (2.0 + rx2 + 2.0 * ix * ix); + double d = __ieee754_sqrt (ix2m1 * ix2m1 + f); + double dp = d + ix2m1; + double dm = f / dp; + double r1 = __ieee754_sqrt ((dm + rx2) / 2.0); + double r2 = rx * ix / r1; + + __real__ res = __log1p (rx2 + dp + 2.0 * (rx * r1 + ix * r2)) / 2.0; + if (adj) + __imag__ res = __ieee754_atan2 (rx + r1, __copysign (ix + r2, + __imag__ x)); + else + __imag__ res = __ieee754_atan2 (ix + r2, rx + r1); + } + } + else if (ix == 1.0 && rx < 0.5) + { + if (rx < DBL_EPSILON / 8.0) + { + __real__ res = __log1p (2.0 * (rx + __ieee754_sqrt (rx))) / 2.0; + if (adj) + __imag__ res = __ieee754_atan2 (__ieee754_sqrt (rx), + __copysign (1.0, __imag__ x)); + else + __imag__ res = __ieee754_atan2 (1.0, __ieee754_sqrt (rx)); + } + else + { + double d = rx * __ieee754_sqrt (4.0 + rx * rx); + double s1 = __ieee754_sqrt ((d + rx * rx) / 2.0); + double s2 = __ieee754_sqrt ((d - rx * rx) / 2.0); + + __real__ res = __log1p (rx * rx + d + 2.0 * (rx * s1 + s2)) / 2.0; + if (adj) + __imag__ res = __ieee754_atan2 (rx + s1, __copysign (1.0 + s2, + __imag__ x)); + else + __imag__ res = __ieee754_atan2 (1.0 + s2, rx + s1); + } + } else { __real__ y = (rx - ix) * (rx + ix) + 1.0; diff --git a/math/k_casinhf.c b/math/k_casinhf.c index 3152ea2f7d..b368313390 100644 --- a/math/k_casinhf.c +++ b/math/k_casinhf.c @@ -77,10 +77,69 @@ __kernel_casinhf (__complex__ float x, int adj) else __imag__ res = __ieee754_atan2f (s, rx); } + else if (ix > 1.0f && ix < 1.5f && rx < 0.5f) + { + if (rx < FLT_EPSILON * FLT_EPSILON) + { + float ix2m1 = (ix + 1.0f) * (ix - 1.0f); + float s = __ieee754_sqrtf (ix2m1); + + __real__ res = __log1pf (2.0f * (ix2m1 + ix * s)) / 2.0f; + if (adj) + __imag__ res = __ieee754_atan2f (rx, __copysignf (s, __imag__ x)); + else + __imag__ res = __ieee754_atan2f (s, rx); + } + else + { + float ix2m1 = (ix + 1.0f) * (ix - 1.0f); + float rx2 = rx * rx; + float f = rx2 * (2.0f + rx2 + 2.0f * ix * ix); + float d = __ieee754_sqrtf (ix2m1 * ix2m1 + f); + float dp = d + ix2m1; + float dm = f / dp; + float r1 = __ieee754_sqrtf ((dm + rx2) / 2.0f); + float r2 = rx * ix / r1; + + __real__ res + = __log1pf (rx2 + dp + 2.0f * (rx * r1 + ix * r2)) / 2.0f; + if (adj) + __imag__ res = __ieee754_atan2f (rx + r1, __copysignf (ix + r2, + __imag__ x)); + else + __imag__ res = __ieee754_atan2f (ix + r2, rx + r1); + } + } + else if (ix == 1.0f && rx < 0.5f) + { + if (rx < FLT_EPSILON / 8.0f) + { + __real__ res = __log1pf (2.0f * (rx + __ieee754_sqrtf (rx))) / 2.0f; + if (adj) + __imag__ res = __ieee754_atan2f (__ieee754_sqrtf (rx), + __copysignf (1.0f, __imag__ x)); + else + __imag__ res = __ieee754_atan2f (1.0f, __ieee754_sqrtf (rx)); + } + else + { + float d = rx * __ieee754_sqrtf (4.0f + rx * rx); + float s1 = __ieee754_sqrtf ((d + rx * rx) / 2.0f); + float s2 = __ieee754_sqrtf ((d - rx * rx) / 2.0f); + + __real__ res = __log1pf (rx * rx + d + 2.0f * (rx * s1 + s2)) / 2.0f; + if (adj) + __imag__ res = __ieee754_atan2f (rx + s1, + __copysignf (1.0f + s2, + __imag__ x)); + else + __imag__ res = __ieee754_atan2f (1.0f + s2, rx + s1); + } + } else { - __real__ y = (rx - ix) * (rx + ix) + 1.0; - __imag__ y = 2.0 * rx * ix; + __real__ y = (rx - ix) * (rx + ix) + 1.0f; + __imag__ y = 2.0f * rx * ix; y = __csqrtf (y); diff --git a/math/k_casinhl.c b/math/k_casinhl.c index 110ae33dee..8e5bbd4385 100644 --- a/math/k_casinhl.c +++ b/math/k_casinhl.c @@ -84,10 +84,69 @@ __kernel_casinhl (__complex__ long double x, int adj) else __imag__ res = __ieee754_atan2l (s, rx); } + else if (ix > 1.0L && ix < 1.5L && rx < 0.5L) + { + if (rx < LDBL_EPSILON * LDBL_EPSILON) + { + long double ix2m1 = (ix + 1.0L) * (ix - 1.0L); + long double s = __ieee754_sqrtl (ix2m1); + + __real__ res = __log1pl (2.0L * (ix2m1 + ix * s)) / 2.0L; + if (adj) + __imag__ res = __ieee754_atan2l (rx, __copysignl (s, __imag__ x)); + else + __imag__ res = __ieee754_atan2l (s, rx); + } + else + { + long double ix2m1 = (ix + 1.0L) * (ix - 1.0L); + long double rx2 = rx * rx; + long double f = rx2 * (2.0L + rx2 + 2.0L * ix * ix); + long double d = __ieee754_sqrtl (ix2m1 * ix2m1 + f); + long double dp = d + ix2m1; + long double dm = f / dp; + long double r1 = __ieee754_sqrtl ((dm + rx2) / 2.0L); + long double r2 = rx * ix / r1; + + __real__ res + = __log1pl (rx2 + dp + 2.0L * (rx * r1 + ix * r2)) / 2.0L; + if (adj) + __imag__ res = __ieee754_atan2l (rx + r1, __copysignl (ix + r2, + __imag__ x)); + else + __imag__ res = __ieee754_atan2l (ix + r2, rx + r1); + } + } + else if (ix == 1.0L && rx < 0.5L) + { + if (rx < LDBL_EPSILON / 8.0L) + { + __real__ res = __log1pl (2.0L * (rx + __ieee754_sqrtl (rx))) / 2.0L; + if (adj) + __imag__ res = __ieee754_atan2l (__ieee754_sqrtl (rx), + __copysignl (1.0L, __imag__ x)); + else + __imag__ res = __ieee754_atan2l (1.0L, __ieee754_sqrtl (rx)); + } + else + { + long double d = rx * __ieee754_sqrtl (4.0L + rx * rx); + long double s1 = __ieee754_sqrtl ((d + rx * rx) / 2.0L); + long double s2 = __ieee754_sqrtl ((d - rx * rx) / 2.0L); + + __real__ res = __log1pl (rx * rx + d + 2.0L * (rx * s1 + s2)) / 2.0L; + if (adj) + __imag__ res = __ieee754_atan2l (rx + s1, + __copysignl (1.0L + s2, + __imag__ x)); + else + __imag__ res = __ieee754_atan2l (1.0L + s2, rx + s1); + } + } else { - __real__ y = (rx - ix) * (rx + ix) + 1.0; - __imag__ y = 2.0 * rx * ix; + __real__ y = (rx - ix) * (rx + ix) + 1.0L; + __imag__ y = 2.0L * rx * ix; y = __csqrtl (y); diff --git a/math/libm-test.inc b/math/libm-test.inc index 6ac3cd2d0b..0ea456bb94 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -224,7 +224,7 @@ static int output_points; /* Should the single function results printed? */ static int ignore_max_ulp; /* Should we ignore max_ulp? */ static FLOAT minus_zero, plus_zero; -static FLOAT plus_infty, minus_infty, nan_value, max_value, min_value; +static FLOAT plus_infty, minus_infty, qnan_value, max_value, min_value; static FLOAT min_subnorm_value; static FLOAT max_error, real_max_error, imag_max_error; @@ -361,7 +361,7 @@ print_complex_function_ulps (const char *function_name, FLOAT real_ulp, static void fpstack_test (const char *test_name) { -#ifdef i386 +#if defined (__i386__) || defined (__x86_64__) static int old_stack; int sw; @@ -805,15 +805,15 @@ acos_test (void) START (acos); - TEST_f_f (acos, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_f_f (acos, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_f_f (acos, nan_value, nan_value); + TEST_f_f (acos, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acos, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acos, qnan_value, qnan_value); /* |x| > 1: */ - TEST_f_f (acos, 1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (acos, -1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (acos, max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (acos, -max_value, nan_value, INVALID_EXCEPTION); + TEST_f_f (acos, 1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acos, -1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acos, max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acos, -max_value, qnan_value, INVALID_EXCEPTION); TEST_f_f (acos, 0, M_PI_2l); TEST_f_f (acos, minus_zero, M_PI_2l); @@ -971,11 +971,12 @@ acosh_test (void) START (acosh); TEST_f_f (acosh, plus_infty, plus_infty); - TEST_f_f (acosh, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (acosh, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acosh, qnan_value, qnan_value); /* x < 1: */ - TEST_f_f (acosh, -1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (acosh, -max_value, nan_value, INVALID_EXCEPTION); + TEST_f_f (acosh, -1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (acosh, -max_value, qnan_value, INVALID_EXCEPTION); TEST_f_f (acosh, 1, 0); TEST_f_f (acosh, 7, 2.63391579384963341725009269461593689L); @@ -994,15 +995,15 @@ asin_test (void) START (asin); - TEST_f_f (asin, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_f_f (asin, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_f_f (asin, nan_value, nan_value); + TEST_f_f (asin, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_f_f (asin, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_f_f (asin, qnan_value, qnan_value); - /* asin x == NaN plus invalid exception for |x| > 1. */ - TEST_f_f (asin, 1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (asin, -1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (asin, max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (asin, -max_value, nan_value, INVALID_EXCEPTION); + /* asin x == qNaN plus invalid exception for |x| > 1. */ + TEST_f_f (asin, 1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (asin, -1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (asin, max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (asin, -max_value, qnan_value, INVALID_EXCEPTION); TEST_f_f (asin, 0, 0); TEST_f_f (asin, minus_zero, minus_zero); @@ -1164,7 +1165,7 @@ asinh_test (void) TEST_f_f (asinh, plus_infty, plus_infty); TEST_f_f (asinh, minus_infty, minus_infty); #endif - TEST_f_f (asinh, nan_value, nan_value); + TEST_f_f (asinh, qnan_value, qnan_value); TEST_f_f (asinh, 0.75L, 0.693147180559945309417232121458176568L); END (asinh); @@ -1186,7 +1187,7 @@ atan_test (void) TEST_f_f (atan, plus_infty, M_PI_2l); TEST_f_f (atan, minus_infty, -M_PI_2l); - TEST_f_f (atan, nan_value, nan_value); + TEST_f_f (atan, qnan_value, qnan_value); TEST_f_f (atan, max_value, M_PI_2l); TEST_f_f (atan, -max_value, -M_PI_2l); @@ -1225,13 +1226,13 @@ atanh_test (void) TEST_f_f (atanh, 1, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); TEST_f_f (atanh, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION); - TEST_f_f (atanh, nan_value, nan_value); + TEST_f_f (atanh, qnan_value, qnan_value); - /* atanh (x) == NaN plus invalid exception if |x| > 1. */ - TEST_f_f (atanh, 1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (atanh, -1.125L, nan_value, INVALID_EXCEPTION); - TEST_f_f (atanh, max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (atanh, -max_value, nan_value, INVALID_EXCEPTION); + /* atanh (x) == qNaN plus invalid exception if |x| > 1. */ + TEST_f_f (atanh, 1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (atanh, -1.125L, qnan_value, INVALID_EXCEPTION); + TEST_f_f (atanh, max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (atanh, -max_value, qnan_value, INVALID_EXCEPTION); TEST_f_f (atanh, 0.75L, 0.972955074527656652552676371721589865L); @@ -1301,7 +1302,7 @@ atan2_test (void) TEST_ff_f (atan2, minus_infty, plus_infty, -M_PI_4l); TEST_ff_f (atan2, plus_infty, minus_infty, M_PI_34l); TEST_ff_f (atan2, minus_infty, minus_infty, -M_PI_34l); - TEST_ff_f (atan2, nan_value, nan_value, nan_value); + TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value); TEST_ff_f (atan2, max_value, max_value, M_PI_4l); @@ -1341,10 +1342,10 @@ cabs_test (void) /* cabs (-inf + i x) == +inf. */ TEST_c_f (cabs, minus_infty, 1.0, plus_infty); - TEST_c_f (cabs, minus_infty, nan_value, plus_infty); - TEST_c_f (cabs, minus_infty, nan_value, plus_infty); + TEST_c_f (cabs, minus_infty, qnan_value, plus_infty); + TEST_c_f (cabs, minus_infty, qnan_value, plus_infty); - TEST_c_f (cabs, nan_value, nan_value, nan_value); + TEST_c_f (cabs, qnan_value, qnan_value, qnan_value); /* cabs (x,y) == cabs (y,x). */ TEST_c_f (cabs, 0.75L, 12.390625L, 12.4133028598606664302388810868156657L); @@ -1410,22 +1411,22 @@ cacos_test (void) TEST_c_c (cacos, plus_infty, 0.5, 0.0, minus_infty); TEST_c_c (cacos, plus_infty, -0.5, 0.0, plus_infty); - TEST_c_c (cacos, plus_infty, nan_value, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (cacos, minus_infty, nan_value, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (cacos, plus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (cacos, minus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (cacos, 0, nan_value, M_PI_2l, nan_value); - TEST_c_c (cacos, minus_zero, nan_value, M_PI_2l, nan_value); + TEST_c_c (cacos, 0, qnan_value, M_PI_2l, qnan_value); + TEST_c_c (cacos, minus_zero, qnan_value, M_PI_2l, qnan_value); - TEST_c_c (cacos, nan_value, plus_infty, nan_value, minus_infty); - TEST_c_c (cacos, nan_value, minus_infty, nan_value, plus_infty); + TEST_c_c (cacos, qnan_value, plus_infty, qnan_value, minus_infty); + TEST_c_c (cacos, qnan_value, minus_infty, qnan_value, plus_infty); - TEST_c_c (cacos, 10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacos, -10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacos, 10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacos, -10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacos, nan_value, 0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacos, nan_value, -0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacos, qnan_value, 0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacos, qnan_value, -0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacos, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (cacos, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (cacos, plus_zero, -1.5L, M_PI_2l, 1.194763217287109304111930828519090523536L); TEST_c_c (cacos, minus_zero, -1.5L, M_PI_2l, 1.194763217287109304111930828519090523536L); @@ -1519,6 +1520,222 @@ cacos_test (void) TEST_c_c (cacos, -1.5L, -0x1.fp-16385L, 3.141592653589793238462643383279502884197L, 9.624236501192068949955178268487368462704e-1L); #endif + TEST_c_c (cacos, 0.5L, 1.0L, 1.221357263937683325603909865564381489366L, -9.261330313501824245501244453057873152694e-1L); + TEST_c_c (cacos, 0.5L, -1.0L, 1.221357263937683325603909865564381489366L, 9.261330313501824245501244453057873152694e-1L); + TEST_c_c (cacos, -0.5L, 1.0L, 1.920235389652109912858733517715121394831L, -9.261330313501824245501244453057873152694e-1L); + TEST_c_c (cacos, -0.5L, -1.0L, 1.920235389652109912858733517715121394831L, 9.261330313501824245501244453057873152694e-1L); + TEST_c_c (cacos, 1.0L, 0.5L, 6.748888455860063801646649673121744318756e-1L, -7.328576759736452608886724437653071523305e-1L); + TEST_c_c (cacos, -1.0L, 0.5L, 2.466703808003786858297978415967328452322L, -7.328576759736452608886724437653071523305e-1L); + TEST_c_c (cacos, 1.0L, -0.5L, 6.748888455860063801646649673121744318756e-1L, 7.328576759736452608886724437653071523305e-1L); + TEST_c_c (cacos, -1.0L, -0.5L, 2.466703808003786858297978415967328452322L, 7.328576759736452608886724437653071523305e-1L); + TEST_c_c (cacos, 0.25L, 1.0L, 1.394493894017929688812643125003661339452L, -8.924633639033482359562124741744951972772e-1L); + TEST_c_c (cacos, 0.25L, -1.0L, 1.394493894017929688812643125003661339452L, 8.924633639033482359562124741744951972772e-1L); + TEST_c_c (cacos, -0.25L, 1.0L, 1.747098759571863549650000258275841544745L, -8.924633639033482359562124741744951972772e-1L); + TEST_c_c (cacos, -0.25L, -1.0L, 1.747098759571863549650000258275841544745L, 8.924633639033482359562124741744951972772e-1L); + TEST_c_c (cacos, 1.0L, 0.25L, 4.890443302710802929202843732146540079124e-1L, -5.097911466811016354623559941115413499164e-1L); + TEST_c_c (cacos, -1.0L, 0.25L, 2.652548323318712945542359010064848876285L, -5.097911466811016354623559941115413499164e-1L); + TEST_c_c (cacos, 1.0L, -0.25L, 4.890443302710802929202843732146540079124e-1L, 5.097911466811016354623559941115413499164e-1L); + TEST_c_c (cacos, -1.0L, -0.25L, 2.652548323318712945542359010064848876285L, 5.097911466811016354623559941115413499164e-1L); + TEST_c_c (cacos, 0x1.fp-10L, 1.0L, 1.569458417435338878318763342108699202986L, -8.813742198809567991336704287826445879025e-1L); + TEST_c_c (cacos, 0x1.fp-10L, -1.0L, 1.569458417435338878318763342108699202986L, 8.813742198809567991336704287826445879025e-1L); + TEST_c_c (cacos, -0x1.fp-10L, 1.0L, 1.572134236154454360143880041170803681211L, -8.813742198809567991336704287826445879025e-1L); + TEST_c_c (cacos, -0x1.fp-10L, -1.0L, 1.572134236154454360143880041170803681211L, 8.813742198809567991336704287826445879025e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-10L, 4.349129763101882771258049954181971959031e-2L, -4.350501469856803800217957402220976497152e-2L); + TEST_c_c (cacos, -1.0L, 0x1.fp-10L, 3.098101355958774410750062883737683164607L, -4.350501469856803800217957402220976497152e-2L); + TEST_c_c (cacos, 1.0L, -0x1.fp-10L, 4.349129763101882771258049954181971959031e-2L, 4.350501469856803800217957402220976497152e-2L); + TEST_c_c (cacos, -1.0L, -0x1.fp-10L, 3.098101355958774410750062883737683164607L, 4.350501469856803800217957402220976497152e-2L); + TEST_c_c (cacos, 0x1.fp-30L, 1.0L, 1.570796325518966635014803151387033957091L, -8.813735870195430258081932989769495326854e-1L); + TEST_c_c (cacos, 0x1.fp-30L, -1.0L, 1.570796325518966635014803151387033957091L, 8.813735870195430258081932989769495326854e-1L); + TEST_c_c (cacos, -0x1.fp-30L, 1.0L, 1.570796328070826603447840231892468927106L, -8.813735870195430258081932989769495326854e-1L); + TEST_c_c (cacos, -0x1.fp-30L, -1.0L, 1.570796328070826603447840231892468927106L, 8.813735870195430258081932989769495326854e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-30L, 4.247867097467650115899790787875186617316e-5L, -4.247867098745151888768727039216644758847e-5L); + TEST_c_c (cacos, -1.0L, 0x1.fp-30L, 3.141550174918818561961484385371624132331L, -4.247867098745151888768727039216644758847e-5L); + TEST_c_c (cacos, 1.0L, -0x1.fp-30L, 4.247867097467650115899790787875186617316e-5L, 4.247867098745151888768727039216644758847e-5L); + TEST_c_c (cacos, -1.0L, -0x1.fp-30L, 3.141550174918818561961484385371624132331L, 4.247867098745151888768727039216644758847e-5L); + TEST_c_c (cacos, 0x1.fp-100L, 1.0L, 1.570796326794896619231321691638670687364L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 0x1.fp-100L, -1.0L, 1.570796326794896619231321691638670687364L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-100L, 1.0L, 1.570796326794896619231321691640832196834L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-100L, -1.0L, 1.570796326794896619231321691640832196834L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-100L, 1.236292038260260888664514866456887257525e-15L, -1.236292038260260888664514866457202186027e-15L); + TEST_c_c (cacos, -1.0L, 0x1.fp-100L, 3.141592653589792002170605123018614219682L, -1.236292038260260888664514866457202186027e-15L); + TEST_c_c (cacos, 1.0L, -0x1.fp-100L, 1.236292038260260888664514866456887257525e-15L, 1.236292038260260888664514866457202186027e-15L); + TEST_c_c (cacos, -1.0L, -0x1.fp-100L, 3.141592653589792002170605123018614219682L, 1.236292038260260888664514866457202186027e-15L); + TEST_c_c (cacos, 0x1.fp-129L, 1.0L, 1.570796326794896619231321691639751442097L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 0x1.fp-129L, -1.0L, 1.570796326794896619231321691639751442097L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-129L, 1.0L, 1.570796326794896619231321691639751442101L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-129L, -1.0L, 1.570796326794896619231321691639751442101L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-129L, 5.335635276982233498398987585285818977930e-20L, -5.335635276982233498398987585285818977933e-20L); + TEST_c_c (cacos, -1.0L, 0x1.fp-129L, 3.141592653589793238409287030509680549213L, -5.335635276982233498398987585285818977933e-20L); + TEST_c_c (cacos, 1.0L, -0x1.fp-129L, 5.335635276982233498398987585285818977930e-20L, 5.335635276982233498398987585285818977933e-20L); + TEST_c_c (cacos, -1.0L, -0x1.fp-129L, 3.141592653589793238409287030509680549213L, 5.335635276982233498398987585285818977933e-20L); +#ifndef TEST_FLOAT + TEST_c_c (cacos, 0x1.fp-1000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 0x1.fp-1000L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-1000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-1000L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-1000L, 4.252291453851660175550490409247739011867e-151L, -4.252291453851660175550490409247739011867e-151L); + TEST_c_c (cacos, -1.0L, 0x1.fp-1000L, 3.141592653589793238462643383279502884197L, -4.252291453851660175550490409247739011867e-151L); + TEST_c_c (cacos, 1.0L, -0x1.fp-1000L, 4.252291453851660175550490409247739011867e-151L, 4.252291453851660175550490409247739011867e-151L); + TEST_c_c (cacos, -1.0L, -0x1.fp-1000L, 3.141592653589793238462643383279502884197L, 4.252291453851660175550490409247739011867e-151L); + TEST_c_c (cacos, 0x1.fp-1025L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 0x1.fp-1025L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-1025L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-1025L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-1025L, 7.340879205566679497036857179189356754017e-155L, -7.340879205566679497036857179189356754017e-155L); + TEST_c_c (cacos, -1.0L, 0x1.fp-1025L, 3.141592653589793238462643383279502884197L, -7.340879205566679497036857179189356754017e-155L); + TEST_c_c (cacos, 1.0L, -0x1.fp-1025L, 7.340879205566679497036857179189356754017e-155L, 7.340879205566679497036857179189356754017e-155L); + TEST_c_c (cacos, -1.0L, -0x1.fp-1025L, 3.141592653589793238462643383279502884197L, 7.340879205566679497036857179189356754017e-155L); +#endif +#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381 + TEST_c_c (cacos, 0x1.fp-10000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 0x1.fp-10000L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-10000L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-10000L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-10000L, 9.854680208706673586644342922051388714633e-1506L, -9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (cacos, -1.0L, 0x1.fp-10000L, 3.141592653589793238462643383279502884197L, -9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (cacos, 1.0L, -0x1.fp-10000L, 9.854680208706673586644342922051388714633e-1506L, 9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (cacos, -1.0L, -0x1.fp-10000L, 3.141592653589793238462643383279502884197L, 9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (cacos, 0x1.fp-16385L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 0x1.fp-16385L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-16385L, 1.0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, -0x1.fp-16385L, -1.0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (cacos, 1.0L, 0x1.fp-16385L, 9.023632056840860275214893047597614177639e-2467L, -9.023632056840860275214893047597614177639e-2467L); + TEST_c_c (cacos, -1.0L, 0x1.fp-16385L, 3.141592653589793238462643383279502884197L, -9.023632056840860275214893047597614177639e-2467L); + TEST_c_c (cacos, 1.0L, -0x1.fp-16385L, 9.023632056840860275214893047597614177639e-2467L, 9.023632056840860275214893047597614177639e-2467L); + TEST_c_c (cacos, -1.0L, -0x1.fp-16385L, 3.141592653589793238462643383279502884197L, 9.023632056840860275214893047597614177639e-2467L); +#endif + + TEST_c_c (cacos, 0x1p-23L, 0x1.000002p0L, 1.570796242501204621739026081991856762292L, -8.813736713132400470205730751186547909968e-1L) + TEST_c_c (cacos, 0x1p-23L, -0x1.000002p0L, 1.570796242501204621739026081991856762292L, 8.813736713132400470205730751186547909968e-1L) + TEST_c_c (cacos, -0x1p-23L, 0x1.000002p0L, 1.570796411088588616723617301287646121905L, -8.813736713132400470205730751186547909968e-1L) + TEST_c_c (cacos, -0x1p-23L, -0x1.000002p0L, 1.570796411088588616723617301287646121905L, 8.813736713132400470205730751186547909968e-1L) + TEST_c_c (cacos, 0x1.000002p0L, 0x1p-23L, 2.222118384408546368406374049167636760903e-4L, -5.364668491573609633134147164031476452679e-4L) + TEST_c_c (cacos, -0x1.000002p0L, 0x1p-23L, 3.141370441751352383825802745874586120521L, -5.364668491573609633134147164031476452679e-4L) + TEST_c_c (cacos, 0x1.000002p0L, -0x1p-23L, 2.222118384408546368406374049167636760903e-4L, 5.364668491573609633134147164031476452679e-4L) + TEST_c_c (cacos, -0x1.000002p0L, -0x1p-23L, 3.141370441751352383825802745874586120521L, 5.364668491573609633134147164031476452679e-4L) + TEST_c_c (cacos, 0x1.fp-129L, 0x1.000002p0L, 1.570796326794896619231321691639751442097L, -8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, 0x1.fp-129L, -0x1.000002p0L, 1.570796326794896619231321691639751442097L, 8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, -0x1.fp-129L, 0x1.000002p0L, 1.570796326794896619231321691639751442101L, -8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, -0x1.fp-129L, -0x1.000002p0L, 1.570796326794896619231321691639751442101L, 8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, 0x1.000002p0L, 0x1.fp-129L, 5.830451806317544230969669308596361881467e-36L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, -0x1.000002p0L, 0x1.fp-129L, 3.141592653589793238462643383279502878367L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, 0x1.000002p0L, -0x1.fp-129L, 5.830451806317544230969669308596361881467e-36L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, -0x1.000002p0L, -0x1.fp-129L, 3.141592653589793238462643383279502878367L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, 0.0L, 0x1.000002p0L, 1.570796326794896619231321691639751442099L, -8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, 0.0L, -0x1.000002p0L, 1.570796326794896619231321691639751442099L, 8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, -0.0L, 0x1.000002p0L, 1.570796326794896619231321691639751442099L, -8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, -0.0L, -0x1.000002p0L, 1.570796326794896619231321691639751442099L, 8.813736713132375348727889167749389235161e-1L) + TEST_c_c (cacos, 0x1.000002p0L, 0.0L, 0.0L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, -0x1.000002p0L, 0.0L, 3.141592653589793238462643383279502884197L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, 0x1.000002p0L, -0.0L, 0.0L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (cacos, -0x1.000002p0L, -0.0L, 3.141592653589793238462643383279502884197L, 4.882812451493617206486388134172712975070e-4L) +#ifndef TEST_FLOAT + TEST_c_c (cacos, 0x1p-52L, 0x1.0000000000001p0L, 1.570796326794896462222075823262262934288L, -8.813735870195431822418551933572982483664e-1L) + TEST_c_c (cacos, 0x1p-52L, -0x1.0000000000001p0L, 1.570796326794896462222075823262262934288L, 8.813735870195431822418551933572982483664e-1L) + TEST_c_c (cacos, -0x1p-52L, 0x1.0000000000001p0L, 1.570796326794896776240567560017239949909L, -8.813735870195431822418551933572982483664e-1L) + TEST_c_c (cacos, -0x1p-52L, -0x1.0000000000001p0L, 1.570796326794896776240567560017239949909L, 8.813735870195431822418551933572982483664e-1L) + TEST_c_c (cacos, 0x1.0000000000001p0L, 0x1p-52L, 9.590301705980041385828904092662391018164e-9L, -2.315303644582684770975188768022139415020e-8L) + TEST_c_c (cacos, -0x1.0000000000001p0L, 0x1p-52L, 3.141592643999491532482601997450598791535L, -2.315303644582684770975188768022139415020e-8L) + TEST_c_c (cacos, 0x1.0000000000001p0L, -0x1p-52L, 9.590301705980041385828904092662391018164e-9L, 2.315303644582684770975188768022139415020e-8L) + TEST_c_c (cacos, -0x1.0000000000001p0L, -0x1p-52L, 3.141592643999491532482601997450598791535L, 2.315303644582684770975188768022139415020e-8L) + TEST_c_c (cacos, 0x1.fp-1025L, 0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, 0x1.fp-1025L, -0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, -0x1.fp-1025L, 0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, -0x1.fp-1025L, -0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, 0x1.0000000000001p0L, 0x1.fp-1025L, 2.557178503953494342609835913586108008322e-301L, -2.107342425544701550354780375182800088393e-8L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM) + TEST_c_c (cacos, -0x1.0000000000001p0L, 0x1.fp-1025L, 3.141592653589793238462643383279502884197L, -2.107342425544701550354780375182800088393e-8L) + TEST_c_c (cacos, 0x1.0000000000001p0L, -0x1.fp-1025L, 2.557178503953494342609835913586108008322e-301L, 2.107342425544701550354780375182800088393e-8L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM) + TEST_c_c (cacos, -0x1.0000000000001p0L, -0x1.fp-1025L, 3.141592653589793238462643383279502884197L, 2.107342425544701550354780375182800088393e-8L) + TEST_c_c (cacos, 0.0L, 0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, 0.0L, -0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, -0.0L, 0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, -0.0L, -0x1.0000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195431822418551933572895326024e-1L) + TEST_c_c (cacos, 0x1.0000000000001p0L, 0.0L, 0.0L, -2.107342425544701550354780375182800088393e-8L) + TEST_c_c (cacos, -0x1.0000000000001p0L, 0.0L, 3.141592653589793238462643383279502884197L, -2.107342425544701550354780375182800088393e-8L) + TEST_c_c (cacos, 0x1.0000000000001p0L, -0.0L, 0.0L, 2.107342425544701550354780375182800088393e-8L) + TEST_c_c (cacos, -0x1.0000000000001p0L, -0.0L, 3.141592653589793238462643383279502884197L, 2.107342425544701550354780375182800088393e-8L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64 + TEST_c_c (cacos, 0x1p-63L, 0x1.0000000000000002p0L, 1.570796326794896619154657020805582738031L, -8.813735870195430253092739958139610131001e-1L) + TEST_c_c (cacos, 0x1p-63L, -0x1.0000000000000002p0L, 1.570796326794896619154657020805582738031L, 8.813735870195430253092739958139610131001e-1L) + TEST_c_c (cacos, -0x1p-63L, 0x1.0000000000000002p0L, 1.570796326794896619307986362473920146166L, -8.813735870195430253092739958139610131001e-1L) + TEST_c_c (cacos, -0x1p-63L, -0x1.0000000000000002p0L, 1.570796326794896619307986362473920146166L, 8.813735870195430253092739958139610131001e-1L) + TEST_c_c (cacos, 0x1.0000000000000002p0L, 0x1p-63L, 2.119177303101063432592523199680782317447e-10L, -5.116146586219826555037807251857670783420e-10L) + TEST_c_c (cacos, -0x1.0000000000000002p0L, 0x1p-63L, 3.141592653377875508152537040020250564229L, -5.116146586219826555037807251857670783420e-10L) + TEST_c_c (cacos, 0x1.0000000000000002p0L, -0x1p-63L, 2.119177303101063432592523199680782317447e-10L, 5.116146586219826555037807251857670783420e-10L) + TEST_c_c (cacos, -0x1.0000000000000002p0L, -0x1p-63L, 3.141592653377875508152537040020250564229L, 5.116146586219826555037807251857670783420e-10L) +# if LDBL_MIN_EXP <= -16381 + TEST_c_c (cacos, 0x1.fp-16385L, 0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, 0x1.fp-16385L, -0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, -0x1.fp-16385L, 0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, -0x1.fp-16385L, -0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, 0x1.0000000000000002p0L, 0x1.fp-16385L, 1.748608650034385653922359120438227480943e-4923L, -4.656612873077392578082927418388212703712e-10L) + TEST_c_c (cacos, -0x1.0000000000000002p0L, 0x1.fp-16385L, 3.141592653589793238462643383279502884197L, -4.656612873077392578082927418388212703712e-10L) + TEST_c_c (cacos, 0x1.0000000000000002p0L, -0x1.fp-16385L, 1.748608650034385653922359120438227480943e-4923L, 4.656612873077392578082927418388212703712e-10L) + TEST_c_c (cacos, -0x1.0000000000000002p0L, -0x1.fp-16385L, 3.141592653589793238462643383279502884197L, 4.656612873077392578082927418388212703712e-10L) +# endif + TEST_c_c (cacos, 0.0L, 0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, 0.0L, -0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, -0.0L, 0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, -0.0L, -0x1.0000000000000002p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430253092739958139610130980e-1L) + TEST_c_c (cacos, 0x1.0000000000000002p0L, 0.0L, 0.0L, -4.656612873077392578082927418388212703712e-10L) + TEST_c_c (cacos, -0x1.0000000000000002p0L, 0.0L, 3.141592653589793238462643383279502884197L, -4.656612873077392578082927418388212703712e-10L) + TEST_c_c (cacos, 0x1.0000000000000002p0L, -0.0L, 0.0L, 4.656612873077392578082927418388212703712e-10L) + TEST_c_c (cacos, -0x1.0000000000000002p0L, -0.0L, 3.141592653589793238462643383279502884197L, 4.656612873077392578082927418388212703712e-10L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106 + TEST_c_c (cacos, 0x1p-106L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639742726335L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, 0x1p-106L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639742726335L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, -0x1p-106L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639760157863L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, -0x1p-106L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639760157863L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, 0x1p-106L, 5.394221422390606848017034778914096659726e-17L, -2.285028863093221674154232933662774454211e-16L) + TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, 0x1p-106L, 3.141592653589793184520429159373434404027L, -2.285028863093221674154232933662774454211e-16L) + TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, -0x1p-106L, 5.394221422390606848017034778914096659726e-17L, 2.285028863093221674154232933662774454211e-16L) + TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, -0x1p-106L, 3.141592653589793184520429159373434404027L, 2.285028863093221674154232933662774454211e-16L) + TEST_c_c (cacos, 0x1.fp-1025L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, 0x1.fp-1025L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, -0x1.fp-1025L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, -0x1.fp-1025L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, 0x1.fp-1025L, 2.426922623448365473354662093431821897807e-293L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, 0x1.fp-1025L, 3.141592653589793238462643383279502884197L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, -0x1.fp-1025L, 2.426922623448365473354662093431821897807e-293L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, -0x1.fp-1025L, 3.141592653589793238462643383279502884197L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, 0.0L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, 0.0L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, -0.0L, 0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, -0.0L, -0x1.000000000000000000000000008p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, 0.0L, 0.0L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, 0.0L, 3.141592653589793238462643383279502884197L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, 0x1.000000000000000000000000008p0L, -0.0L, 0.0L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (cacos, -0x1.000000000000000000000000008p0L, -0.0L, 3.141592653589793238462643383279502884197L, 2.220446049250313080847263336181636063482e-16L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113 + TEST_c_c (cacos, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751374007L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751374007L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, -0x1p-113L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751510190L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, -0x1p-113L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751510190L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, 0x1.0000000000000000000000000001p0L, 0x1p-113L, 4.767863183742677481693563511435642755521e-18L, -2.019699255375255198156433710951064632386e-17L) + TEST_c_c (cacos, -0x1.0000000000000000000000000001p0L, 0x1p-113L, 3.141592653589793233694780199536825402504L, -2.019699255375255198156433710951064632386e-17L) + TEST_c_c (cacos, 0x1.0000000000000000000000000001p0L, -0x1p-113L, 4.767863183742677481693563511435642755521e-18L, 2.019699255375255198156433710951064632386e-17L) + TEST_c_c (cacos, -0x1.0000000000000000000000000001p0L, -0x1p-113L, 3.141592653589793233694780199536825402504L, 2.019699255375255198156433710951064632386e-17L) + TEST_c_c (cacos, 0x1.fp-16385L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, 0x1.fp-16385L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, -0x1.fp-16385L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, -0x1.fp-16385L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, 0x1.0000000000000000000000000001p0L, 0x1.fp-16385L, 4.148847925325683229178506116378864361396e-4916L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, -0x1.0000000000000000000000000001p0L, 0x1.fp-16385L, 3.141592653589793238462643383279502884197L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, 0x1.0000000000000000000000000001p0L, -0x1.fp-16385L, 4.148847925325683229178506116378864361396e-4916L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, -0x1.0000000000000000000000000001p0L, -0x1.fp-16385L, 3.141592653589793238462643383279502884197L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, 0.0L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, 0.0L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, -0.0L, 0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, -0.0L, -0x1.0000000000000000000000000001p0L, 1.570796326794896619231321691639751442099L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (cacos, 0x1.0000000000000000000000000001p0L, 0.0L, 0.0L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, -0x1.0000000000000000000000000001p0L, 0.0L, 3.141592653589793238462643383279502884197L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, 0x1.0000000000000000000000000001p0L, -0.0L, 0.0L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (cacos, -0x1.0000000000000000000000000001p0L, -0.0L, 3.141592653589793238462643383279502884197L, 1.962615573354718824241727964954454332780e-17L) +#endif + TEST_c_c (cacos, 0.75L, 1.25L, 1.11752014915610270578240049553777969L, -1.13239363160530819522266333696834467L); TEST_c_c (cacos, -2, -3, 2.1414491111159960199416055713254211L, 1.9833870299165354323470769028940395L); @@ -1564,22 +1781,22 @@ cacosh_test (void) TEST_c_c (cacosh, plus_infty, 0.5, plus_infty, 0.0); TEST_c_c (cacosh, plus_infty, -0.5, plus_infty, minus_zero); - TEST_c_c (cacosh, plus_infty, nan_value, plus_infty, nan_value); - TEST_c_c (cacosh, minus_infty, nan_value, plus_infty, nan_value); + TEST_c_c (cacosh, plus_infty, qnan_value, plus_infty, qnan_value); + TEST_c_c (cacosh, minus_infty, qnan_value, plus_infty, qnan_value); - TEST_c_c (cacosh, 0, nan_value, nan_value, nan_value); - TEST_c_c (cacosh, minus_zero, nan_value, nan_value, nan_value); + TEST_c_c (cacosh, 0, qnan_value, qnan_value, qnan_value); + TEST_c_c (cacosh, minus_zero, qnan_value, qnan_value, qnan_value); - TEST_c_c (cacosh, nan_value, plus_infty, plus_infty, nan_value); - TEST_c_c (cacosh, nan_value, minus_infty, plus_infty, nan_value); + TEST_c_c (cacosh, qnan_value, plus_infty, plus_infty, qnan_value); + TEST_c_c (cacosh, qnan_value, minus_infty, plus_infty, qnan_value); - TEST_c_c (cacosh, 10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacosh, -10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacosh, 10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacosh, -10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacosh, nan_value, 0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacosh, nan_value, -0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacosh, qnan_value, 0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cacosh, qnan_value, -0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cacosh, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (cacosh, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (cacosh, plus_zero, -1.5L, 1.194763217287109304111930828519090523536L, -M_PI_2l); TEST_c_c (cacosh, minus_zero, -1.5L, 1.194763217287109304111930828519090523536L, -M_PI_2l); @@ -1676,7 +1893,7 @@ carg_test (void) TEST_c_f (carg, minus_infty, minus_infty, -3 * M_PI_4l); - TEST_c_f (carg, nan_value, nan_value, nan_value); + TEST_c_f (carg, qnan_value, qnan_value, qnan_value); END (carg); } @@ -1721,22 +1938,22 @@ casin_test (void) TEST_c_c (casin, plus_infty, 0.5, M_PI_2l, plus_infty); TEST_c_c (casin, plus_infty, -0.5, M_PI_2l, minus_infty); - TEST_c_c (casin, nan_value, plus_infty, nan_value, plus_infty); - TEST_c_c (casin, nan_value, minus_infty, nan_value, minus_infty); + TEST_c_c (casin, qnan_value, plus_infty, qnan_value, plus_infty); + TEST_c_c (casin, qnan_value, minus_infty, qnan_value, minus_infty); - TEST_c_c (casin, 0.0, nan_value, 0.0, nan_value); - TEST_c_c (casin, minus_zero, nan_value, minus_zero, nan_value); + TEST_c_c (casin, 0.0, qnan_value, 0.0, qnan_value); + TEST_c_c (casin, minus_zero, qnan_value, minus_zero, qnan_value); - TEST_c_c (casin, plus_infty, nan_value, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (casin, minus_infty, nan_value, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (casin, plus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (casin, minus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (casin, nan_value, 10.5, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casin, nan_value, -10.5, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casin, qnan_value, 10.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casin, qnan_value, -10.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casin, 0.75, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casin, -0.75, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casin, 0.75, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casin, -0.75, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casin, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (casin, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (casin, plus_zero, -1.5L, plus_zero, -1.194763217287109304111930828519090523536L); TEST_c_c (casin, minus_zero, -1.5L, minus_zero, -1.194763217287109304111930828519090523536L); @@ -1830,6 +2047,222 @@ casin_test (void) TEST_c_c (casin, -1.5L, -0x1.fp-16385L, -1.570796326794896619231321691639751442099L, -9.624236501192068949955178268487368462704e-1L); #endif + TEST_c_c (casin, 0.5L, 1.0L, 3.494390628572132936274118260753699527325e-1L, 9.261330313501824245501244453057873152694e-1L); + TEST_c_c (casin, 0.5L, -1.0L, 3.494390628572132936274118260753699527325e-1L, -9.261330313501824245501244453057873152694e-1L); + TEST_c_c (casin, -0.5L, 1.0L, -3.494390628572132936274118260753699527325e-1L, 9.261330313501824245501244453057873152694e-1L); + TEST_c_c (casin, -0.5L, -1.0L, -3.494390628572132936274118260753699527325e-1L, -9.261330313501824245501244453057873152694e-1L); + TEST_c_c (casin, 1.0L, 0.5L, 8.959074812088902390666567243275770102229e-1L, 7.328576759736452608886724437653071523305e-1L); + TEST_c_c (casin, -1.0L, 0.5L, -8.959074812088902390666567243275770102229e-1L, 7.328576759736452608886724437653071523305e-1L); + TEST_c_c (casin, 1.0L, -0.5L, 8.959074812088902390666567243275770102229e-1L, -7.328576759736452608886724437653071523305e-1L); + TEST_c_c (casin, -1.0L, -0.5L, -8.959074812088902390666567243275770102229e-1L, -7.328576759736452608886724437653071523305e-1L); + TEST_c_c (casin, 0.25L, 1.0L, 1.763024327769669304186785666360901026468e-1L, 8.924633639033482359562124741744951972772e-1L); + TEST_c_c (casin, 0.25L, -1.0L, 1.763024327769669304186785666360901026468e-1L, -8.924633639033482359562124741744951972772e-1L); + TEST_c_c (casin, -0.25L, 1.0L, -1.763024327769669304186785666360901026468e-1L, 8.924633639033482359562124741744951972772e-1L); + TEST_c_c (casin, -0.25L, -1.0L, -1.763024327769669304186785666360901026468e-1L, -8.924633639033482359562124741744951972772e-1L); + TEST_c_c (casin, 1.0L, 0.25L, 1.081751996523816326311037318425097434186L, 5.097911466811016354623559941115413499164e-1L); + TEST_c_c (casin, -1.0L, 0.25L, -1.081751996523816326311037318425097434186L, 5.097911466811016354623559941115413499164e-1L); + TEST_c_c (casin, 1.0L, -0.25L, 1.081751996523816326311037318425097434186L, -5.097911466811016354623559941115413499164e-1L); + TEST_c_c (casin, -1.0L, -0.25L, -1.081751996523816326311037318425097434186L, -5.097911466811016354623559941115413499164e-1L); + TEST_c_c (casin, 0x1.fp-10L, 1.0L, 1.337909359557740912558349531052239112857e-3L, 8.813742198809567991336704287826445879025e-1L); + TEST_c_c (casin, 0x1.fp-10L, -1.0L, 1.337909359557740912558349531052239112857e-3L, -8.813742198809567991336704287826445879025e-1L); + TEST_c_c (casin, -0x1.fp-10L, 1.0L, -1.337909359557740912558349531052239112857e-3L, 8.813742198809567991336704287826445879025e-1L); + TEST_c_c (casin, -0x1.fp-10L, -1.0L, -1.337909359557740912558349531052239112857e-3L, -8.813742198809567991336704287826445879025e-1L); + TEST_c_c (casin, 1.0L, 0x1.fp-10L, 1.527305029163877791518741192097931722508L, 4.350501469856803800217957402220976497152e-2L); + TEST_c_c (casin, -1.0L, 0x1.fp-10L, -1.527305029163877791518741192097931722508L, 4.350501469856803800217957402220976497152e-2L); + TEST_c_c (casin, 1.0L, -0x1.fp-10L, 1.527305029163877791518741192097931722508L, -4.350501469856803800217957402220976497152e-2L); + TEST_c_c (casin, -1.0L, -0x1.fp-10L, -1.527305029163877791518741192097931722508L, -4.350501469856803800217957402220976497152e-2L); + TEST_c_c (casin, 0x1.fp-30L, 1.0L, 1.275929984216518540252717485007112529021e-9L, 8.813735870195430258081932989769495326854e-1L); + TEST_c_c (casin, 0x1.fp-30L, -1.0L, 1.275929984216518540252717485007112529021e-9L, -8.813735870195430258081932989769495326854e-1L); + TEST_c_c (casin, -0x1.fp-30L, 1.0L, -1.275929984216518540252717485007112529021e-9L, 8.813735870195430258081932989769495326854e-1L); + TEST_c_c (casin, -0x1.fp-30L, -1.0L, -1.275929984216518540252717485007112529021e-9L, -8.813735870195430258081932989769495326854e-1L); + TEST_c_c (casin, 1.0L, 0x1.fp-30L, 1.570753848123921942730162693731872690232L, 4.247867098745151888768727039216644758847e-5L); + TEST_c_c (casin, -1.0L, 0x1.fp-30L, -1.570753848123921942730162693731872690232L, 4.247867098745151888768727039216644758847e-5L); + TEST_c_c (casin, 1.0L, -0x1.fp-30L, 1.570753848123921942730162693731872690232L, -4.247867098745151888768727039216644758847e-5L); + TEST_c_c (casin, -1.0L, -0x1.fp-30L, -1.570753848123921942730162693731872690232L, -4.247867098745151888768727039216644758847e-5L); + TEST_c_c (casin, 0x1.fp-100L, 1.0L, 1.080754735021050612990719608916167354321e-30L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, 0x1.fp-100L, -1.0L, 1.080754735021050612990719608916167354321e-30L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, -0x1.fp-100L, 1.0L, -1.080754735021050612990719608916167354321e-30L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, -0x1.fp-100L, -1.0L, -1.080754735021050612990719608916167354321e-30L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, 1.0L, 0x1.fp-100L, 1.570796326794895382939283431378862777584L, 1.236292038260260888664514866457202186027e-15L); + TEST_c_c (casin, -1.0L, 0x1.fp-100L, -1.570796326794895382939283431378862777584L, 1.236292038260260888664514866457202186027e-15L); + TEST_c_c (casin, 1.0L, -0x1.fp-100L, 1.570796326794895382939283431378862777584L, -1.236292038260260888664514866457202186027e-15L); + TEST_c_c (casin, -1.0L, -0x1.fp-100L, -1.570796326794895382939283431378862777584L, -1.236292038260260888664514866457202186027e-15L); + TEST_c_c (casin, 0x1.fp-129L, 1.0L, 2.013062564695348242280482517399205554874e-39L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casin, 0x1.fp-129L, -1.0L, 2.013062564695348242280482517399205554874e-39L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casin, -0x1.fp-129L, 1.0L, -2.013062564695348242280482517399205554874e-39L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casin, -0x1.fp-129L, -1.0L, -2.013062564695348242280482517399205554874e-39L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casin, 1.0L, 0x1.fp-129L, 1.570796326794896619177965338869929107115L, 5.335635276982233498398987585285818977933e-20L); + TEST_c_c (casin, -1.0L, 0x1.fp-129L, -1.570796326794896619177965338869929107115L, 5.335635276982233498398987585285818977933e-20L); + TEST_c_c (casin, 1.0L, -0x1.fp-129L, 1.570796326794896619177965338869929107115L, -5.335635276982233498398987585285818977933e-20L); + TEST_c_c (casin, -1.0L, -0x1.fp-129L, -1.570796326794896619177965338869929107115L, -5.335635276982233498398987585285818977933e-20L); +#ifndef TEST_FLOAT + TEST_c_c (casin, 0x1.fp-1000L, 1.0L, 1.278589251976747242280879285935084814093e-301L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casin, 0x1.fp-1000L, -1.0L, 1.278589251976747242280879285935084814093e-301L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casin, -0x1.fp-1000L, 1.0L, -1.278589251976747242280879285935084814093e-301L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casin, -0x1.fp-1000L, -1.0L, -1.278589251976747242280879285935084814093e-301L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casin, 1.0L, 0x1.fp-1000L, 1.570796326794896619231321691639751442099L, 4.252291453851660175550490409247739011867e-151L); + TEST_c_c (casin, -1.0L, 0x1.fp-1000L, -1.570796326794896619231321691639751442099L, 4.252291453851660175550490409247739011867e-151L); + TEST_c_c (casin, 1.0L, -0x1.fp-1000L, 1.570796326794896619231321691639751442099L, -4.252291453851660175550490409247739011867e-151L); + TEST_c_c (casin, -1.0L, -0x1.fp-1000L, -1.570796326794896619231321691639751442099L, -4.252291453851660175550490409247739011867e-151L); + TEST_c_c (casin, 0x1.fp-1025L, 1.0L, 3.810492908885321743133304375216617626230e-309L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casin, 0x1.fp-1025L, -1.0L, 3.810492908885321743133304375216617626230e-309L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casin, -0x1.fp-1025L, 1.0L, -3.810492908885321743133304375216617626230e-309L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casin, -0x1.fp-1025L, -1.0L, -3.810492908885321743133304375216617626230e-309L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casin, 1.0L, 0x1.fp-1025L, 1.570796326794896619231321691639751442099L, 7.340879205566679497036857179189356754017e-155L); + TEST_c_c (casin, -1.0L, 0x1.fp-1025L, -1.570796326794896619231321691639751442099L, 7.340879205566679497036857179189356754017e-155L); + TEST_c_c (casin, 1.0L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -7.340879205566679497036857179189356754017e-155L); + TEST_c_c (casin, -1.0L, -0x1.fp-1025L, -1.570796326794896619231321691639751442099L, -7.340879205566679497036857179189356754017e-155L); +#endif +#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381 + TEST_c_c (casin, 0x1.fp-10000L, 1.0L, 6.867047849047171855399183659351043150871e-3011L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, 0x1.fp-10000L, -1.0L, 6.867047849047171855399183659351043150871e-3011L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, -0x1.fp-10000L, 1.0L, -6.867047849047171855399183659351043150871e-3011L, 8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, -0x1.fp-10000L, -1.0L, -6.867047849047171855399183659351043150871e-3011L, -8.813735870195430252326093249797923090282e-1L); + TEST_c_c (casin, 1.0L, 0x1.fp-10000L, 1.570796326794896619231321691639751442099L, 9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (casin, -1.0L, 0x1.fp-10000L, -1.570796326794896619231321691639751442099L, 9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (casin, 1.0L, -0x1.fp-10000L, 1.570796326794896619231321691639751442099L, -9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (casin, -1.0L, -0x1.fp-10000L, -1.570796326794896619231321691639751442099L, -9.854680208706673586644342922051388714633e-1506L); + TEST_c_c (casin, 0x1.fp-16385L, 1.0L, 5.757683115456107044131264955348448954458e-4933L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION); + TEST_c_c (casin, 0x1.fp-16385L, -1.0L, 5.757683115456107044131264955348448954458e-4933L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION); + TEST_c_c (casin, -0x1.fp-16385L, 1.0L, -5.757683115456107044131264955348448954458e-4933L, 8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION); + TEST_c_c (casin, -0x1.fp-16385L, -1.0L, -5.757683115456107044131264955348448954458e-4933L, -8.813735870195430252326093249797923090282e-1L, UNDERFLOW_EXCEPTION); + TEST_c_c (casin, 1.0L, 0x1.fp-16385L, 1.570796326794896619231321691639751442099L, 9.023632056840860275214893047597614177639e-2467L); + TEST_c_c (casin, -1.0L, 0x1.fp-16385L, -1.570796326794896619231321691639751442099L, 9.023632056840860275214893047597614177639e-2467L); + TEST_c_c (casin, 1.0L, -0x1.fp-16385L, 1.570796326794896619231321691639751442099L, -9.023632056840860275214893047597614177639e-2467L); + TEST_c_c (casin, -1.0L, -0x1.fp-16385L, -1.570796326794896619231321691639751442099L, -9.023632056840860275214893047597614177639e-2467L); +#endif + + TEST_c_c (casin, 0x1p-23L, 0x1.000002p0L, 8.429369199749229560964789467980644296420e-8L, 8.813736713132400470205730751186547909968e-1L) + TEST_c_c (casin, 0x1p-23L, -0x1.000002p0L, 8.429369199749229560964789467980644296420e-8L, -8.813736713132400470205730751186547909968e-1L) + TEST_c_c (casin, -0x1p-23L, 0x1.000002p0L, -8.429369199749229560964789467980644296420e-8L, 8.813736713132400470205730751186547909968e-1L) + TEST_c_c (casin, -0x1p-23L, -0x1.000002p0L, -8.429369199749229560964789467980644296420e-8L, -8.813736713132400470205730751186547909968e-1L) + TEST_c_c (casin, 0x1.000002p0L, 0x1p-23L, 1.570574114956455764594481054234834678422L, 5.364668491573609633134147164031476452679e-4L) + TEST_c_c (casin, -0x1.000002p0L, 0x1p-23L, -1.570574114956455764594481054234834678422L, 5.364668491573609633134147164031476452679e-4L) + TEST_c_c (casin, 0x1.000002p0L, -0x1p-23L, 1.570574114956455764594481054234834678422L, -5.364668491573609633134147164031476452679e-4L) + TEST_c_c (casin, -0x1.000002p0L, -0x1p-23L, -1.570574114956455764594481054234834678422L, -5.364668491573609633134147164031476452679e-4L) + TEST_c_c (casin, 0x1.fp-129L, 0x1.000002p0L, 2.013062444707472738895109955455676357057e-39L, 8.813736713132375348727889167749389235161e-1L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casin, 0x1.fp-129L, -0x1.000002p0L, 2.013062444707472738895109955455676357057e-39L, -8.813736713132375348727889167749389235161e-1L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casin, -0x1.fp-129L, 0x1.000002p0L, -2.013062444707472738895109955455676357057e-39L, 8.813736713132375348727889167749389235161e-1L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casin, -0x1.fp-129L, -0x1.000002p0L, -2.013062444707472738895109955455676357057e-39L, -8.813736713132375348727889167749389235161e-1L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casin, 0x1.000002p0L, 0x1.fp-129L, 1.570796326794896619231321691639751436268L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, -0x1.000002p0L, 0x1.fp-129L, -1.570796326794896619231321691639751436268L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, 0x1.000002p0L, -0x1.fp-129L, 1.570796326794896619231321691639751436268L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, -0x1.000002p0L, -0x1.fp-129L, -1.570796326794896619231321691639751436268L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, 0.0L, 0x1.000002p0L, 0.0L, 8.813736713132375348727889167749389235161e-1L) + TEST_c_c (casin, 0.0L, -0x1.000002p0L, 0.0L, -8.813736713132375348727889167749389235161e-1L) + TEST_c_c (casin, -0.0L, 0x1.000002p0L, -0.0L, 8.813736713132375348727889167749389235161e-1L) + TEST_c_c (casin, -0.0L, -0x1.000002p0L, -0.0L, -8.813736713132375348727889167749389235161e-1L) + TEST_c_c (casin, 0x1.000002p0L, 0.0L, 1.570796326794896619231321691639751442099L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, -0x1.000002p0L, 0.0L, -1.570796326794896619231321691639751442099L, 4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, 0x1.000002p0L, -0.0L, 1.570796326794896619231321691639751442099L, -4.882812451493617206486388134172712975070e-4L) + TEST_c_c (casin, -0x1.000002p0L, -0.0L, -1.570796326794896619231321691639751442099L, -4.882812451493617206486388134172712975070e-4L) +#ifndef TEST_FLOAT + TEST_c_c (casin, 0x1p-52L, 0x1.0000000000001p0L, 1.570092458683774885078102529858632363236e-16L, 8.813735870195431822418551933572982483664e-1L) + TEST_c_c (casin, 0x1p-52L, -0x1.0000000000001p0L, 1.570092458683774885078102529858632363236e-16L, -8.813735870195431822418551933572982483664e-1L) + TEST_c_c (casin, -0x1p-52L, 0x1.0000000000001p0L, -1.570092458683774885078102529858632363236e-16L, 8.813735870195431822418551933572982483664e-1L) + TEST_c_c (casin, -0x1p-52L, -0x1.0000000000001p0L, -1.570092458683774885078102529858632363236e-16L, -8.813735870195431822418551933572982483664e-1L) + TEST_c_c (casin, 0x1.0000000000001p0L, 0x1p-52L, 1.570796317204594913251280305810847349436L, 2.315303644582684770975188768022139415020e-8L) + TEST_c_c (casin, -0x1.0000000000001p0L, 0x1p-52L, -1.570796317204594913251280305810847349436L, 2.315303644582684770975188768022139415020e-8L) + TEST_c_c (casin, 0x1.0000000000001p0L, -0x1p-52L, 1.570796317204594913251280305810847349436L, -2.315303644582684770975188768022139415020e-8L) + TEST_c_c (casin, -0x1.0000000000001p0L, -0x1p-52L, -1.570796317204594913251280305810847349436L, -2.315303644582684770975188768022139415020e-8L) + TEST_c_c (casin, 0x1.fp-1025L, 0x1.0000000000001p0L, 3.810492908885321320083608113679347200012e-309L, 8.813735870195431822418551933572895326024e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, 0x1.fp-1025L, -0x1.0000000000001p0L, 3.810492908885321320083608113679347200012e-309L, -8.813735870195431822418551933572895326024e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, -0x1.fp-1025L, 0x1.0000000000001p0L, -3.810492908885321320083608113679347200012e-309L, 8.813735870195431822418551933572895326024e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, -0x1.fp-1025L, -0x1.0000000000001p0L, -3.810492908885321320083608113679347200012e-309L, -8.813735870195431822418551933572895326024e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, 0x1.0000000000001p0L, 0x1.fp-1025L, 1.570796326794896619231321691639751442099L, 2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, -0x1.0000000000001p0L, 0x1.fp-1025L, -1.570796326794896619231321691639751442099L, 2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, 0x1.0000000000001p0L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, -0x1.0000000000001p0L, -0x1.fp-1025L, -1.570796326794896619231321691639751442099L, -2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, 0.0L, 0x1.0000000000001p0L, 0.0L, 8.813735870195431822418551933572895326024e-1L) + TEST_c_c (casin, 0.0L, -0x1.0000000000001p0L, 0.0L, -8.813735870195431822418551933572895326024e-1L) + TEST_c_c (casin, -0.0L, 0x1.0000000000001p0L, -0.0L, 8.813735870195431822418551933572895326024e-1L) + TEST_c_c (casin, -0.0L, -0x1.0000000000001p0L, -0.0L, -8.813735870195431822418551933572895326024e-1L) + TEST_c_c (casin, 0x1.0000000000001p0L, 0.0L, 1.570796326794896619231321691639751442099L, 2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, -0x1.0000000000001p0L, 0.0L, -1.570796326794896619231321691639751442099L, 2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, 0x1.0000000000001p0L, -0.0L, 1.570796326794896619231321691639751442099L, -2.107342425544701550354780375182800088393e-8L) + TEST_c_c (casin, -0x1.0000000000001p0L, -0.0L, -1.570796326794896619231321691639751442099L, -2.107342425544701550354780375182800088393e-8L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64 + TEST_c_c (casin, 0x1p-63L, 0x1.0000000000000002p0L, 7.666467083416870406778649849746878368519e-20L, 8.813735870195430253092739958139610131001e-1L) + TEST_c_c (casin, 0x1p-63L, -0x1.0000000000000002p0L, 7.666467083416870406778649849746878368519e-20L, -8.813735870195430253092739958139610131001e-1L) + TEST_c_c (casin, -0x1p-63L, 0x1.0000000000000002p0L, -7.666467083416870406778649849746878368519e-20L, 8.813735870195430253092739958139610131001e-1L) + TEST_c_c (casin, -0x1p-63L, -0x1.0000000000000002p0L, -7.666467083416870406778649849746878368519e-20L, -8.813735870195430253092739958139610131001e-1L) + TEST_c_c (casin, 0x1.0000000000000002p0L, 0x1p-63L, 1.570796326582978888921215348380499122131L, 5.116146586219826555037807251857670783420e-10L) + TEST_c_c (casin, -0x1.0000000000000002p0L, 0x1p-63L, -1.570796326582978888921215348380499122131L, 5.116146586219826555037807251857670783420e-10L) + TEST_c_c (casin, 0x1.0000000000000002p0L, -0x1p-63L, 1.570796326582978888921215348380499122131L, -5.116146586219826555037807251857670783420e-10L) + TEST_c_c (casin, -0x1.0000000000000002p0L, -0x1p-63L, -1.570796326582978888921215348380499122131L, -5.116146586219826555037807251857670783420e-10L) +# if LDBL_MIN_EXP <= -16381 + TEST_c_c (casin, 0x1.fp-16385L, 0x1.0000000000000002p0L, 5.757683115456107043819140328235418018963e-4933L, 8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, 0x1.fp-16385L, -0x1.0000000000000002p0L, 5.757683115456107043819140328235418018963e-4933L, -8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, -0x1.fp-16385L, 0x1.0000000000000002p0L, -5.757683115456107043819140328235418018963e-4933L, 8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, -0x1.fp-16385L, -0x1.0000000000000002p0L, -5.757683115456107043819140328235418018963e-4933L, -8.813735870195430253092739958139610130980e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, 0x1.0000000000000002p0L, 0x1.fp-16385L, 1.570796326794896619231321691639751442099L, 4.656612873077392578082927418388212703712e-10L) + TEST_c_c (casin, -0x1.0000000000000002p0L, 0x1.fp-16385L, -1.570796326794896619231321691639751442099L, 4.656612873077392578082927418388212703712e-10L) + TEST_c_c (casin, 0x1.0000000000000002p0L, -0x1.fp-16385L, 1.570796326794896619231321691639751442099L, -4.656612873077392578082927418388212703712e-10L) + TEST_c_c (casin, -0x1.0000000000000002p0L, -0x1.fp-16385L, -1.570796326794896619231321691639751442099L, -4.656612873077392578082927418388212703712e-10L) +# endif + TEST_c_c (casin, 0.0L, 0x1.0000000000000002p0L, 0.0L, 8.813735870195430253092739958139610130980e-1L) + TEST_c_c (casin, 0.0L, -0x1.0000000000000002p0L, 0.0L, -8.813735870195430253092739958139610130980e-1L) + TEST_c_c (casin, -0.0L, 0x1.0000000000000002p0L, -0.0L, 8.813735870195430253092739958139610130980e-1L) + TEST_c_c (casin, -0.0L, -0x1.0000000000000002p0L, -0.0L, -8.813735870195430253092739958139610130980e-1L) + TEST_c_c (casin, 0x1.0000000000000002p0L, 0.0L, 1.570796326794896619231321691639751442099L, 4.656612873077392578082927418388212703712e-10L) + TEST_c_c (casin, -0x1.0000000000000002p0L, 0.0L, -1.570796326794896619231321691639751442099L, 4.656612873077392578082927418388212703712e-10L) + TEST_c_c (casin, 0x1.0000000000000002p0L, -0.0L, 1.570796326794896619231321691639751442099L, -4.656612873077392578082927418388212703712e-10L) + TEST_c_c (casin, -0x1.0000000000000002p0L, -0.0L, -1.570796326794896619231321691639751442099L, -4.656612873077392578082927418388212703712e-10L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106 + TEST_c_c (casin, 0x1p-106L, 0x1.000000000000000000000000008p0L, 8.715763992105246878957416200936726072500e-33L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, 0x1p-106L, -0x1.000000000000000000000000008p0L, 8.715763992105246878957416200936726072500e-33L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, -0x1p-106L, 0x1.000000000000000000000000008p0L, -8.715763992105246878957416200936726072500e-33L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, -0x1p-106L, -0x1.000000000000000000000000008p0L, -8.715763992105246878957416200936726072500e-33L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, 0x1.000000000000000000000000008p0L, 0x1p-106L, 1.570796326794896565289107467733682961928L, 2.285028863093221674154232933662774454211e-16L) + TEST_c_c (casin, -0x1.000000000000000000000000008p0L, 0x1p-106L, -1.570796326794896565289107467733682961928L, 2.285028863093221674154232933662774454211e-16L) + TEST_c_c (casin, 0x1.000000000000000000000000008p0L, -0x1p-106L, 1.570796326794896565289107467733682961928L, -2.285028863093221674154232933662774454211e-16L) + TEST_c_c (casin, -0x1.000000000000000000000000008p0L, -0x1p-106L, -1.570796326794896565289107467733682961928L, -2.285028863093221674154232933662774454211e-16L) + TEST_c_c (casin, 0x1.fp-1025L, 0x1.000000000000000000000000008p0L, 3.810492908885321743133304375216570658278e-309L, 8.813735870195430252326093249798097405561e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, 0x1.fp-1025L, -0x1.000000000000000000000000008p0L, 3.810492908885321743133304375216570658278e-309L, -8.813735870195430252326093249798097405561e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, -0x1.fp-1025L, 0x1.000000000000000000000000008p0L, -3.810492908885321743133304375216570658278e-309L, 8.813735870195430252326093249798097405561e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, -0x1.fp-1025L, -0x1.000000000000000000000000008p0L, -3.810492908885321743133304375216570658278e-309L, -8.813735870195430252326093249798097405561e-1L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casin, 0x1.000000000000000000000000008p0L, 0x1.fp-1025L, 1.570796326794896619231321691639751442099L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, -0x1.000000000000000000000000008p0L, 0x1.fp-1025L, -1.570796326794896619231321691639751442099L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, 0x1.000000000000000000000000008p0L, -0x1.fp-1025L, 1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, -0x1.000000000000000000000000008p0L, -0x1.fp-1025L, -1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, 0.0L, 0x1.000000000000000000000000008p0L, 0.0L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, 0.0L, -0x1.000000000000000000000000008p0L, 0.0L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, -0.0L, 0x1.000000000000000000000000008p0L, -0.0L, 8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, -0.0L, -0x1.000000000000000000000000008p0L, -0.0L, -8.813735870195430252326093249798097405561e-1L) + TEST_c_c (casin, 0x1.000000000000000000000000008p0L, 0.0L, 1.570796326794896619231321691639751442099L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, -0x1.000000000000000000000000008p0L, 0.0L, -1.570796326794896619231321691639751442099L, 2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, 0x1.000000000000000000000000008p0L, -0.0L, 1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181636063482e-16L) + TEST_c_c (casin, -0x1.000000000000000000000000008p0L, -0.0L, -1.570796326794896619231321691639751442099L, -2.220446049250313080847263336181636063482e-16L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113 + TEST_c_c (casin, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 6.809190618832224124185481406981900518193e-35L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 6.809190618832224124185481406981900518193e-35L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, -0x1p-113L, 0x1.0000000000000000000000000001p0L, -6.809190618832224124185481406981900518193e-35L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, -0x1p-113L, -0x1.0000000000000000000000000001p0L, -6.809190618832224124185481406981900518193e-35L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, 0x1.0000000000000000000000000001p0L, 0x1p-113L, 1.570796326794896614463458507897073960405L, 2.019699255375255198156433710951064632386e-17L) + TEST_c_c (casin, -0x1.0000000000000000000000000001p0L, 0x1p-113L, -1.570796326794896614463458507897073960405L, 2.019699255375255198156433710951064632386e-17L) + TEST_c_c (casin, 0x1.0000000000000000000000000001p0L, -0x1p-113L, 1.570796326794896614463458507897073960405L, -2.019699255375255198156433710951064632386e-17L) + TEST_c_c (casin, -0x1.0000000000000000000000000001p0L, -0x1p-113L, -1.570796326794896614463458507897073960405L, -2.019699255375255198156433710951064632386e-17L) + TEST_c_c (casin, 0x1.fp-16385L, 0x1.0000000000000000000000000001p0L, 5.757683115456107044131264955348448400014e-4933L, 8.813735870195430252326093249797924452120e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, 0x1.fp-16385L, -0x1.0000000000000000000000000001p0L, 5.757683115456107044131264955348448400014e-4933L, -8.813735870195430252326093249797924452120e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, -0x1.fp-16385L, 0x1.0000000000000000000000000001p0L, -5.757683115456107044131264955348448400014e-4933L, 8.813735870195430252326093249797924452120e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, -0x1.fp-16385L, -0x1.0000000000000000000000000001p0L, -5.757683115456107044131264955348448400014e-4933L, -8.813735870195430252326093249797924452120e-1L, UNDERFLOW_EXCEPTION) + TEST_c_c (casin, 0x1.0000000000000000000000000001p0L, 0x1.fp-16385L, 1.570796326794896619231321691639751442099L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, -0x1.0000000000000000000000000001p0L, 0x1.fp-16385L, -1.570796326794896619231321691639751442099L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, 0x1.0000000000000000000000000001p0L, -0x1.fp-16385L, 1.570796326794896619231321691639751442099L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, -0x1.0000000000000000000000000001p0L, -0x1.fp-16385L, -1.570796326794896619231321691639751442099L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, 0.0L, 0x1.0000000000000000000000000001p0L, 0.0L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, 0.0L, -0x1.0000000000000000000000000001p0L, 0.0L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, -0.0L, 0x1.0000000000000000000000000001p0L, -0.0L, 8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, -0.0L, -0x1.0000000000000000000000000001p0L, -0.0L, -8.813735870195430252326093249797924452120e-1L) + TEST_c_c (casin, 0x1.0000000000000000000000000001p0L, 0.0L, 1.570796326794896619231321691639751442099L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, -0x1.0000000000000000000000000001p0L, 0.0L, -1.570796326794896619231321691639751442099L, 1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, 0x1.0000000000000000000000000001p0L, -0.0L, 1.570796326794896619231321691639751442099L, -1.962615573354718824241727964954454332780e-17L) + TEST_c_c (casin, -0x1.0000000000000000000000000001p0L, -0.0L, -1.570796326794896619231321691639751442099L, -1.962615573354718824241727964954454332780e-17L) +#endif + TEST_c_c (casin, 0.75L, 1.25L, 0.453276177638793913448921196101971749L, 1.13239363160530819522266333696834467L); TEST_c_c (casin, -2, -3, -0.57065278432109940071028387968566963L, -1.9833870299165354323470769028940395L); @@ -1877,22 +2310,22 @@ casinh_test (void) TEST_c_c (casinh, plus_infty, 0.5, plus_infty, 0.0); TEST_c_c (casinh, plus_infty, -0.5, plus_infty, minus_zero); - TEST_c_c (casinh, plus_infty, nan_value, plus_infty, nan_value); - TEST_c_c (casinh, minus_infty, nan_value, minus_infty, nan_value); + TEST_c_c (casinh, plus_infty, qnan_value, plus_infty, qnan_value); + TEST_c_c (casinh, minus_infty, qnan_value, minus_infty, qnan_value); - TEST_c_c (casinh, nan_value, 0, nan_value, 0.0); - TEST_c_c (casinh, nan_value, minus_zero, nan_value, minus_zero); + TEST_c_c (casinh, qnan_value, 0, qnan_value, 0.0); + TEST_c_c (casinh, qnan_value, minus_zero, qnan_value, minus_zero); - TEST_c_c (casinh, nan_value, plus_infty, plus_infty, nan_value, IGNORE_ZERO_INF_SIGN); - TEST_c_c (casinh, nan_value, minus_infty, plus_infty, nan_value, IGNORE_ZERO_INF_SIGN); + TEST_c_c (casinh, qnan_value, plus_infty, plus_infty, qnan_value, IGNORE_ZERO_INF_SIGN); + TEST_c_c (casinh, qnan_value, minus_infty, plus_infty, qnan_value, IGNORE_ZERO_INF_SIGN); - TEST_c_c (casinh, 10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casinh, -10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casinh, 10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casinh, -10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casinh, nan_value, 0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casinh, -0.75, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casinh, qnan_value, 0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (casinh, -0.75, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (casinh, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (casinh, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (casinh, plus_zero, -1.5L, 0.9624236501192068949955178268487368462704L, -M_PI_2l); TEST_c_c (casinh, minus_zero, -1.5L, -0.9624236501192068949955178268487368462704L, -M_PI_2l); @@ -1986,6 +2419,222 @@ casinh_test (void) TEST_c_c (casinh, -1.5L, -0x1.fp-16385L, -1.194763217287109304111930828519090523536L, -4.516698239814521372306784062043266700598e-4933L, UNDERFLOW_EXCEPTION); #endif + TEST_c_c (casinh, 0.5L, 1.0L, 7.328576759736452608886724437653071523305e-1L, 8.959074812088902390666567243275770102229e-1L); + TEST_c_c (casinh, 0.5L, -1.0L, 7.328576759736452608886724437653071523305e-1L, -8.959074812088902390666567243275770102229e-1L); + TEST_c_c (casinh, -0.5L, 1.0L, -7.328576759736452608886724437653071523305e-1L, 8.959074812088902390666567243275770102229e-1L); + TEST_c_c (casinh, -0.5L, -1.0L, -7.328576759736452608886724437653071523305e-1L, -8.959074812088902390666567243275770102229e-1L); + TEST_c_c (casinh, 1.0L, 0.5L, 9.261330313501824245501244453057873152694e-1L, 3.494390628572132936274118260753699527325e-1L); + TEST_c_c (casinh, -1.0L, 0.5L, -9.261330313501824245501244453057873152694e-1L, 3.494390628572132936274118260753699527325e-1L); + TEST_c_c (casinh, 1.0L, -0.5L, 9.261330313501824245501244453057873152694e-1L, -3.494390628572132936274118260753699527325e-1L); + TEST_c_c (casinh, -1.0L, -0.5L, -9.261330313501824245501244453057873152694e-1L, -3.494390628572132936274118260753699527325e-1L); + TEST_c_c (casinh, 0.25L, 1.0L, 5.097911466811016354623559941115413499164e-1L, 1.081751996523816326311037318425097434186L); + TEST_c_c (casinh, 0.25L, -1.0L, 5.097911466811016354623559941115413499164e-1L, -1.081751996523816326311037318425097434186L); + TEST_c_c (casinh, -0.25L, 1.0L, -5.097911466811016354623559941115413499164e-1L, 1.081751996523816326311037318425097434186L); + TEST_c_c (casinh, -0.25L, -1.0L, -5.097911466811016354623559941115413499164e-1L, -1.081751996523816326311037318425097434186L); + TEST_c_c (casinh, 1.0L, 0.25L, 8.924633639033482359562124741744951972772e-1L, 1.763024327769669304186785666360901026468e-1L); + TEST_c_c (casinh, -1.0L, 0.25L, -8.924633639033482359562124741744951972772e-1L, 1.763024327769669304186785666360901026468e-1L); + TEST_c_c (casinh, 1.0L, -0.25L, 8.924633639033482359562124741744951972772e-1L, -1.763024327769669304186785666360901026468e-1L); + TEST_c_c (casinh, -1.0L, -0.25L, -8.924633639033482359562124741744951972772e-1L, -1.763024327769669304186785666360901026468e-1L); + TEST_c_c (casinh, 0x1.fp-10L, 1.0L, 4.350501469856803800217957402220976497152e-2L, 1.527305029163877791518741192097931722508L); + TEST_c_c (casinh, 0x1.fp-10L, -1.0L, 4.350501469856803800217957402220976497152e-2L, -1.527305029163877791518741192097931722508L); + TEST_c_c (casinh, -0x1.fp-10L, 1.0L, -4.350501469856803800217957402220976497152e-2L, 1.527305029163877791518741192097931722508L); + TEST_c_c (casinh, -0x1.fp-10L, -1.0L, -4.350501469856803800217957402220976497152e-2L, -1.527305029163877791518741192097931722508L); + TEST_c_c (casinh, 1.0L, 0x1.fp-10L, 8.813742198809567991336704287826445879025e-1L, 1.337909359557740912558349531052239112857e-3L); + TEST_c_c (casinh, -1.0L, 0x1.fp-10L, -8.813742198809567991336704287826445879025e-1L, 1.337909359557740912558349531052239112857e-3L); + TEST_c_c (casinh, 1.0L, -0x1.fp-10L, 8.813742198809567991336704287826445879025e-1L, -1.337909359557740912558349531052239112857e-3L); + TEST_c_c (casinh, -1.0L, -0x1.fp-10L, -8.813742198809567991336704287826445879025e-1L, -1.337909359557740912558349531052239112857e-3L); + TEST_c_c (casinh, 0x1.fp-30L, 1.0L, 4.247867098745151888768727039216644758847e-5L, 1.570753848123921942730162693731872690232L); + TEST_c_c (casinh, 0x1.fp-30L, -1.0L, 4.247867098745151888768727039216644758847e-5L, -1.570753848123921942730162693731872690232L); + TEST_c_c (casinh, -0x1.fp-30L, 1.0L, -4.247867098745151888768727039216644758847e-5L, 1.570753848123921942730162693731872690232L); + TEST_c_c (casinh, -0x1.fp-30L, -1.0L, -4.247867098745151888768727039216644758847e-5L, -1.570753848123921942730162693731872690232L); + TEST_c_c (casinh, 1.0L, 0x1.fp-30L, 8.813735870195430258081932989769495326854e-1L, 1.275929984216518540252717485007112529021e-9L); + TEST_c_c (casinh, -1.0L, 0x1.fp-30L, -8.813735870195430258081932989769495326854e-1L, 1.275929984216518540252717485007112529021e-9L); + TEST_c_c (casinh, 1.0L, -0x1.fp-30L, 8.813735870195430258081932989769495326854e-1L, -1.275929984216518540252717485007112529021e-9L); + TEST_c_c (casinh, -1.0L, -0x1.fp-30L, -8.813735870195430258081932989769495326854e-1L, -1.275929984216518540252717485007112529021e-9L); + TEST_c_c (casinh, 0x1.fp-100L, 1.0L, 1.236292038260260888664514866457202186027e-15L, 1.570796326794895382939283431378862777584L); + TEST_c_c (casinh, 0x1.fp-100L, -1.0L, 1.236292038260260888664514866457202186027e-15L, -1.570796326794895382939283431378862777584L); + TEST_c_c (casinh, -0x1.fp-100L, 1.0L, -1.236292038260260888664514866457202186027e-15L, 1.570796326794895382939283431378862777584L); + TEST_c_c (casinh, -0x1.fp-100L, -1.0L, -1.236292038260260888664514866457202186027e-15L, -1.570796326794895382939283431378862777584L); + TEST_c_c (casinh, 1.0L, 0x1.fp-100L, 8.813735870195430252326093249797923090282e-1L, 1.080754735021050612990719608916167354321e-30L); + TEST_c_c (casinh, -1.0L, 0x1.fp-100L, -8.813735870195430252326093249797923090282e-1L, 1.080754735021050612990719608916167354321e-30L); + TEST_c_c (casinh, 1.0L, -0x1.fp-100L, 8.813735870195430252326093249797923090282e-1L, -1.080754735021050612990719608916167354321e-30L); + TEST_c_c (casinh, -1.0L, -0x1.fp-100L, -8.813735870195430252326093249797923090282e-1L, -1.080754735021050612990719608916167354321e-30L); + TEST_c_c (casinh, 0x1.fp-129L, 1.0L, 5.335635276982233498398987585285818977933e-20L, 1.570796326794896619177965338869929107115L); + TEST_c_c (casinh, 0x1.fp-129L, -1.0L, 5.335635276982233498398987585285818977933e-20L, -1.570796326794896619177965338869929107115L); + TEST_c_c (casinh, -0x1.fp-129L, 1.0L, -5.335635276982233498398987585285818977933e-20L, 1.570796326794896619177965338869929107115L); + TEST_c_c (casinh, -0x1.fp-129L, -1.0L, -5.335635276982233498398987585285818977933e-20L, -1.570796326794896619177965338869929107115L); + TEST_c_c (casinh, 1.0L, 0x1.fp-129L, 8.813735870195430252326093249797923090282e-1L, 2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casinh, -1.0L, 0x1.fp-129L, -8.813735870195430252326093249797923090282e-1L, 2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casinh, 1.0L, -0x1.fp-129L, 8.813735870195430252326093249797923090282e-1L, -2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT); + TEST_c_c (casinh, -1.0L, -0x1.fp-129L, -8.813735870195430252326093249797923090282e-1L, -2.013062564695348242280482517399205554874e-39L, UNDERFLOW_EXCEPTION_FLOAT); +#ifndef TEST_FLOAT + TEST_c_c (casinh, 0x1.fp-1000L, 1.0L, 4.252291453851660175550490409247739011867e-151L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 0x1.fp-1000L, -1.0L, 4.252291453851660175550490409247739011867e-151L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-1000L, 1.0L, -4.252291453851660175550490409247739011867e-151L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-1000L, -1.0L, -4.252291453851660175550490409247739011867e-151L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 1.0L, 0x1.fp-1000L, 8.813735870195430252326093249797923090282e-1L, 1.278589251976747242280879285935084814093e-301L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casinh, -1.0L, 0x1.fp-1000L, -8.813735870195430252326093249797923090282e-1L, 1.278589251976747242280879285935084814093e-301L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casinh, 1.0L, -0x1.fp-1000L, 8.813735870195430252326093249797923090282e-1L, -1.278589251976747242280879285935084814093e-301L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casinh, -1.0L, -0x1.fp-1000L, -8.813735870195430252326093249797923090282e-1L, -1.278589251976747242280879285935084814093e-301L, UNDERFLOW_EXCEPTION_LDOUBLE_IBM); + TEST_c_c (casinh, 0x1.fp-1025L, 1.0L, 7.340879205566679497036857179189356754017e-155L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 0x1.fp-1025L, -1.0L, 7.340879205566679497036857179189356754017e-155L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-1025L, 1.0L, -7.340879205566679497036857179189356754017e-155L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-1025L, -1.0L, -7.340879205566679497036857179189356754017e-155L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 1.0L, 0x1.fp-1025L, 8.813735870195430252326093249797923090282e-1L, 3.810492908885321743133304375216617626230e-309L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casinh, -1.0L, 0x1.fp-1025L, -8.813735870195430252326093249797923090282e-1L, 3.810492908885321743133304375216617626230e-309L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casinh, 1.0L, -0x1.fp-1025L, 8.813735870195430252326093249797923090282e-1L, -3.810492908885321743133304375216617626230e-309L, UNDERFLOW_EXCEPTION_DOUBLE); + TEST_c_c (casinh, -1.0L, -0x1.fp-1025L, -8.813735870195430252326093249797923090282e-1L, -3.810492908885321743133304375216617626230e-309L, UNDERFLOW_EXCEPTION_DOUBLE); +#endif +#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381 + TEST_c_c (casinh, 0x1.fp-10000L, 1.0L, 9.854680208706673586644342922051388714633e-1506L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 0x1.fp-10000L, -1.0L, 9.854680208706673586644342922051388714633e-1506L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-10000L, 1.0L, -9.854680208706673586644342922051388714633e-1506L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-10000L, -1.0L, -9.854680208706673586644342922051388714633e-1506L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 1.0L, 0x1.fp-10000L, 8.813735870195430252326093249797923090282e-1L, 6.867047849047171855399183659351043150871e-3011L); + TEST_c_c (casinh, -1.0L, 0x1.fp-10000L, -8.813735870195430252326093249797923090282e-1L, 6.867047849047171855399183659351043150871e-3011L); + TEST_c_c (casinh, 1.0L, -0x1.fp-10000L, 8.813735870195430252326093249797923090282e-1L, -6.867047849047171855399183659351043150871e-3011L); + TEST_c_c (casinh, -1.0L, -0x1.fp-10000L, -8.813735870195430252326093249797923090282e-1L, -6.867047849047171855399183659351043150871e-3011L); + TEST_c_c (casinh, 0x1.fp-16385L, 1.0L, 9.023632056840860275214893047597614177639e-2467L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 0x1.fp-16385L, -1.0L, 9.023632056840860275214893047597614177639e-2467L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-16385L, 1.0L, -9.023632056840860275214893047597614177639e-2467L, 1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, -0x1.fp-16385L, -1.0L, -9.023632056840860275214893047597614177639e-2467L, -1.570796326794896619231321691639751442099L); + TEST_c_c (casinh, 1.0L, 0x1.fp-16385L, 8.813735870195430252326093249797923090282e-1L, 5.757683115456107044131264955348448954458e-4933L, UNDERFLOW_EXCEPTION); + TEST_c_c (casinh, -1.0L, 0x1.fp-16385L, -8.813735870195430252326093249797923090282e-1L, 5.757683115456107044131264955348448954458e-4933L, UNDERFLOW_EXCEPTION); + TEST_c_c (casinh, 1.0L, -0x1.fp-16385L, 8.813735870195430252326093249797923090282e-1L, -5.757683115456107044131264955348448954458e-4933L, UNDERFLOW_EXCEPTION); + TEST_c_c (casinh, -1.0L, -0x1.fp-16385L, -8.813735870195430252326093249797923090282e-1L, -5.757683115456107044131264955348448954458e-4933L, UNDERFLOW_EXCEPTION); +#endif + + TEST_c_c (casinh, 0x1p-23L, 0x1.000002p0L, 5.364668491573609633134147164031476452679e-4L, 1.570574114956455764594481054234834678422L) + TEST_c_c (casinh, 0x1p-23L, -0x1.000002p0L, 5.364668491573609633134147164031476452679e-4L, -1.570574114956455764594481054234834678422L) + TEST_c_c (casinh, -0x1p-23L, 0x1.000002p0L, -5.364668491573609633134147164031476452679e-4L, 1.570574114956455764594481054234834678422L) + TEST_c_c (casinh, -0x1p-23L, -0x1.000002p0L, -5.364668491573609633134147164031476452679e-4L, -1.570574114956455764594481054234834678422L) + TEST_c_c (casinh, 0x1.000002p0L, 0x1p-23L, 8.813736713132400470205730751186547909968e-1L, 8.429369199749229560964789467980644296420e-8L) + TEST_c_c (casinh, -0x1.000002p0L, 0x1p-23L, -8.813736713132400470205730751186547909968e-1L, 8.429369199749229560964789467980644296420e-8L) + TEST_c_c (casinh, 0x1.000002p0L, -0x1p-23L, 8.813736713132400470205730751186547909968e-1L, -8.429369199749229560964789467980644296420e-8L) + TEST_c_c (casinh, -0x1.000002p0L, -0x1p-23L, -8.813736713132400470205730751186547909968e-1L, -8.429369199749229560964789467980644296420e-8L) + TEST_c_c (casinh, 0x1.fp-129L, 0x1.000002p0L, 4.882812451493617206486388134172712975070e-4L, 1.570796326794896619231321691639751436268L) + TEST_c_c (casinh, 0x1.fp-129L, -0x1.000002p0L, 4.882812451493617206486388134172712975070e-4L, -1.570796326794896619231321691639751436268L) + TEST_c_c (casinh, -0x1.fp-129L, 0x1.000002p0L, -4.882812451493617206486388134172712975070e-4L, 1.570796326794896619231321691639751436268L) + TEST_c_c (casinh, -0x1.fp-129L, -0x1.000002p0L, -4.882812451493617206486388134172712975070e-4L, -1.570796326794896619231321691639751436268L) + TEST_c_c (casinh, 0x1.000002p0L, 0x1.fp-129L, 8.813736713132375348727889167749389235161e-1L, 2.013062444707472738895109955455676357057e-39L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casinh, -0x1.000002p0L, 0x1.fp-129L, -8.813736713132375348727889167749389235161e-1L, 2.013062444707472738895109955455676357057e-39L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casinh, 0x1.000002p0L, -0x1.fp-129L, 8.813736713132375348727889167749389235161e-1L, -2.013062444707472738895109955455676357057e-39L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casinh, -0x1.000002p0L, -0x1.fp-129L, -8.813736713132375348727889167749389235161e-1L, -2.013062444707472738895109955455676357057e-39L, UNDERFLOW_EXCEPTION_FLOAT) + TEST_c_c (casinh, 0.0L, 0x1.000002p0L, 4.882812451493617206486388134172712975070e-4L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0.0L, -0x1.000002p0L, 4.882812451493617206486388134172712975070e-4L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, 0x1.000002p0L, -4.882812451493617206486388134172712975070e-4L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, -0x1.000002p0L, -4.882812451493617206486388134172712975070e-4L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.000002p0L, 0.0L, 8.813736713132375348727889167749389235161e-1L, 0.0L) + TEST_c_c (casinh, -0x1.000002p0L, 0.0L, -8.813736713132375348727889167749389235161e-1L, 0.0L) + TEST_c_c (casinh, 0x1.000002p0L, -0.0L, 8.813736713132375348727889167749389235161e-1L, -0.0L) + TEST_c_c (casinh, -0x1.000002p0L, -0.0L, -8.813736713132375348727889167749389235161e-1L, -0.0L) +#ifndef TEST_FLOAT + TEST_c_c (casinh, 0x1p-52L, 0x1.0000000000001p0L, 2.315303644582684770975188768022139415020e-8L, 1.570796317204594913251280305810847349436L) + TEST_c_c (casinh, 0x1p-52L, -0x1.0000000000001p0L, 2.315303644582684770975188768022139415020e-8L, -1.570796317204594913251280305810847349436L) + TEST_c_c (casinh, -0x1p-52L, 0x1.0000000000001p0L, -2.315303644582684770975188768022139415020e-8L, 1.570796317204594913251280305810847349436L) + TEST_c_c (casinh, -0x1p-52L, -0x1.0000000000001p0L, -2.315303644582684770975188768022139415020e-8L, -1.570796317204594913251280305810847349436L) + TEST_c_c (casinh, 0x1.0000000000001p0L, 0x1p-52L, 8.813735870195431822418551933572982483664e-1L, 1.570092458683774885078102529858632363236e-16L) + TEST_c_c (casinh, -0x1.0000000000001p0L, 0x1p-52L, -8.813735870195431822418551933572982483664e-1L, 1.570092458683774885078102529858632363236e-16L) + TEST_c_c (casinh, 0x1.0000000000001p0L, -0x1p-52L, 8.813735870195431822418551933572982483664e-1L, -1.570092458683774885078102529858632363236e-16L) + TEST_c_c (casinh, -0x1.0000000000001p0L, -0x1p-52L, -8.813735870195431822418551933572982483664e-1L, -1.570092458683774885078102529858632363236e-16L) + TEST_c_c (casinh, 0x1.fp-1025L, 0x1.0000000000001p0L, 2.107342425544701550354780375182800088393e-8L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.fp-1025L, -0x1.0000000000001p0L, 2.107342425544701550354780375182800088393e-8L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-1025L, 0x1.0000000000001p0L, -2.107342425544701550354780375182800088393e-8L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-1025L, -0x1.0000000000001p0L, -2.107342425544701550354780375182800088393e-8L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.0000000000001p0L, 0x1.fp-1025L, 8.813735870195431822418551933572895326024e-1L, 3.810492908885321320083608113679347200012e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, -0x1.0000000000001p0L, 0x1.fp-1025L, -8.813735870195431822418551933572895326024e-1L, 3.810492908885321320083608113679347200012e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, 0x1.0000000000001p0L, -0x1.fp-1025L, 8.813735870195431822418551933572895326024e-1L, -3.810492908885321320083608113679347200012e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, -0x1.0000000000001p0L, -0x1.fp-1025L, -8.813735870195431822418551933572895326024e-1L, -3.810492908885321320083608113679347200012e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, 0.0L, 0x1.0000000000001p0L, 2.107342425544701550354780375182800088393e-8L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0.0L, -0x1.0000000000001p0L, 2.107342425544701550354780375182800088393e-8L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, 0x1.0000000000001p0L, -2.107342425544701550354780375182800088393e-8L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, -0x1.0000000000001p0L, -2.107342425544701550354780375182800088393e-8L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.0000000000001p0L, 0.0L, 8.813735870195431822418551933572895326024e-1L, 0.0L) + TEST_c_c (casinh, -0x1.0000000000001p0L, 0.0L, -8.813735870195431822418551933572895326024e-1L, 0.0L) + TEST_c_c (casinh, 0x1.0000000000001p0L, -0.0L, 8.813735870195431822418551933572895326024e-1L, -0.0L) + TEST_c_c (casinh, -0x1.0000000000001p0L, -0.0L, -8.813735870195431822418551933572895326024e-1L, -0.0L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64 + TEST_c_c (casinh, 0x1p-63L, 0x1.0000000000000002p0L, 5.116146586219826555037807251857670783420e-10L, 1.570796326582978888921215348380499122131L) + TEST_c_c (casinh, 0x1p-63L, -0x1.0000000000000002p0L, 5.116146586219826555037807251857670783420e-10L, -1.570796326582978888921215348380499122131L) + TEST_c_c (casinh, -0x1p-63L, 0x1.0000000000000002p0L, -5.116146586219826555037807251857670783420e-10L, 1.570796326582978888921215348380499122131L) + TEST_c_c (casinh, -0x1p-63L, -0x1.0000000000000002p0L, -5.116146586219826555037807251857670783420e-10L, -1.570796326582978888921215348380499122131L) + TEST_c_c (casinh, 0x1.0000000000000002p0L, 0x1p-63L, 8.813735870195430253092739958139610131001e-1L, 7.666467083416870406778649849746878368519e-20L) + TEST_c_c (casinh, -0x1.0000000000000002p0L, 0x1p-63L, -8.813735870195430253092739958139610131001e-1L, 7.666467083416870406778649849746878368519e-20L) + TEST_c_c (casinh, 0x1.0000000000000002p0L, -0x1p-63L, 8.813735870195430253092739958139610131001e-1L, -7.666467083416870406778649849746878368519e-20L) + TEST_c_c (casinh, -0x1.0000000000000002p0L, -0x1p-63L, -8.813735870195430253092739958139610131001e-1L, -7.666467083416870406778649849746878368519e-20L) +# if LDBL_MIN_EXP <= -16381 + TEST_c_c (casinh, 0x1.fp-16385L, 0x1.0000000000000002p0L, 4.656612873077392578082927418388212703712e-10L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.fp-16385L, -0x1.0000000000000002p0L, 4.656612873077392578082927418388212703712e-10L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-16385L, 0x1.0000000000000002p0L, -4.656612873077392578082927418388212703712e-10L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-16385L, -0x1.0000000000000002p0L, -4.656612873077392578082927418388212703712e-10L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.0000000000000002p0L, 0x1.fp-16385L, 8.813735870195430253092739958139610130980e-1L, 5.757683115456107043819140328235418018963e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, -0x1.0000000000000002p0L, 0x1.fp-16385L, -8.813735870195430253092739958139610130980e-1L, 5.757683115456107043819140328235418018963e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, 0x1.0000000000000002p0L, -0x1.fp-16385L, 8.813735870195430253092739958139610130980e-1L, -5.757683115456107043819140328235418018963e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, -0x1.0000000000000002p0L, -0x1.fp-16385L, -8.813735870195430253092739958139610130980e-1L, -5.757683115456107043819140328235418018963e-4933L, UNDERFLOW_EXCEPTION) +# endif + TEST_c_c (casinh, 0.0L, 0x1.0000000000000002p0L, 4.656612873077392578082927418388212703712e-10L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0.0L, -0x1.0000000000000002p0L, 4.656612873077392578082927418388212703712e-10L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, 0x1.0000000000000002p0L, -4.656612873077392578082927418388212703712e-10L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, -0x1.0000000000000002p0L, -4.656612873077392578082927418388212703712e-10L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.0000000000000002p0L, 0.0L, 8.813735870195430253092739958139610130980e-1L, 0.0L) + TEST_c_c (casinh, -0x1.0000000000000002p0L, 0.0L, -8.813735870195430253092739958139610130980e-1L, 0.0L) + TEST_c_c (casinh, 0x1.0000000000000002p0L, -0.0L, 8.813735870195430253092739958139610130980e-1L, -0.0L) + TEST_c_c (casinh, -0x1.0000000000000002p0L, -0.0L, -8.813735870195430253092739958139610130980e-1L, -0.0L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106 + TEST_c_c (casinh, 0x1p-106L, 0x1.000000000000000000000000008p0L, 2.285028863093221674154232933662774454211e-16L, 1.570796326794896565289107467733682961928L) + TEST_c_c (casinh, 0x1p-106L, -0x1.000000000000000000000000008p0L, 2.285028863093221674154232933662774454211e-16L, -1.570796326794896565289107467733682961928L) + TEST_c_c (casinh, -0x1p-106L, 0x1.000000000000000000000000008p0L, -2.285028863093221674154232933662774454211e-16L, 1.570796326794896565289107467733682961928L) + TEST_c_c (casinh, -0x1p-106L, -0x1.000000000000000000000000008p0L, -2.285028863093221674154232933662774454211e-16L, -1.570796326794896565289107467733682961928L) + TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, 0x1p-106L, 8.813735870195430252326093249798097405561e-1L, 8.715763992105246878957416200936726072500e-33L) + TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, 0x1p-106L, -8.813735870195430252326093249798097405561e-1L, 8.715763992105246878957416200936726072500e-33L) + TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, -0x1p-106L, 8.813735870195430252326093249798097405561e-1L, -8.715763992105246878957416200936726072500e-33L) + TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, -0x1p-106L, -8.813735870195430252326093249798097405561e-1L, -8.715763992105246878957416200936726072500e-33L) + TEST_c_c (casinh, 0x1.fp-1025L, 0x1.000000000000000000000000008p0L, 2.220446049250313080847263336181636063482e-16L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.fp-1025L, -0x1.000000000000000000000000008p0L, 2.220446049250313080847263336181636063482e-16L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-1025L, 0x1.000000000000000000000000008p0L, -2.220446049250313080847263336181636063482e-16L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-1025L, -0x1.000000000000000000000000008p0L, -2.220446049250313080847263336181636063482e-16L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, 0x1.fp-1025L, 8.813735870195430252326093249798097405561e-1L, 3.810492908885321743133304375216570658278e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, 0x1.fp-1025L, -8.813735870195430252326093249798097405561e-1L, 3.810492908885321743133304375216570658278e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, -0x1.fp-1025L, 8.813735870195430252326093249798097405561e-1L, -3.810492908885321743133304375216570658278e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, -0x1.fp-1025L, -8.813735870195430252326093249798097405561e-1L, -3.810492908885321743133304375216570658278e-309L, UNDERFLOW_EXCEPTION_DOUBLE) + TEST_c_c (casinh, 0.0L, 0x1.000000000000000000000000008p0L, 2.220446049250313080847263336181636063482e-16L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0.0L, -0x1.000000000000000000000000008p0L, 2.220446049250313080847263336181636063482e-16L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, 0x1.000000000000000000000000008p0L, -2.220446049250313080847263336181636063482e-16L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, -0x1.000000000000000000000000008p0L, -2.220446049250313080847263336181636063482e-16L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, 0.0L, 8.813735870195430252326093249798097405561e-1L, 0.0L) + TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, 0.0L, -8.813735870195430252326093249798097405561e-1L, 0.0L) + TEST_c_c (casinh, 0x1.000000000000000000000000008p0L, -0.0L, 8.813735870195430252326093249798097405561e-1L, -0.0L) + TEST_c_c (casinh, -0x1.000000000000000000000000008p0L, -0.0L, -8.813735870195430252326093249798097405561e-1L, -0.0L) +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113 + TEST_c_c (casinh, 0x1p-113L, 0x1.0000000000000000000000000001p0L, 2.019699255375255198156433710951064632386e-17L, 1.570796326794896614463458507897073960405L) + TEST_c_c (casinh, 0x1p-113L, -0x1.0000000000000000000000000001p0L, 2.019699255375255198156433710951064632386e-17L, -1.570796326794896614463458507897073960405L) + TEST_c_c (casinh, -0x1p-113L, 0x1.0000000000000000000000000001p0L, -2.019699255375255198156433710951064632386e-17L, 1.570796326794896614463458507897073960405L) + TEST_c_c (casinh, -0x1p-113L, -0x1.0000000000000000000000000001p0L, -2.019699255375255198156433710951064632386e-17L, -1.570796326794896614463458507897073960405L) + TEST_c_c (casinh, 0x1.0000000000000000000000000001p0L, 0x1p-113L, 8.813735870195430252326093249797924452120e-1L, 6.809190618832224124185481406981900518193e-35L) + TEST_c_c (casinh, -0x1.0000000000000000000000000001p0L, 0x1p-113L, -8.813735870195430252326093249797924452120e-1L, 6.809190618832224124185481406981900518193e-35L) + TEST_c_c (casinh, 0x1.0000000000000000000000000001p0L, -0x1p-113L, 8.813735870195430252326093249797924452120e-1L, -6.809190618832224124185481406981900518193e-35L) + TEST_c_c (casinh, -0x1.0000000000000000000000000001p0L, -0x1p-113L, -8.813735870195430252326093249797924452120e-1L, -6.809190618832224124185481406981900518193e-35L) + TEST_c_c (casinh, 0x1.fp-16385L, 0x1.0000000000000000000000000001p0L, 1.962615573354718824241727964954454332780e-17L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.fp-16385L, -0x1.0000000000000000000000000001p0L, 1.962615573354718824241727964954454332780e-17L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-16385L, 0x1.0000000000000000000000000001p0L, -1.962615573354718824241727964954454332780e-17L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0x1.fp-16385L, -0x1.0000000000000000000000000001p0L, -1.962615573354718824241727964954454332780e-17L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.0000000000000000000000000001p0L, 0x1.fp-16385L, 8.813735870195430252326093249797924452120e-1L, 5.757683115456107044131264955348448400014e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, -0x1.0000000000000000000000000001p0L, 0x1.fp-16385L, -8.813735870195430252326093249797924452120e-1L, 5.757683115456107044131264955348448400014e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, 0x1.0000000000000000000000000001p0L, -0x1.fp-16385L, 8.813735870195430252326093249797924452120e-1L, -5.757683115456107044131264955348448400014e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, -0x1.0000000000000000000000000001p0L, -0x1.fp-16385L, -8.813735870195430252326093249797924452120e-1L, -5.757683115456107044131264955348448400014e-4933L, UNDERFLOW_EXCEPTION) + TEST_c_c (casinh, 0.0L, 0x1.0000000000000000000000000001p0L, 1.962615573354718824241727964954454332780e-17L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0.0L, -0x1.0000000000000000000000000001p0L, 1.962615573354718824241727964954454332780e-17L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, 0x1.0000000000000000000000000001p0L, -1.962615573354718824241727964954454332780e-17L, 1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, -0.0L, -0x1.0000000000000000000000000001p0L, -1.962615573354718824241727964954454332780e-17L, -1.570796326794896619231321691639751442099L) + TEST_c_c (casinh, 0x1.0000000000000000000000000001p0L, 0.0L, 8.813735870195430252326093249797924452120e-1L, 0.0L) + TEST_c_c (casinh, -0x1.0000000000000000000000000001p0L, 0.0L, -8.813735870195430252326093249797924452120e-1L, 0.0L) + TEST_c_c (casinh, 0x1.0000000000000000000000000001p0L, -0.0L, 8.813735870195430252326093249797924452120e-1L, -0.0L) + TEST_c_c (casinh, -0x1.0000000000000000000000000001p0L, -0.0L, -8.813735870195430252326093249797924452120e-1L, -0.0L) +#endif + TEST_c_c (casinh, 0.75L, 1.25L, 1.03171853444778027336364058631006594L, 0.911738290968487636358489564316731207L); TEST_c_c (casinh, -2, -3, -1.9686379257930962917886650952454982L, -0.96465850440760279204541105949953237L); @@ -2034,25 +2683,25 @@ catan_test (void) TEST_c_c (catan, 0.5, plus_infty, M_PI_2l, 0); TEST_c_c (catan, -0.5, plus_infty, -M_PI_2l, 0); - TEST_c_c (catan, nan_value, 0.0, nan_value, 0); - TEST_c_c (catan, nan_value, minus_zero, nan_value, minus_zero); + TEST_c_c (catan, qnan_value, 0.0, qnan_value, 0); + TEST_c_c (catan, qnan_value, minus_zero, qnan_value, minus_zero); - TEST_c_c (catan, nan_value, plus_infty, nan_value, 0); - TEST_c_c (catan, nan_value, minus_infty, nan_value, minus_zero); + TEST_c_c (catan, qnan_value, plus_infty, qnan_value, 0); + TEST_c_c (catan, qnan_value, minus_infty, qnan_value, minus_zero); - TEST_c_c (catan, 0.0, nan_value, nan_value, nan_value); - TEST_c_c (catan, minus_zero, nan_value, nan_value, nan_value); + TEST_c_c (catan, 0.0, qnan_value, qnan_value, qnan_value); + TEST_c_c (catan, minus_zero, qnan_value, qnan_value, qnan_value); - TEST_c_c (catan, plus_infty, nan_value, M_PI_2l, 0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (catan, minus_infty, nan_value, -M_PI_2l, 0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (catan, plus_infty, qnan_value, M_PI_2l, 0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (catan, minus_infty, qnan_value, -M_PI_2l, 0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (catan, nan_value, 10.5, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catan, nan_value, -10.5, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catan, qnan_value, 10.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catan, qnan_value, -10.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catan, 0.75, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catan, -0.75, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catan, 0.75, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catan, -0.75, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catan, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (catan, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (catan, 0.75L, 1.25L, 1.10714871779409050301706546017853704L, 0.549306144334054845697622618461262852L); TEST_c_c (catan, -2, -3, -1.4099210495965755225306193844604208L, -0.22907268296853876629588180294200276L); @@ -2100,25 +2749,25 @@ catanh_test (void) TEST_c_c (catanh, plus_infty, 0.5, 0.0, M_PI_2l); TEST_c_c (catanh, plus_infty, -0.5, 0.0, -M_PI_2l); - TEST_c_c (catanh, 0, nan_value, 0.0, nan_value); - TEST_c_c (catanh, minus_zero, nan_value, minus_zero, nan_value); + TEST_c_c (catanh, 0, qnan_value, 0.0, qnan_value); + TEST_c_c (catanh, minus_zero, qnan_value, minus_zero, qnan_value); - TEST_c_c (catanh, plus_infty, nan_value, 0.0, nan_value); - TEST_c_c (catanh, minus_infty, nan_value, minus_zero, nan_value); + TEST_c_c (catanh, plus_infty, qnan_value, 0.0, qnan_value); + TEST_c_c (catanh, minus_infty, qnan_value, minus_zero, qnan_value); - TEST_c_c (catanh, nan_value, 0, nan_value, nan_value); - TEST_c_c (catanh, nan_value, minus_zero, nan_value, nan_value); + TEST_c_c (catanh, qnan_value, 0, qnan_value, qnan_value); + TEST_c_c (catanh, qnan_value, minus_zero, qnan_value, qnan_value); - TEST_c_c (catanh, nan_value, plus_infty, 0.0, M_PI_2l, IGNORE_ZERO_INF_SIGN); - TEST_c_c (catanh, nan_value, minus_infty, 0.0, -M_PI_2l, IGNORE_ZERO_INF_SIGN); + TEST_c_c (catanh, qnan_value, plus_infty, 0.0, M_PI_2l, IGNORE_ZERO_INF_SIGN); + TEST_c_c (catanh, qnan_value, minus_infty, 0.0, -M_PI_2l, IGNORE_ZERO_INF_SIGN); - TEST_c_c (catanh, 10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catanh, -10.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catanh, 10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catanh, -10.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catanh, nan_value, 0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catanh, nan_value, -0.75, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catanh, qnan_value, 0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (catanh, qnan_value, -0.75, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (catanh, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (catanh, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (catanh, 0.75L, 1.25L, 0.261492138795671927078652057366532140L, 0.996825126463918666098902241310446708L); TEST_c_c (catanh, -2, -3, -0.14694666622552975204743278515471595L, -1.3389725222944935611241935759091443L); @@ -2142,7 +2791,7 @@ cbrt_test (void) TEST_f_f (cbrt, plus_infty, plus_infty); TEST_f_f (cbrt, minus_infty, minus_infty); - TEST_f_f (cbrt, nan_value, nan_value); + TEST_f_f (cbrt, qnan_value, qnan_value); TEST_f_f (cbrt, -0.001L, -0.1L); TEST_f_f (cbrt, 8, 2); @@ -2170,50 +2819,50 @@ ccos_test (void) TEST_c_c (ccos, 0.0, minus_zero, 1.0, 0.0); TEST_c_c (ccos, minus_zero, minus_zero, 1.0, minus_zero); - TEST_c_c (ccos, plus_infty, 0.0, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, plus_infty, minus_zero, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, minus_infty, 0.0, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, minus_infty, minus_zero, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, plus_infty, 0.0, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, plus_infty, minus_zero, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, minus_infty, 0.0, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, minus_infty, minus_zero, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); TEST_c_c (ccos, 0.0, plus_infty, plus_infty, minus_zero); TEST_c_c (ccos, 0.0, minus_infty, plus_infty, 0.0); TEST_c_c (ccos, minus_zero, plus_infty, plus_infty, 0.0); TEST_c_c (ccos, minus_zero, minus_infty, plus_infty, minus_zero); - TEST_c_c (ccos, plus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, minus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, plus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, minus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, plus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, minus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, plus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, minus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); TEST_c_c (ccos, 4.625, plus_infty, minus_infty, plus_infty); TEST_c_c (ccos, 4.625, minus_infty, minus_infty, minus_infty); TEST_c_c (ccos, -4.625, plus_infty, minus_infty, minus_infty); TEST_c_c (ccos, -4.625, minus_infty, minus_infty, plus_infty); - TEST_c_c (ccos, plus_infty, 6.75, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, plus_infty, -6.75, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, minus_infty, 6.75, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, minus_infty, -6.75, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, plus_infty, 6.75, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, plus_infty, -6.75, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, minus_infty, 6.75, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccos, minus_infty, -6.75, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (ccos, nan_value, 0.0, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, nan_value, minus_zero, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, qnan_value, 0.0, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, qnan_value, minus_zero, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, nan_value, plus_infty, plus_infty, nan_value); - TEST_c_c (ccos, nan_value, minus_infty, plus_infty, nan_value); + TEST_c_c (ccos, qnan_value, plus_infty, plus_infty, qnan_value); + TEST_c_c (ccos, qnan_value, minus_infty, plus_infty, qnan_value); - TEST_c_c (ccos, nan_value, 9.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccos, nan_value, -9.0, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccos, qnan_value, 9.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccos, qnan_value, -9.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccos, 0.0, nan_value, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, minus_zero, nan_value, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, 0.0, qnan_value, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccos, minus_zero, qnan_value, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccos, 10.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccos, -10.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccos, 10.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccos, -10.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccos, plus_infty, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccos, minus_infty, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccos, plus_infty, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccos, minus_infty, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccos, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (ccos, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (ccos, 0.75L, 1.25L, 1.38173873063425888530729933139078645L, -1.09193013555397466170919531722024128L); TEST_c_c (ccos, -2, -3, -4.18962569096880723013255501961597373L, -9.10922789375533659797919726277886212L); @@ -2269,50 +2918,50 @@ ccosh_test (void) TEST_c_c (ccosh, 0.0, minus_zero, 1.0, minus_zero); TEST_c_c (ccosh, minus_zero, minus_zero, 1.0, 0.0); - TEST_c_c (ccosh, 0.0, plus_infty, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, minus_zero, plus_infty, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, 0.0, minus_infty, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, minus_zero, minus_infty, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, 0.0, plus_infty, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, minus_zero, plus_infty, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, 0.0, minus_infty, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, minus_zero, minus_infty, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); TEST_c_c (ccosh, plus_infty, 0.0, plus_infty, 0.0); TEST_c_c (ccosh, minus_infty, 0.0, plus_infty, minus_zero); TEST_c_c (ccosh, plus_infty, minus_zero, plus_infty, minus_zero); TEST_c_c (ccosh, minus_infty, minus_zero, plus_infty, 0.0); - TEST_c_c (ccosh, plus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, minus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, plus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, minus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, plus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, minus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, plus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, minus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); TEST_c_c (ccosh, plus_infty, 4.625, minus_infty, minus_infty); TEST_c_c (ccosh, minus_infty, 4.625, minus_infty, plus_infty); TEST_c_c (ccosh, plus_infty, -4.625, minus_infty, plus_infty); TEST_c_c (ccosh, minus_infty, -4.625, minus_infty, minus_infty); - TEST_c_c (ccosh, 6.75, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, -6.75, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, 6.75, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, -6.75, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, 6.75, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, -6.75, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, 6.75, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ccosh, -6.75, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (ccosh, 0.0, nan_value, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, minus_zero, nan_value, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, 0.0, qnan_value, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, minus_zero, qnan_value, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, plus_infty, nan_value, plus_infty, nan_value); - TEST_c_c (ccosh, minus_infty, nan_value, plus_infty, nan_value); + TEST_c_c (ccosh, plus_infty, qnan_value, plus_infty, qnan_value); + TEST_c_c (ccosh, minus_infty, qnan_value, plus_infty, qnan_value); - TEST_c_c (ccosh, 9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccosh, -9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccosh, 9.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccosh, -9.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccosh, nan_value, 0.0, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, nan_value, minus_zero, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, qnan_value, 0.0, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ccosh, qnan_value, minus_zero, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ccosh, nan_value, 10.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccosh, nan_value, -10.0, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccosh, qnan_value, 10.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccosh, qnan_value, -10.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccosh, nan_value, plus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccosh, nan_value, minus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccosh, qnan_value, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ccosh, qnan_value, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ccosh, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (ccosh, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (ccosh, 0.75L, 1.25L, 0.408242591877968807788852146397499084L, 0.780365930845853240391326216300863152L); @@ -2362,7 +3011,7 @@ ceil_test (void) TEST_f_f (ceil, minus_zero, minus_zero); TEST_f_f (ceil, plus_infty, plus_infty); TEST_f_f (ceil, minus_infty, minus_infty); - TEST_f_f (ceil, nan_value, nan_value); + TEST_f_f (ceil, qnan_value, qnan_value); TEST_f_f (ceil, M_PIl, 4.0); TEST_f_f (ceil, -M_PIl, -3.0); @@ -2469,40 +3118,40 @@ cexp_test (void) TEST_c_c (cexp, minus_infty, plus_zero, 0.0, 0.0); TEST_c_c (cexp, minus_infty, minus_zero, 0.0, minus_zero); - TEST_c_c (cexp, 0.0, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, minus_zero, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, 0.0, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, minus_zero, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, 0.0, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, minus_zero, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, 0.0, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, minus_zero, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, 100.0, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, -100.0, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, 100.0, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, -100.0, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, 100.0, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (cexp, -100.0, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, 100.0, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (cexp, -100.0, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); TEST_c_c (cexp, minus_infty, 2.0, minus_zero, 0.0); TEST_c_c (cexp, minus_infty, 4.0, minus_zero, minus_zero); TEST_c_c (cexp, plus_infty, 2.0, minus_infty, plus_infty); TEST_c_c (cexp, plus_infty, 4.0, minus_infty, minus_infty); - TEST_c_c (cexp, plus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (cexp, plus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (cexp, plus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (cexp, plus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); TEST_c_c (cexp, minus_infty, plus_infty, 0.0, 0.0, IGNORE_ZERO_INF_SIGN); TEST_c_c (cexp, minus_infty, minus_infty, 0.0, minus_zero, IGNORE_ZERO_INF_SIGN); - TEST_c_c (cexp, minus_infty, nan_value, 0, 0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (cexp, minus_infty, qnan_value, 0, 0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (cexp, plus_infty, nan_value, plus_infty, nan_value); + TEST_c_c (cexp, plus_infty, qnan_value, plus_infty, qnan_value); - TEST_c_c (cexp, nan_value, 0.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cexp, nan_value, 1.0, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cexp, qnan_value, 0.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cexp, qnan_value, 1.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cexp, nan_value, plus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cexp, 0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cexp, 1, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (cexp, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (cexp, qnan_value, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cexp, 0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cexp, 1, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (cexp, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (cexp, 0.75L, 1.25L, 0.667537446429131586942201977015932112L, 2.00900045494094876258347228145863909L); TEST_c_c (cexp, -2.0, -3.0, -0.13398091492954261346140525546115575L, -0.019098516261135196432576240858800925L); @@ -2561,8 +3210,8 @@ cimag_test (void) START (cimag); TEST_c_f (cimag, 1.0, 0.0, 0.0); TEST_c_f (cimag, 1.0, minus_zero, minus_zero); - TEST_c_f (cimag, 1.0, nan_value, nan_value); - TEST_c_f (cimag, nan_value, nan_value, nan_value); + TEST_c_f (cimag, 1.0, qnan_value, qnan_value); + TEST_c_f (cimag, qnan_value, qnan_value, qnan_value); TEST_c_f (cimag, 1.0, plus_infty, plus_infty); TEST_c_f (cimag, 1.0, minus_infty, minus_infty); TEST_c_f (cimag, 2.0, 3.0, 3.0); @@ -2612,23 +3261,23 @@ clog_test (void) TEST_c_c (clog, plus_infty, minus_zero, plus_infty, minus_zero); TEST_c_c (clog, plus_infty, -1, plus_infty, minus_zero); - TEST_c_c (clog, plus_infty, nan_value, plus_infty, nan_value); - TEST_c_c (clog, minus_infty, nan_value, plus_infty, nan_value); + TEST_c_c (clog, plus_infty, qnan_value, plus_infty, qnan_value); + TEST_c_c (clog, minus_infty, qnan_value, plus_infty, qnan_value); - TEST_c_c (clog, nan_value, plus_infty, plus_infty, nan_value); - TEST_c_c (clog, nan_value, minus_infty, plus_infty, nan_value); + TEST_c_c (clog, qnan_value, plus_infty, plus_infty, qnan_value); + TEST_c_c (clog, qnan_value, minus_infty, plus_infty, qnan_value); - TEST_c_c (clog, 0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, 3, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, minus_zero, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, -3, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, 0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, 3, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, minus_zero, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, -3, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, nan_value, 0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, nan_value, 5, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, nan_value, minus_zero, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, nan_value, -5, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, qnan_value, 0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, qnan_value, 5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, qnan_value, minus_zero, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog, qnan_value, -5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (clog, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (clog, 0.75L, 1.25L, 0.376885901188190075998919126749298416L, 1.03037682652431246378774332703115153L); TEST_c_c (clog, -2, -3, 1.2824746787307683680267437207826593L, -2.1587989303424641704769327722648368L); @@ -2832,23 +3481,23 @@ clog10_test (void) TEST_c_c (clog10, plus_infty, minus_zero, plus_infty, minus_zero); TEST_c_c (clog10, plus_infty, -1, plus_infty, minus_zero); - TEST_c_c (clog10, plus_infty, nan_value, plus_infty, nan_value); - TEST_c_c (clog10, minus_infty, nan_value, plus_infty, nan_value); + TEST_c_c (clog10, plus_infty, qnan_value, plus_infty, qnan_value); + TEST_c_c (clog10, minus_infty, qnan_value, plus_infty, qnan_value); - TEST_c_c (clog10, nan_value, plus_infty, plus_infty, nan_value); - TEST_c_c (clog10, nan_value, minus_infty, plus_infty, nan_value); + TEST_c_c (clog10, qnan_value, plus_infty, plus_infty, qnan_value); + TEST_c_c (clog10, qnan_value, minus_infty, plus_infty, qnan_value); - TEST_c_c (clog10, 0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, 3, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, minus_zero, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, -3, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, 0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, 3, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, minus_zero, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, -3, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, nan_value, 0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, nan_value, 5, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, nan_value, minus_zero, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, nan_value, -5, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, qnan_value, 0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, qnan_value, 5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, qnan_value, minus_zero, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (clog10, qnan_value, -5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (clog10, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (clog10, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (clog10, 0.75L, 1.25L, 0.163679467193165171449476605077428975L, 0.447486970040493067069984724340855636L); TEST_c_c (clog10, -2, -3, 0.556971676153418384603252578971164214L, -0.937554462986374708541507952140189646L); @@ -3017,7 +3666,7 @@ conj_test (void) START (conj); TEST_c_c (conj, 0.0, 0.0, 0.0, minus_zero); TEST_c_c (conj, 0.0, minus_zero, 0.0, 0.0); - TEST_c_c (conj, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (conj, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (conj, plus_infty, minus_infty, plus_infty, plus_infty); TEST_c_c (conj, plus_infty, plus_infty, plus_infty, minus_infty); TEST_c_c (conj, 1.0, 2.0, 1.0, -2.0); @@ -3048,10 +3697,10 @@ copysign_test (void) TEST_ff_f (copysign, minus_zero, minus_zero, minus_zero); /* XXX More correctly we would have to check the sign of the NaN. */ - TEST_ff_f (copysign, nan_value, 0, nan_value); - TEST_ff_f (copysign, nan_value, minus_zero, nan_value); - TEST_ff_f (copysign, -nan_value, 0, nan_value); - TEST_ff_f (copysign, -nan_value, minus_zero, nan_value); + TEST_ff_f (copysign, qnan_value, 0, qnan_value); + TEST_ff_f (copysign, qnan_value, minus_zero, qnan_value); + TEST_ff_f (copysign, -qnan_value, 0, qnan_value); + TEST_ff_f (copysign, -qnan_value, minus_zero, qnan_value); END (copysign); } @@ -3071,14 +3720,14 @@ cos_test (void) TEST_f_f (cos, 0, 1); TEST_f_f (cos, minus_zero, 1); errno = 0; - TEST_f_f (cos, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (cos, plus_infty, qnan_value, INVALID_EXCEPTION); check_int ("errno for cos(+inf) == EDOM", errno, EDOM, 0, 0, 0); errno = 0; - TEST_f_f (cos, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (cos, minus_infty, qnan_value, INVALID_EXCEPTION); check_int ("errno for cos(-inf) == EDOM", errno, EDOM, 0, 0, 0); errno = 0; - TEST_f_f (cos, nan_value, nan_value); - check_int ("errno for cos(NaN) unchanged", errno, 0, 0, 0, 0); + TEST_f_f (cos, qnan_value, qnan_value); + check_int ("errno for cos(qNaN) unchanged", errno, 0, 0, 0, 0); TEST_f_f (cos, M_PI_6l * 2.0, 0.5); TEST_f_f (cos, M_PI_6l * 4.0, -0.5); @@ -3268,7 +3917,7 @@ cosh_test (void) TEST_f_f (cosh, plus_infty, plus_infty); TEST_f_f (cosh, minus_infty, plus_infty); #endif - TEST_f_f (cosh, nan_value, nan_value); + TEST_f_f (cosh, qnan_value, qnan_value); TEST_f_f (cosh, 0.75L, 1.29468328467684468784170818539018176L); @@ -3406,7 +4055,7 @@ cpow_test (void) TEST_cc_c (cpow, M_El, 0, 0, 2 * M_PIl, 1.0, 0.0); TEST_cc_c (cpow, 2, 3, 4, 0, -119.0, -120.0); - TEST_cc_c (cpow, nan_value, nan_value, nan_value, nan_value, nan_value, nan_value); + TEST_cc_c (cpow, qnan_value, qnan_value, qnan_value, qnan_value, qnan_value, qnan_value); TEST_cc_c (cpow, 0.75L, 1.25L, 0.75L, 1.25L, 0.117506293914473555420279832210420483L, 0.346552747708338676483025352060418001L); TEST_cc_c (cpow, 0.75L, 1.25L, 1.0L, 1.0L, 0.0846958290317209430433805274189191353L, 0.513285749182902449043287190519090481L); @@ -3426,7 +4075,7 @@ cproj_test (void) TEST_c_c (cproj, 0.0, minus_zero, 0.0, minus_zero); TEST_c_c (cproj, minus_zero, 0.0, minus_zero, 0.0); - TEST_c_c (cproj, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (cproj, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (cproj, plus_infty, plus_infty, plus_infty, 0.0); TEST_c_c (cproj, plus_infty, minus_infty, plus_infty, minus_zero); @@ -3446,8 +4095,8 @@ creal_test (void) START (creal); TEST_c_f (creal, 0.0, 1.0, 0.0); TEST_c_f (creal, minus_zero, 1.0, minus_zero); - TEST_c_f (creal, nan_value, 1.0, nan_value); - TEST_c_f (creal, nan_value, nan_value, nan_value); + TEST_c_f (creal, qnan_value, 1.0, qnan_value); + TEST_c_f (creal, qnan_value, qnan_value, qnan_value); TEST_c_f (creal, plus_infty, 1.0, plus_infty); TEST_c_f (creal, minus_infty, 1.0, minus_infty); TEST_c_f (creal, 2.0, 3.0, 2.0); @@ -3476,45 +4125,45 @@ csin_test (void) TEST_c_c (csin, 0.0, minus_infty, 0.0, minus_infty); TEST_c_c (csin, minus_zero, minus_infty, minus_zero, minus_infty); - TEST_c_c (csin, plus_infty, 0.0, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, minus_infty, 0.0, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, plus_infty, minus_zero, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, minus_infty, minus_zero, nan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, plus_infty, 0.0, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, minus_infty, 0.0, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, plus_infty, minus_zero, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, minus_infty, minus_zero, qnan_value, 0.0, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, plus_infty, plus_infty, nan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, minus_infty, plus_infty, nan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, plus_infty, minus_infty, nan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, minus_infty, minus_infty, nan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, plus_infty, plus_infty, qnan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, minus_infty, plus_infty, qnan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, plus_infty, minus_infty, qnan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, minus_infty, minus_infty, qnan_value, plus_infty, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, plus_infty, 6.75, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (csin, plus_infty, -6.75, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (csin, minus_infty, 6.75, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (csin, minus_infty, -6.75, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (csin, plus_infty, 6.75, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (csin, plus_infty, -6.75, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (csin, minus_infty, 6.75, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (csin, minus_infty, -6.75, qnan_value, qnan_value, INVALID_EXCEPTION); TEST_c_c (csin, 4.625, plus_infty, minus_infty, minus_infty); TEST_c_c (csin, 4.625, minus_infty, minus_infty, plus_infty); TEST_c_c (csin, -4.625, plus_infty, plus_infty, minus_infty); TEST_c_c (csin, -4.625, minus_infty, plus_infty, plus_infty); - TEST_c_c (csin, nan_value, 0.0, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, nan_value, minus_zero, nan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, qnan_value, 0.0, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, qnan_value, minus_zero, qnan_value, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, nan_value, plus_infty, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, nan_value, minus_infty, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, qnan_value, plus_infty, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csin, qnan_value, minus_infty, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csin, nan_value, 9.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csin, nan_value, -9.0, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csin, qnan_value, 9.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csin, qnan_value, -9.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csin, 0.0, nan_value, 0.0, nan_value); - TEST_c_c (csin, minus_zero, nan_value, minus_zero, nan_value); + TEST_c_c (csin, 0.0, qnan_value, 0.0, qnan_value); + TEST_c_c (csin, minus_zero, qnan_value, minus_zero, qnan_value); - TEST_c_c (csin, 10.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csin, nan_value, -10.0, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csin, 10.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csin, qnan_value, -10.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csin, plus_infty, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csin, minus_infty, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csin, plus_infty, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csin, minus_infty, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csin, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (csin, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (csin, 0.75L, 1.25L, 1.28722291002649188575873510790565441L, 1.17210635989270256101081285116138863L); TEST_c_c (csin, -2, -3, -9.15449914691142957346729954460983256L, 4.16890695996656435075481305885375484L); @@ -3570,50 +4219,50 @@ csinh_test (void) TEST_c_c (csinh, 0.0, minus_zero, 0.0, minus_zero); TEST_c_c (csinh, minus_zero, minus_zero, minus_zero, minus_zero); - TEST_c_c (csinh, 0.0, plus_infty, 0.0, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, minus_zero, plus_infty, 0.0, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, 0.0, minus_infty, 0.0, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, minus_zero, minus_infty, 0.0, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, 0.0, plus_infty, 0.0, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, minus_zero, plus_infty, 0.0, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, 0.0, minus_infty, 0.0, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, minus_zero, minus_infty, 0.0, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); TEST_c_c (csinh, plus_infty, 0.0, plus_infty, 0.0); TEST_c_c (csinh, minus_infty, 0.0, minus_infty, 0.0); TEST_c_c (csinh, plus_infty, minus_zero, plus_infty, minus_zero); TEST_c_c (csinh, minus_infty, minus_zero, minus_infty, minus_zero); - TEST_c_c (csinh, plus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, minus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, plus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, minus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, plus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, minus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, plus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, minus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION|IGNORE_ZERO_INF_SIGN); TEST_c_c (csinh, plus_infty, 4.625, minus_infty, minus_infty); TEST_c_c (csinh, minus_infty, 4.625, plus_infty, minus_infty); TEST_c_c (csinh, plus_infty, -4.625, minus_infty, plus_infty); TEST_c_c (csinh, minus_infty, -4.625, plus_infty, plus_infty); - TEST_c_c (csinh, 6.75, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (csinh, -6.75, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (csinh, 6.75, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (csinh, -6.75, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (csinh, 6.75, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (csinh, -6.75, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (csinh, 6.75, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (csinh, -6.75, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (csinh, 0.0, nan_value, 0.0, nan_value, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, minus_zero, nan_value, 0.0, nan_value, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, 0.0, qnan_value, 0.0, qnan_value, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, minus_zero, qnan_value, 0.0, qnan_value, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, plus_infty, nan_value, plus_infty, nan_value, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, minus_infty, nan_value, plus_infty, nan_value, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, plus_infty, qnan_value, plus_infty, qnan_value, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csinh, minus_infty, qnan_value, plus_infty, qnan_value, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csinh, 9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csinh, -9.0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csinh, 9.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csinh, -9.0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csinh, nan_value, 0.0, nan_value, 0.0); - TEST_c_c (csinh, nan_value, minus_zero, nan_value, minus_zero); + TEST_c_c (csinh, qnan_value, 0.0, qnan_value, 0.0); + TEST_c_c (csinh, qnan_value, minus_zero, qnan_value, minus_zero); - TEST_c_c (csinh, nan_value, 10.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csinh, nan_value, -10.0, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csinh, qnan_value, 10.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csinh, qnan_value, -10.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csinh, nan_value, plus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csinh, nan_value, minus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csinh, qnan_value, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csinh, qnan_value, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csinh, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (csinh, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (csinh, 0.75L, 1.25L, 0.259294854551162779153349830618433028L, 1.22863452409509552219214606515777594L); TEST_c_c (csinh, -2, -3, 3.59056458998577995201256544779481679L, -0.530921086248519805267040090660676560L); @@ -3692,21 +4341,21 @@ csqrt_test (void) TEST_c_c (csqrt, -4, minus_infty, plus_infty, minus_infty); TEST_c_c (csqrt, minus_infty, minus_infty, plus_infty, minus_infty); - TEST_c_c (csqrt, minus_infty, nan_value, nan_value, plus_infty, IGNORE_ZERO_INF_SIGN); + TEST_c_c (csqrt, minus_infty, qnan_value, qnan_value, plus_infty, IGNORE_ZERO_INF_SIGN); - TEST_c_c (csqrt, plus_infty, nan_value, plus_infty, nan_value); + TEST_c_c (csqrt, plus_infty, qnan_value, plus_infty, qnan_value); - TEST_c_c (csqrt, 0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, 1, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, minus_zero, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, -1, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, 0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, 1, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, minus_zero, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, -1, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, nan_value, 0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, nan_value, 8, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, nan_value, minus_zero, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, nan_value, -8, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, qnan_value, 0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, qnan_value, 8, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, qnan_value, minus_zero, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (csqrt, qnan_value, -8, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (csqrt, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (csqrt, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (csqrt, 16.0, -30.0, 5.0, -3.0); TEST_c_c (csqrt, -1, 0, 0.0, 1.0); @@ -3800,30 +4449,30 @@ ctan_test (void) TEST_c_c (ctan, minus_zero, minus_infty, minus_zero, -1.0); TEST_c_c (ctan, -1, minus_infty, minus_zero, -1.0); - TEST_c_c (ctan, plus_infty, 0, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, plus_infty, 2, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, minus_infty, 0, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, minus_infty, 2, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, plus_infty, minus_zero, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, plus_infty, -2, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, minus_infty, minus_zero, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, minus_infty, -2, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, plus_infty, 0, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, plus_infty, 2, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, minus_infty, 0, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, minus_infty, 2, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, plus_infty, minus_zero, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, plus_infty, -2, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, minus_infty, minus_zero, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctan, minus_infty, -2, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (ctan, nan_value, plus_infty, 0.0, 1.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ctan, nan_value, minus_infty, 0.0, -1.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ctan, qnan_value, plus_infty, 0.0, 1.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ctan, qnan_value, minus_infty, 0.0, -1.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ctan, 0, nan_value, 0.0, nan_value); - TEST_c_c (ctan, minus_zero, nan_value, minus_zero, nan_value); + TEST_c_c (ctan, 0, qnan_value, 0.0, qnan_value); + TEST_c_c (ctan, minus_zero, qnan_value, minus_zero, qnan_value); - TEST_c_c (ctan, 0.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctan, -4.5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctan, 0.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctan, -4.5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctan, nan_value, 0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctan, nan_value, 5, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctan, nan_value, minus_zero, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctan, nan_value, -0.25, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctan, qnan_value, 0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctan, qnan_value, 5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctan, qnan_value, minus_zero, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctan, qnan_value, -0.25, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctan, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (ctan, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (ctan, 0.75L, 1.25L, 0.160807785916206426725166058173438663L, 0.975363285031235646193581759755216379L); TEST_c_c (ctan, -2, -3, 0.376402564150424829275122113032269084e-2L, -1.00323862735360980144635859782192726L); @@ -4019,30 +4668,30 @@ ctanh_test (void) TEST_c_c (ctanh, minus_infty, minus_zero, -1.0, minus_zero); TEST_c_c (ctanh, minus_infty, -1, -1.0, minus_zero); - TEST_c_c (ctanh, 0, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, 2, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, 0, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, 2, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, minus_zero, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, -2, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, minus_zero, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, -2, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, 0, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, 2, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, 0, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, 2, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, minus_zero, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, -2, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, minus_zero, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_c_c (ctanh, -2, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); - TEST_c_c (ctanh, plus_infty, nan_value, 1.0, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ctanh, minus_infty, nan_value, -1.0, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ctanh, plus_infty, qnan_value, 1.0, 0.0, IGNORE_ZERO_INF_SIGN); + TEST_c_c (ctanh, minus_infty, qnan_value, -1.0, 0.0, IGNORE_ZERO_INF_SIGN); - TEST_c_c (ctanh, nan_value, 0, nan_value, 0.0); - TEST_c_c (ctanh, nan_value, minus_zero, nan_value, minus_zero); + TEST_c_c (ctanh, qnan_value, 0, qnan_value, 0.0); + TEST_c_c (ctanh, qnan_value, minus_zero, qnan_value, minus_zero); - TEST_c_c (ctanh, nan_value, 0.5, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctanh, nan_value, -4.5, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctanh, qnan_value, 0.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctanh, qnan_value, -4.5, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctanh, 0, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctanh, 5, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctanh, minus_zero, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctanh, -0.25, nan_value, nan_value, nan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctanh, 0, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctanh, 5, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctanh, minus_zero, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_c_c (ctanh, -0.25, qnan_value, qnan_value, qnan_value, INVALID_EXCEPTION_OK); - TEST_c_c (ctanh, nan_value, nan_value, nan_value, nan_value); + TEST_c_c (ctanh, qnan_value, qnan_value, qnan_value, qnan_value); TEST_c_c (ctanh, 0, M_PI_4l, 0.0, 1.0); @@ -4230,7 +4879,7 @@ erf_test (void) TEST_f_f (erf, minus_zero, minus_zero); TEST_f_f (erf, plus_infty, 1); TEST_f_f (erf, minus_infty, -1); - TEST_f_f (erf, nan_value, nan_value); + TEST_f_f (erf, qnan_value, qnan_value); TEST_f_f (erf, 0.125L, 0.140316204801333817393029446521623398L); TEST_f_f (erf, 0.75L, 0.711155633653515131598937834591410777L); @@ -4258,7 +4907,7 @@ erfc_test (void) TEST_f_f (erfc, minus_infty, 2.0); TEST_f_f (erfc, 0.0, 1.0); TEST_f_f (erfc, minus_zero, 1.0); - TEST_f_f (erfc, nan_value, nan_value); + TEST_f_f (erfc, qnan_value, qnan_value); TEST_f_f (erfc, 0.125L, 0.859683795198666182606970553478376602L); TEST_f_f (erfc, 0.75L, 0.288844366346484868401062165408589223L); @@ -4300,7 +4949,7 @@ exp_test (void) TEST_f_f (exp, plus_infty, plus_infty); TEST_f_f (exp, minus_infty, 0); #endif - TEST_f_f (exp, nan_value, nan_value); + TEST_f_f (exp, qnan_value, qnan_value); TEST_f_f (exp, 1, M_El); TEST_f_f (exp, 2, M_E2l); @@ -4308,6 +4957,9 @@ exp_test (void) TEST_f_f (exp, 0.75L, 2.11700001661267466854536981983709561L); TEST_f_f (exp, 50.0L, 5184705528587072464087.45332293348538L); TEST_f_f (exp, 88.72269439697265625L, 3.40233126623160774937554134772290447915e38L); +#ifndef TEST_FLOAT + TEST_f_f (exp, 709.75L, 1.739836873264160557698252711673830393864768e+308L); +#endif #if defined TEST_LDOUBLE && __LDBL_MAX_EXP__ > 1024 /* The result can only be represented in sane long double. */ TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L); @@ -4449,7 +5101,7 @@ exp10_test (void) TEST_f_f (exp10, plus_infty, plus_infty); TEST_f_f (exp10, minus_infty, 0); - TEST_f_f (exp10, nan_value, nan_value); + TEST_f_f (exp10, qnan_value, qnan_value); TEST_f_f (exp10, 3, 1000); TEST_f_f (exp10, -1, 0.1L); TEST_f_f (exp10, 36, 1.0e36L); @@ -4487,7 +5139,7 @@ exp2_test (void) TEST_f_f (exp2, minus_zero, 1); TEST_f_f (exp2, plus_infty, plus_infty); TEST_f_f (exp2, minus_infty, 0); - TEST_f_f (exp2, nan_value, nan_value); + TEST_f_f (exp2, qnan_value, qnan_value); TEST_f_f (exp2, 10, 1024); TEST_f_f (exp2, -1, 0.5); @@ -4534,7 +5186,7 @@ expm1_test (void) TEST_f_f (expm1, plus_infty, plus_infty); TEST_f_f (expm1, minus_infty, -1); #endif - TEST_f_f (expm1, nan_value, nan_value); + TEST_f_f (expm1, qnan_value, qnan_value); TEST_f_f (expm1, 1, M_El - 1.0); TEST_f_f (expm1, 0.75L, 1.11700001661267466854536981983709561L); @@ -4591,7 +5243,7 @@ fabs_test (void) TEST_f_f (fabs, plus_infty, plus_infty); TEST_f_f (fabs, minus_infty, plus_infty); - TEST_f_f (fabs, nan_value, nan_value); + TEST_f_f (fabs, qnan_value, qnan_value); TEST_f_f (fabs, 38.0, 38.0); TEST_f_f (fabs, -M_El, M_El); @@ -4620,16 +5272,16 @@ fdim_test (void) TEST_ff_f (fdim, 9, plus_infty, 0); TEST_ff_f (fdim, -9, plus_infty, 0); - TEST_ff_f (fdim, 0, nan_value, nan_value); - TEST_ff_f (fdim, 9, nan_value, nan_value); - TEST_ff_f (fdim, -9, nan_value, nan_value); - TEST_ff_f (fdim, nan_value, 9, nan_value); - TEST_ff_f (fdim, nan_value, -9, nan_value); - TEST_ff_f (fdim, plus_infty, nan_value, nan_value); - TEST_ff_f (fdim, minus_infty, nan_value, nan_value); - TEST_ff_f (fdim, nan_value, plus_infty, nan_value); - TEST_ff_f (fdim, nan_value, minus_infty, nan_value); - TEST_ff_f (fdim, nan_value, nan_value, nan_value); + TEST_ff_f (fdim, 0, qnan_value, qnan_value); + TEST_ff_f (fdim, 9, qnan_value, qnan_value); + TEST_ff_f (fdim, -9, qnan_value, qnan_value); + TEST_ff_f (fdim, qnan_value, 9, qnan_value); + TEST_ff_f (fdim, qnan_value, -9, qnan_value); + TEST_ff_f (fdim, plus_infty, qnan_value, qnan_value); + TEST_ff_f (fdim, minus_infty, qnan_value, qnan_value); + TEST_ff_f (fdim, qnan_value, plus_infty, qnan_value); + TEST_ff_f (fdim, qnan_value, minus_infty, qnan_value); + TEST_ff_f (fdim, qnan_value, qnan_value, qnan_value); TEST_ff_f (fdim, plus_infty, plus_infty, 0); @@ -4648,7 +5300,7 @@ finite_test (void) TEST_f_b (finite, min_subnorm_value, 1); TEST_f_b (finite, plus_infty, 0); TEST_f_b (finite, minus_infty, 0); - TEST_f_b (finite, nan_value, 0); + TEST_f_b (finite, qnan_value, 0); END (finite); } @@ -4663,7 +5315,7 @@ floor_test (void) TEST_f_f (floor, minus_zero, minus_zero); TEST_f_f (floor, plus_infty, plus_infty); TEST_f_f (floor, minus_infty, minus_infty); - TEST_f_f (floor, nan_value, nan_value); + TEST_f_f (floor, qnan_value, qnan_value); TEST_f_f (floor, M_PIl, 3.0); TEST_f_f (floor, -M_PIl, -4.0); @@ -4761,26 +5413,26 @@ fma_test (void) START (fma); TEST_fff_f (fma, 1.0, 2.0, 3.0, 5.0); - TEST_fff_f (fma, nan_value, 2.0, 3.0, nan_value); - TEST_fff_f (fma, 1.0, nan_value, 3.0, nan_value); - TEST_fff_f (fma, 1.0, 2.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_fff_f (fma, plus_infty, 0.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_fff_f (fma, minus_infty, 0.0, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_fff_f (fma, 0.0, plus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_fff_f (fma, 0.0, minus_infty, nan_value, nan_value, INVALID_EXCEPTION_OK); - TEST_fff_f (fma, plus_infty, 0.0, 1.0, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, minus_infty, 0.0, 1.0, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, 0.0, plus_infty, 1.0, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, 0.0, minus_infty, 1.0, nan_value, INVALID_EXCEPTION); - - TEST_fff_f (fma, plus_infty, plus_infty, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, minus_infty, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, plus_infty, minus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, minus_infty, minus_infty, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, plus_infty, 3.5L, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, minus_infty, -7.5L, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, -13.5L, plus_infty, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_fff_f (fma, minus_infty, 7.5L, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, qnan_value, 2.0, 3.0, qnan_value); + TEST_fff_f (fma, 1.0, qnan_value, 3.0, qnan_value); + TEST_fff_f (fma, 1.0, 2.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_fff_f (fma, plus_infty, 0.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_fff_f (fma, minus_infty, 0.0, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_fff_f (fma, 0.0, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_fff_f (fma, 0.0, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION_OK); + TEST_fff_f (fma, plus_infty, 0.0, 1.0, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, minus_infty, 0.0, 1.0, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, 0.0, plus_infty, 1.0, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, 0.0, minus_infty, 1.0, qnan_value, INVALID_EXCEPTION); + + TEST_fff_f (fma, plus_infty, plus_infty, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, minus_infty, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, plus_infty, minus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, minus_infty, minus_infty, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, plus_infty, 3.5L, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, minus_infty, -7.5L, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, -13.5L, plus_infty, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_fff_f (fma, minus_infty, 7.5L, plus_infty, qnan_value, INVALID_EXCEPTION); TEST_fff_f (fma, 1.25L, 0.75L, 0.0625L, 1.0L); @@ -5728,17 +6380,17 @@ fmax_test (void) TEST_ff_f (fmax, 9, minus_infty, 9); TEST_ff_f (fmax, -9, minus_infty, -9); - TEST_ff_f (fmax, 0, nan_value, 0); - TEST_ff_f (fmax, 9, nan_value, 9); - TEST_ff_f (fmax, -9, nan_value, -9); - TEST_ff_f (fmax, nan_value, 0, 0); - TEST_ff_f (fmax, nan_value, 9, 9); - TEST_ff_f (fmax, nan_value, -9, -9); - TEST_ff_f (fmax, plus_infty, nan_value, plus_infty); - TEST_ff_f (fmax, minus_infty, nan_value, minus_infty); - TEST_ff_f (fmax, nan_value, plus_infty, plus_infty); - TEST_ff_f (fmax, nan_value, minus_infty, minus_infty); - TEST_ff_f (fmax, nan_value, nan_value, nan_value); + TEST_ff_f (fmax, 0, qnan_value, 0); + TEST_ff_f (fmax, 9, qnan_value, 9); + TEST_ff_f (fmax, -9, qnan_value, -9); + TEST_ff_f (fmax, qnan_value, 0, 0); + TEST_ff_f (fmax, qnan_value, 9, 9); + TEST_ff_f (fmax, qnan_value, -9, -9); + TEST_ff_f (fmax, plus_infty, qnan_value, plus_infty); + TEST_ff_f (fmax, minus_infty, qnan_value, minus_infty); + TEST_ff_f (fmax, qnan_value, plus_infty, plus_infty); + TEST_ff_f (fmax, qnan_value, minus_infty, minus_infty); + TEST_ff_f (fmax, qnan_value, qnan_value, qnan_value); END (fmax); } @@ -5765,17 +6417,17 @@ fmin_test (void) TEST_ff_f (fmin, 9, minus_infty, minus_infty); TEST_ff_f (fmin, -9, minus_infty, minus_infty); - TEST_ff_f (fmin, 0, nan_value, 0); - TEST_ff_f (fmin, 9, nan_value, 9); - TEST_ff_f (fmin, -9, nan_value, -9); - TEST_ff_f (fmin, nan_value, 0, 0); - TEST_ff_f (fmin, nan_value, 9, 9); - TEST_ff_f (fmin, nan_value, -9, -9); - TEST_ff_f (fmin, plus_infty, nan_value, plus_infty); - TEST_ff_f (fmin, minus_infty, nan_value, minus_infty); - TEST_ff_f (fmin, nan_value, plus_infty, plus_infty); - TEST_ff_f (fmin, nan_value, minus_infty, minus_infty); - TEST_ff_f (fmin, nan_value, nan_value, nan_value); + TEST_ff_f (fmin, 0, qnan_value, 0); + TEST_ff_f (fmin, 9, qnan_value, 9); + TEST_ff_f (fmin, -9, qnan_value, -9); + TEST_ff_f (fmin, qnan_value, 0, 0); + TEST_ff_f (fmin, qnan_value, 9, 9); + TEST_ff_f (fmin, qnan_value, -9, -9); + TEST_ff_f (fmin, plus_infty, qnan_value, plus_infty); + TEST_ff_f (fmin, minus_infty, qnan_value, minus_infty); + TEST_ff_f (fmin, qnan_value, plus_infty, plus_infty); + TEST_ff_f (fmin, qnan_value, minus_infty, minus_infty); + TEST_ff_f (fmin, qnan_value, qnan_value, qnan_value); END (fmin); } @@ -5798,27 +6450,27 @@ fmod_test (void) /* fmod (-0, y) == -0 for y != 0. */ TEST_ff_f (fmod, minus_zero, 3, minus_zero); - /* fmod (+inf, y) == NaN plus invalid exception. */ + /* fmod (+inf, y) == qNaN plus invalid exception. */ errno = 0; - TEST_ff_f (fmod, plus_infty, 3, nan_value, INVALID_EXCEPTION); + TEST_ff_f (fmod, plus_infty, 3, qnan_value, INVALID_EXCEPTION); check_int ("errno for fmod(Inf,3) unchanged", errno, EDOM, 0, 0, 0); - /* fmod (-inf, y) == NaN plus invalid exception. */ + /* fmod (-inf, y) == qNaN plus invalid exception. */ errno = 0; - TEST_ff_f (fmod, minus_infty, 3, nan_value, INVALID_EXCEPTION); + TEST_ff_f (fmod, minus_infty, 3, qnan_value, INVALID_EXCEPTION); check_int ("errno for fmod(-Inf,3) unchanged", errno, EDOM, 0, 0, 0); - /* fmod (x, +0) == NaN plus invalid exception. */ + /* fmod (x, +0) == qNaN plus invalid exception. */ errno = 0; - TEST_ff_f (fmod, 3, 0, nan_value, INVALID_EXCEPTION); + TEST_ff_f (fmod, 3, 0, qnan_value, INVALID_EXCEPTION); check_int ("errno for fmod(3,0) unchanged", errno, EDOM, 0, 0, 0); - /* fmod (x, -0) == NaN plus invalid exception. */ - TEST_ff_f (fmod, 3, minus_zero, nan_value, INVALID_EXCEPTION); + /* fmod (x, -0) == qNaN plus invalid exception. */ + TEST_ff_f (fmod, 3, minus_zero, qnan_value, INVALID_EXCEPTION); /* fmod (x, +inf) == x for x not infinite. */ TEST_ff_f (fmod, 3.0, plus_infty, 3.0); /* fmod (x, -inf) == x for x not infinite. */ TEST_ff_f (fmod, 3.0, minus_infty, 3.0); - TEST_ff_f (fmod, nan_value, nan_value, nan_value); + TEST_ff_f (fmod, qnan_value, qnan_value, qnan_value); TEST_ff_f (fmod, 6.5, 2.25L, 2.0L); TEST_ff_f (fmod, -6.5, 2.25L, -2.0L); @@ -5842,7 +6494,7 @@ fpclassify_test (void) { START (fpclassify); - TEST_f_i (fpclassify, nan_value, FP_NAN); + TEST_f_i (fpclassify, qnan_value, FP_NAN); TEST_f_i (fpclassify, plus_infty, FP_INFINITE); TEST_f_i (fpclassify, minus_infty, FP_INFINITE); TEST_f_i (fpclassify, plus_zero, FP_ZERO); @@ -5863,7 +6515,7 @@ frexp_test (void) TEST_fI_f1 (frexp, plus_infty, plus_infty, IGNORE); TEST_fI_f1 (frexp, minus_infty, minus_infty, IGNORE); - TEST_fI_f1 (frexp, nan_value, nan_value, IGNORE); + TEST_fI_f1 (frexp, qnan_value, qnan_value, IGNORE); TEST_fI_f1 (frexp, 0.0, 0.0, 0.0); TEST_fI_f1 (frexp, minus_zero, minus_zero, 0.0); @@ -5891,7 +6543,7 @@ gamma_test (void) TEST_f_f (gamma, 0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); TEST_f_f (gamma, -3, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); TEST_f_f (gamma, minus_infty, plus_infty); - TEST_f_f (gamma, nan_value, nan_value); + TEST_f_f (gamma, qnan_value, qnan_value); TEST_f_f1 (gamma, 1, 0, 1); TEST_f_f1 (gamma, 3, M_LN2l, 1); @@ -5917,13 +6569,13 @@ hypot_test (void) TEST_ff_f (hypot, minus_infty, 1, plus_infty, IGNORE_ZERO_INF_SIGN); #ifndef TEST_INLINE - TEST_ff_f (hypot, plus_infty, nan_value, plus_infty); - TEST_ff_f (hypot, minus_infty, nan_value, plus_infty); - TEST_ff_f (hypot, nan_value, plus_infty, plus_infty); - TEST_ff_f (hypot, nan_value, minus_infty, plus_infty); + TEST_ff_f (hypot, plus_infty, qnan_value, plus_infty); + TEST_ff_f (hypot, minus_infty, qnan_value, plus_infty); + TEST_ff_f (hypot, qnan_value, plus_infty, plus_infty); + TEST_ff_f (hypot, qnan_value, minus_infty, plus_infty); #endif - TEST_ff_f (hypot, nan_value, nan_value, nan_value); + TEST_ff_f (hypot, qnan_value, qnan_value, qnan_value); /* hypot (x,y) == hypot (+-x, +-y) */ TEST_ff_f (hypot, 0.7L, 12.4L, 12.419742348374220601176836866763271L); @@ -5978,10 +6630,10 @@ ilogb_test (void) errno = 0; TEST_f_i (ilogb, 0.0, FP_ILOGB0, INVALID_EXCEPTION); check_int ("errno for ilogb(0.0) unchanged", errno, EDOM, 0, 0, 0); - /* ilogb (NaN) == FP_ILOGBNAN plus invalid exception */ + /* ilogb (qNaN) == FP_ILOGBNAN plus invalid exception */ errno = 0; - TEST_f_i (ilogb, nan_value, FP_ILOGBNAN, INVALID_EXCEPTION); - check_int ("errno for ilogb(NaN) unchanged", errno, EDOM, 0, 0, 0); + TEST_f_i (ilogb, qnan_value, FP_ILOGBNAN, INVALID_EXCEPTION); + check_int ("errno for ilogb(qNaN) unchanged", errno, EDOM, 0, 0, 0); /* ilogb (inf) == INT_MAX plus invalid exception */ errno = 0; TEST_f_i (ilogb, plus_infty, INT_MAX, INVALID_EXCEPTION); @@ -6005,7 +6657,7 @@ isfinite_test (void) TEST_f_b (isfinite, min_subnorm_value, 1); TEST_f_b (isfinite, plus_infty, 0); TEST_f_b (isfinite, minus_infty, 0); - TEST_f_b (isfinite, nan_value, 0); + TEST_f_b (isfinite, qnan_value, 0); END (isfinite); } @@ -6018,19 +6670,19 @@ isgreater_test (void) TEST_ff_i (isgreater, minus_zero, minus_zero, 0); TEST_ff_i (isgreater, minus_zero, plus_zero, 0); TEST_ff_i (isgreater, minus_zero, (FLOAT) 1, 0); - TEST_ff_i (isgreater, minus_zero, nan_value, 0); + TEST_ff_i (isgreater, minus_zero, qnan_value, 0); TEST_ff_i (isgreater, plus_zero, minus_zero, 0); TEST_ff_i (isgreater, plus_zero, plus_zero, 0); TEST_ff_i (isgreater, plus_zero, (FLOAT) 1, 0); - TEST_ff_i (isgreater, plus_zero, nan_value, 0); + TEST_ff_i (isgreater, plus_zero, qnan_value, 0); TEST_ff_i (isgreater, (FLOAT) 1, minus_zero, 1); TEST_ff_i (isgreater, (FLOAT) 1, plus_zero, 1); TEST_ff_i (isgreater, (FLOAT) 1, (FLOAT) 1, 0); - TEST_ff_i (isgreater, (FLOAT) 1, nan_value, 0); - TEST_ff_i (isgreater, nan_value, minus_zero, 0); - TEST_ff_i (isgreater, nan_value, plus_zero, 0); - TEST_ff_i (isgreater, nan_value, (FLOAT) 1, 0); - TEST_ff_i (isgreater, nan_value, nan_value, 0); + TEST_ff_i (isgreater, (FLOAT) 1, qnan_value, 0); + TEST_ff_i (isgreater, qnan_value, minus_zero, 0); + TEST_ff_i (isgreater, qnan_value, plus_zero, 0); + TEST_ff_i (isgreater, qnan_value, (FLOAT) 1, 0); + TEST_ff_i (isgreater, qnan_value, qnan_value, 0); END (isgreater); } @@ -6043,19 +6695,19 @@ isgreaterequal_test (void) TEST_ff_i (isgreaterequal, minus_zero, minus_zero, 1); TEST_ff_i (isgreaterequal, minus_zero, plus_zero, 1); TEST_ff_i (isgreaterequal, minus_zero, (FLOAT) 1, 0); - TEST_ff_i (isgreaterequal, minus_zero, nan_value, 0); + TEST_ff_i (isgreaterequal, minus_zero, qnan_value, 0); TEST_ff_i (isgreaterequal, plus_zero, minus_zero, 1); TEST_ff_i (isgreaterequal, plus_zero, plus_zero, 1); TEST_ff_i (isgreaterequal, plus_zero, (FLOAT) 1, 0); - TEST_ff_i (isgreaterequal, plus_zero, nan_value, 0); + TEST_ff_i (isgreaterequal, plus_zero, qnan_value, 0); TEST_ff_i (isgreaterequal, (FLOAT) 1, minus_zero, 1); TEST_ff_i (isgreaterequal, (FLOAT) 1, plus_zero, 1); TEST_ff_i (isgreaterequal, (FLOAT) 1, (FLOAT) 1, 1); - TEST_ff_i (isgreaterequal, (FLOAT) 1, nan_value, 0); - TEST_ff_i (isgreaterequal, nan_value, minus_zero, 0); - TEST_ff_i (isgreaterequal, nan_value, plus_zero, 0); - TEST_ff_i (isgreaterequal, nan_value, (FLOAT) 1, 0); - TEST_ff_i (isgreaterequal, nan_value, nan_value, 0); + TEST_ff_i (isgreaterequal, (FLOAT) 1, qnan_value, 0); + TEST_ff_i (isgreaterequal, qnan_value, minus_zero, 0); + TEST_ff_i (isgreaterequal, qnan_value, plus_zero, 0); + TEST_ff_i (isgreaterequal, qnan_value, (FLOAT) 1, 0); + TEST_ff_i (isgreaterequal, qnan_value, qnan_value, 0); END (isgreaterequal); } @@ -6071,7 +6723,7 @@ isinf_test (void) TEST_f_b (isinf, min_subnorm_value, 0); TEST_f_b (isinf, plus_infty, 1); TEST_f_b (isinf, minus_infty, 1); - TEST_f_b (isinf, nan_value, 0); + TEST_f_b (isinf, qnan_value, 0); END (isinf); } @@ -6084,19 +6736,19 @@ isless_test (void) TEST_ff_i (isless, minus_zero, minus_zero, 0); TEST_ff_i (isless, minus_zero, plus_zero, 0); TEST_ff_i (isless, minus_zero, (FLOAT) 1, 1); - TEST_ff_i (isless, minus_zero, nan_value, 0); + TEST_ff_i (isless, minus_zero, qnan_value, 0); TEST_ff_i (isless, plus_zero, minus_zero, 0); TEST_ff_i (isless, plus_zero, plus_zero, 0); TEST_ff_i (isless, plus_zero, (FLOAT) 1, 1); - TEST_ff_i (isless, plus_zero, nan_value, 0); + TEST_ff_i (isless, plus_zero, qnan_value, 0); TEST_ff_i (isless, (FLOAT) 1, minus_zero, 0); TEST_ff_i (isless, (FLOAT) 1, plus_zero, 0); TEST_ff_i (isless, (FLOAT) 1, (FLOAT) 1, 0); - TEST_ff_i (isless, (FLOAT) 1, nan_value, 0); - TEST_ff_i (isless, nan_value, minus_zero, 0); - TEST_ff_i (isless, nan_value, plus_zero, 0); - TEST_ff_i (isless, nan_value, (FLOAT) 1, 0); - TEST_ff_i (isless, nan_value, nan_value, 0); + TEST_ff_i (isless, (FLOAT) 1, qnan_value, 0); + TEST_ff_i (isless, qnan_value, minus_zero, 0); + TEST_ff_i (isless, qnan_value, plus_zero, 0); + TEST_ff_i (isless, qnan_value, (FLOAT) 1, 0); + TEST_ff_i (isless, qnan_value, qnan_value, 0); END (isless); } @@ -6109,19 +6761,19 @@ islessequal_test (void) TEST_ff_i (islessequal, minus_zero, minus_zero, 1); TEST_ff_i (islessequal, minus_zero, plus_zero, 1); TEST_ff_i (islessequal, minus_zero, (FLOAT) 1, 1); - TEST_ff_i (islessequal, minus_zero, nan_value, 0); + TEST_ff_i (islessequal, minus_zero, qnan_value, 0); TEST_ff_i (islessequal, plus_zero, minus_zero, 1); TEST_ff_i (islessequal, plus_zero, plus_zero, 1); TEST_ff_i (islessequal, plus_zero, (FLOAT) 1, 1); - TEST_ff_i (islessequal, plus_zero, nan_value, 0); + TEST_ff_i (islessequal, plus_zero, qnan_value, 0); TEST_ff_i (islessequal, (FLOAT) 1, minus_zero, 0); TEST_ff_i (islessequal, (FLOAT) 1, plus_zero, 0); TEST_ff_i (islessequal, (FLOAT) 1, (FLOAT) 1, 1); - TEST_ff_i (islessequal, (FLOAT) 1, nan_value, 0); - TEST_ff_i (islessequal, nan_value, minus_zero, 0); - TEST_ff_i (islessequal, nan_value, plus_zero, 0); - TEST_ff_i (islessequal, nan_value, (FLOAT) 1, 0); - TEST_ff_i (islessequal, nan_value, nan_value, 0); + TEST_ff_i (islessequal, (FLOAT) 1, qnan_value, 0); + TEST_ff_i (islessequal, qnan_value, minus_zero, 0); + TEST_ff_i (islessequal, qnan_value, plus_zero, 0); + TEST_ff_i (islessequal, qnan_value, (FLOAT) 1, 0); + TEST_ff_i (islessequal, qnan_value, qnan_value, 0); END (islessequal); } @@ -6134,19 +6786,19 @@ islessgreater_test (void) TEST_ff_i (islessgreater, minus_zero, minus_zero, 0); TEST_ff_i (islessgreater, minus_zero, plus_zero, 0); TEST_ff_i (islessgreater, minus_zero, (FLOAT) 1, 1); - TEST_ff_i (islessgreater, minus_zero, nan_value, 0); + TEST_ff_i (islessgreater, minus_zero, qnan_value, 0); TEST_ff_i (islessgreater, plus_zero, minus_zero, 0); TEST_ff_i (islessgreater, plus_zero, plus_zero, 0); TEST_ff_i (islessgreater, plus_zero, (FLOAT) 1, 1); - TEST_ff_i (islessgreater, plus_zero, nan_value, 0); + TEST_ff_i (islessgreater, plus_zero, qnan_value, 0); TEST_ff_i (islessgreater, (FLOAT) 1, minus_zero, 1); TEST_ff_i (islessgreater, (FLOAT) 1, plus_zero, 1); TEST_ff_i (islessgreater, (FLOAT) 1, (FLOAT) 1, 0); - TEST_ff_i (islessgreater, (FLOAT) 1, nan_value, 0); - TEST_ff_i (islessgreater, nan_value, minus_zero, 0); - TEST_ff_i (islessgreater, nan_value, plus_zero, 0); - TEST_ff_i (islessgreater, nan_value, (FLOAT) 1, 0); - TEST_ff_i (islessgreater, nan_value, nan_value, 0); + TEST_ff_i (islessgreater, (FLOAT) 1, qnan_value, 0); + TEST_ff_i (islessgreater, qnan_value, minus_zero, 0); + TEST_ff_i (islessgreater, qnan_value, plus_zero, 0); + TEST_ff_i (islessgreater, qnan_value, (FLOAT) 1, 0); + TEST_ff_i (islessgreater, qnan_value, qnan_value, 0); END (islessgreater); } @@ -6162,7 +6814,7 @@ isnan_test (void) TEST_f_b (isnan, min_subnorm_value, 0); TEST_f_b (isnan, plus_infty, 0); TEST_f_b (isnan, minus_infty, 0); - TEST_f_b (isnan, nan_value, 1); + TEST_f_b (isnan, qnan_value, 1); END (isnan); } @@ -6178,7 +6830,7 @@ isnormal_test (void) TEST_f_b (isnormal, min_subnorm_value, 0); TEST_f_b (isnormal, plus_infty, 0); TEST_f_b (isnormal, minus_infty, 0); - TEST_f_b (isnormal, nan_value, 0); + TEST_f_b (isnormal, qnan_value, 0); END (isnormal); } @@ -6191,19 +6843,19 @@ isunordered_test (void) TEST_ff_i (isunordered, minus_zero, minus_zero, 0); TEST_ff_i (isunordered, minus_zero, plus_zero, 0); TEST_ff_i (isunordered, minus_zero, (FLOAT) 1, 0); - TEST_ff_i (isunordered, minus_zero, nan_value, 1); + TEST_ff_i (isunordered, minus_zero, qnan_value, 1); TEST_ff_i (isunordered, plus_zero, minus_zero, 0); TEST_ff_i (isunordered, plus_zero, plus_zero, 0); TEST_ff_i (isunordered, plus_zero, (FLOAT) 1, 0); - TEST_ff_i (isunordered, plus_zero, nan_value, 1); + TEST_ff_i (isunordered, plus_zero, qnan_value, 1); TEST_ff_i (isunordered, (FLOAT) 1, minus_zero, 0); TEST_ff_i (isunordered, (FLOAT) 1, plus_zero, 0); TEST_ff_i (isunordered, (FLOAT) 1, (FLOAT) 1, 0); - TEST_ff_i (isunordered, (FLOAT) 1, nan_value, 1); - TEST_ff_i (isunordered, nan_value, minus_zero, 1); - TEST_ff_i (isunordered, nan_value, plus_zero, 1); - TEST_ff_i (isunordered, nan_value, (FLOAT) 1, 1); - TEST_ff_i (isunordered, nan_value, nan_value, 1); + TEST_ff_i (isunordered, (FLOAT) 1, qnan_value, 1); + TEST_ff_i (isunordered, qnan_value, minus_zero, 1); + TEST_ff_i (isunordered, qnan_value, plus_zero, 1); + TEST_ff_i (isunordered, qnan_value, (FLOAT) 1, 1); + TEST_ff_i (isunordered, qnan_value, qnan_value, 1); END (isunordered); } @@ -6225,7 +6877,7 @@ j0_test (void) START (j0); /* j0 is the Bessel function of the first kind of order 0 */ - TEST_f_f (j0, nan_value, nan_value); + TEST_f_f (j0, qnan_value, qnan_value); TEST_f_f (j0, plus_infty, 0); TEST_f_f (j0, -1.0, 0.765197686557966551449717526102663221L); TEST_f_f (j0, 0.0, 1.0); @@ -6239,12 +6891,16 @@ j0_test (void) TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L); TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L); - /* Bug 14155: spurious exception may occur. */ - TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L, UNDERFLOW_EXCEPTION_OK); + TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L); #ifndef TEST_FLOAT - /* Bug 14155: spurious exception may occur. */ - TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L, UNDERFLOW_EXCEPTION_OK); + TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L); + TEST_f_f (j0, 0x1p1023L, -1.5665258060609012834424478437196679802783e-155L); +#endif + +#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 + TEST_f_f (j0, 0x1p16382L, -1.2193782500509000574176799046642541129387e-2466L); + TEST_f_f (j0, 0x1p16383L, 9.5859502826270374691362975419147645151233e-2467L); #endif END (j0); @@ -6269,7 +6925,7 @@ j1_test (void) START (j1); - TEST_f_f (j1, nan_value, nan_value); + TEST_f_f (j1, qnan_value, qnan_value); TEST_f_f (j1, plus_infty, 0); TEST_f_f (j1, -1.0, -0.440050585744933515959682203718914913L); @@ -6285,8 +6941,13 @@ j1_test (void) TEST_f_f (j1, 0x1.3ffp+74L, 1.818984347516051243459364437186082741567e-12L); #ifndef TEST_FLOAT - /* Bug 14155: spurious exception may occur. */ - TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L, UNDERFLOW_EXCEPTION_OK); + TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L); + TEST_f_f (j1, 0x1p1023L, 8.2687542933709649327986678723012001545638e-155L); +#endif + +#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 + TEST_f_f (j1, 0x1p16382L, 8.0839224448726336195866026476176740513439e-2467L); + TEST_f_f (j1, 0x1p16383L, -3.8895531955766020648617743624167352352217e-2467L); #endif END (j1); @@ -6310,7 +6971,7 @@ jn_test (void) START (jn); /* jn (0, x) == j0 (x) */ - TEST_ff_f (jn, 0, nan_value, nan_value); + TEST_ff_f (jn, 0, qnan_value, qnan_value); TEST_ff_f (jn, 0, plus_infty, 0); TEST_ff_f (jn, 0, -1.0, 0.765197686557966551449717526102663221L); TEST_ff_f (jn, 0, 0.0, 1.0); @@ -6325,7 +6986,7 @@ jn_test (void) TEST_ff_f (jn, 0, -4.0, -3.9714980986384737228659076845169804197562E-1L); /* jn (1, x) == j1 (x) */ - TEST_ff_f (jn, 1, nan_value, nan_value); + TEST_ff_f (jn, 1, qnan_value, qnan_value); TEST_ff_f (jn, 1, plus_infty, 0); TEST_ff_f (jn, 1, -1.0, -0.440050585744933515959682203718914913L); TEST_ff_f (jn, 1, 0.0, 0.0); @@ -6338,7 +6999,7 @@ jn_test (void) TEST_ff_f (jn, 1, 10.0, 0.0434727461688614366697487680258592883L); /* jn (3, x) */ - TEST_ff_f (jn, 3, nan_value, nan_value); + TEST_ff_f (jn, 3, qnan_value, qnan_value); TEST_ff_f (jn, 3, plus_infty, 0); TEST_ff_f (jn, 3, -1.0, -0.0195633539826684059189053216217515083L); @@ -6350,7 +7011,7 @@ jn_test (void) TEST_ff_f (jn, 3, 10.0, 0.0583793793051868123429354784103409563L); /* jn (10, x) */ - TEST_ff_f (jn, 10, nan_value, nan_value); + TEST_ff_f (jn, 10, qnan_value, qnan_value); TEST_ff_f (jn, 10, plus_infty, 0); TEST_ff_f (jn, 10, -1.0, 0.263061512368745320699785368779050294e-9L); @@ -6381,18 +7042,22 @@ jn_test (void) static void ldexp_test (void) { + START (ldexp); + TEST_ff_f (ldexp, 0, 0, 0); TEST_ff_f (ldexp, minus_zero, 0, minus_zero); TEST_ff_f (ldexp, plus_infty, 1, plus_infty); TEST_ff_f (ldexp, minus_infty, 1, minus_infty); - TEST_ff_f (ldexp, nan_value, 1, nan_value); + TEST_ff_f (ldexp, qnan_value, 1, qnan_value); TEST_ff_f (ldexp, 0.8L, 4, 12.8L); TEST_ff_f (ldexp, -0.854375L, 5, -27.34L); /* ldexp (x, 0) == x. */ TEST_ff_f (ldexp, 1.0L, 0L, 1.0L); + + END (ldexp); } @@ -6412,7 +7077,7 @@ lgamma_test (void) check_int ("signgam for lgamma(0) == 1", signgam, 1, 0, 0, 0); TEST_f_f (lgamma, minus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); check_int ("signgam for lgamma(-0) == -1", signgam, -1, 0, 0, 0); - TEST_f_f (lgamma, nan_value, nan_value); + TEST_f_f (lgamma, qnan_value, qnan_value); /* lgamma (x) == +inf plus divide by zero exception for integer x <= 0. */ errno = 0; @@ -6441,6 +7106,7 @@ lrint_test (void) /* XXX this test is incomplete. We need to have a way to specifiy the rounding method and test the critical cases. So far, only unproblematic numbers are tested. */ + /* TODO: missing +/-Inf as well as qNaN tests. */ START (lrint); @@ -6633,6 +7299,7 @@ llrint_test (void) /* XXX this test is incomplete. We need to have a way to specifiy the rounding method and test the critical cases. So far, only unproblematic numbers are tested. */ + /* TODO: missing +/-Inf as well as qNaN tests. */ START (llrint); @@ -7321,11 +7988,11 @@ log_test (void) TEST_f_f (log, 1, 0); - TEST_f_f (log, -1, nan_value, INVALID_EXCEPTION); - TEST_f_f (log, -max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (log, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (log, -1, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log, -max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log, minus_infty, qnan_value, INVALID_EXCEPTION); TEST_f_f (log, plus_infty, plus_infty); - TEST_f_f (log, nan_value, nan_value); + TEST_f_f (log, qnan_value, qnan_value); TEST_f_f (log, M_El, 1); TEST_f_f (log, 1.0 / M_El, -1); @@ -7353,13 +8020,13 @@ log10_test (void) TEST_f_f (log10, 1, 0); - /* log10 (x) == NaN plus invalid exception if x < 0. */ - TEST_f_f (log10, -1, nan_value, INVALID_EXCEPTION); - TEST_f_f (log10, -max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (log10, minus_infty, nan_value, INVALID_EXCEPTION); + /* log10 (x) == qNaN plus invalid exception if x < 0. */ + TEST_f_f (log10, -1, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log10, -max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log10, minus_infty, qnan_value, INVALID_EXCEPTION); TEST_f_f (log10, plus_infty, plus_infty); - TEST_f_f (log10, nan_value, nan_value); + TEST_f_f (log10, qnan_value, qnan_value); TEST_f_f (log10, 0.1L, -1); TEST_f_f (log10, 10.0, 1); @@ -7387,12 +8054,12 @@ log1p_test (void) TEST_f_f (log1p, minus_zero, minus_zero); TEST_f_f (log1p, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION); - TEST_f_f (log1p, -2, nan_value, INVALID_EXCEPTION); - TEST_f_f (log1p, -max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (log1p, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (log1p, -2, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log1p, -max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log1p, minus_infty, qnan_value, INVALID_EXCEPTION); TEST_f_f (log1p, plus_infty, plus_infty); - TEST_f_f (log1p, nan_value, nan_value); + TEST_f_f (log1p, qnan_value, qnan_value); TEST_f_f (log1p, M_El - 1.0, 1); @@ -7419,12 +8086,12 @@ log2_test (void) TEST_f_f (log2, 1, 0); - TEST_f_f (log2, -1, nan_value, INVALID_EXCEPTION); - TEST_f_f (log2, -max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (log2, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (log2, -1, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log2, -max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (log2, minus_infty, qnan_value, INVALID_EXCEPTION); TEST_f_f (log2, plus_infty, plus_infty); - TEST_f_f (log2, nan_value, nan_value); + TEST_f_f (log2, qnan_value, qnan_value); TEST_f_f (log2, M_El, M_LOG2El); TEST_f_f (log2, 2.0, 1); @@ -7447,7 +8114,7 @@ logb_test (void) TEST_f_f (logb, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION); TEST_f_f (logb, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION); - TEST_f_f (logb, nan_value, nan_value); + TEST_f_f (logb, qnan_value, qnan_value); TEST_f_f (logb, 1, 0); TEST_f_f (logb, M_El, 1); @@ -7511,6 +8178,8 @@ logb_test_downward (void) static void lround_test (void) { + /* TODO: missing +/-Inf as well as qNaN tests. */ + START (lround); TEST_f_l (lround, 0, 0); @@ -7553,6 +8222,8 @@ lround_test (void) static void llround_test (void) { + /* TODO: missing +/-Inf as well as qNaN tests. */ + START (llround); TEST_f_L (llround, 0, 0); @@ -7729,7 +8400,7 @@ modf_test (void) TEST_fF_f1 (modf, plus_infty, 0, plus_infty); TEST_fF_f1 (modf, minus_infty, minus_zero, minus_infty); - TEST_fF_f1 (modf, nan_value, nan_value, nan_value); + TEST_fF_f1 (modf, qnan_value, qnan_value, qnan_value); TEST_fF_f1 (modf, 0, 0, 0); TEST_fF_f1 (modf, 1.5, 0.5, 1); TEST_fF_f1 (modf, 2.5, 0.5, 2); @@ -7751,7 +8422,7 @@ nearbyint_test (void) TEST_f_f (nearbyint, minus_zero, minus_zero); TEST_f_f (nearbyint, plus_infty, plus_infty); TEST_f_f (nearbyint, minus_infty, minus_infty); - TEST_f_f (nearbyint, nan_value, nan_value); + TEST_f_f (nearbyint, qnan_value, qnan_value); /* Subnormal values */ TEST_f_f (nearbyint, -8.98847e+307, -8.98847e+307); @@ -7810,9 +8481,9 @@ nextafter_test (void) TEST_ff_f (nextafter, plus_infty, plus_infty, plus_infty); TEST_ff_f (nextafter, minus_infty, minus_infty, minus_infty); - TEST_ff_f (nextafter, nan_value, 1.1L, nan_value); - TEST_ff_f (nextafter, 1.1L, nan_value, nan_value); - TEST_ff_f (nextafter, nan_value, nan_value, nan_value); + TEST_ff_f (nextafter, qnan_value, 1.1L, qnan_value); + TEST_ff_f (nextafter, 1.1L, qnan_value, qnan_value); + TEST_ff_f (nextafter, qnan_value, qnan_value, qnan_value); FLOAT fltmax = CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX, LDBL_MAX, DBL_MAX, FLT_MAX); @@ -7845,9 +8516,9 @@ nexttoward_test (void) TEST_ff_f (nexttoward, plus_infty, plus_infty, plus_infty); TEST_ff_f (nexttoward, minus_infty, minus_infty, minus_infty); - TEST_ff_f (nexttoward, nan_value, 1.1L, nan_value); - TEST_ff_f (nexttoward, 1.1L, nan_value, nan_value); - TEST_ff_f (nexttoward, nan_value, nan_value, nan_value); + TEST_ff_f (nexttoward, qnan_value, 1.1L, qnan_value); + TEST_ff_f (nexttoward, 1.1L, qnan_value, qnan_value); + TEST_ff_f (nexttoward, qnan_value, qnan_value, qnan_value); #ifdef TEST_FLOAT TEST_ff_f (nexttoward, 1.0, 1.1L, 0x1.000002p0); @@ -7943,8 +8614,8 @@ pow_test (void) TEST_ff_f (pow, -10, 0, 1); TEST_ff_f (pow, -10, minus_zero, 1); - TEST_ff_f (pow, nan_value, 0, 1); - TEST_ff_f (pow, nan_value, minus_zero, 1); + TEST_ff_f (pow, qnan_value, 0, 1); + TEST_ff_f (pow, qnan_value, minus_zero, 1); #ifndef TEST_INLINE @@ -8005,28 +8676,28 @@ pow_test (void) TEST_ff_f (pow, minus_infty, -min_subnorm_value, 0); #endif - TEST_ff_f (pow, nan_value, nan_value, nan_value); - TEST_ff_f (pow, 0, nan_value, nan_value); - TEST_ff_f (pow, 1, nan_value, 1); - TEST_ff_f (pow, -1, nan_value, nan_value); - TEST_ff_f (pow, nan_value, 1, nan_value); - TEST_ff_f (pow, nan_value, -1, nan_value); - - /* pow (x, NaN) == NaN. */ - TEST_ff_f (pow, 3.0, nan_value, nan_value); - TEST_ff_f (pow, minus_zero, nan_value, nan_value); - TEST_ff_f (pow, plus_infty, nan_value, nan_value); - TEST_ff_f (pow, -3.0, nan_value, nan_value); - TEST_ff_f (pow, minus_infty, nan_value, nan_value); - - TEST_ff_f (pow, nan_value, 3.0, nan_value); - TEST_ff_f (pow, nan_value, -3.0, nan_value); - TEST_ff_f (pow, nan_value, plus_infty, nan_value); - TEST_ff_f (pow, nan_value, minus_infty, nan_value); - TEST_ff_f (pow, nan_value, 2.5, nan_value); - TEST_ff_f (pow, nan_value, -2.5, nan_value); - TEST_ff_f (pow, nan_value, min_subnorm_value, nan_value); - TEST_ff_f (pow, nan_value, -min_subnorm_value, nan_value); + TEST_ff_f (pow, qnan_value, qnan_value, qnan_value); + TEST_ff_f (pow, 0, qnan_value, qnan_value); + TEST_ff_f (pow, 1, qnan_value, 1); + TEST_ff_f (pow, -1, qnan_value, qnan_value); + TEST_ff_f (pow, qnan_value, 1, qnan_value); + TEST_ff_f (pow, qnan_value, -1, qnan_value); + + /* pow (x, qNaN) == qNaN. */ + TEST_ff_f (pow, 3.0, qnan_value, qnan_value); + TEST_ff_f (pow, minus_zero, qnan_value, qnan_value); + TEST_ff_f (pow, plus_infty, qnan_value, qnan_value); + TEST_ff_f (pow, -3.0, qnan_value, qnan_value); + TEST_ff_f (pow, minus_infty, qnan_value, qnan_value); + + TEST_ff_f (pow, qnan_value, 3.0, qnan_value); + TEST_ff_f (pow, qnan_value, -3.0, qnan_value); + TEST_ff_f (pow, qnan_value, plus_infty, qnan_value); + TEST_ff_f (pow, qnan_value, minus_infty, qnan_value); + TEST_ff_f (pow, qnan_value, 2.5, qnan_value); + TEST_ff_f (pow, qnan_value, -2.5, qnan_value); + TEST_ff_f (pow, qnan_value, min_subnorm_value, qnan_value); + TEST_ff_f (pow, qnan_value, -min_subnorm_value, qnan_value); TEST_ff_f (pow, 1, plus_infty, 1); TEST_ff_f (pow, -1, plus_infty, 1); @@ -8057,14 +8728,14 @@ pow_test (void) TEST_ff_f (pow, 0x1p-72L, 0, 1); TEST_ff_f (pow, 0x1p-72L, minus_zero, 1); - TEST_ff_f (pow, -0.1L, 1.1L, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -0.1L, -1.1L, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -10.1L, 1.1L, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -10.1L, -1.1L, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -1.01L, min_subnorm_value, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -1.01L, -min_subnorm_value, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -1.0L, min_subnorm_value, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -1.0L, -min_subnorm_value, nan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -0.1L, 1.1L, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -0.1L, -1.1L, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -10.1L, 1.1L, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -10.1L, -1.1L, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -1.01L, min_subnorm_value, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -1.01L, -min_subnorm_value, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -1.0L, min_subnorm_value, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -1.0L, -min_subnorm_value, qnan_value, INVALID_EXCEPTION); errno = 0; TEST_ff_f (pow, 0, -1, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); @@ -8474,9 +9145,9 @@ pow_test (void) #endif TEST_ff_f (pow, -2.0, max_value, plus_infty, OVERFLOW_EXCEPTION); - TEST_ff_f (pow, -max_value, 0.5, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -max_value, 1.5, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -max_value, 1000.5, nan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -max_value, 0.5, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -max_value, 1.5, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -max_value, 1000.5, qnan_value, INVALID_EXCEPTION); TEST_ff_f (pow, -max_value, -2, plus_zero, UNDERFLOW_EXCEPTION); TEST_ff_f (pow, -max_value, -3, minus_zero, UNDERFLOW_EXCEPTION); TEST_ff_f (pow, -max_value, 2, plus_infty, OVERFLOW_EXCEPTION); @@ -8575,9 +9246,9 @@ pow_test (void) #endif TEST_ff_f (pow, -0.5, max_value, plus_zero, UNDERFLOW_EXCEPTION); - TEST_ff_f (pow, -min_value, 0.5, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -min_value, 1.5, nan_value, INVALID_EXCEPTION); - TEST_ff_f (pow, -min_value, 1000.5, nan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -min_value, 0.5, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -min_value, 1.5, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (pow, -min_value, 1000.5, qnan_value, INVALID_EXCEPTION); TEST_ff_f (pow, -min_value, -2, plus_infty, OVERFLOW_EXCEPTION); TEST_ff_f (pow, -min_value, -3, minus_infty, OVERFLOW_EXCEPTION); /* Allow inexact results to be considered to underflow. */ @@ -8813,26 +9484,26 @@ remainder_test (void) START (remainder); errno = 0; - TEST_ff_f (remainder, 1, 0, nan_value, INVALID_EXCEPTION); + TEST_ff_f (remainder, 1, 0, qnan_value, INVALID_EXCEPTION); check_int ("errno for remainder(1, 0) = EDOM ", errno, EDOM, 0, 0, 0); errno = 0; - TEST_ff_f (remainder, 1, minus_zero, nan_value, INVALID_EXCEPTION); + TEST_ff_f (remainder, 1, minus_zero, qnan_value, INVALID_EXCEPTION); check_int ("errno for remainder(1, -0) = EDOM ", errno, EDOM, 0, 0, 0); errno = 0; - TEST_ff_f (remainder, plus_infty, 1, nan_value, INVALID_EXCEPTION); + TEST_ff_f (remainder, plus_infty, 1, qnan_value, INVALID_EXCEPTION); check_int ("errno for remainder(INF, 1) = EDOM ", errno, EDOM, 0, 0, 0); errno = 0; - TEST_ff_f (remainder, minus_infty, 1, nan_value, INVALID_EXCEPTION); + TEST_ff_f (remainder, minus_infty, 1, qnan_value, INVALID_EXCEPTION); check_int ("errno for remainder(-INF, 1) = EDOM ", errno, EDOM, 0, 0, 0); errno = 0; - TEST_ff_f (remainder, nan_value, nan_value, nan_value); - check_int ("errno for remainder(NAN, NAN) unchanged", errno, 0, 0, 0, 0); + TEST_ff_f (remainder, qnan_value, qnan_value, qnan_value); + check_int ("errno for remainder(qNAN, qNAN) unchanged", errno, 0, 0, 0, 0); errno = 0; - TEST_ff_f (remainder, 0, nan_value, nan_value); - check_int ("errno for remainder(0, NAN) unchanged", errno, 0, 0, 0, 0); + TEST_ff_f (remainder, 0, qnan_value, qnan_value); + check_int ("errno for remainder(0, qNAN) unchanged", errno, 0, 0, 0, 0); errno = 0; - TEST_ff_f (remainder, nan_value, 0, nan_value); - check_int ("errno for remainder(NaN, 0) unchanged", errno, 0, 0, 0, 0); + TEST_ff_f (remainder, qnan_value, 0, qnan_value); + check_int ("errno for remainder(qNaN, 0) unchanged", errno, 0, 0, 0, 0); TEST_ff_f (remainder, 1.625, 1.0, -0.375); TEST_ff_f (remainder, -1.625, 1.0, 0.375); @@ -8858,11 +9529,11 @@ remquo_test (void) START (remquo); - TEST_ffI_f1 (remquo, 1, 0, nan_value, IGNORE, INVALID_EXCEPTION); - TEST_ffI_f1 (remquo, 1, minus_zero, nan_value, IGNORE, INVALID_EXCEPTION); - TEST_ffI_f1 (remquo, plus_infty, 1, nan_value, IGNORE, INVALID_EXCEPTION); - TEST_ffI_f1 (remquo, minus_infty, 1, nan_value, IGNORE, INVALID_EXCEPTION); - TEST_ffI_f1 (remquo, nan_value, nan_value, nan_value, IGNORE); + TEST_ffI_f1 (remquo, 1, 0, qnan_value, IGNORE, INVALID_EXCEPTION); + TEST_ffI_f1 (remquo, 1, minus_zero, qnan_value, IGNORE, INVALID_EXCEPTION); + TEST_ffI_f1 (remquo, plus_infty, 1, qnan_value, IGNORE, INVALID_EXCEPTION); + TEST_ffI_f1 (remquo, minus_infty, 1, qnan_value, IGNORE, INVALID_EXCEPTION); + TEST_ffI_f1 (remquo, qnan_value, qnan_value, qnan_value, IGNORE); TEST_ffI_f1 (remquo, 1.625, 1.0, -0.375, 2); TEST_ffI_f1 (remquo, -1.625, 1.0, 0.375, -2); @@ -8878,6 +9549,8 @@ remquo_test (void) static void rint_test (void) { + /* TODO: missing qNaN tests. */ + START (rint); TEST_f_f (rint, 0.0, 0.0); @@ -9343,6 +10016,8 @@ rint_test_upward (void) static void round_test (void) { + /* TODO: missing +/-Inf as well as qNaN tests. */ + START (round); TEST_f_f (round, 0, 0); @@ -9445,17 +10120,17 @@ scalb_test (void) START (scalb); - TEST_ff_f (scalb, 2.0, 0.5, nan_value, INVALID_EXCEPTION); - TEST_ff_f (scalb, 3.0, -2.5, nan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, 2.0, 0.5, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, 3.0, -2.5, qnan_value, INVALID_EXCEPTION); - TEST_ff_f (scalb, 0, nan_value, nan_value); - TEST_ff_f (scalb, 1, nan_value, nan_value); + TEST_ff_f (scalb, 0, qnan_value, qnan_value); + TEST_ff_f (scalb, 1, qnan_value, qnan_value); TEST_ff_f (scalb, 1, 0, 1); TEST_ff_f (scalb, -1, 0, -1); - TEST_ff_f (scalb, 0, plus_infty, nan_value, INVALID_EXCEPTION); - TEST_ff_f (scalb, minus_zero, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, 0, plus_infty, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, minus_zero, plus_infty, qnan_value, INVALID_EXCEPTION); TEST_ff_f (scalb, 0, 2, 0); TEST_ff_f (scalb, minus_zero, -4, minus_zero); @@ -9481,16 +10156,16 @@ scalb_test (void) TEST_ff_f (scalb, plus_infty, plus_infty, plus_infty); TEST_ff_f (scalb, minus_infty, plus_infty, minus_infty); - TEST_ff_f (scalb, plus_infty, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_ff_f (scalb, minus_infty, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, plus_infty, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, minus_infty, minus_infty, qnan_value, INVALID_EXCEPTION); - TEST_ff_f (scalb, nan_value, 1, nan_value); - TEST_ff_f (scalb, 1, nan_value, nan_value); - TEST_ff_f (scalb, nan_value, 0, nan_value); - TEST_ff_f (scalb, 0, nan_value, nan_value); - TEST_ff_f (scalb, nan_value, plus_infty, nan_value); - TEST_ff_f (scalb, plus_infty, nan_value, nan_value); - TEST_ff_f (scalb, nan_value, nan_value, nan_value); + TEST_ff_f (scalb, qnan_value, 1, qnan_value); + TEST_ff_f (scalb, 1, qnan_value, qnan_value); + TEST_ff_f (scalb, qnan_value, 0, qnan_value); + TEST_ff_f (scalb, 0, qnan_value, qnan_value); + TEST_ff_f (scalb, qnan_value, plus_infty, qnan_value); + TEST_ff_f (scalb, plus_infty, qnan_value, qnan_value); + TEST_ff_f (scalb, qnan_value, qnan_value, qnan_value); TEST_ff_f (scalb, 0.8L, 4, 12.8L); TEST_ff_f (scalb, -0.854375L, 5, -27.34L); @@ -9510,7 +10185,7 @@ scalbn_test (void) TEST_fi_f (scalbn, plus_infty, 1, plus_infty); TEST_fi_f (scalbn, minus_infty, 1, minus_infty); - TEST_fi_f (scalbn, nan_value, 1, nan_value); + TEST_fi_f (scalbn, qnan_value, 1, qnan_value); TEST_fi_f (scalbn, 0.8L, 4, 12.8L); TEST_fi_f (scalbn, -0.854375L, 5, -27.34L); @@ -9541,7 +10216,7 @@ scalbln_test (void) TEST_fl_f (scalbln, plus_infty, 1, plus_infty); TEST_fl_f (scalbln, minus_infty, 1, minus_infty); - TEST_fl_f (scalbln, nan_value, 1, nan_value); + TEST_fl_f (scalbln, qnan_value, 1, qnan_value); TEST_fl_f (scalbln, 0.8L, 4, 12.8L); TEST_fl_f (scalbln, -0.854375L, 5, -27.34L); @@ -9584,6 +10259,7 @@ scalbln_test (void) static void signbit_test (void) { + /* TODO: missing qNaN tests. */ START (signbit); @@ -9615,14 +10291,14 @@ sin_test (void) TEST_f_f (sin, 0, 0); TEST_f_f (sin, minus_zero, minus_zero); errno = 0; - TEST_f_f (sin, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (sin, plus_infty, qnan_value, INVALID_EXCEPTION); check_int ("errno for sin(+inf) == EDOM", errno, EDOM, 0, 0, 0); errno = 0; - TEST_f_f (sin, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (sin, minus_infty, qnan_value, INVALID_EXCEPTION); check_int ("errno for sin(-inf) == EDOM", errno, EDOM, 0, 0, 0); errno = 0; - TEST_f_f (sin, nan_value, nan_value); - check_int ("errno for sin(NaN) unchanged", errno, 0, 0, 0, 0); + TEST_f_f (sin, qnan_value, qnan_value); + check_int ("errno for sin(qNaN) unchanged", errno, 0, 0, 0, 0); TEST_f_f (sin, M_PI_6l, 0.5); TEST_f_f (sin, -M_PI_6l, -0.5); @@ -9814,9 +10490,9 @@ sincos_test (void) TEST_extra (sincos, 0, 0, 1); TEST_extra (sincos, minus_zero, minus_zero, 1); - TEST_extra (sincos, plus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_extra (sincos, minus_infty, nan_value, nan_value, INVALID_EXCEPTION); - TEST_extra (sincos, nan_value, nan_value, nan_value); + TEST_extra (sincos, plus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_extra (sincos, minus_infty, qnan_value, qnan_value, INVALID_EXCEPTION); + TEST_extra (sincos, qnan_value, qnan_value, qnan_value); TEST_extra (sincos, M_PI_2l, 1, 0); TEST_extra (sincos, M_PI_6l, 0.5, 0.86602540378443864676372317075293616L); @@ -9866,7 +10542,7 @@ sinh_test (void) TEST_f_f (sinh, plus_infty, plus_infty); TEST_f_f (sinh, minus_infty, minus_infty); #endif - TEST_f_f (sinh, nan_value, nan_value); + TEST_f_f (sinh, qnan_value, qnan_value); TEST_f_f (sinh, 0.75L, 0.822316731935829980703661634446913849L); TEST_f_f (sinh, 0x8p-32L, 1.86264514923095703232705808926175479e-9L); @@ -9995,16 +10671,15 @@ sqrt_test (void) START (sqrt); TEST_f_f (sqrt, 0, 0); - TEST_f_f (sqrt, nan_value, nan_value); + TEST_f_f (sqrt, qnan_value, qnan_value); TEST_f_f (sqrt, plus_infty, plus_infty); TEST_f_f (sqrt, minus_zero, minus_zero); - /* sqrt (x) == NaN plus invalid exception for x < 0. */ - TEST_f_f (sqrt, -1, nan_value, INVALID_EXCEPTION); - TEST_f_f (sqrt, -max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (sqrt, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_f_f (sqrt, nan_value, nan_value); + /* sqrt (x) == qNaN plus invalid exception for x < 0. */ + TEST_f_f (sqrt, -1, qnan_value, INVALID_EXCEPTION); + TEST_f_f (sqrt, -max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (sqrt, minus_infty, qnan_value, INVALID_EXCEPTION); TEST_f_f (sqrt, 2209, 47); TEST_f_f (sqrt, 4, 2); @@ -10032,14 +10707,14 @@ tan_test (void) TEST_f_f (tan, 0, 0); TEST_f_f (tan, minus_zero, minus_zero); errno = 0; - TEST_f_f (tan, plus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (tan, plus_infty, qnan_value, INVALID_EXCEPTION); check_int ("errno for tan(Inf) == EDOM", errno, EDOM, 0, 0, 0); errno = 0; - TEST_f_f (tan, minus_infty, nan_value, INVALID_EXCEPTION); + TEST_f_f (tan, minus_infty, qnan_value, INVALID_EXCEPTION); check_int ("errno for tan(-Inf) == EDOM", errno, EDOM, 0, 0, 0); errno = 0; - TEST_f_f (tan, nan_value, nan_value); - check_int ("errno for tan(NaN) == 0", errno, 0, 0, 0, 0); + TEST_f_f (tan, qnan_value, qnan_value); + check_int ("errno for tan(qNaN) == 0", errno, 0, 0, 0, 0); TEST_f_f (tan, M_PI_4l, 1); TEST_f_f (tan, 0.75L, 0.931596459944072461165202756573936428L); @@ -10252,7 +10927,7 @@ tanh_test (void) TEST_f_f (tanh, plus_infty, 1); TEST_f_f (tanh, minus_infty, -1); #endif - TEST_f_f (tanh, nan_value, nan_value); + TEST_f_f (tanh, qnan_value, qnan_value); TEST_f_f (tanh, 0.75L, 0.635148952387287319214434357312496495L); TEST_f_f (tanh, -0.75L, -0.635148952387287319214434357312496495L); @@ -10281,11 +10956,11 @@ tgamma_test (void) TEST_f_f (tgamma, max_value, plus_infty, OVERFLOW_EXCEPTION); TEST_f_f (tgamma, 0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); TEST_f_f (tgamma, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION); - /* tgamma (x) == NaN plus invalid exception for integer x <= 0. */ - TEST_f_f (tgamma, -2, nan_value, INVALID_EXCEPTION); - TEST_f_f (tgamma, -max_value, nan_value, INVALID_EXCEPTION); - TEST_f_f (tgamma, minus_infty, nan_value, INVALID_EXCEPTION); - TEST_f_f (tgamma, nan_value, nan_value); + /* tgamma (x) == qNaN plus invalid exception for integer x <= 0. */ + TEST_f_f (tgamma, -2, qnan_value, INVALID_EXCEPTION); + TEST_f_f (tgamma, -max_value, qnan_value, INVALID_EXCEPTION); + TEST_f_f (tgamma, minus_infty, qnan_value, INVALID_EXCEPTION); + TEST_f_f (tgamma, qnan_value, qnan_value); TEST_f_f (tgamma, 0.5, M_SQRT_PIl); TEST_f_f (tgamma, -0.5, -M_2_SQRT_PIl); @@ -10307,7 +10982,7 @@ trunc_test (void) TEST_f_f (trunc, plus_infty, plus_infty); TEST_f_f (trunc, minus_infty, minus_infty); - TEST_f_f (trunc, nan_value, nan_value); + TEST_f_f (trunc, qnan_value, qnan_value); TEST_f_f (trunc, 0, 0); TEST_f_f (trunc, minus_zero, minus_zero); @@ -10429,7 +11104,7 @@ y0_test (void) TEST_f_f (y0, -1.0, minus_infty, INVALID_EXCEPTION); TEST_f_f (y0, -max_value, minus_infty, INVALID_EXCEPTION); TEST_f_f (y0, 0.0, minus_infty); - TEST_f_f (y0, nan_value, nan_value); + TEST_f_f (y0, qnan_value, qnan_value); TEST_f_f (y0, plus_infty, 0); TEST_f_f (y0, 0.125L, -1.38968062514384052915582277745018693L); @@ -10443,8 +11118,13 @@ y0_test (void) TEST_f_f (y0, 0x1.3ffp+74L, 1.818984347516051243459467456433028748678e-12L); #ifndef TEST_FLOAT - /* Bug 14155: spurious exception may occur. */ - TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L, UNDERFLOW_EXCEPTION_OK); + TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L); + TEST_f_f (y0, 0x1p1023L, 8.2687542933709649327986678723012001545638e-155L); +#endif + +#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 + TEST_f_f (y0, 0x1p16382L, 8.0839224448726336195866026476176740513439e-2467L); + TEST_f_f (y0, 0x1p16383L, -3.8895531955766020648617743624167352352217e-2467L); #endif TEST_f_f (y0, 0x1p-10L, -4.4865150767109739412411806297168793661098L); @@ -10484,7 +11164,7 @@ y1_test (void) TEST_f_f (y1, -max_value, minus_infty, INVALID_EXCEPTION); TEST_f_f (y1, 0.0, minus_infty); TEST_f_f (y1, plus_infty, 0); - TEST_f_f (y1, nan_value, nan_value); + TEST_f_f (y1, qnan_value, qnan_value); TEST_f_f (y1, 0.125L, -5.19993611253477499595928744876579921L); TEST_f_f (y1, 0.75L, -1.03759455076928541973767132140642198L); @@ -10494,12 +11174,16 @@ y1_test (void) TEST_f_f (y1, 8.0, -0.158060461731247494255555266187483550L); TEST_f_f (y1, 10.0, 0.249015424206953883923283474663222803L); - /* Bug 14155: spurious exception may occur. */ - TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L, UNDERFLOW_EXCEPTION_OK); + TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L); #ifndef TEST_FLOAT - /* Bug 14155: spurious exception may occur. */ - TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L, UNDERFLOW_EXCEPTION_OK); + TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L); + TEST_f_f (y1, 0x1p1023L, 1.5665258060609012834424478437196679802783e-155L); +#endif + +#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 + TEST_f_f (y1, 0x1p16382L, 1.2193782500509000574176799046642541129387e-2466L); + TEST_f_f (y1, 0x1p16383L, -9.5859502826270374691362975419147645151233e-2467L); #endif TEST_f_f (y1, 0x1p-10L, -6.5190099301063115047395187618929589514382e+02L); @@ -10539,7 +11223,7 @@ yn_test (void) TEST_ff_f (yn, 0, -1.0, minus_infty, INVALID_EXCEPTION); TEST_ff_f (yn, 0, -max_value, minus_infty, INVALID_EXCEPTION); TEST_ff_f (yn, 0, 0.0, minus_infty); - TEST_ff_f (yn, 0, nan_value, nan_value); + TEST_ff_f (yn, 0, qnan_value, qnan_value); TEST_ff_f (yn, 0, plus_infty, 0); TEST_ff_f (yn, 0, 0.125L, -1.38968062514384052915582277745018693L); @@ -10554,7 +11238,7 @@ yn_test (void) TEST_ff_f (yn, 1, -1.0, minus_infty, INVALID_EXCEPTION); TEST_ff_f (yn, 1, 0.0, minus_infty); TEST_ff_f (yn, 1, plus_infty, 0); - TEST_ff_f (yn, 1, nan_value, nan_value); + TEST_ff_f (yn, 1, qnan_value, qnan_value); TEST_ff_f (yn, 1, 0.125L, -5.19993611253477499595928744876579921L); TEST_ff_f (yn, 1, 0.75L, -1.03759455076928541973767132140642198L); @@ -10566,7 +11250,7 @@ yn_test (void) /* yn (3, x) */ TEST_ff_f (yn, 3, plus_infty, 0); - TEST_ff_f (yn, 3, nan_value, nan_value); + TEST_ff_f (yn, 3, qnan_value, qnan_value); TEST_ff_f (yn, 3, 0.125L, -2612.69757350066712600220955744091741L); TEST_ff_f (yn, 3, 0.75L, -12.9877176234475433186319774484809207L); @@ -10576,7 +11260,7 @@ yn_test (void) /* yn (10, x) */ TEST_ff_f (yn, 10, plus_infty, 0); - TEST_ff_f (yn, 10, nan_value, nan_value); + TEST_ff_f (yn, 10, qnan_value, qnan_value); TEST_ff_f (yn, 10, 0.125L, -127057845771019398.252538486899753195L); TEST_ff_f (yn, 10, 0.75L, -2133501638.90573424452445412893839236L); @@ -10600,6 +11284,9 @@ static void significand_test (void) { /* significand returns the mantissa of the exponential representation. */ + + /* TODO: missing +/-Inf as well as qNaN tests. */ + START (significand); TEST_f_f (significand, 4.0, 1.0); @@ -10614,10 +11301,10 @@ static void initialize (void) { fpstack_test ("start *init*"); - plus_zero = 0.0; - nan_value = plus_zero / plus_zero; /* Suppress GCC warning */ - minus_zero = FUNC(copysign) (0.0, -1.0); + plus_zero = 0.0; + qnan_value = FUNC (__builtin_nan) (""); + minus_zero = FUNC (copysign) (0.0, -1.0); plus_infty = CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF, HUGE_VALL, HUGE_VAL, HUGE_VALF); minus_infty = CHOOSE (-HUGE_VALL, -HUGE_VAL, -HUGE_VALF, @@ -10634,7 +11321,7 @@ initialize (void) __FLT_DENORM_MIN__); (void) &plus_zero; - (void) &nan_value; + (void) &qnan_value; (void) &minus_zero; (void) &plus_infty; (void) &minus_infty; diff --git a/math/test-misc.c b/math/test-misc.c index d64e8e2fcc..c13bafa117 100644 --- a/math/test-misc.c +++ b/math/test-misc.c @@ -1056,7 +1056,7 @@ main (void) } #endif -#ifdef __i386__ +#if defined (__i386__) || defined (__x86_64__) /* This is a test for the strange long doubles in x86 FPUs. */ { union @@ -1074,7 +1074,7 @@ main (void) } } - /* Special NaNs in x86 long double. Test for scalbl. */ + /* Special qNaNs in x86 long double. Test for scalbl. */ { union { @@ -1087,12 +1087,12 @@ main (void) r = scalbl (u.d, 0.0); if (!isnan (r)) { - puts ("scalbl(NaN, 0) does not return NaN"); + puts ("scalbl (qNaN, 0) does not return NaN"); result = 1; } else if (memcmp (&r, &u.d, sizeof (double)) != 0) { - puts ("scalbl(NaN, 0) does not return the same NaN"); + puts ("scalbl (qNaN, 0) does not return the same NaN"); result = 1; } } @@ -1116,7 +1116,7 @@ main (void) } else if (fetestexcept (FE_UNDERFLOW)) { - puts ("scalbl(NaN, 0) raises underflow exception"); + puts ("scalbl (LDBL_MIN, 2147483647) raises underflow exception"); result = 1; } @@ -1134,7 +1134,7 @@ main (void) } else if (fetestexcept (FE_OVERFLOW)) { - puts ("scalbl(NaN, 0) raises overflow exception"); + puts ("scalbl (LDBL_MAX, -2147483647) raises overflow exception"); result = 1; } } diff --git a/sysdeps/powerpc/fpu/test-powerpc-snan.c b/math/test-snan.c index e3bd47abaf..f185cbb45c 100644 --- a/sysdeps/powerpc/fpu/test-powerpc-snan.c +++ b/math/test-snan.c @@ -1,4 +1,4 @@ -/* Test Signalling NaN in isnan, isinf etc functions. +/* Test signaling NaNs in isnan, isinf, and similar functions. Copyright (C) 2008-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 2005. @@ -29,61 +29,18 @@ #include <setjmp.h> #include <errno.h> +#include <math-tests.h> + + int dest_offset; char *dest_address; double value = 123.456; double zero = 0.0; -float SNANf; -double SNAN; -long double SNANl; - static sigjmp_buf sigfpe_buf; -void -init_signaling_nan (void) -{ - union { - double _ld16; - double _d8; - unsigned int _ui4[4]; - float _f4; - } nan_temp; - - nan_temp._ui4[0] = 0x7fa00000; - SNANf = nan_temp._f4; - - nan_temp._ui4[0] = 0x7ff40000; - nan_temp._ui4[1] = 0x00000000; - SNAN = nan_temp._d8; - - nan_temp._ui4[0] = 0x7ff40000; - nan_temp._ui4[1] = 0x00000000; - nan_temp._ui4[2] = 0x00000000; - nan_temp._ui4[3] = 0x00000000; - SNANl = nan_temp._ld16; -} - -static float -snan_float (void) -{ - return SNANf; -} - -static double -snan_double (void) -{ - return SNAN; -} - typedef long double ldouble; -static ldouble -snan_ldouble (void) -{ - return SNANl; -} - void myFPsighandler(int signal, @@ -130,25 +87,29 @@ check (const char *testname, int result) } } -#define TEST_FUNC(NAME, FLOAT) \ +#define TEST_FUNC(NAME, FLOAT, SUFFIX) \ static void \ NAME (void) \ { \ /* Variables are declared volatile to forbid some compiler \ optimizations. */ \ - volatile FLOAT Inf_var, NaN_var, zero_var, one_var, SNaN_var; \ + volatile FLOAT Inf_var, qNaN_var, zero_var, one_var; \ + /* A sNaN is only guaranteed to be representable in variables with */ \ + /* static (or thread-local) storage duration. */ \ + static volatile FLOAT sNaN_var = __builtin_nans ## SUFFIX (""); \ + static volatile FLOAT minus_sNaN_var = -__builtin_nans ## SUFFIX (""); \ fenv_t saved_fenv; \ \ zero_var = 0.0; \ one_var = 1.0; \ - NaN_var = zero_var / zero_var; \ - SNaN_var = snan_##FLOAT (); \ + qNaN_var = __builtin_nan ## SUFFIX (""); \ Inf_var = one_var / zero_var; \ \ (void) &zero_var; \ (void) &one_var; \ - (void) &NaN_var; \ - (void) &SNaN_var; \ + (void) &qNaN_var; \ + (void) &sNaN_var; \ + (void) &minus_sNaN_var; \ (void) &Inf_var; \ \ set_sigaction_FP (); \ @@ -158,217 +119,225 @@ NAME (void) \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnan(NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnan (qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnan (NaN)", isnan (NaN_var)); \ + check (#FLOAT " isnan (qNaN)", isnan (qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnan(-NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnan (-qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnan (-NaN)", isnan (-NaN_var)); \ + check (#FLOAT " isnan (-qNaN)", isnan (-qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnan(SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnan (sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnan (SNaN)", isnan (SNaN_var)); \ + check (#FLOAT " isnan (sNaN)", \ + SNAN_TESTS (FLOAT) ? isnan (sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnan(-SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnan (-sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnan (-SNaN)", isnan (-SNaN_var)); \ + check (#FLOAT " isnan (-sNaN)", \ + SNAN_TESTS (FLOAT) ? isnan (minus_sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isinf(NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isinf (qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isinf (NaN)", !isinf (NaN_var)); \ + check (#FLOAT " isinf (qNaN)", !isinf (qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isinf(-NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isinf (-qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isinf (-NaN)", !isinf (-NaN_var)); \ + check (#FLOAT " isinf (-qNaN)", !isinf (-qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isinf(SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isinf (sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isinf (SNaN)", !isinf (SNaN_var)); \ + check (#FLOAT " isinf (sNaN)", \ + SNAN_TESTS (FLOAT) ? !isinf (sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isinf(-SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isinf (-sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isinf (-SNaN)", !isinf (-SNaN_var)); \ + check (#FLOAT " isinf (-sNaN)", \ + SNAN_TESTS (FLOAT) ? !isinf (minus_sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isfinite(NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isfinite (qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isfinite (NaN)", !isfinite (NaN_var)); \ + check (#FLOAT " isfinite (qNaN)", !isfinite (qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isfinite(-NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isfinite (-qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isfinite (-NaN)", !isfinite (-NaN_var)); \ + check (#FLOAT " isfinite (-qNaN)", !isfinite (-qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isfinite(SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isfinite (sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isfinite (SNaN)", !isfinite (SNaN_var)); \ + check (#FLOAT " isfinite (sNaN)", \ + SNAN_TESTS (FLOAT) ? !isfinite (sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isfinite(-SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isfinite (-sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isfinite (-SNaN)", !isfinite (-SNaN_var)); \ + check (#FLOAT " isfinite (-sNaN)", \ + SNAN_TESTS (FLOAT) ? !isfinite (minus_sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnormal(NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnormal (qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnormal (NaN)", !isnormal (NaN_var)); \ + check (#FLOAT " isnormal (qNaN)", !isnormal (qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnormal(-NaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnormal (-qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnormal (-NaN)", !isnormal (-NaN_var)); \ + check (#FLOAT " isnormal (-qNaN)", !isnormal (-qNaN_var)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnormal(SNaN) isnormal SIGFPE\n"); \ + printf (#FLOAT " isnormal (sNaN) isnormal SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnormal (SNaN)", !isnormal (SNaN_var)); \ + check (#FLOAT " isnormal (sNaN)", \ + SNAN_TESTS (FLOAT) ? !isnormal (sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " isnormal(-SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " isnormal (-sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " isnormal (-SNaN)", !isnormal (-SNaN_var)); \ + check (#FLOAT " isnormal (-sNaN)", \ + SNAN_TESTS (FLOAT) ? !isnormal (minus_sNaN_var) : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " fpclassify(NaN) raised SIGFPE\n"); \ + printf (#FLOAT " fpclassify (qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " fpclassify (NaN)", (fpclassify (NaN_var)==FP_NAN)); \ + check (#FLOAT " fpclassify (qNaN)", (fpclassify (qNaN_var)==FP_NAN)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " fpclassify(-NaN) raised SIGFPE\n"); \ + printf (#FLOAT " fpclassify (-qNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " fpclassify (-NaN)", (fpclassify (-NaN_var)==FP_NAN)); \ + check (#FLOAT " fpclassify (-qNaN)", (fpclassify (-qNaN_var)==FP_NAN)); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " fpclassify(SNaN) isnormal SIGFPE\n"); \ + printf (#FLOAT " fpclassify (sNaN) isnormal SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " fpclassify (SNaN)", (fpclassify (SNaN_var)==FP_NAN)); \ + check (#FLOAT " fpclassify (sNaN)", \ + SNAN_TESTS (FLOAT) ? fpclassify (sNaN_var) == FP_NAN : 1); \ } \ \ feclearexcept(FE_ALL_EXCEPT); \ feenableexcept (FE_ALL_EXCEPT); \ if (sigsetjmp(sigfpe_buf, 0)) \ { \ - printf (#FLOAT " fpclassify(-SNaN) raised SIGFPE\n"); \ + printf (#FLOAT " fpclassify (-sNaN) raised SIGFPE\n"); \ errors++; \ } else { \ - check (#FLOAT " fpclassify (-SNaN)", (fpclassify (-SNaN_var)==FP_NAN)); \ + check (#FLOAT " fpclassify (-sNaN)", \ + SNAN_TESTS (FLOAT) ? fpclassify (minus_sNaN_var) == FP_NAN : 1); \ } \ \ fesetenv(&saved_fenv); /* restore saved fenv */ \ remove_sigaction_FP(); \ } -TEST_FUNC (float_test, float) -TEST_FUNC (double_test, double) +TEST_FUNC (float_test, float, f) +TEST_FUNC (double_test, double, ) #ifndef NO_LONG_DOUBLE -TEST_FUNC (ldouble_test, ldouble) +TEST_FUNC (ldouble_test, ldouble, l) #endif static int do_test (void) { - init_signaling_nan(); - float_test(); double_test(); #ifndef NO_LONG_DOUBLE diff --git a/misc/Makefile b/misc/Makefile index 3d2328d189..5df70e6ecc 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -109,10 +109,6 @@ else $(objpfx)tst-tsearch: $(common-objpfx)math/libm.a endif -ifeq ($(build-bounded),yes) -$(objpfx)tst-tsearch-bp: $(common-objpfx)math/libm_b.a -endif - tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace tst-error1-ARGS = $(objpfx)tst-error1.out $(objpfx)tst-error1-mem: $(objpfx)tst-error1.out diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 81ab3187bf..f5f18e914c 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -128,14 +128,6 @@ #endif -/* Support for bounded pointers. */ -#ifndef __BOUNDED_POINTERS__ -# define __bounded /* nothing */ -# define __unbounded /* nothing */ -# define __ptrvalue /* nothing */ -#endif - - /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) @@ -222,6 +214,15 @@ # define __attribute_malloc__ /* Ignore */ #endif +/* Tell the compiler which arguments to an allocation function + indicate the size of the allocation. */ +#if __GNUC_PREREQ (4, 3) +# define __attribute_alloc_size__(params) \ + __attribute__ ((__alloc_size__ params)) +#else +# define __attribute_alloc_size__(params) /* Ignore. */ +#endif + /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ diff --git a/misc/sys/mman.h b/misc/sys/mman.h index 065fd497df..70454a5bd4 100644 --- a/misc/sys/mman.h +++ b/misc/sys/mman.h @@ -128,7 +128,7 @@ extern int mincore (void *__start, size_t __len, unsigned char *__vec) /* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function - takes another paramter which is a fixed address at which the block + takes another parameter which is a fixed address at which the block resides after a successful call. */ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...) __THROW; diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c index 87d8c630ac..c9896492fc 100644 --- a/misc/tst-efgcvt.c +++ b/misc/tst-efgcvt.c @@ -177,7 +177,7 @@ special (void) p = ecvt (INFINITY, 10, &decpt, &sign); if (sign != 0 || strcmp (p, "inf") != 0) - output_error ("ecvt", NAN, 10, "inf", 0, 0, p, decpt, sign); + output_error ("ecvt", INFINITY, 10, "inf", 0, 0, p, decpt, sign); /* Simply make sure these calls with large NDIGITs don't crash. */ (void) ecvt (123.456, 10000, &decpt, &sign); diff --git a/misc/tst-pselect.c b/misc/tst-pselect.c index 35d51d8ee0..36bc46da6c 100644 --- a/misc/tst-pselect.c +++ b/misc/tst-pselect.c @@ -4,6 +4,7 @@ #include <unistd.h> #include <sys/select.h> #include <sys/wait.h> +#include <stdlib.h> static volatile int handler_called; diff --git a/nis/nss-nisplus.h b/nis/nss-nisplus.h index f73ff47275..f28a08f142 100644 --- a/nis/nss-nisplus.h +++ b/nis/nss-nisplus.h @@ -28,7 +28,8 @@ extern const enum nss_status __niserr2nss_tab[] attribute_hidden; extern const unsigned int __niserr2nss_count attribute_hidden; -static inline enum nss_status +static enum nss_status +__attribute__ ((unused)) niserr2nss (int errval) { if ((unsigned int) errval >= __niserr2nss_count) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index c4f6c630cc..707744a657 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,123 @@ +2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com> + + * allocatestack.c (allocate_stack): Use __default_pthread_attr + instead of __default_stacksize. + * nptl-init.c (__pthread_initialize_minimal_internal): + Likewise. Initialize guardsize. + * pthreadP.h (__default_pthread_attr): Declare. + * pthread_attr_getstacksize.c (__pthread_attr_getstacksize): + Use __default_pthread_attr instead of __default_stacksize. + * pthread_create.c (default_attr): Remove. + (__pthread_create_2_1): Use __default_pthread_attr instead of + default_attr. + * vars.c (__default_stacksize): Remove. + (__default_pthread_attr): New static variable to store + default thread attributes. + +2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * pthread_barrier_init.c (default_attr): Rename to + default_barrierattr. + (pthread_barrier_init): Adjust for the rename. + * pthread_mutex_init.c (default_attr): Rename to + default_mutexattr. + (__pthread_mutex_init): Adjust for the rename. + * pthread_rwlock_init.c (default_attr): Rebane to + default_rwlockattr. + (__pthread_rwlock_init): Adjust for the rename. + +2013-03-12 Carlos O'Donell <carlos@redhat.com> + + * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>. + +2013-03-04 Roland McGrath <roland@hack.frob.com> + + * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: + Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H. + Use #include_next. + (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant. + (RTLD_PRIVATE_ERRNO): Likewise. + (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): + Move macros and associated declaration to ... + * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here. + Change multiple include guard to _LINUX_I386_DL_SYSDEP_H. + Use #include_next. + +2013-03-01 Carlos O'Donell <carlos@redhat.com> + + * Makefile (tests): Revert last change. + (tst-pthread-stack-env-ENV): Likewise. + * nptl-init.c (set_default_stacksize): Likewise. + (__pthread_initialize_minimal_internal): Likewise. + * tst-pthread-stack-env.c: Likewise. + +2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com> + + * tst-oddstacklimit.c: Include stdlib.h. + + * Makefile (tests): Add tst-pthread-stack-env. + (tst-pthread-stack-env-ENV): Set environment for test. + * nptl-init.c (set_default_stacksize): New function. + (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and + ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE. + * tst-pthread-stack-env.c: New test case. + +2013-02-21 David S. Miller <davem@davemloft.net> + + * sysdeps/unix/sysv/linux/sparc/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + +2013-02-21 Carlos O'Donell <carlos@redhat.com> + + * sysdeps/unix/sysv/linux/fork.c: Fix comment typo. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration + of exit. + * tst-barrier4.c: Likewise. + * tst-robust7.c: Likewise. + + [BZ #14920] + * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is + PI-aware. + * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use + PI-aware futex operations if available and mutex is PI-aware. + * pthread_cond_signal.c (__pthread_cond_signal): Likewise. + * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): + Likewise. + * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if + cancellation occurred just after futex returned successfully + from a PI operation with the mutex held. + (__pthread_cond_wait): Use PI-aware futex operations if + available and mutex is PI-aware. + * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31. + +2013-02-04 Andreas Schwab <schwab@suse.de> + + [BZ #14142] + * tst-cancel14.c: Include <sys/time.h>. + * tst-cancel15.c: Likewise. + * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>. + * tst-stackguard1.c: Include <tls.h> + 2013-01-16 Andreas Schwab <schwab@suse.de> [BZ #14327] diff --git a/nptl/Makeconfig b/nptl/Makeconfig index 7be9b0d7c4..2a1399d74b 100644 --- a/nptl/Makeconfig +++ b/nptl/Makeconfig @@ -24,7 +24,6 @@ have-thread-library = yes shared-thread-library = $(common-objpfx)nptl/libpthread_nonshared.a \ $(common-objpfx)nptl/libpthread.so static-thread-library = $(common-objpfx)nptl/libpthread.a -bounded-thread-library = $(common-objpfx)nptl/libpthread_b.a rpath-dirs += nptl diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 31c88291ae..56bf2570f8 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -358,7 +358,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, /* Get the stack size from the attribute if it is set. Otherwise we use the default we determined at start time. */ - size = attr->stacksize ?: __default_stacksize; + size = attr->stacksize ?: __default_pthread_attr.stacksize; /* Get memory for the stack. */ if (__builtin_expect (attr->flags & ATTR_FLAG_STACKADDR, 0)) diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 19e6616420..63fb729fc6 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -423,7 +423,8 @@ __pthread_initialize_minimal_internal (void) /* Round the resource limit up to page size. */ limit.rlim_cur = (limit.rlim_cur + pagesz - 1) & -pagesz; - __default_stacksize = limit.rlim_cur; + __default_pthread_attr.stacksize = limit.rlim_cur; + __default_pthread_attr.guardsize = GLRO (dl_pagesize); #ifdef SHARED /* Transfer the old value from the dynamic linker's internal location. */ diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 993a79e250..954b54a50a 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -147,8 +147,8 @@ enum /* Internal variables. */ -/* Default stack size. */ -extern size_t __default_stacksize attribute_hidden; +/* Default pthread attributes. */ +extern struct pthread_attr __default_pthread_attr attribute_hidden; /* Size and alignment of static TLS block. */ extern size_t __static_tls_size attribute_hidden; @@ -577,4 +577,16 @@ extern void __wait_lookup_done (void) attribute_hidden; # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); #endif +/* Test if the mutex is suitable for the FUTEX_WAIT_REQUEUE_PI operation. */ +#if (defined lll_futex_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) +# define USE_REQUEUE_PI(mut) \ + ((mut) && (mut) != (void *) ~0l \ + && (((mut)->__data.__kind \ + & (PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP)) \ + == PTHREAD_MUTEX_PRIO_INHERIT_NP)) +#else +# define USE_REQUEUE_PI(mut) 0 +#endif + #endif /* pthreadP.h */ diff --git a/nptl/pthread_attr_getstacksize.c b/nptl/pthread_attr_getstacksize.c index 6df70623e8..42d3f8f44c 100644 --- a/nptl/pthread_attr_getstacksize.c +++ b/nptl/pthread_attr_getstacksize.c @@ -32,7 +32,7 @@ __pthread_attr_getstacksize (attr, stacksize) /* If the user has not set a stack size we return what the system will use as the default. */ - *stacksize = iattr->stacksize ?: __default_stacksize; + *stacksize = iattr->stacksize ?: __default_pthread_attr.stacksize; return 0; } diff --git a/nptl/pthread_barrier_init.c b/nptl/pthread_barrier_init.c index d5891fd41e..6d2910ef95 100644 --- a/nptl/pthread_barrier_init.c +++ b/nptl/pthread_barrier_init.c @@ -22,7 +22,7 @@ #include <kernel-features.h> -static const struct pthread_barrierattr default_attr = +static const struct pthread_barrierattr default_barrierattr = { .pshared = PTHREAD_PROCESS_PRIVATE }; @@ -42,7 +42,7 @@ pthread_barrier_init (barrier, attr, count) const struct pthread_barrierattr *iattr = (attr != NULL ? iattr = (struct pthread_barrierattr *) attr - : &default_attr); + : &default_barrierattr); if (iattr->pshared != PTHREAD_PROCESS_PRIVATE && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0)) diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c index 968ee03da7..0702ec0ec2 100644 --- a/nptl/pthread_cond_broadcast.c +++ b/nptl/pthread_cond_broadcast.c @@ -53,34 +53,37 @@ __pthread_cond_broadcast (cond) /* We are done. */ lll_unlock (cond->__data.__lock, pshared); - /* Do not use requeue for pshared condvars. */ - if (cond->__data.__mutex == (void *) ~0l) - goto wake_all; - /* Wake everybody. */ pthread_mutex_t *mut = (pthread_mutex_t *) cond->__data.__mutex; - /* XXX: Kernel so far doesn't support requeue to PI futex. */ - /* XXX: Kernel so far can only requeue to the same type of futex, - in this case private (we don't requeue for pshared condvars). */ - if (__builtin_expect (mut->__data.__kind - & (PTHREAD_MUTEX_PRIO_INHERIT_NP - | PTHREAD_MUTEX_PSHARED_BIT), 0)) + /* Do not use requeue for pshared condvars. */ + if (mut == (void *) ~0l + || PTHREAD_MUTEX_PSHARED (mut) & PTHREAD_MUTEX_PSHARED_BIT) goto wake_all; - /* lll_futex_requeue returns 0 for success and non-zero - for errors. */ - if (__builtin_expect (lll_futex_requeue (&cond->__data.__futex, 1, - INT_MAX, &mut->__data.__lock, - futex_val, LLL_PRIVATE), 0)) +#if (defined lll_futex_cmp_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; + pi_flag &= mut->__data.__kind; + + if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP) { - /* The requeue functionality is not available. */ - wake_all: - lll_futex_wake (&cond->__data.__futex, INT_MAX, pshared); + if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX, + &mut->__data.__lock, futex_val, + LLL_PRIVATE) == 0) + return 0; } - - /* That's all. */ - return 0; + else +#endif + /* lll_futex_requeue returns 0 for success and non-zero + for errors. */ + if (!__builtin_expect (lll_futex_requeue (&cond->__data.__futex, 1, + INT_MAX, &mut->__data.__lock, + futex_val, LLL_PRIVATE), 0)) + return 0; + +wake_all: + lll_futex_wake (&cond->__data.__futex, INT_MAX, pshared); } /* We are done. */ diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c index 908a2acfaf..102d0b380c 100644 --- a/nptl/pthread_cond_signal.c +++ b/nptl/pthread_cond_signal.c @@ -47,12 +47,35 @@ __pthread_cond_signal (cond) ++cond->__data.__wakeup_seq; ++cond->__data.__futex; - /* Wake one. */ - if (! __builtin_expect (lll_futex_wake_unlock (&cond->__data.__futex, 1, - 1, &cond->__data.__lock, - pshared), 0)) - return 0; +#if (defined lll_futex_cmp_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; + pthread_mutex_t *mut = cond->__data.__mutex; + /* Do not use requeue for pshared condvars. */ + if (mut != (void *) ~0l) + pi_flag &= mut->__data.__kind; + + if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0) + /* This can only really fail with a ENOSYS, since nobody can modify + futex while we have the cond_lock. */ + && lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0, + &mut->__data.__lock, + cond->__data.__futex, pshared) == 0) + { + lll_unlock (cond->__data.__lock, pshared); + return 0; + } + else +#endif + /* Wake one. */ + if (! __builtin_expect (lll_futex_wake_unlock (&cond->__data.__futex, + 1, 1, + &cond->__data.__lock, + pshared), 0)) + return 0; + + /* Fallback if neither of them work. */ lll_futex_wake (&cond->__data.__futex, 1, pshared); } diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c index 0f52bd885c..0a2d092e6c 100644 --- a/nptl/pthread_cond_timedwait.c +++ b/nptl/pthread_cond_timedwait.c @@ -64,6 +64,11 @@ __pthread_cond_timedwait (cond, mutex, abstime) int pshared = (cond->__data.__mutex == (void *) ~0l) ? LLL_SHARED : LLL_PRIVATE; +#if (defined lll_futex_timed_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + int pi_flag = 0; +#endif + /* Make sure we are alone. */ lll_lock (cond->__data.__lock, pshared); @@ -155,17 +160,46 @@ __pthread_cond_timedwait (cond, mutex, abstime) /* Enable asynchronous cancellation. Required by the standard. */ cbuffer.oldtype = __pthread_enable_asynccancel (); +/* REQUEUE_PI was implemented after FUTEX_CLOCK_REALTIME, so it is sufficient + to check just the former. */ +#if (defined lll_futex_timed_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + /* If pi_flag remained 1 then it means that we had the lock and the mutex + but a spurious waker raced ahead of us. Give back the mutex before + going into wait again. */ + if (pi_flag) + { + __pthread_mutex_cond_lock_adjust (mutex); + __pthread_mutex_unlock_usercnt (mutex, 0); + } + pi_flag = USE_REQUEUE_PI (mutex); + + if (pi_flag) + { + unsigned int clockbit = (cond->__data.__nwaiters & 1 + ? 0 : FUTEX_CLOCK_REALTIME); + err = lll_futex_timed_wait_requeue_pi (&cond->__data.__futex, + futex_val, abstime, clockbit, + &mutex->__data.__lock, + pshared); + pi_flag = (err == 0); + } + else +#endif + + { #if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \ || !defined lll_futex_timed_wait_bitset) - /* Wait until woken by signal or broadcast. */ - err = lll_futex_timed_wait (&cond->__data.__futex, - futex_val, &rt, pshared); + /* Wait until woken by signal or broadcast. */ + err = lll_futex_timed_wait (&cond->__data.__futex, + futex_val, &rt, pshared); #else - unsigned int clockbit = (cond->__data.__nwaiters & 1 - ? 0 : FUTEX_CLOCK_REALTIME); - err = lll_futex_timed_wait_bitset (&cond->__data.__futex, futex_val, - abstime, clockbit, pshared); + unsigned int clockbit = (cond->__data.__nwaiters & 1 + ? 0 : FUTEX_CLOCK_REALTIME); + err = lll_futex_timed_wait_bitset (&cond->__data.__futex, futex_val, + abstime, clockbit, pshared); #endif + } /* Disable asynchronous cancellation. */ __pthread_disable_asynccancel (cbuffer.oldtype); @@ -217,7 +251,16 @@ __pthread_cond_timedwait (cond, mutex, abstime) __pthread_cleanup_pop (&buffer, 0); /* Get the mutex before returning. */ - err = __pthread_mutex_cond_lock (mutex); +#if (defined lll_futex_timed_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + if (pi_flag) + { + __pthread_mutex_cond_lock_adjust (mutex); + err = 0; + } + else +#endif + err = __pthread_mutex_cond_lock (mutex); return err ?: result; } diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c index 0ae320cb83..01d42d7834 100644 --- a/nptl/pthread_cond_wait.c +++ b/nptl/pthread_cond_wait.c @@ -26,7 +26,6 @@ #include <shlib-compat.h> #include <stap-probe.h> - struct _condvar_cleanup_buffer { int oldtype; @@ -85,8 +84,15 @@ __condvar_cleanup (void *arg) lll_futex_wake (&cbuffer->cond->__data.__futex, INT_MAX, pshared); /* Get the mutex before returning unless asynchronous cancellation - is in effect. */ - __pthread_mutex_cond_lock (cbuffer->mutex); + is in effect. We don't try to get the mutex if we already own it. */ + if (!(USE_REQUEUE_PI (cbuffer->mutex)) + || ((cbuffer->mutex->__data.__lock & FUTEX_TID_MASK) + != THREAD_GETMEM (THREAD_SELF, tid))) + { + __pthread_mutex_cond_lock (cbuffer->mutex); + } + else + __pthread_mutex_cond_lock_adjust (cbuffer->mutex); } @@ -101,6 +107,11 @@ __pthread_cond_wait (cond, mutex) int pshared = (cond->__data.__mutex == (void *) ~0l) ? LLL_SHARED : LLL_PRIVATE; +#if (defined lll_futex_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + int pi_flag = 0; +#endif + LIBC_PROBE (cond_wait, 2, cond, mutex); /* Make sure we are alone. */ @@ -144,15 +155,36 @@ __pthread_cond_wait (cond, mutex) do { unsigned int futex_val = cond->__data.__futex; - /* Prepare to wait. Release the condvar futex. */ lll_unlock (cond->__data.__lock, pshared); /* Enable asynchronous cancellation. Required by the standard. */ cbuffer.oldtype = __pthread_enable_asynccancel (); - /* Wait until woken by signal or broadcast. */ - lll_futex_wait (&cond->__data.__futex, futex_val, pshared); +#if (defined lll_futex_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + /* If pi_flag remained 1 then it means that we had the lock and the mutex + but a spurious waker raced ahead of us. Give back the mutex before + going into wait again. */ + if (pi_flag) + { + __pthread_mutex_cond_lock_adjust (mutex); + __pthread_mutex_unlock_usercnt (mutex, 0); + } + pi_flag = USE_REQUEUE_PI (mutex); + + if (pi_flag) + { + err = lll_futex_wait_requeue_pi (&cond->__data.__futex, + futex_val, &mutex->__data.__lock, + pshared); + + pi_flag = (err == 0); + } + else +#endif + /* Wait until woken by signal or broadcast. */ + lll_futex_wait (&cond->__data.__futex, futex_val, pshared); /* Disable asynchronous cancellation. */ __pthread_disable_asynccancel (cbuffer.oldtype); @@ -189,8 +221,17 @@ __pthread_cond_wait (cond, mutex) /* The cancellation handling is back to normal, remove the handler. */ __pthread_cleanup_pop (&buffer, 0); - /* Get the mutex before returning. */ - return __pthread_mutex_cond_lock (mutex); + /* Get the mutex before returning. Not needed for PI. */ +#if (defined lll_futex_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) + if (pi_flag) + { + __pthread_mutex_cond_lock_adjust (mutex); + return 0; + } + else +#endif + return __pthread_mutex_cond_lock (mutex); } versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 4fe0755079..c18278cf08 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -311,6 +311,9 @@ start_thread (void *arg) #endif } + /* Call destructors for the thread_local TLS variables. */ + __call_tls_dtors (); + /* Run the destructor for the thread-local data. */ __nptl_deallocate_tsd (); @@ -432,15 +435,6 @@ start_thread (void *arg) } -/* Default thread attributes for the case when the user does not - provide any. */ -static const struct pthread_attr default_attr = - { - /* Just some value > 0 which gets rounded to the nearest page size. */ - .guardsize = 1, - }; - - int __pthread_create_2_1 (newthread, attr, start_routine, arg) pthread_t *newthread; @@ -454,7 +448,7 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg) if (iattr == NULL) /* Is this the best idea? On NUMA machines this could mean accessing far-away memory. */ - iattr = &default_attr; + iattr = &__default_pthread_attr; struct pthread *pd = NULL; int err = ALLOCATE_STACK (iattr, &pd); diff --git a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c index 36da3f8bfb..174d900dc8 100644 --- a/nptl/pthread_mutex_init.c +++ b/nptl/pthread_mutex_init.c @@ -24,7 +24,7 @@ #include <stap-probe.h> -static const struct pthread_mutexattr default_attr = +static const struct pthread_mutexattr default_mutexattr = { /* Default is a normal mutex, not shared between processes. */ .mutexkind = PTHREAD_MUTEX_NORMAL @@ -45,7 +45,8 @@ __pthread_mutex_init (mutex, mutexattr) assert (sizeof (pthread_mutex_t) <= __SIZEOF_PTHREAD_MUTEX_T); - imutexattr = (const struct pthread_mutexattr *) mutexattr ?: &default_attr; + imutexattr = ((const struct pthread_mutexattr *) mutexattr + ?: &default_mutexattr); /* Sanity checks. */ switch (__builtin_expect (imutexattr->mutexkind diff --git a/nptl/pthread_rwlock_init.c b/nptl/pthread_rwlock_init.c index 16bfe2d757..29bef71db3 100644 --- a/nptl/pthread_rwlock_init.c +++ b/nptl/pthread_rwlock_init.c @@ -21,7 +21,7 @@ #include <kernel-features.h> -static const struct pthread_rwlockattr default_attr = +static const struct pthread_rwlockattr default_rwlockattr = { .lockkind = PTHREAD_RWLOCK_DEFAULT_NP, .pshared = PTHREAD_PROCESS_PRIVATE @@ -35,7 +35,7 @@ __pthread_rwlock_init (rwlock, attr) { const struct pthread_rwlockattr *iattr; - iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_attr; + iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_rwlockattr; memset (rwlock, '\0', sizeof (*rwlock)); diff --git a/nptl/sysdeps/pthread/bits/libc-lockP.h b/nptl/sysdeps/pthread/bits/libc-lockP.h index 31a40aa982..2781e191ec 100644 --- a/nptl/sysdeps/pthread/bits/libc-lockP.h +++ b/nptl/sysdeps/pthread/bits/libc-lockP.h @@ -375,31 +375,30 @@ extern int __pthread_atfork (void (*__prepare) (void), single-threaded processes. */ #ifndef __NO_WEAK_PTHREAD_ALIASES # ifdef weak_extern -# include <bp-sym.h> -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) +weak_extern (__pthread_mutex_init) +weak_extern (__pthread_mutex_destroy) +weak_extern (__pthread_mutex_lock) +weak_extern (__pthread_mutex_trylock) +weak_extern (__pthread_mutex_unlock) +weak_extern (__pthread_mutexattr_init) +weak_extern (__pthread_mutexattr_destroy) +weak_extern (__pthread_mutexattr_settype) +weak_extern (__pthread_rwlock_init) +weak_extern (__pthread_rwlock_destroy) +weak_extern (__pthread_rwlock_rdlock) +weak_extern (__pthread_rwlock_tryrdlock) +weak_extern (__pthread_rwlock_wrlock) +weak_extern (__pthread_rwlock_trywrlock) +weak_extern (__pthread_rwlock_unlock) +weak_extern (__pthread_key_create) +weak_extern (__pthread_setspecific) +weak_extern (__pthread_getspecific) +weak_extern (__pthread_once) weak_extern (__pthread_initialize) weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -weak_extern (BP_SYM (pthread_setcancelstate)) +weak_extern (_pthread_cleanup_push_defer) +weak_extern (_pthread_cleanup_pop_restore) +weak_extern (pthread_setcancelstate) # else # pragma weak __pthread_mutex_init # pragma weak __pthread_mutex_destroy diff --git a/nptl/sysdeps/pthread/tst-timer.c b/nptl/sysdeps/pthread/tst-timer.c index f46addd791..fa1b6e72a3 100644 --- a/nptl/sysdeps/pthread/tst-timer.c +++ b/nptl/sysdeps/pthread/tst-timer.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <time.h> #include <unistd.h> +#include <stdlib.h> static void diff --git a/nptl/sysdeps/unix/sysv/linux/fork.c b/nptl/sysdeps/unix/sysv/linux/fork.c index 05f3dce03b..ff089422e4 100644 --- a/nptl/sysdeps/unix/sysv/linux/fork.c +++ b/nptl/sysdeps/unix/sysv/linux/fork.c @@ -35,7 +35,7 @@ unsigned long int *__fork_generation_pointer; -/* The single linked list of all currently registered for handlers. */ +/* The single linked list of all currently registered fork handlers. */ struct fork_handler *__fork_handlers; diff --git a/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h b/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h index 29a77a08fa..a89eb0a62f 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/dl-sysdep.h @@ -16,12 +16,31 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _DL_SYSDEP_H -# include "i686/dl-sysdep.h" +#ifndef _LINUX_I386_DL_SYSDEP_H -/* sysenter/syscall is not useful on i386 through i586, but the dynamic - linker and dl code in libc.a has to be able to load i686 compiled - libraries. */ -# undef USE_DL_SYSINFO +#include_next <dl-sysdep.h> + +/* Traditionally system calls have been made using int $0x80. A + second method was introduced which, if possible, will use the + sysenter/syscall instructions. To signal the presence and where to + find the code the kernel passes an AT_SYSINFO value in the + auxiliary vector to the application. */ +#define NEED_DL_SYSINFO 1 + +#ifndef __ASSEMBLER__ +extern void _dl_sysinfo_int80 (void) attribute_hidden; +# define DL_SYSINFO_DEFAULT (uintptr_t) _dl_sysinfo_int80 +# define DL_SYSINFO_IMPLEMENTATION \ + asm (".text\n\t" \ + ".type _dl_sysinfo_int80,@function\n\t" \ + ".hidden _dl_sysinfo_int80\n" \ + CFI_STARTPROC "\n" \ + "_dl_sysinfo_int80:\n\t" \ + "int $0x80;\n\t" \ + "ret;\n\t" \ + CFI_ENDPROC "\n" \ + ".size _dl_sysinfo_int80,.-_dl_sysinfo_int80\n\t" \ + ".previous"); +#endif #endif /* dl-sysdep.h */ diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h b/nptl/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h index 466f0177c3..c59c8dbbdb 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h @@ -16,52 +16,14 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 +#ifndef _LINUX_I686_DL_SYSDEP_H +#define _LINUX_I686_DL_SYSDEP_H 1 -/* This macro must be defined to either 0 or 1. +/* The i386 file does most of the work. */ +#include_next <dl-sysdep.h> - If 1, then an errno global variable hidden in ld.so will work right with - all the errno-using libc code compiled for ld.so, and there is never a - need to share the errno location with libc. This is appropriate only if - all the libc functions that ld.so uses are called without PLT and always - get the versions linked into ld.so rather than the libc ones. */ - -#ifdef IS_IN_rtld -# define RTLD_PRIVATE_ERRNO 1 -#else -# define RTLD_PRIVATE_ERRNO 0 -#endif - -/* Traditionally system calls have been made using int $0x80. A - second method was introduced which, if possible, will use the - sysenter/syscall instructions. To signal the presence and where to - find the code the kernel passes an AT_SYSINFO value in the - auxiliary vector to the application. */ -#define NEED_DL_SYSINFO 1 +/* Actually use the vDSO entry point for syscalls. + i386/dl-sysdep.h arranges to support it, but not use it. */ #define USE_DL_SYSINFO 1 -#if defined NEED_DL_SYSINFO && !defined __ASSEMBLER__ -extern void _dl_sysinfo_int80 (void) attribute_hidden; -# define DL_SYSINFO_DEFAULT (uintptr_t) _dl_sysinfo_int80 -# define DL_SYSINFO_IMPLEMENTATION \ - asm (".text\n\t" \ - ".type _dl_sysinfo_int80,@function\n\t" \ - ".hidden _dl_sysinfo_int80\n" \ - CFI_STARTPROC "\n" \ - "_dl_sysinfo_int80:\n\t" \ - "int $0x80;\n\t" \ - "ret;\n\t" \ - CFI_ENDPROC "\n" \ - ".size _dl_sysinfo_int80,.-_dl_sysinfo_int80\n\t" \ - ".previous"); -#endif - - -#ifndef __ASSEMBLER__ -/* Get version of the OS. */ -extern int _dl_discover_osversion (void) attribute_hidden; -# define HAVE_DL_DISCOVER_OSVERSION 1 -#endif - #endif /* dl-sysdep.h */ diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c index c33791ac2f..0efb72a56c 100644 --- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c @@ -21,7 +21,7 @@ #include <sysdep.h> #include <lowlevellock.h> #include <sys/time.h> - +#include <atomic.h> void __lll_lock_wait_private (int *futex) diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h index b4b1fd4afd..f33f703346 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h @@ -39,6 +39,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -149,6 +151,34 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + #ifdef UP # define __lll_acq_instr "" diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h index a0163d6371..3dab05e057 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h @@ -37,6 +37,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -141,6 +143,32 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + }) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + #define lll_compare_and_swap(futex, oldval, newval, operation) \ do { \ __typeof (futex) __futex = (futex); \ diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h index c88ec16434..2d7d9f82f6 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h @@ -37,6 +37,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -157,6 +159,34 @@ extern void __cpu_relax (void); }) #endif +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + static inline int __attribute__ ((always_inline)) __lll_trylock (int *futex) diff --git a/nptl/tst-barrier4.c b/nptl/tst-barrier4.c index 8b5b153219..2836fb341b 100644 --- a/nptl/tst-barrier4.c +++ b/nptl/tst-barrier4.c @@ -20,6 +20,7 @@ #include <errno.h> #include <pthread.h> #include <stdio.h> +#include <stdlib.h> static pthread_barrier_t b1; diff --git a/nptl/tst-cancel14.c b/nptl/tst-cancel14.c index fbaed4940f..ca9042d60a 100644 --- a/nptl/tst-cancel14.c +++ b/nptl/tst-cancel14.c @@ -23,6 +23,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/time.h> static pthread_barrier_t bar; diff --git a/nptl/tst-cancel15.c b/nptl/tst-cancel15.c index 0119cc761f..3f320ad00d 100644 --- a/nptl/tst-cancel15.c +++ b/nptl/tst-cancel15.c @@ -23,6 +23,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/time.h> static pthread_barrier_t bar; diff --git a/nptl/tst-mutex9.c b/nptl/tst-mutex9.c index adb3b61f09..1d689bd7e4 100644 --- a/nptl/tst-mutex9.c +++ b/nptl/tst-mutex9.c @@ -18,10 +18,13 @@ #include <errno.h> #include <pthread.h> +#include <stdint.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/mman.h> +#include <sys/time.h> #include <sys/wait.h> diff --git a/nptl/tst-oddstacklimit.c b/nptl/tst-oddstacklimit.c index 2c7783f56f..49754fe48c 100644 --- a/nptl/tst-oddstacklimit.c +++ b/nptl/tst-oddstacklimit.c @@ -21,6 +21,7 @@ #include <string.h> #include <sys/resource.h> #include <sys/wait.h> +#include <stdlib.h> /* This sets the stack resource limit to 1023kb, which is not a multiple of the page size since every architecture's page size is > 1k. */ diff --git a/nptl/tst-robust7.c b/nptl/tst-robust7.c index e64a4fc86d..ed1857c4ec 100644 --- a/nptl/tst-robust7.c +++ b/nptl/tst-robust7.c @@ -20,6 +20,7 @@ #include <pthread.h> #include <stdbool.h> #include <stdio.h> +#include <stdlib.h> static pthread_barrier_t b; diff --git a/nptl/tst-stackguard1.c b/nptl/tst-stackguard1.c index f0f707f43a..57a48ad292 100644 --- a/nptl/tst-stackguard1.c +++ b/nptl/tst-stackguard1.c @@ -24,6 +24,7 @@ #include <string.h> #include <sys/wait.h> #include <stackguard-macros.h> +#include <tls.h> #include <unistd.h> static const char *command; diff --git a/nptl/vars.c b/nptl/vars.c index 2bcd1f8e0a..45ca486143 100644 --- a/nptl/vars.c +++ b/nptl/vars.c @@ -20,13 +20,9 @@ #include <tls.h> #include <unistd.h> -/* Default stack size. */ -size_t __default_stacksize attribute_hidden -#ifdef SHARED -; -#else - = PTHREAD_STACK_MIN; -#endif +/* Default thread attributes for the case when the user does not + provide any. */ +struct pthread_attr __default_pthread_attr attribute_hidden; /* Flag whether the machine is SMP or not. */ int __is_smp attribute_hidden; diff --git a/nscd/connections.c b/nscd/connections.c index f6e2328637..56c327971b 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -976,9 +976,25 @@ cannot change socket to nonblocking mode: %s"), } +/* Register the file in FINFO as a traced file for the database DBS[DBIX]. + + We support registering multiple files per database. Each call to + register_traced_file adds to the list of registered files. + + When we prune the database, either through timeout or a request to + invalidate, we will check to see if any of the registered files has changed. + When we accept new connections to handle a cache request we will also + check to see if any of the registered files has changed. + + If we have inotify support then we install an inotify fd to notify us of + file deletion or modification, both of which will require we invalidate + the cache for the database. Without inotify support we stat the file and + store st_mtime to determine if the file has been modified. */ void register_traced_file (size_t dbidx, struct traced_file *finfo) { + /* If the database is disabled or file checking is disabled + then ignore the registration. */ if (! dbs[dbidx].enabled || ! dbs[dbidx].check_file) return; @@ -1859,7 +1875,7 @@ fd_ready (int fd) /* Check whether restarting should happen. */ -static inline int +static bool restart_p (time_t now) { return (paranoia && readylist == NULL && nready == nthreads @@ -1870,6 +1886,63 @@ restart_p (time_t now) /* Array for times a connection was accepted. */ static time_t *starttime; +#ifdef HAVE_INOTIFY +/* Inotify event for changed file. */ +union __inev +{ + struct inotify_event i; +# ifndef PATH_MAX +# define PATH_MAX 1024 +# endif + char buf[sizeof (struct inotify_event) + PATH_MAX]; +}; + +/* Process the inotify event in INEV. If the event matches any of the files + registered with a database then mark that database as requiring its cache + to be cleared. We indicate the cache needs clearing by setting + TO_CLEAR[DBCNT] to true for the matching database. */ +static inline void +inotify_check_files (bool *to_clear, union __inev *inev) +{ + /* Check which of the files changed. */ + for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt) + { + struct traced_file *finfo = dbs[dbcnt].traced_files; + + while (finfo != NULL) + { + /* Inotify event watch descriptor matches. */ + if (finfo->inotify_descr == inev->i.wd) + { + /* Mark cache as needing to be cleared and reinitialize. */ + to_clear[dbcnt] = true; + if (finfo->call_res_init) + res_init (); + return; + } + + finfo = finfo->next; + } + } +} + +/* If an entry in the array of booleans TO_CLEAR is TRUE then clear the cache + for the associated database, otherwise do nothing. The TO_CLEAR array must + have LASTDB entries. */ +static inline void +clear_db_cache (bool *to_clear) +{ + for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt) + if (to_clear[dbcnt]) + { + pthread_mutex_lock (&dbs[dbcnt].prune_lock); + dbs[dbcnt].clear_cache = 1; + pthread_mutex_unlock (&dbs[dbcnt].prune_lock); + pthread_cond_signal (&dbs[dbcnt].prune_cond); + } +} + +#endif static void __attribute__ ((__noreturn__)) @@ -1976,15 +2049,10 @@ main_loop_poll (void) if (conns[1].revents != 0) { bool to_clear[lastdb] = { false, }; - union - { -# ifndef PATH_MAX -# define PATH_MAX 1024 -# endif - struct inotify_event i; - char buf[sizeof (struct inotify_event) + PATH_MAX]; - } inev; + union __inev inev; + /* Read all inotify events for files registered via + register_traced_file(). */ while (1) { ssize_t nb = TEMP_FAILURE_RETRY (read (inotify_fd, &inev, @@ -2010,35 +2078,11 @@ disabled inotify after read error %d"), } /* Check which of the files changed. */ - for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt) - { - struct traced_file *finfo = dbs[dbcnt].traced_files; - - while (finfo != NULL) - { - if (finfo->inotify_descr == inev.i.wd) - { - to_clear[dbcnt] = true; - if (finfo->call_res_init) - res_init (); - goto next; - } - - finfo = finfo->next; - } - } - next:; + inotify_check_files (to_clear, &inev); } /* Actually perform the cache clearing. */ - for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt) - if (to_clear[dbcnt]) - { - pthread_mutex_lock (&dbs[dbcnt].prune_lock); - dbs[dbcnt].clear_cache = 1; - pthread_mutex_unlock (&dbs[dbcnt].prune_lock); - pthread_cond_signal (&dbs[dbcnt].prune_cond); - } + clear_db_cache (to_clear); --n; } @@ -2208,12 +2252,10 @@ main_loop_epoll (int efd) else if (revs[cnt].data.fd == inotify_fd) { bool to_clear[lastdb] = { false, }; - union - { - struct inotify_event i; - char buf[sizeof (struct inotify_event) + PATH_MAX]; - } inev; + union __inev inev; + /* Read all inotify events for files registered via + register_traced_file(). */ while (1) { ssize_t nb = TEMP_FAILURE_RETRY (read (inotify_fd, &inev, @@ -2235,35 +2277,11 @@ main_loop_epoll (int efd) } /* Check which of the files changed. */ - for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt) - { - struct traced_file *finfo = dbs[dbcnt].traced_files; - - while (finfo != NULL) - { - if (finfo->inotify_descr == inev.i.wd) - { - to_clear[dbcnt] = true; - if (finfo->call_res_init) - res_init (); - goto next; - } - - finfo = finfo->next; - } - } - next:; + inotify_check_files(to_clear, &inev); } /* Actually perform the cache clearing. */ - for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt) - if (to_clear[dbcnt]) - { - pthread_mutex_lock (&dbs[dbcnt].prune_lock); - dbs[dbcnt].clear_cache = 1; - pthread_mutex_unlock (&dbs[dbcnt].prune_lock); - pthread_cond_signal (&dbs[dbcnt].prune_cond); - } + clear_db_cache (to_clear); } # endif # ifdef HAVE_NETLINK diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 11964f607d..360852b2a6 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -362,8 +362,9 @@ extern struct mapped_database *__nscd_get_map_ref (request_type type, extern void __nscd_unmap (struct mapped_database *mapped); /* Drop reference of mapping. */ -static inline int __nscd_drop_map_ref (struct mapped_database *map, - int *gc_cycle) +static int +__attribute__ ((unused)) +__nscd_drop_map_ref (struct mapped_database *map, int *gc_cycle) { if (map != NO_MAPPING) { diff --git a/nscd/nscd.h b/nscd/nscd.h index 46d0433286..cbd402a958 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -200,12 +200,7 @@ extern gid_t old_gid; /* Prototypes for global functions. */ /* Wrapper functions with error checking for standard functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); -extern void *xrealloc (void *o, size_t n) - __attribute_malloc__ __attribute_alloc_size (2); +#include <programs/xmalloc.h> /* nscd.c */ extern void termination_handler (int signum) __attribute__ ((__noreturn__)); diff --git a/nss/getent.c b/nss/getent.c index 64e642f1da..aa4eaf9e0d 100644 --- a/nss/getent.c +++ b/nss/getent.c @@ -55,7 +55,7 @@ static const char args_doc[] = N_("database [key ...]"); /* Supported options. */ static const struct argp_option args_options[] = { - { "service", 's', "CONFIG", 0, N_("Service configuration to be used") }, + { "service", 's', N_("CONFIG"), 0, N_("Service configuration to be used") }, { "no-idn", 'i', NULL, 0, N_("disable IDN encoding") }, { NULL, 0, NULL, 0, NULL }, }; @@ -92,7 +92,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ } /* This is for aliases */ -static inline void +static void print_aliases (struct aliasent *alias) { unsigned int i = 0; @@ -181,7 +181,7 @@ ethers_keys (int number, char *key[]) } /* This is for group */ -static inline void +static void print_group (struct group *grp) { unsigned int i = 0; @@ -600,7 +600,7 @@ networks_keys (int number, char *key[]) } /* Now is all for passwd */ -static inline void +static void print_passwd (struct passwd *pwd) { printf ("%s:%s:%lu:%lu:%s:%s:%s\n", @@ -651,7 +651,7 @@ passwd_keys (int number, char *key[]) } /* This is for protocols */ -static inline void +static void print_protocols (struct protoent *proto) { unsigned int i; @@ -701,7 +701,7 @@ protocols_keys (int number, char *key[]) } /* Now is all for rpc */ -static inline void +static void print_rpc (struct rpcent *rpc) { int i; diff --git a/nss/makedb.c b/nss/makedb.c index d4a19b3597..13bd8461d4 100644 --- a/nss/makedb.c +++ b/nss/makedb.c @@ -173,10 +173,7 @@ static void reset_file_creation_context (void); /* External functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); +#include <programs/xmalloc.h> int @@ -1,15 +1,15 @@ # Mensajes en español para GNU libc. -# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2011, 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the glibc package. # Enrique Melero Gómez <melero@eurolands.com>, 1996, 1997. -# Santiago Vila Doncel <sanvila@unex.es>, 1997, 1998, 2001, 2002, 2003, 2004, 2011. +# Santiago Vila Doncel <sanvila@unex.es>, 1997, 1998, 2001, 2002, 2003, 2004, 2011, 2013. # msgid "" msgstr "" -"Project-Id-Version: GNU libc 2.14\n" +"Project-Id-Version: GNU libc 2.17-pre1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-31 00:06-0400\n" -"PO-Revision-Date: 2011-10-25 17:03+0200\n" +"POT-Creation-Date: 2012-12-07 15:10-0500\n" +"PO-Revision-Date: 2013-03-03 22:30+0100\n" "Last-Translator: Santiago Vila Doncel <sanvila@unex.es>\n" "Language-Team: Spanish <es@li.org>\n" "Language: es\n" @@ -17,79 +17,79 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" -#: argp/argp-help.c:228 +#: argp/argp-help.c:227 #, c-format msgid "%.*s: ARGP_HELP_FMT parameter requires a value" msgstr "%.*s: El argumento ARGP_HELP_FMT requiere un valor" -#: argp/argp-help.c:238 +#: argp/argp-help.c:237 #, c-format msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Parámetro ARGP_HELP_FMT desconocido" -#: argp/argp-help.c:251 +#: argp/argp-help.c:250 #, c-format msgid "Garbage in ARGP_HELP_FMT: %s" msgstr "Inconsistencias en ARGP_HELP_FMT: %s" -#: argp/argp-help.c:1215 +#: argp/argp-help.c:1214 msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "" "Los argumentos obligatorios u opcionales para las opciones largas son\n" "también obligatorios u opcionales para las opciones cortas correspondientes." -#: argp/argp-help.c:1601 +#: argp/argp-help.c:1600 msgid "Usage:" msgstr "Modo de empleo:" -#: argp/argp-help.c:1605 +#: argp/argp-help.c:1604 msgid " or: " msgstr " o: " -#: argp/argp-help.c:1617 +#: argp/argp-help.c:1616 msgid " [OPTION...]" msgstr " [OPCIÓN...]" -#: argp/argp-help.c:1644 +#: argp/argp-help.c:1643 #, c-format msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Pruebe `%s --help' o `%s --usage' para más información.\n" -#: argp/argp-help.c:1672 +#: argp/argp-help.c:1671 #, c-format msgid "Report bugs to %s.\n" -msgstr "Comunicar bichos a %s.\n" +msgstr "Comunicar errores a %s.\n" -#: argp/argp-parse.c:102 +#: argp/argp-parse.c:101 msgid "Give this help list" msgstr "Da esta lista de ayuda" -#: argp/argp-parse.c:103 +#: argp/argp-parse.c:102 msgid "Give a short usage message" msgstr "Da un mensaje corto de uso" -#: argp/argp-parse.c:104 +#: argp/argp-parse.c:103 msgid "Set the program name" msgstr "Establece el nombre del programa" -#: argp/argp-parse.c:106 +#: argp/argp-parse.c:105 msgid "Hang for SECS seconds (default 3600)" msgstr "Cuelga durante SECS segundos (por omisión, 3600)" -#: argp/argp-parse.c:167 +#: argp/argp-parse.c:166 msgid "Print program version" msgstr "Muestra la versión del programa" -#: argp/argp-parse.c:183 +#: argp/argp-parse.c:182 msgid "(PROGRAM ERROR) No version known!?" msgstr "(ERROR DEL PROGRAMA) ¿¡No se conoce ninguna versión!?" -#: argp/argp-parse.c:623 +#: argp/argp-parse.c:622 #, c-format msgid "%s: Too many arguments\n" msgstr "%s: Demasiados argumentos\n" -#: argp/argp-parse.c:766 +#: argp/argp-parse.c:765 msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(ERROR DEL PROGRAMA) ¿¡No se debería haber reconocido la opción!?" @@ -106,7 +106,7 @@ msgstr "(ERROR DEL PROGRAMA) ¿¡No se debería haber reconocido la opción!?" # recordar a una opción en silla de ruedas...). sv+ # # Lo cambio después de leer 1984. sv -#: assert/assert-perr.c:37 +#: assert/assert-perr.c:36 #, c-format msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n" msgstr "%s%s%s:%u: %s%sError inesperado: %s.\n" @@ -114,7 +114,7 @@ msgstr "%s%s%s:%u: %s%sError inesperado: %s.\n" # La traducción de Jochen es exactamente esta: Zusicherung %s nicht erfüllt # que viene a decir algo así que las promesas no se han cumplido, o que # las afirmaciones hechas no son ciertas. -#: assert/assert.c:105 +#: assert/assert.c:101 #, c-format msgid "" "%s%s%s:%u: %s%sAssertion `%s' failed.\n" @@ -123,24 +123,24 @@ msgstr "" "%s%s%s:%u: %s%sLa declaración `%s' no se cumple.\n" "%n" -#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61 +#: catgets/gencat.c:109 catgets/gencat.c:113 nscd/nscd.c:115 nss/makedb.c:119 msgid "NAME" msgstr "NOMBRE" -#: catgets/gencat.c:111 +#: catgets/gencat.c:110 msgid "Create C header file NAME containing symbol definitions" msgstr "Crea un fichero de cabecera C, NOMBRE, que contiene las definiciones de símbolos" -#: catgets/gencat.c:113 +#: catgets/gencat.c:112 msgid "Do not use existing catalog, force new output file" msgstr "No utiliza el catálogo existente, crea un nuevo fichero de salida" -#: catgets/gencat.c:114 nss/makedb.c:61 +#: catgets/gencat.c:113 nss/makedb.c:119 msgid "Write output to file NAME" msgstr "Escribe el resultado en el fichero NOMBRE" # FIXME: ¿Qué es ^K? -#: catgets/gencat.c:119 +#: catgets/gencat.c:118 msgid "" "Generate message catalog.\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n" "is -, output is written to standard output.\n" @@ -149,7 +149,7 @@ msgstr "" "se lee de la entrada estándar. Si FICHERO-SALIDA es -, el resultado se\n" "escribe en la salida estándar.\n" -#: catgets/gencat.c:124 +#: catgets/gencat.c:123 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" "[OUTPUT-FILE [INPUT-FILE]...]" @@ -157,28 +157,28 @@ msgstr "" "-o FICHERO-SALIDA [FICHERO-ENTRADA]...\n" "[FICHERO-SALIDA [FICHERO-ENTRADA]...]" -#: catgets/gencat.c:232 debug/pcprofiledump.c:208 debug/xtrace.sh:58 -#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sotruss.ksh:49 -#: elf/sprof.c:371 iconv/iconv_prog.c:408 iconv/iconvconfig.c:380 -#: locale/programs/locale.c:278 locale/programs/localedef.c:371 -#: login/programs/pt_chown.c:92 malloc/memusage.sh:65 -#: malloc/memusagestat.c:539 nscd/nscd.c:415 nss/getent.c:918 nss/makedb.c:231 -#: posix/getconf.c:1122 sunrpc/rpc_main.c:1492 sunrpc/rpcinfo.c:691 -#: sysdeps/unix/sysv/linux/lddlibc4.c:62 +#: catgets/gencat.c:235 debug/pcprofiledump.c:208 elf/ldconfig.c:302 +#: elf/pldd.c:222 elf/sln.c:85 elf/sprof.c:371 iconv/iconv_prog.c:408 +#: iconv/iconvconfig.c:383 locale/programs/locale.c:279 +#: locale/programs/localedef.c:363 login/programs/pt_chown.c:88 +#: malloc/memusagestat.c:536 nscd/nscd.c:459 nss/getent.c:965 nss/makedb.c:371 +#: posix/getconf.c:1121 sunrpc/rpcinfo.c:691 +#: sysdeps/unix/sysv/linux/lddlibc4.c:61 +#, c-format msgid "" "For bug reporting instructions, please see:\n" -"<http://www.gnu.org/software/libc/bugs.html>.\n" +"%s.\n" msgstr "" "Para instrucciones sobre informes de fallo, por favor consulte:\n" -"<http://www.gnu.org/software/libc/bugs.html>.\n" +"%s.\n" -#: catgets/gencat.c:246 debug/pcprofiledump.c:222 debug/xtrace.sh:66 -#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sotruss.ksh:76 elf/sprof.c:386 -#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:395 locale/programs/locale.c:293 -#: locale/programs/localedef.c:387 login/programs/pt_chown.c:63 -#: malloc/memusage.sh:73 malloc/memusagestat.c:557 nscd/nscd.c:429 -#: nss/getent.c:87 nss/makedb.c:245 posix/getconf.c:1104 -#: sysdeps/unix/sysv/linux/lddlibc4.c:69 +#: catgets/gencat.c:251 debug/pcprofiledump.c:224 debug/xtrace.sh:64 +#: elf/ldconfig.c:318 elf/ldd.bash.in:38 elf/pldd.c:238 elf/sotruss.ksh:75 +#: elf/sprof.c:388 iconv/iconv_prog.c:425 iconv/iconvconfig.c:400 +#: locale/programs/locale.c:296 locale/programs/localedef.c:389 +#: login/programs/pt_chown.c:62 malloc/memusage.sh:71 +#: malloc/memusagestat.c:552 nscd/nscd.c:475 nss/getent.c:86 nss/makedb.c:387 +#: posix/getconf.c:1103 sysdeps/unix/sysv/linux/lddlibc4.c:68 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -190,35 +190,35 @@ msgstr "" "No hay NINGUNA garantía; ni siquiera de COMERCIABILIDAD o IDONEIDAD PARA UN\n" "FIN DETERMINADO.\n" -#: catgets/gencat.c:251 debug/pcprofiledump.c:227 debug/xtrace.sh:70 -#: elf/ldconfig.c:321 elf/sprof.c:392 iconv/iconv_prog.c:428 -#: iconv/iconvconfig.c:400 locale/programs/locale.c:298 -#: locale/programs/localedef.c:392 malloc/memusage.sh:77 -#: malloc/memusagestat.c:562 nscd/nscd.c:434 nss/getent.c:92 nss/makedb.c:250 -#: posix/getconf.c:1109 +#: catgets/gencat.c:256 debug/pcprofiledump.c:229 debug/xtrace.sh:68 +#: elf/ldconfig.c:323 elf/pldd.c:243 elf/sprof.c:394 iconv/iconv_prog.c:430 +#: iconv/iconvconfig.c:405 locale/programs/locale.c:301 +#: locale/programs/localedef.c:394 malloc/memusage.sh:75 +#: malloc/memusagestat.c:557 nscd/nscd.c:480 nss/getent.c:91 nss/makedb.c:392 +#: posix/getconf.c:1108 #, c-format msgid "Written by %s.\n" msgstr "Escrito por %s.\n" -#: catgets/gencat.c:282 +#: catgets/gencat.c:287 msgid "*standard input*" msgstr "*entrada estándar*" -#: catgets/gencat.c:288 iconv/iconv_charmap.c:170 iconv/iconv_prog.c:294 -#: nss/makedb.c:170 +#: catgets/gencat.c:293 iconv/iconv_charmap.c:169 iconv/iconv_prog.c:293 +#: nss/makedb.c:248 #, c-format msgid "cannot open input file `%s'" msgstr "no se puede abrir el fichero de entrada `%s'" -#: catgets/gencat.c:417 catgets/gencat.c:494 +#: catgets/gencat.c:422 catgets/gencat.c:497 msgid "illegal set number" msgstr "número de conjunto ilegal" -#: catgets/gencat.c:444 +#: catgets/gencat.c:449 msgid "duplicate set definition" msgstr "definición de conjunto duplicada" -#: catgets/gencat.c:446 catgets/gencat.c:623 catgets/gencat.c:677 +#: catgets/gencat.c:451 catgets/gencat.c:623 catgets/gencat.c:675 msgid "this is the first definition" msgstr "esta es la primera vez que aparece la definición" @@ -243,91 +243,92 @@ msgstr "directiva desconocida `%s': línea pasada por alto" msgid "duplicated message number" msgstr "número de mensaje duplicado" -#: catgets/gencat.c:674 +#: catgets/gencat.c:672 msgid "duplicated message identifier" msgstr "identificador de mensaje duplicado" -#: catgets/gencat.c:731 +#: catgets/gencat.c:729 msgid "invalid character: message ignored" msgstr "carácter inválido: mensaje descartado" -#: catgets/gencat.c:774 +#: catgets/gencat.c:772 msgid "invalid line" msgstr "línea inválida" -#: catgets/gencat.c:828 +#: catgets/gencat.c:826 msgid "malformed line ignored" msgstr "una línea incorrecta no se tendrá en cuenta" -#: catgets/gencat.c:992 catgets/gencat.c:1033 nss/makedb.c:183 +#: catgets/gencat.c:990 catgets/gencat.c:1031 #, c-format msgid "cannot open output file `%s'" msgstr "no se puede abrir el fichero de salida `%s'" -#: catgets/gencat.c:1195 locale/programs/linereader.c:560 +#: catgets/gencat.c:1193 locale/programs/linereader.c:559 msgid "invalid escape sequence" msgstr "secuencia de escape inválida" -#: catgets/gencat.c:1217 +#: catgets/gencat.c:1215 msgid "unterminated message" msgstr "mensaje sin terminar" -#: catgets/gencat.c:1241 +#: catgets/gencat.c:1239 #, c-format msgid "while opening old catalog file" msgstr "al abrir el fichero de catálogo antiguo" -#: catgets/gencat.c:1332 +#: catgets/gencat.c:1330 #, c-format msgid "conversion modules not available" msgstr "no están disponibles los módulos de conversión" -#: catgets/gencat.c:1358 +#: catgets/gencat.c:1356 #, c-format msgid "cannot determine escape character" msgstr "no se puede determinar el carácter de escape" -#: debug/pcprofiledump.c:53 +#: debug/pcprofiledump.c:52 msgid "Don't buffer output" msgstr "No hace pasar el resultado a través de un búfer" # Se admiten sugerencias. sv -#: debug/pcprofiledump.c:58 +#: debug/pcprofiledump.c:57 msgid "Dump information generated by PC profiling." msgstr "Información de volcado generada mediante `PC profiling'." -#: debug/pcprofiledump.c:61 +#: debug/pcprofiledump.c:60 msgid "[FILE]" msgstr "[FICHERO]" -#: debug/pcprofiledump.c:108 +#: debug/pcprofiledump.c:107 #, c-format msgid "cannot open input file" msgstr "no se puede abrir el fichero de entrada" -#: debug/pcprofiledump.c:115 +#: debug/pcprofiledump.c:114 #, c-format msgid "cannot read header" msgstr "no se puede leer la cabecera" -#: debug/pcprofiledump.c:179 +#: debug/pcprofiledump.c:178 #, c-format msgid "invalid pointer size" msgstr "tamaño de puntero inválido" -#: debug/xtrace.sh:27 debug/xtrace.sh:45 +#: debug/xtrace.sh:26 debug/xtrace.sh:44 msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n" msgstr "Modo de empleo: xtrace [OPCIÓN]... PROGRAMA [OPCIÓNDEPROGRAMA]...\\n" -#: debug/xtrace.sh:33 malloc/memusage.sh:27 -msgid "Try \\`%s --help' or `%s --usage' for more information.\\n" +#: debug/xtrace.sh:32 elf/sotruss.ksh:56 elf/sotruss.ksh:67 +#: elf/sotruss.ksh:135 malloc/memusage.sh:26 +msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n" msgstr "Pruebe \\`%s --help' o `%s --usage' para más información.\\n" -#: debug/xtrace.sh:39 +#: debug/xtrace.sh:38 msgid "%s: option '%s' requires an argument.\\n" msgstr "%s: la opción '%s' requiere un argumento\\n" -#: debug/xtrace.sh:46 +#: debug/xtrace.sh:45 msgid "" "Trace execution of program by printing currently executed function.\n" "\n" @@ -352,156 +353,166 @@ msgstr "" "Los argumentos obligatorios para las opciones largas son también obligatorios\n" "para las opciones cortas correspondientes.\n" -#: debug/xtrace.sh:127 +# FIXME: No entiendo lo del final. +#: debug/xtrace.sh:57 elf/ldd.bash.in:55 elf/sotruss.ksh:49 +#: malloc/memusage.sh:64 +msgid "For bug reporting instructions, please see:\\\\n%s.\\\\n" +msgstr "Para instrucciones sobre informes de fallo, por favor consulte:\\\\n%s.\\\\n" + +#: debug/xtrace.sh:125 msgid "xtrace: unrecognized option \\`$1'\\n" msgstr "xtrace: opción no reconocida \\`$1'\\n" -#: debug/xtrace.sh:140 +#: debug/xtrace.sh:138 msgid "No program name given\\n" msgstr "No se ha especificado el nombre del programa\\n" -#: debug/xtrace.sh:148 +#: debug/xtrace.sh:146 #, sh-format msgid "executable \\`$program' not found\\n" msgstr "no se ha encontrado el ejecutable \\`$program'\\n" -#: debug/xtrace.sh:152 +#: debug/xtrace.sh:150 #, sh-format msgid "\\`$program' is no executable\\n" msgstr "\\`$program' no es ejecutable\\n" -#: dlfcn/dlinfo.c:64 +#: dlfcn/dlinfo.c:63 msgid "RTLD_SELF used in code not dynamically loaded" msgstr "Se ha usado RTLD_SELF en una parte del código que no se cargó dinámicamente" -#: dlfcn/dlinfo.c:73 +#: dlfcn/dlinfo.c:72 msgid "unsupported dlinfo request" msgstr "Petición dlinfo no admitida" -#: dlfcn/dlmopen.c:64 +#: dlfcn/dlmopen.c:63 msgid "invalid namespace" msgstr "espacio de nombres inválido" -#: dlfcn/dlmopen.c:69 +#: dlfcn/dlmopen.c:68 msgid "invalid mode" msgstr "modo inválido" -#: dlfcn/dlopen.c:65 +#: dlfcn/dlopen.c:64 msgid "invalid mode parameter" msgstr "parámetro de modo inválido" # FIXME: Falta ver si es niño o niña. sv -#: elf/cache.c:69 +#: elf/cache.c:68 msgid "unknown" msgstr "desconocido/a" -#: elf/cache.c:112 +#: elf/cache.c:121 msgid "Unknown OS" msgstr "Sistema Operativo desconocido" -#: elf/cache.c:117 +#: elf/cache.c:126 #, c-format msgid ", OS ABI: %s %d.%d.%d" msgstr ", ABI del SO: %s %d.%d.%d" -#: elf/cache.c:134 elf/ldconfig.c:1305 +#: elf/cache.c:143 elf/ldconfig.c:1309 #, c-format msgid "Can't open cache file %s\n" msgstr "No se puede abrir el fichero de caché %s\n" -#: elf/cache.c:148 +#: elf/cache.c:157 #, c-format msgid "mmap of cache file failed.\n" msgstr "falló la operación `mmap' sobre el fichero de caché.\n" -#: elf/cache.c:152 elf/cache.c:166 +#: elf/cache.c:161 elf/cache.c:175 #, c-format msgid "File is not a cache file.\n" msgstr "El fichero no es un fichero de caché.\n" -#: elf/cache.c:199 elf/cache.c:209 +#: elf/cache.c:208 elf/cache.c:218 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d bibliotecas se encontraron en la caché `%s'\n" -#: elf/cache.c:403 +#: elf/cache.c:412 #, c-format msgid "Can't create temporary cache file %s" msgstr "No se puede crear el fichero temporal de caché %s" -#: elf/cache.c:411 elf/cache.c:421 elf/cache.c:425 elf/cache.c:430 +#: elf/cache.c:420 elf/cache.c:430 elf/cache.c:434 elf/cache.c:439 #, c-format msgid "Writing of cache data failed" msgstr "Falló la escritura de los datos de la caché" -#: elf/cache.c:435 +#: elf/cache.c:444 #, c-format msgid "Changing access rights of %s to %#o failed" msgstr "El cambio de los derechos de acceso de %s a %#o falló" -#: elf/cache.c:440 +#: elf/cache.c:449 #, c-format msgid "Renaming of %s to %s failed" msgstr "Falló el renombramiento de %s a %s" -#: elf/dl-close.c:387 elf/dl-open.c:397 +#: elf/dl-close.c:378 elf/dl-open.c:474 msgid "cannot create scope list" msgstr "no se puede crear la lista de ámbito" -#: elf/dl-close.c:767 +#: elf/dl-close.c:771 msgid "shared object not open" msgstr "el objeto compartido no está abierto" -#: elf/dl-deps.c:114 +#: elf/dl-deps.c:112 msgid "DST not allowed in SUID/SGID programs" msgstr "No se permite DST en programas SUID/SGID" -#: elf/dl-deps.c:127 +#: elf/dl-deps.c:125 msgid "empty dynamic string token substitution" msgstr "sustitución dinámica de un elemento por una cadena vacía" # Hmm, me suena que lo que es dinámica aquí es la cadena, no la sustitución. # FIXME: Consultarlo. sv -#: elf/dl-deps.c:133 +#: elf/dl-deps.c:131 #, c-format msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n" msgstr "" "no se puede cargar el `%s' auxiliar debido a la sustitución dinámica\n" "de un elemento por cadena vacía\n" -#: elf/dl-deps.c:474 +#: elf/dl-deps.c:483 msgid "cannot allocate dependency list" msgstr "no se pudo asignar espacio para la lista de dependencias" -#: elf/dl-deps.c:514 elf/dl-deps.c:574 +#: elf/dl-deps.c:520 elf/dl-deps.c:580 msgid "cannot allocate symbol search list" msgstr "no se puede asignar espacio para la lista de búsqueda de los símbolos" -#: elf/dl-deps.c:554 +#: elf/dl-deps.c:560 msgid "Filters not supported with LD_TRACE_PRELINKING" msgstr "No se admiten filtros con LD_TRACE_PRELINKING" # Véase "A bug's life". -#: elf/dl-error.c:77 +#: elf/dl-error.c:76 msgid "DYNAMIC LINKER BUG!!!" -msgstr "¡¡¡HAY UN BICHO EN EL ENLAZADOR DINÁMICO!!!" +msgstr "¡¡¡HAY UN ERROR EN EL ENLAZADOR DINÁMICO!!!" -#: elf/dl-error.c:124 +#: elf/dl-error.c:123 msgid "error while loading shared libraries" msgstr "error al cargar las bibliotecas compartidas" -#: elf/dl-fptr.c:88 +#: elf/dl-fptr.c:87 ports/sysdeps/hppa/dl-fptr.c:93 msgid "cannot map pages for fdesc table" msgstr "no se pueden asignar páginas para la tabla fdesc" -#: elf/dl-fptr.c:192 +#: elf/dl-fptr.c:191 ports/sysdeps/hppa/dl-fptr.c:206 msgid "cannot map pages for fptr table" msgstr "no se pueden asignar páginas para la tabla fptr" -#: elf/dl-fptr.c:221 +#: elf/dl-fptr.c:220 ports/sysdeps/hppa/dl-fptr.c:235 msgid "internal error: symidx out of range of fptr table" msgstr "error interno: symidx fuera del rango de la tabla fptr" +#: elf/dl-hwcaps.c:173 elf/dl-hwcaps.c:185 +msgid "cannot create capability list" +msgstr "no se puede crear la lista de capacidades" + #: elf/dl-load.c:471 msgid "cannot allocate name record" msgstr "no se puede asignar el registro del nombre" @@ -520,171 +531,171 @@ msgstr "no se puede crear una copia RUNPATH/RPATH" msgid "cannot create search path array" msgstr "no se puede crear la matriz de la ruta de búsqueda" -#: elf/dl-load.c:931 +#: elf/dl-load.c:934 msgid "cannot stat shared object" msgstr "no se puede efectuar `stat' sobre el objeto compartido" -#: elf/dl-load.c:1009 +#: elf/dl-load.c:1012 msgid "cannot open zero fill device" msgstr "no se puede abrir el dispositivo de `zero fill'" -#: elf/dl-load.c:1055 elf/dl-load.c:2313 +#: elf/dl-load.c:1059 elf/dl-load.c:2339 msgid "cannot create shared object descriptor" msgstr "no se puede crear el descriptor del objeto compartido" -#: elf/dl-load.c:1074 elf/dl-load.c:1730 elf/dl-load.c:1833 +#: elf/dl-load.c:1078 elf/dl-load.c:1751 elf/dl-load.c:1854 msgid "cannot read file data" msgstr "no se pueden leer los datos del fichero" -#: elf/dl-load.c:1120 +#: elf/dl-load.c:1124 msgid "ELF load command alignment not page-aligned" msgstr "El alineamiento de la orden de carga ELF no está alineada a la página" -#: elf/dl-load.c:1127 +#: elf/dl-load.c:1131 msgid "ELF load command address/offset not properly aligned" msgstr "La dirección/desplazamiento de la orden de carga ELF no está bien alineada" -#: elf/dl-load.c:1210 +#: elf/dl-load.c:1216 msgid "cannot allocate TLS data structures for initial thread" msgstr "no se pueden crear las estructuras de datos TLS para el hilo inicial" -#: elf/dl-load.c:1233 +#: elf/dl-load.c:1239 msgid "cannot handle TLS data" msgstr "no se pueden manejar los datos de TLS" -#: elf/dl-load.c:1252 +#: elf/dl-load.c:1258 msgid "object file has no loadable segments" msgstr "el fichero objeto no tiene segmentos cargables" -#: elf/dl-load.c:1288 +#: elf/dl-load.c:1294 msgid "failed to map segment from shared object" msgstr "fallo al asignar un segmento del objeto compartido" -#: elf/dl-load.c:1314 +#: elf/dl-load.c:1320 msgid "cannot dynamically load executable" msgstr "no se puede cargar el ejecutable dinámicamente" -#: elf/dl-load.c:1376 +#: elf/dl-load.c:1383 msgid "cannot change memory protections" msgstr "no se pueden cambiar las protecciones de memoria" -#: elf/dl-load.c:1395 +#: elf/dl-load.c:1402 msgid "cannot map zero-fill pages" msgstr "no se pueden asignar páginas de tipo `zero-fill'" -#: elf/dl-load.c:1409 +#: elf/dl-load.c:1416 msgid "object file has no dynamic section" msgstr "el fichero objeto no tiene sección dinámica" -#: elf/dl-load.c:1432 +#: elf/dl-load.c:1439 msgid "shared object cannot be dlopen()ed" msgstr "no se puede efectuar dlopen() sobre el objeto compartido" -#: elf/dl-load.c:1445 +#: elf/dl-load.c:1452 msgid "cannot allocate memory for program header" msgstr "no se puede asignar memoria para la cabecera del programa" -#: elf/dl-load.c:1462 elf/dl-open.c:180 +#: elf/dl-load.c:1469 elf/dl-open.c:180 msgid "invalid caller" msgstr "llamante inválido" -#: elf/dl-load.c:1501 +#: elf/dl-load.c:1508 msgid "cannot enable executable stack as shared object requires" msgstr "no se puede activar la pila ejecutable tal y como el objeto compartido necesita" -#: elf/dl-load.c:1514 +#: elf/dl-load.c:1521 msgid "cannot close file descriptor" msgstr "no se puede cerrar el descriptor de fichero" -#: elf/dl-load.c:1730 +#: elf/dl-load.c:1751 msgid "file too short" msgstr "fichero demasiado corto" -#: elf/dl-load.c:1766 +#: elf/dl-load.c:1787 msgid "invalid ELF header" msgstr "cabecera ELF inválida" -#: elf/dl-load.c:1778 +#: elf/dl-load.c:1799 msgid "ELF file data encoding not big-endian" msgstr "La codificación de los datos del fichero ELF no es `big-endian'" -#: elf/dl-load.c:1780 +#: elf/dl-load.c:1801 msgid "ELF file data encoding not little-endian" msgstr "La codificación de los datos del fichero ELF no es `little-endian'" -#: elf/dl-load.c:1784 +#: elf/dl-load.c:1805 msgid "ELF file version ident does not match current one" msgstr "La identificación de versión del fichero ELF no encaja con la actual" -#: elf/dl-load.c:1788 +#: elf/dl-load.c:1809 msgid "ELF file OS ABI invalid" msgstr "ABI del OS del fichero ELF inválida" -#: elf/dl-load.c:1791 +#: elf/dl-load.c:1812 msgid "ELF file ABI version invalid" msgstr "Versión de ABI del fichero ELF inválida" -#: elf/dl-load.c:1794 +#: elf/dl-load.c:1815 msgid "nonzero padding in e_ident" msgstr "relleno con no ceros en e_ident" -#: elf/dl-load.c:1797 +#: elf/dl-load.c:1818 msgid "internal error" msgstr "error interno" -#: elf/dl-load.c:1804 +#: elf/dl-load.c:1825 msgid "ELF file version does not match current one" msgstr "La versión del fichero ELF no coincide con la actual" -#: elf/dl-load.c:1812 +#: elf/dl-load.c:1833 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "solamente pueden cargarse ET_DYN y ET_EXEC" -#: elf/dl-load.c:1818 +#: elf/dl-load.c:1839 msgid "ELF file's phentsize not the expected size" msgstr "El `phentsize' del fichero ELF no es el tamaño esperado" -#: elf/dl-load.c:2332 +#: elf/dl-load.c:2358 msgid "wrong ELF class: ELFCLASS64" msgstr "clase ELF errónea: ELFCLASS64" -#: elf/dl-load.c:2333 +#: elf/dl-load.c:2359 msgid "wrong ELF class: ELFCLASS32" msgstr "clase ELF errónea: ELFCLASS32" -#: elf/dl-load.c:2336 +#: elf/dl-load.c:2362 msgid "cannot open shared object file" msgstr "no se puede abrir el fichero del objeto compartido" -#: elf/dl-lookup.c:757 +#: elf/dl-lookup.c:757 ports/sysdeps/mips/dl-lookup.c:774 msgid "relocation error" msgstr "error de relocalización" -#: elf/dl-lookup.c:785 +#: elf/dl-lookup.c:786 ports/sysdeps/mips/dl-lookup.c:803 msgid "symbol lookup error" msgstr "error de búsqueda de símbolo" -#: elf/dl-open.c:115 +#: elf/dl-open.c:110 msgid "cannot extend global scope" msgstr "no se puede extender el ámbito global" -#: elf/dl-open.c:440 +#: elf/dl-open.c:524 msgid "TLS generation counter wrapped! Please report this." msgstr "¡El contador de generaciones TLS ha vuelto a cero! Por favor envíe un informe." -#: elf/dl-open.c:462 +#: elf/dl-open.c:546 msgid "cannot load any more object with static TLS" msgstr "no se puede cargar ningún objeto más con TLS estático" -#: elf/dl-open.c:511 +#: elf/dl-open.c:599 msgid "invalid mode for dlopen()" msgstr "modo inválido para dlopen()" -#: elf/dl-open.c:528 +#: elf/dl-open.c:616 msgid "no more namespaces available for dlmopen()" msgstr "no hay más espacios de nombres disponibles para dlmopen()" -#: elf/dl-open.c:547 +#: elf/dl-open.c:634 msgid "invalid target namespace in dlmopen()" msgstr "espacio de nombres objetivo inválido para dlmopen()" @@ -692,276 +703,272 @@ msgstr "espacio de nombres objetivo inválido para dlmopen()" msgid "cannot allocate memory in static TLS block" msgstr "No se pudo asignar memoria en el bloque TLS estático" -#: elf/dl-reloc.c:212 +#: elf/dl-reloc.c:213 msgid "cannot make segment writable for relocation" msgstr "no se puede hacer el segmento escribible para su relocalización" -#: elf/dl-reloc.c:275 +#: elf/dl-reloc.c:276 #, c-format msgid "%s: no PLTREL found in object %s\n" msgstr "%s no se encontró ningún PLTREL en el objeto %s\n" -#: elf/dl-reloc.c:286 +#: elf/dl-reloc.c:287 #, c-format msgid "%s: out of memory to store relocation results for %s\n" msgstr "%s: memoria agotada para almacenar los resultados de relocalización para %s\n" # Se admiten sugerencias. sv -#: elf/dl-reloc.c:302 +#: elf/dl-reloc.c:303 msgid "cannot restore segment prot after reloc" msgstr "no se puede restaurar el `prot' del segmento después de la relocalización" -#: elf/dl-reloc.c:331 +#: elf/dl-reloc.c:332 msgid "cannot apply additional memory protection after relocation" msgstr "no se pueden aplicar protecciones de memoria adicionales después de relocalizar" -#: elf/dl-sym.c:162 +#: elf/dl-sym.c:163 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "Se ha usado RTLD_NEXT en una parte del código que no se cargó dinámicamente" -#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500 -msgid "cannot create capability list" -msgstr "no se puede crear la lista de capacidades" - -#: elf/dl-tls.c:861 +#: elf/dl-tls.c:875 msgid "cannot create TLS data structures" msgstr "no se pueden crear las estructuras de datos TLS" -#: elf/dl-version.c:172 +#: elf/dl-version.c:166 msgid "version lookup error" msgstr "error de búsqueda de versión" -#: elf/dl-version.c:303 +#: elf/dl-version.c:297 msgid "cannot allocate version reference table" msgstr "no se puede asignar espacio para la tabla de versiones de referencia" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:140 msgid "Print cache" msgstr "Muestra la caché" -#: elf/ldconfig.c:142 +#: elf/ldconfig.c:141 msgid "Generate verbose messages" msgstr "Genera mensajes explicativos" -#: elf/ldconfig.c:143 +#: elf/ldconfig.c:142 msgid "Don't build cache" msgstr "No crea caché" -#: elf/ldconfig.c:144 +#: elf/ldconfig.c:143 msgid "Don't generate links" msgstr "No genera enlaces" -#: elf/ldconfig.c:145 +#: elf/ldconfig.c:144 msgid "Change to and use ROOT as root directory" msgstr "Cambia a RAÍZ y lo utiliza como directorio raíz" -#: elf/ldconfig.c:145 +#: elf/ldconfig.c:144 msgid "ROOT" msgstr "RAÍZ" -#: elf/ldconfig.c:146 +#: elf/ldconfig.c:145 msgid "CACHE" msgstr "CACHÉ" -#: elf/ldconfig.c:146 +#: elf/ldconfig.c:145 msgid "Use CACHE as cache file" msgstr "Utiliza CACHE como fichero de caché" -#: elf/ldconfig.c:147 +#: elf/ldconfig.c:146 msgid "CONF" msgstr "CONF" -#: elf/ldconfig.c:147 +#: elf/ldconfig.c:146 msgid "Use CONF as configuration file" msgstr "Utiliza CONF como fichero de configuración" -#: elf/ldconfig.c:148 +#: elf/ldconfig.c:147 msgid "Only process directories specified on the command line. Don't build cache." msgstr "" "Procesa únicamente los directorios especificados en la línea de órdenes.\n" "No crea la caché." -#: elf/ldconfig.c:149 +#: elf/ldconfig.c:148 msgid "Manually link individual libraries." msgstr "Enlace bibliotecas individuales manualmente." -#: elf/ldconfig.c:150 +#: elf/ldconfig.c:149 msgid "FORMAT" msgstr "FORMATO" -#: elf/ldconfig.c:150 +#: elf/ldconfig.c:149 msgid "Format to use: new, old or compat (default)" msgstr "Formato utilizado: new, old o compat (predeterminado)" # Antes decía: .rhosts no es un fichero regular -#: elf/ldconfig.c:151 +#: elf/ldconfig.c:150 msgid "Ignore auxiliary cache file" msgstr "Descarta el fichero de caché auxiliar" # FIXME: Why So Many Uppercase Letters? sv -#: elf/ldconfig.c:159 +#: elf/ldconfig.c:158 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Configura las asociaciones de tiempo de ejecución del enlazador dinámico" -#: elf/ldconfig.c:339 +#: elf/ldconfig.c:341 #, c-format msgid "Path `%s' given more than once" msgstr "Se ha dado la ruta `%s' más de una vez" -#: elf/ldconfig.c:379 +#: elf/ldconfig.c:381 #, c-format msgid "%s is not a known library type" msgstr "%s no es un tipo de biblioteca conocido" -#: elf/ldconfig.c:407 +#: elf/ldconfig.c:409 #, c-format msgid "Can't stat %s" msgstr "No se puede efectuar `stat' sobre %s" -#: elf/ldconfig.c:481 +#: elf/ldconfig.c:483 #, c-format msgid "Can't stat %s\n" msgstr "No se puede efectuar `stat' sobre %s\n" -#: elf/ldconfig.c:491 +#: elf/ldconfig.c:493 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s no es un enlace simbólico\n" -#: elf/ldconfig.c:510 +#: elf/ldconfig.c:512 #, c-format msgid "Can't unlink %s" msgstr "No se puede efectuar `unlink' sobre %s" -#: elf/ldconfig.c:516 +#: elf/ldconfig.c:518 #, c-format msgid "Can't link %s to %s" msgstr "No se puede crear un enlace de %s a %s" -#: elf/ldconfig.c:522 +#: elf/ldconfig.c:524 msgid " (changed)\n" msgstr " (cambiado)\n" -#: elf/ldconfig.c:524 +#: elf/ldconfig.c:526 msgid " (SKIPPED)\n" msgstr " (SALTADO)\n" -#: elf/ldconfig.c:579 +#: elf/ldconfig.c:581 #, c-format msgid "Can't find %s" msgstr "No se encuentra %s" -#: elf/ldconfig.c:595 elf/ldconfig.c:768 elf/ldconfig.c:827 elf/ldconfig.c:861 +#: elf/ldconfig.c:597 elf/ldconfig.c:770 elf/ldconfig.c:829 elf/ldconfig.c:863 #, c-format msgid "Cannot lstat %s" msgstr "No se puede efectuar `lstat' sobre %s" -#: elf/ldconfig.c:602 +#: elf/ldconfig.c:604 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Descartado el fichero %s dado que no es un fichero regular." -#: elf/ldconfig.c:611 +#: elf/ldconfig.c:613 #, c-format msgid "No link created since soname could not be found for %s" msgstr "No se creó el enlace ya que no se encontró el soname para %s" -#: elf/ldconfig.c:694 +#: elf/ldconfig.c:696 #, c-format msgid "Can't open directory %s" msgstr "No se puede abrir el directorio %s" -#: elf/ldconfig.c:786 elf/ldconfig.c:848 elf/readlib.c:91 +#: elf/ldconfig.c:788 elf/ldconfig.c:850 elf/readlib.c:90 #, c-format msgid "Input file %s not found.\n" msgstr "No se encontró el fichero de entrada %s.\n" -#: elf/ldconfig.c:793 +#: elf/ldconfig.c:795 #, c-format msgid "Cannot stat %s" msgstr "No se puede efectuar `stat' sobre %s" -#: elf/ldconfig.c:922 +#: elf/ldconfig.c:924 #, c-format msgid "libc5 library %s in wrong directory" msgstr "biblioteca libc5 %s en un directorio equivocado" -#: elf/ldconfig.c:925 +#: elf/ldconfig.c:927 #, c-format msgid "libc6 library %s in wrong directory" msgstr "biblioteca libc6 %s en un directorio equivocado" -#: elf/ldconfig.c:928 +#: elf/ldconfig.c:930 #, c-format msgid "libc4 library %s in wrong directory" msgstr "biblioteca libc4 %s en un directorio equivocado" -#: elf/ldconfig.c:956 +#: elf/ldconfig.c:958 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "las bibliotecas %s y %s en el directorio %s tienen el mismo soname pero distinto tipo." -#: elf/ldconfig.c:1065 +#: elf/ldconfig.c:1067 #, c-format -msgid "Can't open configuration file %s" -msgstr "No se puede abrir el fichero de configuración `%s'" +msgid "Warning: ignoring configuration file that cannot be opened: %s" +msgstr "Atención: no se tendrá en cuenta el fichero de configuración que no se puede abrir: %s" -#: elf/ldconfig.c:1129 +#: elf/ldconfig.c:1133 #, c-format msgid "%s:%u: bad syntax in hwcap line" msgstr "%s:%u: sintaxis errónea en línea hwcap" -#: elf/ldconfig.c:1135 +#: elf/ldconfig.c:1139 #, c-format msgid "%s:%u: hwcap index %lu above maximum %u" msgstr "%s:%u: el índice de hwcap %lu está por encima del máximo %u" -#: elf/ldconfig.c:1142 elf/ldconfig.c:1150 +#: elf/ldconfig.c:1146 elf/ldconfig.c:1154 #, c-format msgid "%s:%u: hwcap index %lu already defined as %s" msgstr "%s:%u: el índice de hwcap %lu ya está definido como %s" -#: elf/ldconfig.c:1153 +#: elf/ldconfig.c:1157 #, c-format msgid "%s:%u: duplicate hwcap %lu %s" msgstr "%s:%u: hwcap duplicado %lu %s" -#: elf/ldconfig.c:1175 +#: elf/ldconfig.c:1179 #, c-format msgid "need absolute file name for configuration file when using -r" msgstr "se necesita un nombre de fichero absoluto para el fichero de configuración cuando se utiliza -r" -#: elf/ldconfig.c:1182 locale/programs/xmalloc.c:70 malloc/obstack.c:434 -#: malloc/obstack.c:436 posix/getconf.c:1077 posix/getconf.c:1297 +#: elf/ldconfig.c:1186 locale/programs/xmalloc.c:65 malloc/obstack.c:433 +#: malloc/obstack.c:435 posix/getconf.c:1076 posix/getconf.c:1296 #, c-format msgid "memory exhausted" msgstr "memoria agotada" -#: elf/ldconfig.c:1214 +#: elf/ldconfig.c:1218 #, c-format msgid "%s:%u: cannot read directory %s" msgstr "%s:%u: no se puede leer el directorio %s" -#: elf/ldconfig.c:1258 +#: elf/ldconfig.c:1262 #, c-format msgid "relative path `%s' used to build cache" msgstr "se usa el camino relativo `%s' para construir el caché" -#: elf/ldconfig.c:1284 +#: elf/ldconfig.c:1288 #, c-format msgid "Can't chdir to /" msgstr "No se puede cambiar al directorio /" -#: elf/ldconfig.c:1325 +#: elf/ldconfig.c:1329 #, c-format msgid "Can't open cache file directory %s\n" msgstr "No se puede leer el directorio de ficheros de caché %s\n" -#: elf/ldd.bash.in:43 +#: elf/ldd.bash.in:42 msgid "Written by %s and %s.\n" msgstr "Escrito por %s y %s.\n" -#: elf/ldd.bash.in:48 +#: elf/ldd.bash.in:47 msgid "" "Usage: ldd [OPTION]... FILE...\n" " --help print this help and exit\n" @@ -979,106 +986,194 @@ msgstr "" " -u, --unused muestra las dependencias directas no utilizadas\n" " -v, --verbose muestra toda la información\n" -#: elf/ldd.bash.in:82 +#: elf/ldd.bash.in:80 msgid "ldd: option \\`$1' is ambiguous" msgstr "ldd: la opción \\`$1' es ambigua" -#: elf/ldd.bash.in:89 +#: elf/ldd.bash.in:87 msgid "unrecognized option" msgstr "opción no reconocida" -#: elf/ldd.bash.in:90 elf/ldd.bash.in:128 +#: elf/ldd.bash.in:88 elf/ldd.bash.in:126 msgid "Try \\`ldd --help' for more information." msgstr "Pruebe \\`ldd --help' para más información." -#: elf/ldd.bash.in:127 +#: elf/ldd.bash.in:125 msgid "missing file arguments" msgstr "faltan los ficheros de argumentos" #. TRANS No such file or directory. This is a ``file doesn't exist'' error #. TRANS for ordinary files that are referenced in contexts where they are #. TRANS expected to already exist. -#: elf/ldd.bash.in:150 sysdeps/gnu/errlist.c:36 +#: elf/ldd.bash.in:148 sysdeps/gnu/errlist.c:36 msgid "No such file or directory" msgstr "No existe el fichero o el directorio" # Antes decía: .rhosts no es un fichero regular -#: elf/ldd.bash.in:153 inet/rcmd.c:488 +#: elf/ldd.bash.in:151 inet/rcmd.c:488 msgid "not regular file" msgstr "no es un fichero regular" -#: elf/ldd.bash.in:156 +#: elf/ldd.bash.in:154 msgid "warning: you do not have execution permission for" msgstr "atención: no tiene permiso de ejecitación para" -#: elf/ldd.bash.in:185 +#: elf/ldd.bash.in:183 msgid "\tnot a dynamic executable" msgstr "\tno es un ejecutable dinámico" -#: elf/ldd.bash.in:193 +#: elf/ldd.bash.in:191 msgid "exited with unknown exit code" msgstr "salió con estado de salida desconocido" -#: elf/ldd.bash.in:198 +#: elf/ldd.bash.in:196 msgid "error: you do not have read permission for" msgstr "error: no tiene permiso de lectura para" -#: elf/readelflib.c:35 +#: elf/pldd-xx.c:105 +#, c-format +msgid "cannot find program header of process" +msgstr "no se puede encontrar la cabecera del proceso" + +#: elf/pldd-xx.c:110 +#, c-format +msgid "cannot read program header" +msgstr "no se puede leer la cabecera del programa" + +#: elf/pldd-xx.c:135 +#, c-format +msgid "cannot read dynamic section" +msgstr "no se puede leer la sección dinámica" + +#: elf/pldd-xx.c:147 +#, c-format +msgid "cannot read r_debug" +msgstr "no se puede leer r_debug" + +#: elf/pldd-xx.c:167 +#, c-format +msgid "cannot read program interpreter" +msgstr "no se puede leer el intérprete del programa" + +#: elf/pldd-xx.c:196 +#, c-format +msgid "cannot read link map" +msgstr "no se puede leer la asignación de enlace" + +#: elf/pldd-xx.c:207 +#, c-format +msgid "cannot read object name" +msgstr "no se puede leer el nombre del objeto" + +#: elf/pldd.c:65 +msgid "List dynamic shared objects loaded into process." +msgstr "Lista los objetos compartidos dinámicos cargados en este proceso." + +#: elf/pldd.c:69 +msgid "PID" +msgstr "PID" + +#: elf/pldd.c:100 +#, c-format +msgid "Exactly one parameter with process ID required.\n" +msgstr "Se requiere exactamente un parámetro con el ID de proceso.\n" + +#: elf/pldd.c:112 +#, c-format +msgid "invalid process ID '%s'" +msgstr "ID de proceso inválido '%s'" + +#: elf/pldd.c:120 +#, c-format +msgid "cannot open %s" +msgstr "no se puede abrir %s" + +#: elf/pldd.c:145 +#, c-format +msgid "cannot open %s/task" +msgstr "no se puede abrir %s/tarea" + +#: elf/pldd.c:148 +#, c-format +msgid "cannot prepare reading %s/task" +msgstr "no se puede preparar la lectura de %s/tarea" + +#: elf/pldd.c:161 +#, c-format +msgid "invalid thread ID '%s'" +msgstr "ID de hilo inválido '%s'" + +#: elf/pldd.c:172 +#, c-format +msgid "cannot attach to process %lu" +msgstr "no se puede asociar al proceso %lu" + +#: elf/pldd.c:264 +#, c-format +msgid "cannot get information about process %lu" +msgstr "no se puede obtener información sobre el proceso %lu" + +#: elf/pldd.c:277 +#, c-format +msgid "process %lu is no ELF program" +msgstr "el proceso %lu no es un programa ELF" + +#: elf/readelflib.c:34 #, c-format msgid "file %s is truncated\n" msgstr "el fichero %s está truncado\n" -#: elf/readelflib.c:67 +#: elf/readelflib.c:66 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s es un fichero ELF de 32 bits.\n" -#: elf/readelflib.c:69 +#: elf/readelflib.c:68 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s es un fichero ELF de 64 bits.\n" -#: elf/readelflib.c:71 +#: elf/readelflib.c:70 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "ELFCLASS desconocido en el fichero %s.\n" -#: elf/readelflib.c:78 +#: elf/readelflib.c:77 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s no es un fichero `shared object' (Tipo: %d).\n" -#: elf/readelflib.c:109 +#: elf/readelflib.c:108 #, c-format msgid "more than one dynamic segment\n" msgstr "más de un segmento dinámico\n" -#: elf/readlib.c:97 +#: elf/readlib.c:96 #, c-format msgid "Cannot fstat file %s.\n" msgstr "No se puede efectuar `fstat' sobre el fichero %s.\n" -#: elf/readlib.c:108 +#: elf/readlib.c:107 #, c-format msgid "File %s is empty, not checked." msgstr "El fichero %s está vacío, no se comprueba." -#: elf/readlib.c:114 +#: elf/readlib.c:113 #, c-format msgid "File %s is too small, not checked." msgstr "El fichero %s es demasiado pequeño, no se comprueba." -#: elf/readlib.c:124 +#: elf/readlib.c:123 #, c-format msgid "Cannot mmap file %s.\n" msgstr "No se puede efectuar `mmap' sobre el fichero %s.\n" -#: elf/readlib.c:162 +#: elf/readlib.c:161 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s no es un fichero ELF - tiene los bytes mágicos equivocados en el comienzo.\n" -#: elf/sln.c:85 +#: elf/sln.c:84 #, c-format msgid "" "Usage: sln src dest|file\n" @@ -1087,22 +1182,22 @@ msgstr "" "Modo de empleo: sln orig desti|fichero\n" "\n" -#: elf/sln.c:110 +#: elf/sln.c:109 #, c-format msgid "%s: file open error: %m\n" msgstr "%s: error al abrir el fichero: %m\n" -#: elf/sln.c:147 +#: elf/sln.c:146 #, c-format msgid "No target in line %d\n" msgstr "No hay ningún objetivo en la línea %d\n" -#: elf/sln.c:179 +#: elf/sln.c:178 #, c-format msgid "%s: destination must not be a directory\n" msgstr "%s: el destino no debe ser un directorio\n" -#: elf/sln.c:185 +#: elf/sln.c:184 #, c-format msgid "%s: failed to remove the old destination\n" msgstr "%s: fallo al borrar el destino antiguo\n" @@ -1121,42 +1216,44 @@ msgstr "%s: fallo al borrar el destino antiguo\n" # Después de leer "1984", lo cambio. # Aquí y en todas partes. sv # -#: elf/sln.c:193 +#: elf/sln.c:192 #, c-format msgid "%s: invalid destination: %s\n" msgstr "%s: destino inválido: %s\n" -#: elf/sln.c:208 elf/sln.c:217 +#: elf/sln.c:207 elf/sln.c:216 #, c-format msgid "Invalid link from \"%s\" to \"%s\": %s\n" msgstr "Enlace inválido de \"%s\" a \"%s\": %s\n" -#: elf/sotruss.ksh:33 +#: elf/sotruss.ksh:32 #, sh-format msgid "" "Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n" -" -F, --from FROMLIST trace calls from objects on FORMLIST\n" -" -T, --to TOLIST trace calls to objects on TOLIST\n" +" -F, --from FROMLIST Trace calls from objects on FROMLIST\n" +" -T, --to TOLIST Trace calls to objects on TOLIST\n" "\n" -" -e, --exit also show exits from the function calls\n" -" -f, --follow trace child processes\n" -" -o, --output FILENAME write output to FILENAME (or FILENAME.$PID in case\n" +" -e, --exit Also show exits from the function calls\n" +" -f, --follow Trace child processes\n" +" -o, --output FILENAME Write output to FILENAME (or FILENAME.$PID in case\n" "\t\t\t -f is also used) instead of standard error\n" "\n" -" --help print this help and exit\n" -" --version print version information and exit" +" -?, --help Give this help list\n" +" --usage Give a short usage message\n" +" --version Print program version" msgstr "" "Modo de empleo: sotruss [OPCIÓN...] [--] EJECUTABLE [OPCIÓN-DEL-EJECUTABLE...]\n" -" -F, --from LISTA_DE sigue las llamadas de objetos en LISTA_DE\n" -" -T, --to LISTA_A sigue las llamadas a objetos en LISTA_A\n" +" -F, --from LISTA_DE Sigue las llamadas de objetos en LISTA_DE\n" +" -T, --to LISTA_A Sigue las llamadas a objetos en LISTA_A\n" "\n" -" -e, --exit muestra también la salidas de las llamadas a función\n" -" -f, --follow sigue los procesos hijos\n" -" -o, --output FICHERO escribe el resultado en FICHERO (o en FICHERO.$PID si se\n" +" -e, --exit Muestra también la salidas de las llamadas a función\n" +" -f, --follow Sigue los procesos hijos\n" +" -o, --output FICHERO Escribe el resultado en FICHERO (o en FICHERO.$PID si se\n" " utiliza también -f) en lugar de la salida de error estándar\n" "\n" -" --help muestra esta ayuda y finaliza\n" -" --version muestra la información de versión y finaliza" +" -?, --help Da esta lista de ayuda\n" +" --usage Da un mensaje corto de uso\n" +" --version Muestra la versión del programa" #: elf/sotruss.ksh:46 msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n" @@ -1164,285 +1261,286 @@ msgstr "" "Los argumentos obligatorios para las opciones largas son\n" "también obligatorios para las opciones cortas correspondientes." -#: elf/sotruss.ksh:56 +#: elf/sotruss.ksh:55 msgid "%s: option requires an argument -- '%s'\\n" msgstr "%s: la opción requiere un argumento -- '%c'\\n" -#: elf/sotruss.ksh:57 elf/sotruss.ksh:68 elf/sotruss.ksh:134 -msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n" -msgstr "Pruebe \\`%s --help' o `%s --usage' para más información.\\n" - -#: elf/sotruss.ksh:62 +#: elf/sotruss.ksh:61 msgid "%s: option is ambiguous; possibilities:" msgstr "%s: la opción es ambigua; posibilidades:" -#: elf/sotruss.ksh:80 +#: elf/sotruss.ksh:79 msgid "Written by %s.\\n" msgstr "Escrito por %s.\\n" -#: elf/sotruss.ksh:87 +# FIXME: Posible errata en el msgid. +#: elf/sotruss.ksh:86 msgid "" "Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]\n" -"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\\n" +"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\n" +"\t [--help] [--usage] [--version] [--]\n" +"\t EXECUTABLE [EXECUTABLE-OPTION...]\\n" msgstr "" "Modo de empleo: %s [-ef] [-F LISTA_DE] [-o FICHERO] [-T LISTA_A] [--exit]\n" -"\t [--follow] [--from LISTA_DE] [--output FICHERO] [--to LISTA_A]\\n" +"\t [--follow] [--from LISTA_DE] [--output FICHERO] [--to LISTA_A]\n" +"\t [--help] [--usage] [--version] [--]\n" +"\t EJECUTABLE [OPCIÓN-DEL-EJECUTABLE...]\\n" -#: elf/sotruss.ksh:133 +#: elf/sotruss.ksh:134 msgid "%s: unrecognized option '%c%s'\\n" msgstr "%s: opción no reconocida '%c%s'\\n" -#: elf/sprof.c:77 +#: elf/sprof.c:76 msgid "Output selection:" msgstr "Selección del resultado:" -#: elf/sprof.c:79 +#: elf/sprof.c:78 msgid "print list of count paths and their number of use" msgstr "muestra la lista de contadores de ruta y su número de uso" -#: elf/sprof.c:81 +#: elf/sprof.c:80 msgid "generate flat profile with counts and ticks" msgstr "genera un `profile' plano con contadores y `ticks'" -#: elf/sprof.c:82 +#: elf/sprof.c:81 msgid "generate call graph" msgstr "genera el grafo de llamadas" # ¿profiling? sv -#: elf/sprof.c:89 +#: elf/sprof.c:88 msgid "Read and display shared object profiling data." msgstr "Lee y muestra los datos de `profiling' del objeto compartido." -#: elf/sprof.c:94 +#: elf/sprof.c:93 msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [DATOSPROF]" -#: elf/sprof.c:431 +#: elf/sprof.c:432 #, c-format msgid "failed to load shared object `%s'" msgstr "fallo al cargar el objeto compartido `%s'" -#: elf/sprof.c:440 +#: elf/sprof.c:441 #, c-format msgid "cannot create internal descriptors" msgstr "no se pueden crear descriptores internos" -#: elf/sprof.c:559 +#: elf/sprof.c:553 #, c-format msgid "Reopening shared object `%s' failed" msgstr "La reapertura del objeto compartido `%s' falló" -#: elf/sprof.c:566 elf/sprof.c:660 +#: elf/sprof.c:560 elf/sprof.c:655 #, c-format msgid "reading of section headers failed" msgstr "falló la lectura de las cabeceras de sección" # Estupendo, entre section, header, string y table hay 4! posibilidades... -#: elf/sprof.c:574 elf/sprof.c:668 +#: elf/sprof.c:568 elf/sprof.c:663 #, c-format msgid "reading of section header string table failed" msgstr "falló la lectura de la tabla de cadenas de cabeceras de sección" -#: elf/sprof.c:600 +#: elf/sprof.c:594 #, c-format msgid "*** Cannot read debuginfo file name: %m\n" msgstr "*** No se puede leer el nombre del fichero de información de depuración: %m\n" -#: elf/sprof.c:620 +#: elf/sprof.c:615 #, c-format msgid "cannot determine file name" msgstr "no se puede determinar el nombre del fichero" -#: elf/sprof.c:653 +#: elf/sprof.c:648 #, c-format msgid "reading of ELF header failed" msgstr "falló la lectura de la cabecera ELF" # Duda: stripped. -#: elf/sprof.c:689 +#: elf/sprof.c:684 #, c-format msgid "*** The file `%s' is stripped: no detailed analysis possible\n" msgstr "*** El fichero `%s' está `stripped': no es posible un análisis detallado\n" -#: elf/sprof.c:719 +#: elf/sprof.c:714 #, c-format msgid "failed to load symbol data" msgstr "fallo al cargar los datos del símbolo" -#: elf/sprof.c:784 +#: elf/sprof.c:779 #, c-format msgid "cannot load profiling data" msgstr "no se pueden cargar los datos de `profiling'" -#: elf/sprof.c:793 +#: elf/sprof.c:788 #, c-format msgid "while stat'ing profiling data file" msgstr "al ejecutar `stat' sobre el fichero de datos de `profiling'" -#: elf/sprof.c:801 +#: elf/sprof.c:796 #, c-format msgid "profiling data file `%s' does not match shared object `%s'" msgstr "" "el fichero de datos para `profiling' %s no se corresponde con el\n" "objeto compartido `%s'" -#: elf/sprof.c:812 +#: elf/sprof.c:807 #, c-format msgid "failed to mmap the profiling data file" msgstr "no se pudo hacer mmap con el fichero de datos de `profile'" # Se admiten sugerencias para el "profiling" sv. -#: elf/sprof.c:820 +#: elf/sprof.c:815 #, c-format msgid "error while closing the profiling data file" msgstr "error al cerrar el fichero de datos de `profiling'" -#: elf/sprof.c:829 elf/sprof.c:927 +#: elf/sprof.c:824 elf/sprof.c:922 #, c-format msgid "cannot create internal descriptor" msgstr "no se puede crear un descriptor interno" -#: elf/sprof.c:903 +#: elf/sprof.c:898 #, c-format msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s' no es un fichero de datos para `profile' correcto para `%s'" -#: elf/sprof.c:1084 elf/sprof.c:1142 +#: elf/sprof.c:1079 elf/sprof.c:1137 #, c-format msgid "cannot allocate symbol data" msgstr "no se puede asignar espacio para los datos del símbolo" -#: iconv/iconv_charmap.c:142 iconv/iconv_prog.c:446 +#: iconv/iconv_charmap.c:143 iconv/iconv_prog.c:448 #, c-format msgid "cannot open output file" msgstr "no se puede abrir el fichero de salida" -#: iconv/iconv_charmap.c:188 iconv/iconv_prog.c:312 +#: iconv/iconv_charmap.c:189 iconv/iconv_prog.c:311 #, c-format msgid "error while closing input `%s'" msgstr "error al cerrar la entrada `%s'" -#: iconv/iconv_charmap.c:462 +#: iconv/iconv_charmap.c:463 #, c-format msgid "illegal input sequence at position %Zd" msgstr "secuencia de entrada ilegal en la posición %Zd" -#: iconv/iconv_charmap.c:481 iconv/iconv_prog.c:537 +#: iconv/iconv_charmap.c:482 iconv/iconv_prog.c:539 #, c-format msgid "incomplete character or shift sequence at end of buffer" msgstr "carácter o secuencia de desplazamiento incompleta al final del búfer" -#: iconv/iconv_charmap.c:526 iconv/iconv_charmap.c:562 iconv/iconv_prog.c:580 -#: iconv/iconv_prog.c:616 +#: iconv/iconv_charmap.c:527 iconv/iconv_charmap.c:563 iconv/iconv_prog.c:582 +#: iconv/iconv_prog.c:618 #, c-format msgid "error while reading the input" msgstr "error al leer la entrada" -#: iconv/iconv_charmap.c:544 iconv/iconv_prog.c:598 +#: iconv/iconv_charmap.c:545 iconv/iconv_prog.c:600 #, c-format msgid "unable to allocate buffer for input" msgstr "no se puede asignar espacio para el búfer de entrada" -#: iconv/iconv_prog.c:60 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "Especificación de formato de Entrada/Salida:" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "codificación del texto original" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "codificación para el resultado" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Información:" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "lista todos los juegos de caracteres conocidos" -#: iconv/iconv_prog.c:65 locale/programs/localedef.c:127 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:126 msgid "Output control:" msgstr "Control del resultado:" -#: iconv/iconv_prog.c:66 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "se omiten los caracteres inválidos en la salida" -#: iconv/iconv_prog.c:67 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "fichero de salida" -#: iconv/iconv_prog.c:68 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "suprime los avisos" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "muestra información sobre el desarrollo" -#: iconv/iconv_prog.c:74 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Convierte la codificación de los ficheros dados de una codificación a otra." -#: iconv/iconv_prog.c:78 +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[FICHERO...]" -#: iconv/iconv_prog.c:234 +#: iconv/iconv_prog.c:233 #, c-format msgid "conversions from `%s' and to `%s' are not supported" msgstr "no se admiten las conversiones desde `%s' y hacia `%s'" -#: iconv/iconv_prog.c:239 +#: iconv/iconv_prog.c:238 #, c-format msgid "conversion from `%s' is not supported" msgstr "no se admite la conversión de `%s'" -#: iconv/iconv_prog.c:246 +#: iconv/iconv_prog.c:245 #, c-format msgid "conversion to `%s' is not supported" msgstr "no se admite la conversión a `%s'" -#: iconv/iconv_prog.c:250 +#: iconv/iconv_prog.c:249 #, c-format msgid "conversion from `%s' to `%s' is not supported" msgstr "no se admite la conversión de `%s' a `%s'" -#: iconv/iconv_prog.c:260 +#: iconv/iconv_prog.c:259 #, c-format msgid "failed to start conversion processing" msgstr "fallo al comenzar el proceso de conversión" -#: iconv/iconv_prog.c:358 +#: iconv/iconv_prog.c:357 #, c-format msgid "error while closing output file" msgstr "error al cerrar el fichero de salida" -#: iconv/iconv_prog.c:456 +#: iconv/iconv_prog.c:458 #, c-format msgid "conversion stopped due to problem in writing the output" msgstr "la conversión se ha detenido debido a un problema al escribir el resultado" -#: iconv/iconv_prog.c:533 +#: iconv/iconv_prog.c:535 #, c-format msgid "illegal input sequence at position %ld" msgstr "secuencia de entrada ilegal en la posición %ld" -#: iconv/iconv_prog.c:541 +#: iconv/iconv_prog.c:543 #, c-format msgid "internal error (illegal descriptor)" msgstr "error interno (descriptor ilegal)" -#: iconv/iconv_prog.c:544 +#: iconv/iconv_prog.c:546 #, c-format msgid "unknown iconv() error %d" msgstr "error de iconv() desconocido %d" # FIXME: Espacio en blanco final. -#: iconv/iconv_prog.c:790 +#: iconv/iconv_prog.c:791 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -1459,11 +1557,11 @@ msgstr "" "\n" " " -#: iconv/iconvconfig.c:110 +#: iconv/iconvconfig.c:109 msgid "Create fastloading iconv module configuration file." msgstr "Crea un fichero de configuración de un módulo iconv de carga rápida." -#: iconv/iconvconfig.c:114 +#: iconv/iconvconfig.c:113 msgid "[DIR...]" msgstr "[DIR...]" @@ -1472,34 +1570,34 @@ msgstr "[DIR...]" # caso el msgstr que he puesto es apropiado) o si por el contrario lo # que nos dicen es que se utilizará prefijo para todos los accesos a # ficheros. -#: iconv/iconvconfig.c:127 +#: iconv/iconvconfig.c:126 msgid "Prefix used for all file accesses" msgstr "Prefijo utilizado para todos los accesos a ficheros" -#: iconv/iconvconfig.c:128 +#: iconv/iconvconfig.c:127 msgid "Put output in FILE instead of installed location (--prefix does not apply to FILE)" msgstr "Pone el resultado en FICHERO, no en el lugar instalado (--prefix no es aplicable a FICHERO)" -#: iconv/iconvconfig.c:132 +#: iconv/iconvconfig.c:131 msgid "Do not search standard directories, only those on the command line" msgstr "No busca en los directorios estándar, solamente en los de la línea de órdenes" -#: iconv/iconvconfig.c:301 +#: iconv/iconvconfig.c:303 #, c-format msgid "Directory arguments required when using --nostdlib" msgstr "Se requieren directorios como argumentos cuando se usa --nostdlib" -#: iconv/iconvconfig.c:343 locale/programs/localedef.c:291 +#: iconv/iconvconfig.c:345 locale/programs/localedef.c:287 #, c-format msgid "no output file produced because warnings were issued" msgstr "no se ha producido ningún fichero de salida debido a la existencia de avisos" -#: iconv/iconvconfig.c:429 +#: iconv/iconvconfig.c:434 #, c-format msgid "while inserting in search tree" msgstr "al insertar en el árbol de búsqueda" -#: iconv/iconvconfig.c:1238 +#: iconv/iconvconfig.c:1243 #, c-format msgid "cannot generate output file" msgstr "no se puede generar el fichero de salida" @@ -1595,753 +1693,753 @@ msgstr "Elimine la contraseña o haga el fichero no legible por otros." msgid "Unknown .netrc keyword %s" msgstr "Palabra clave %s desconocida en .netrc" -#: libidn/nfkc.c:464 +#: libidn/nfkc.c:462 msgid "Character out of range for UTF-8" msgstr "Carácter fuera de rango para UTF-8" -#: locale/programs/charmap-dir.c:59 +#: locale/programs/charmap-dir.c:58 #, c-format msgid "cannot read character map directory `%s'" msgstr "no se puede leer el directorio de tablas de caracteres `%s'" -#: locale/programs/charmap.c:138 +#: locale/programs/charmap.c:137 #, c-format msgid "character map file `%s' not found" msgstr "el fichero de tabla de caracteres `%s' no se encontró" -#: locale/programs/charmap.c:195 +#: locale/programs/charmap.c:194 #, c-format msgid "default character map file `%s' not found" msgstr "no se encontró el fichero de tabla de caracteres predeterminado `%s'" -#: locale/programs/charmap.c:258 +#: locale/programs/charmap.c:257 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "" "la tabla de caracteres `%s' no es compatible con ASCII, el local no cumple\n" "con ISO C\n" -#: locale/programs/charmap.c:337 +#: locale/programs/charmap.c:336 #, c-format msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n" msgstr "%s: <mb_cur_max> debe ser mayor que <mb_cur_min>\n" -#: locale/programs/charmap.c:357 locale/programs/charmap.c:374 -#: locale/programs/repertoire.c:174 +#: locale/programs/charmap.c:356 locale/programs/charmap.c:373 +#: locale/programs/repertoire.c:173 #, c-format msgid "syntax error in prolog: %s" msgstr "error de sintaxis en el prólogo: %s" -#: locale/programs/charmap.c:358 +#: locale/programs/charmap.c:357 msgid "invalid definition" msgstr "definición inválida" -#: locale/programs/charmap.c:375 locale/programs/locfile.c:126 -#: locale/programs/locfile.c:153 locale/programs/repertoire.c:175 +#: locale/programs/charmap.c:374 locale/programs/locfile.c:125 +#: locale/programs/locfile.c:152 locale/programs/repertoire.c:174 msgid "bad argument" msgstr "argumento erróneo" -#: locale/programs/charmap.c:403 +#: locale/programs/charmap.c:402 #, c-format msgid "duplicate definition of <%s>" msgstr "definición duplicada de <%s>" -#: locale/programs/charmap.c:410 +#: locale/programs/charmap.c:409 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "el valor para <%s> debe ser 1 o mayor" # Milagro, por una vez es más corto en español :-) sv -#: locale/programs/charmap.c:422 +#: locale/programs/charmap.c:421 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "el valor de <%s> debe ser mayor o igual que el valor de <%s>" -#: locale/programs/charmap.c:445 locale/programs/repertoire.c:183 +#: locale/programs/charmap.c:444 locale/programs/repertoire.c:182 #, c-format msgid "argument to <%s> must be a single character" msgstr "el argumento para <%s> debe ser un único carácter" -#: locale/programs/charmap.c:471 +#: locale/programs/charmap.c:470 msgid "character sets with locking states are not supported" msgstr "los conjuntos de caracteres con estados de bloqueo no están soportados" -#: locale/programs/charmap.c:498 locale/programs/charmap.c:552 -#: locale/programs/charmap.c:584 locale/programs/charmap.c:678 -#: locale/programs/charmap.c:733 locale/programs/charmap.c:774 -#: locale/programs/charmap.c:815 +#: locale/programs/charmap.c:497 locale/programs/charmap.c:551 +#: locale/programs/charmap.c:583 locale/programs/charmap.c:677 +#: locale/programs/charmap.c:732 locale/programs/charmap.c:773 +#: locale/programs/charmap.c:814 #, c-format msgid "syntax error in %s definition: %s" msgstr "error de sintaxis en la definición de %s: %s" -#: locale/programs/charmap.c:499 locale/programs/charmap.c:679 -#: locale/programs/charmap.c:775 locale/programs/repertoire.c:230 +#: locale/programs/charmap.c:498 locale/programs/charmap.c:678 +#: locale/programs/charmap.c:774 locale/programs/repertoire.c:229 msgid "no symbolic name given" msgstr "no se ha especificado ningún nombre simbólico" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:552 msgid "invalid encoding given" msgstr "especificada una codificación inválida" -#: locale/programs/charmap.c:562 +#: locale/programs/charmap.c:561 msgid "too few bytes in character encoding" msgstr "insuficiente número de bytes en la codificación del carácter" -#: locale/programs/charmap.c:564 +#: locale/programs/charmap.c:563 msgid "too many bytes in character encoding" msgstr "demasiados bytes en la codificación del carácter" -#: locale/programs/charmap.c:586 locale/programs/charmap.c:734 -#: locale/programs/charmap.c:817 locale/programs/repertoire.c:296 +#: locale/programs/charmap.c:585 locale/programs/charmap.c:733 +#: locale/programs/charmap.c:816 locale/programs/repertoire.c:295 msgid "no symbolic name given for end of range" msgstr "no se ha especificado ningún nombre simbólico para el final del rango" -#: locale/programs/charmap.c:610 locale/programs/ld-address.c:602 -#: locale/programs/ld-collate.c:2769 locale/programs/ld-collate.c:3927 -#: locale/programs/ld-ctype.c:2257 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-identification.c:452 -#: locale/programs/ld-measurement.c:238 locale/programs/ld-messages.c:332 -#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:241 -#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1221 -#: locale/programs/repertoire.c:313 +#: locale/programs/charmap.c:609 locale/programs/ld-address.c:601 +#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:3924 +#: locale/programs/ld-ctype.c:2255 locale/programs/ld-ctype.c:3006 +#: locale/programs/ld-identification.c:451 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:942 locale/programs/ld-name.c:306 +#: locale/programs/ld-numeric.c:367 locale/programs/ld-paper.c:240 +#: locale/programs/ld-telephone.c:312 locale/programs/ld-time.c:1220 +#: locale/programs/repertoire.c:312 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: la definición no termina con `END %1$s'" -#: locale/programs/charmap.c:643 +#: locale/programs/charmap.c:642 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "solamente se permiten ANCHO definiciones después de la definición CHARMAP" -#: locale/programs/charmap.c:651 locale/programs/charmap.c:714 +#: locale/programs/charmap.c:650 locale/programs/charmap.c:713 #, c-format msgid "value for %s must be an integer" msgstr "el valor para %s debe ser un número entero" # Para entender este mensaje, pensar en Turing. -#: locale/programs/charmap.c:842 +#: locale/programs/charmap.c:841 #, c-format msgid "%s: error in state machine" msgstr "%s: error en la máquina de estados" -#: locale/programs/charmap.c:850 locale/programs/ld-address.c:618 -#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:4120 -#: locale/programs/ld-ctype.c:2254 locale/programs/ld-ctype.c:3026 -#: locale/programs/ld-identification.c:468 -#: locale/programs/ld-measurement.c:254 locale/programs/ld-messages.c:348 -#: locale/programs/ld-monetary.c:959 locale/programs/ld-name.c:323 -#: locale/programs/ld-numeric.c:384 locale/programs/ld-paper.c:257 -#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1237 -#: locale/programs/locfile.c:826 locale/programs/repertoire.c:324 +#: locale/programs/charmap.c:849 locale/programs/ld-address.c:617 +#: locale/programs/ld-collate.c:2763 locale/programs/ld-collate.c:4117 +#: locale/programs/ld-ctype.c:2252 locale/programs/ld-ctype.c:3023 +#: locale/programs/ld-identification.c:467 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:958 locale/programs/ld-name.c:322 +#: locale/programs/ld-numeric.c:383 locale/programs/ld-paper.c:256 +#: locale/programs/ld-telephone.c:328 locale/programs/ld-time.c:1236 +#: locale/programs/locfile.c:825 locale/programs/repertoire.c:323 #, c-format msgid "%s: premature end of file" msgstr "%s: fin de fichero no esperado" -#: locale/programs/charmap.c:869 locale/programs/charmap.c:880 +#: locale/programs/charmap.c:868 locale/programs/charmap.c:879 #, c-format msgid "unknown character `%s'" msgstr "carácter desconocido `%s'" -#: locale/programs/charmap.c:888 +#: locale/programs/charmap.c:887 #, c-format msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d" msgstr "" "el número de bytes para la sucesión de bytes de comienzo y final del rango\n" "no es el mismo: %d vs %d" -#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3046 -#: locale/programs/repertoire.c:419 +#: locale/programs/charmap.c:992 locale/programs/ld-collate.c:3043 +#: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "nombres inválidos para el rango de caracteres" -#: locale/programs/charmap.c:1005 locale/programs/repertoire.c:431 +#: locale/programs/charmap.c:1004 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "el formato de rango hexadecimal debe usar solamente caracteres en mayúsculas" -#: locale/programs/charmap.c:1023 locale/programs/repertoire.c:449 +#: locale/programs/charmap.c:1022 locale/programs/repertoire.c:448 #, c-format msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> y <%s> son nombres inválidos para el rango de caracteres" -#: locale/programs/charmap.c:1029 locale/programs/repertoire.c:456 +#: locale/programs/charmap.c:1028 locale/programs/repertoire.c:455 msgid "upper limit in range is smaller than lower limit" msgstr "el límite superior del rango es menor que el límite inferior" -#: locale/programs/charmap.c:1087 +#: locale/programs/charmap.c:1086 msgid "resulting bytes for range not representable." msgstr "los bytes resultantes para el rango no son representables." -#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1558 -#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:133 -#: locale/programs/ld-measurement.c:94 locale/programs/ld-messages.c:97 -#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 -#: locale/programs/ld-numeric.c:98 locale/programs/ld-paper.c:91 -#: locale/programs/ld-telephone.c:94 locale/programs/ld-time.c:159 +#: locale/programs/ld-address.c:134 locale/programs/ld-collate.c:1557 +#: locale/programs/ld-ctype.c:420 locale/programs/ld-identification.c:132 +#: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:96 +#: locale/programs/ld-monetary.c:193 locale/programs/ld-name.c:93 +#: locale/programs/ld-numeric.c:97 locale/programs/ld-paper.c:90 +#: locale/programs/ld-telephone.c:93 locale/programs/ld-time.c:158 #, c-format msgid "No definition for %s category found" msgstr "No se encontró ninguna definición para la categoría %s" # FIXME: ¿Por qué hay dos mensajes distintos para este y el siguiente? -#: locale/programs/ld-address.c:146 locale/programs/ld-address.c:184 -#: locale/programs/ld-address.c:202 locale/programs/ld-address.c:231 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:322 -#: locale/programs/ld-address.c:335 locale/programs/ld-identification.c:146 -#: locale/programs/ld-measurement.c:105 locale/programs/ld-monetary.c:206 -#: locale/programs/ld-monetary.c:250 locale/programs/ld-monetary.c:266 -#: locale/programs/ld-monetary.c:278 locale/programs/ld-name.c:105 -#: locale/programs/ld-name.c:142 locale/programs/ld-numeric.c:112 -#: locale/programs/ld-numeric.c:126 locale/programs/ld-paper.c:102 -#: locale/programs/ld-paper.c:111 locale/programs/ld-telephone.c:105 -#: locale/programs/ld-telephone.c:162 locale/programs/ld-time.c:175 -#: locale/programs/ld-time.c:196 +#: locale/programs/ld-address.c:145 locale/programs/ld-address.c:183 +#: locale/programs/ld-address.c:201 locale/programs/ld-address.c:230 +#: locale/programs/ld-address.c:302 locale/programs/ld-address.c:321 +#: locale/programs/ld-address.c:334 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:205 +#: locale/programs/ld-monetary.c:249 locale/programs/ld-monetary.c:265 +#: locale/programs/ld-monetary.c:277 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:111 +#: locale/programs/ld-numeric.c:125 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:110 locale/programs/ld-telephone.c:104 +#: locale/programs/ld-telephone.c:161 locale/programs/ld-time.c:174 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: el campo `%s' no está definido" -#: locale/programs/ld-address.c:158 locale/programs/ld-address.c:210 -#: locale/programs/ld-address.c:240 locale/programs/ld-address.c:278 -#: locale/programs/ld-name.c:117 locale/programs/ld-telephone.c:117 +#: locale/programs/ld-address.c:157 locale/programs/ld-address.c:209 +#: locale/programs/ld-address.c:239 locale/programs/ld-address.c:277 +#: locale/programs/ld-name.c:116 locale/programs/ld-telephone.c:116 #, c-format msgid "%s: field `%s' must not be empty" msgstr "%s: el campo `%s' no debe estar vacío" -#: locale/programs/ld-address.c:170 +#: locale/programs/ld-address.c:169 #, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%s: secuencia de escape `%%%c' inválida en el campo `%s'" -#: locale/programs/ld-address.c:221 +#: locale/programs/ld-address.c:220 #, c-format msgid "%s: terminology language code `%s' not defined" msgstr "%s: el código de terminología del idioma `%s' no está definido" # FIXME: ¿Por qué hay dos mensajes distintos para este y el siguiente? -#: locale/programs/ld-address.c:246 +#: locale/programs/ld-address.c:245 #, c-format msgid "%s: field `%s' must not be defined" msgstr "%s: no se debe definir el campo `%s'" -#: locale/programs/ld-address.c:260 locale/programs/ld-address.c:289 +#: locale/programs/ld-address.c:259 locale/programs/ld-address.c:288 #, c-format msgid "%s: language abbreviation `%s' not defined" msgstr "%s: la abreviatura de lenguaje `%s' no está definida" -#: locale/programs/ld-address.c:267 locale/programs/ld-address.c:295 -#: locale/programs/ld-address.c:329 locale/programs/ld-address.c:341 +#: locale/programs/ld-address.c:266 locale/programs/ld-address.c:294 +#: locale/programs/ld-address.c:328 locale/programs/ld-address.c:340 #, c-format msgid "%s: `%s' value does not match `%s' value" msgstr "%s: el valor `%s' no coincide con el valor `%s'" -#: locale/programs/ld-address.c:314 +#: locale/programs/ld-address.c:313 #, c-format msgid "%s: numeric country code `%d' not valid" msgstr "%s: el código numérico de país `%d' no es válido" -#: locale/programs/ld-address.c:510 locale/programs/ld-address.c:547 -#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2633 -#: locale/programs/ld-identification.c:364 -#: locale/programs/ld-measurement.c:221 locale/programs/ld-messages.c:301 -#: locale/programs/ld-monetary.c:701 locale/programs/ld-monetary.c:736 -#: locale/programs/ld-monetary.c:777 locale/programs/ld-name.c:280 -#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:224 -#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1126 -#: locale/programs/ld-time.c:1168 +#: locale/programs/ld-address.c:509 locale/programs/ld-address.c:546 +#: locale/programs/ld-address.c:584 locale/programs/ld-ctype.c:2630 +#: locale/programs/ld-identification.c:363 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:700 locale/programs/ld-monetary.c:735 +#: locale/programs/ld-monetary.c:776 locale/programs/ld-name.c:279 +#: locale/programs/ld-numeric.c:262 locale/programs/ld-paper.c:223 +#: locale/programs/ld-telephone.c:287 locale/programs/ld-time.c:1125 +#: locale/programs/ld-time.c:1167 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: el campo `%s' ha sido declarado más de una vez" -#: locale/programs/ld-address.c:514 locale/programs/ld-address.c:552 -#: locale/programs/ld-identification.c:368 locale/programs/ld-messages.c:311 -#: locale/programs/ld-monetary.c:705 locale/programs/ld-monetary.c:740 -#: locale/programs/ld-name.c:284 locale/programs/ld-numeric.c:267 -#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:1020 -#: locale/programs/ld-time.c:1089 locale/programs/ld-time.c:1131 +#: locale/programs/ld-address.c:513 locale/programs/ld-address.c:551 +#: locale/programs/ld-identification.c:367 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:704 locale/programs/ld-monetary.c:739 +#: locale/programs/ld-name.c:283 locale/programs/ld-numeric.c:266 +#: locale/programs/ld-telephone.c:291 locale/programs/ld-time.c:1019 +#: locale/programs/ld-time.c:1088 locale/programs/ld-time.c:1130 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: carácter desconocido en el campo `%s'" -#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3925 -#: locale/programs/ld-ctype.c:3006 locale/programs/ld-identification.c:449 -#: locale/programs/ld-measurement.c:235 locale/programs/ld-messages.c:330 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:305 -#: locale/programs/ld-numeric.c:366 locale/programs/ld-paper.c:239 -#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1219 +#: locale/programs/ld-address.c:598 locale/programs/ld-collate.c:3922 +#: locale/programs/ld-ctype.c:3003 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:940 locale/programs/ld-name.c:304 +#: locale/programs/ld-numeric.c:365 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:310 locale/programs/ld-time.c:1218 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: línea `END' incompleta" -#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:544 -#: locale/programs/ld-collate.c:596 locale/programs/ld-collate.c:892 -#: locale/programs/ld-collate.c:905 locale/programs/ld-collate.c:2735 -#: locale/programs/ld-collate.c:2756 locale/programs/ld-collate.c:4110 -#: locale/programs/ld-ctype.c:1985 locale/programs/ld-ctype.c:2244 -#: locale/programs/ld-ctype.c:2831 locale/programs/ld-ctype.c:3017 -#: locale/programs/ld-identification.c:459 -#: locale/programs/ld-measurement.c:245 locale/programs/ld-messages.c:339 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:314 -#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:248 -#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1228 +#: locale/programs/ld-address.c:608 locale/programs/ld-collate.c:543 +#: locale/programs/ld-collate.c:595 locale/programs/ld-collate.c:891 +#: locale/programs/ld-collate.c:904 locale/programs/ld-collate.c:2732 +#: locale/programs/ld-collate.c:2753 locale/programs/ld-collate.c:4107 +#: locale/programs/ld-ctype.c:1984 locale/programs/ld-ctype.c:2242 +#: locale/programs/ld-ctype.c:2828 locale/programs/ld-ctype.c:3014 +#: locale/programs/ld-identification.c:458 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:949 locale/programs/ld-name.c:313 +#: locale/programs/ld-numeric.c:374 locale/programs/ld-paper.c:247 +#: locale/programs/ld-telephone.c:319 locale/programs/ld-time.c:1227 #, c-format msgid "%s: syntax error" msgstr "%s: error de sintaxis" -#: locale/programs/ld-collate.c:419 +#: locale/programs/ld-collate.c:418 #, c-format msgid "`%.*s' already defined in charmap" msgstr "`%.*s' ya está definido en la tabla de caracteres" -#: locale/programs/ld-collate.c:428 +#: locale/programs/ld-collate.c:427 #, c-format msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' ya está definido en el repertorio" -#: locale/programs/ld-collate.c:435 +#: locale/programs/ld-collate.c:434 #, c-format msgid "`%.*s' already defined as collating symbol" msgstr "`%.*s' ya está definido como símbolo de ordenación" -#: locale/programs/ld-collate.c:442 +#: locale/programs/ld-collate.c:441 #, c-format msgid "`%.*s' already defined as collating element" msgstr "`%.*s' ya está definido como elemento de ordenación" -#: locale/programs/ld-collate.c:473 locale/programs/ld-collate.c:499 +#: locale/programs/ld-collate.c:472 locale/programs/ld-collate.c:498 #, c-format msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: `forward' y `backward' se excluyen mutuamente" -#: locale/programs/ld-collate.c:483 locale/programs/ld-collate.c:509 -#: locale/programs/ld-collate.c:525 +#: locale/programs/ld-collate.c:482 locale/programs/ld-collate.c:508 +#: locale/programs/ld-collate.c:524 #, c-format msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: `%s' mencionado más de una vez en la definición del peso %d" -#: locale/programs/ld-collate.c:581 +#: locale/programs/ld-collate.c:580 #, c-format msgid "%s: too many rules; first entry only had %d" msgstr "%s: demasiadas reglas; la primera entrada solamente tenía %d" -#: locale/programs/ld-collate.c:617 +#: locale/programs/ld-collate.c:616 #, c-format msgid "%s: not enough sorting rules" msgstr "%s: no hay suficientes reglas de ordenación" -#: locale/programs/ld-collate.c:782 +#: locale/programs/ld-collate.c:781 #, c-format msgid "%s: empty weight string not allowed" msgstr "%s: no se permite una cadena de peso vacía" -#: locale/programs/ld-collate.c:877 +#: locale/programs/ld-collate.c:876 #, c-format msgid "%s: weights must use the same ellipsis symbol as the name" msgstr "%s: los pesos deben usar el mismo símbolo de elipsis que el nombre" -#: locale/programs/ld-collate.c:933 +#: locale/programs/ld-collate.c:932 #, c-format msgid "%s: too many values" msgstr "%s: demasiados valores" -#: locale/programs/ld-collate.c:1053 locale/programs/ld-collate.c:1228 +#: locale/programs/ld-collate.c:1052 locale/programs/ld-collate.c:1227 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "el orden para `%.*s' ya está definido en %s:%Zu" -#: locale/programs/ld-collate.c:1103 +#: locale/programs/ld-collate.c:1102 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: los símbolos de comienzo y de final de un rango deben representar caracteres" -#: locale/programs/ld-collate.c:1130 +#: locale/programs/ld-collate.c:1129 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "" "%s: los órdenes de byte de los caracteres primero y último deben tener\n" "la misma longitud" -#: locale/programs/ld-collate.c:1172 +#: locale/programs/ld-collate.c:1171 #, c-format msgid "%s: byte sequence of first character of range is not lower than that of the last character" msgstr "" "%s: el orden de byte del primer carácter del rango no es menor que\n" "el del último carácter" -#: locale/programs/ld-collate.c:1297 +#: locale/programs/ld-collate.c:1296 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: el rango simbólico de la elipsis no debe seguir directamente a `order_start'" -#: locale/programs/ld-collate.c:1301 +#: locale/programs/ld-collate.c:1300 #, c-format msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: el rango simbólico de la elipsis no debe estar directamente seguido por `order_end'" -#: locale/programs/ld-collate.c:1321 locale/programs/ld-ctype.c:1502 +#: locale/programs/ld-collate.c:1320 locale/programs/ld-ctype.c:1501 #, c-format msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' y `%.*s' no son nombres válidos para el rango simbólico" -#: locale/programs/ld-collate.c:1371 locale/programs/ld-collate.c:3861 +#: locale/programs/ld-collate.c:1370 locale/programs/ld-collate.c:3858 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: el orden para `%.*s' ya está definido en %s:%Zu" -#: locale/programs/ld-collate.c:1380 +#: locale/programs/ld-collate.c:1379 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s' debe ser un carácter" -#: locale/programs/ld-collate.c:1575 +#: locale/programs/ld-collate.c:1574 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position' debe utilizarse para un nivel específico en todas las secciones o en ninguna" -#: locale/programs/ld-collate.c:1600 +#: locale/programs/ld-collate.c:1599 #, c-format msgid "symbol `%s' not defined" msgstr "el símbolo `%s' no está definido" -#: locale/programs/ld-collate.c:1676 locale/programs/ld-collate.c:1782 +#: locale/programs/ld-collate.c:1675 locale/programs/ld-collate.c:1781 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "el símbolo `%s' tiene la misma codificación que" -#: locale/programs/ld-collate.c:1680 locale/programs/ld-collate.c:1786 +#: locale/programs/ld-collate.c:1679 locale/programs/ld-collate.c:1785 #, c-format msgid "symbol `%s'" msgstr "el símbolo `%s'" -#: locale/programs/ld-collate.c:1828 +#: locale/programs/ld-collate.c:1827 #, c-format msgid "no definition of `UNDEFINED'" msgstr "no hay definición para `UNDEFINED'" -#: locale/programs/ld-collate.c:1857 +#: locale/programs/ld-collate.c:1856 #, c-format msgid "too many errors; giving up" msgstr "demasiados errores; abandono" -#: locale/programs/ld-collate.c:2661 locale/programs/ld-collate.c:4049 +#: locale/programs/ld-collate.c:2658 locale/programs/ld-collate.c:4046 #, c-format msgid "%s: nested conditionals not supported" msgstr "%s: no se admiten condicionales anidados" -#: locale/programs/ld-collate.c:2679 +#: locale/programs/ld-collate.c:2676 #, c-format msgid "%s: more then one 'else'" msgstr "%s: más de un 'else'" -#: locale/programs/ld-collate.c:2854 +#: locale/programs/ld-collate.c:2851 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: definición duplicada de `%s'" -#: locale/programs/ld-collate.c:2890 +#: locale/programs/ld-collate.c:2887 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: definición duplicada de la sección `%s'" -#: locale/programs/ld-collate.c:3026 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: carácter desconocido en el nombre de un símbolo de ordenación" -#: locale/programs/ld-collate.c:3155 +#: locale/programs/ld-collate.c:3152 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: carácter desconocido en el nombre de definición equivalente" -#: locale/programs/ld-collate.c:3166 +#: locale/programs/ld-collate.c:3163 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: carácter desconocido en el valor de definición equivalente" -#: locale/programs/ld-collate.c:3176 +#: locale/programs/ld-collate.c:3173 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: símbolo desconocido `%s' en la definición equivalente" -#: locale/programs/ld-collate.c:3185 +#: locale/programs/ld-collate.c:3182 msgid "error while adding equivalent collating symbol" msgstr "error al añadir símbolo de ordenación equivalente" -#: locale/programs/ld-collate.c:3223 +#: locale/programs/ld-collate.c:3220 #, c-format msgid "duplicate definition of script `%s'" msgstr "definición duplicada de `script' `%s'" -#: locale/programs/ld-collate.c:3271 +#: locale/programs/ld-collate.c:3268 #, c-format msgid "%s: unknown section name `%.*s'" msgstr "%s: nombre de sección desconocido `%.*s'" -#: locale/programs/ld-collate.c:3300 +#: locale/programs/ld-collate.c:3297 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: hay varias definiciones de orden para la sección `%s'" -#: locale/programs/ld-collate.c:3328 +#: locale/programs/ld-collate.c:3325 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: número inválido de reglas de ordenación" -#: locale/programs/ld-collate.c:3355 +#: locale/programs/ld-collate.c:3352 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: varias definiciones de orden para la sección sin nombre" -#: locale/programs/ld-collate.c:3410 locale/programs/ld-collate.c:3540 -#: locale/programs/ld-collate.c:3903 +#: locale/programs/ld-collate.c:3407 locale/programs/ld-collate.c:3537 +#: locale/programs/ld-collate.c:3900 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: falta la palabra clave `order_end'" -#: locale/programs/ld-collate.c:3473 +#: locale/programs/ld-collate.c:3470 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: el orden para el símbolo de ordenación %.*s todavía no está definido" # FIXME: ¿Por qué este y el siguiente no son iguales? -#: locale/programs/ld-collate.c:3491 +#: locale/programs/ld-collate.c:3488 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: el orden para el elemento de ordenación %.*s todavía no está definido" -#: locale/programs/ld-collate.c:3502 +#: locale/programs/ld-collate.c:3499 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: no se puede reordenar después de %.*s: símbolo desconocido" -#: locale/programs/ld-collate.c:3554 locale/programs/ld-collate.c:3915 +#: locale/programs/ld-collate.c:3551 locale/programs/ld-collate.c:3912 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: falta la palabra clave `reorder-end'" -#: locale/programs/ld-collate.c:3588 locale/programs/ld-collate.c:3786 +#: locale/programs/ld-collate.c:3585 locale/programs/ld-collate.c:3783 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: la sección `%.*s' es desconocida" -#: locale/programs/ld-collate.c:3653 +#: locale/programs/ld-collate.c:3650 #, c-format msgid "%s: bad symbol <%.*s>" msgstr "%s: símbolo erróneo <%.*s>" -#: locale/programs/ld-collate.c:3849 +#: locale/programs/ld-collate.c:3846 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: no puede tener `%s' como final de un rango de elipsis" -#: locale/programs/ld-collate.c:3899 +#: locale/programs/ld-collate.c:3896 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: no se permite una descripción de categoría vacía" -#: locale/programs/ld-collate.c:3918 +#: locale/programs/ld-collate.c:3915 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: falta la palabra clave `reorder-sections-end'" -#: locale/programs/ld-collate.c:4082 +#: locale/programs/ld-collate.c:4079 #, c-format msgid "%s: '%s' without matching 'ifdef' or 'ifndef'" msgstr "%s: '%s' sin el 'ifdef' o 'ifndef' correspondiente" -#: locale/programs/ld-collate.c:4100 +#: locale/programs/ld-collate.c:4097 #, c-format msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'" msgstr "%s: 'endif' sin el 'ifdef' o 'ifndef' correspondiente" -#: locale/programs/ld-ctype.c:440 +#: locale/programs/ld-ctype.c:439 #, c-format msgid "No character set name specified in charmap" msgstr "" "No se ha especificado ningún nombre de conjunto de caracteres en la tabla\n" "de caracteres" -#: locale/programs/ld-ctype.c:469 +#: locale/programs/ld-ctype.c:468 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "el carácter L'\\u%0*x' en la clase `%s' debe estar en la clase `%s'" -#: locale/programs/ld-ctype.c:484 +#: locale/programs/ld-ctype.c:483 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "el carácter L'\\u%0*x' en la clase `%s' no debe estar en la clase `%s" -#: locale/programs/ld-ctype.c:498 locale/programs/ld-ctype.c:556 +#: locale/programs/ld-ctype.c:497 locale/programs/ld-ctype.c:555 #, c-format msgid "internal error in %s, line %u" msgstr "error interno en %s, línea %u" -#: locale/programs/ld-ctype.c:527 +#: locale/programs/ld-ctype.c:526 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "el carácter '%s' en la clase `%s' debe estar en la clase `%s'" -#: locale/programs/ld-ctype.c:543 +#: locale/programs/ld-ctype.c:542 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "el carácter '%s' en la clase `%s' no debe estar en la clase `%s" -#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:611 +#: locale/programs/ld-ctype.c:572 locale/programs/ld-ctype.c:610 #, c-format msgid "<SP> character not in class `%s'" msgstr "El carácter <SP> no está en la clase `%s'" -#: locale/programs/ld-ctype.c:585 locale/programs/ld-ctype.c:622 +#: locale/programs/ld-ctype.c:584 locale/programs/ld-ctype.c:621 #, c-format msgid "<SP> character must not be in class `%s'" msgstr "El carácter <SP> no debe estar en la clase `%s'" -#: locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:599 #, c-format msgid "character <SP> not defined in character map" msgstr "el carácter <SP> no está definido en la tabla de caracteres" -#: locale/programs/ld-ctype.c:736 +#: locale/programs/ld-ctype.c:735 #, c-format msgid "`digit' category has not entries in groups of ten" msgstr "la categoría `digit' no tiene entradas en grupos de diez" # FIXME: El original no se entiende. ¿Es gramaticalmente correcto? sv -#: locale/programs/ld-ctype.c:785 +#: locale/programs/ld-ctype.c:784 #, c-format msgid "no input digits defined and none of the standard names in the charmap" msgstr "" "no hay ningún dígito de entrada definido y ninguno de los nombres estándar\n" "en el conjunto de caracteres" -#: locale/programs/ld-ctype.c:850 +#: locale/programs/ld-ctype.c:849 #, c-format msgid "not all characters used in `outdigit' are available in the charmap" msgstr "" "no todos los caracteres usados en `outdigit' están disponibles en la tabla\n" "de caracteres" -#: locale/programs/ld-ctype.c:867 +#: locale/programs/ld-ctype.c:866 #, c-format msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "no todos los caracteres usados en `outdigit' están disponibles en el repertorio" -#: locale/programs/ld-ctype.c:1270 +#: locale/programs/ld-ctype.c:1269 #, c-format msgid "character class `%s' already defined" msgstr "la clase de carácter `%s' ya fue definida" -#: locale/programs/ld-ctype.c:1276 +#: locale/programs/ld-ctype.c:1275 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "límite de la implementación: no se permiten más de %Zd clases de caracteres" -#: locale/programs/ld-ctype.c:1302 +#: locale/programs/ld-ctype.c:1301 #, c-format msgid "character map `%s' already defined" msgstr "la tabla de caracteres `%s' ya está definida" -#: locale/programs/ld-ctype.c:1308 +#: locale/programs/ld-ctype.c:1307 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "límite de la implementación: no se permiten más de %d tablas de caracteres" -#: locale/programs/ld-ctype.c:1573 locale/programs/ld-ctype.c:1698 -#: locale/programs/ld-ctype.c:1804 locale/programs/ld-ctype.c:2496 -#: locale/programs/ld-ctype.c:3492 +#: locale/programs/ld-ctype.c:1572 locale/programs/ld-ctype.c:1697 +#: locale/programs/ld-ctype.c:1803 locale/programs/ld-ctype.c:2493 +#: locale/programs/ld-ctype.c:3489 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: el campo `%s' no contiene exactamente diez entradas" -#: locale/programs/ld-ctype.c:1601 locale/programs/ld-ctype.c:2175 +#: locale/programs/ld-ctype.c:1600 locale/programs/ld-ctype.c:2174 #, c-format msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>" msgstr "el valor `to' del rango <U%0*X> es más pequeño que el valor `from' <U%0*X>" -#: locale/programs/ld-ctype.c:1728 +#: locale/programs/ld-ctype.c:1727 msgid "start and end character sequence of range must have the same length" msgstr "los caracteres de comienzo y final del rango debe tener la misma longitud" -#: locale/programs/ld-ctype.c:1735 +#: locale/programs/ld-ctype.c:1734 msgid "to-value character sequence is smaller than from-value sequence" msgstr "el valor `to' de la sucesión de caracteres es más pequeño que el valor `from'" -#: locale/programs/ld-ctype.c:2095 locale/programs/ld-ctype.c:2146 +#: locale/programs/ld-ctype.c:2094 locale/programs/ld-ctype.c:2145 msgid "premature end of `translit_ignore' definition" msgstr "Fin no esperado de la definición `translit_ignore'" -#: locale/programs/ld-ctype.c:2101 locale/programs/ld-ctype.c:2152 -#: locale/programs/ld-ctype.c:2194 +#: locale/programs/ld-ctype.c:2100 locale/programs/ld-ctype.c:2151 +#: locale/programs/ld-ctype.c:2193 msgid "syntax error" msgstr "error de sintaxis" -#: locale/programs/ld-ctype.c:2328 +#: locale/programs/ld-ctype.c:2326 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: error de sintaxis en la definición de una nueva clase de caracteres" -#: locale/programs/ld-ctype.c:2343 +#: locale/programs/ld-ctype.c:2341 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: error de sintaxis en la definición de un nueva tabla de caracteres" -#: locale/programs/ld-ctype.c:2518 +#: locale/programs/ld-ctype.c:2515 msgid "ellipsis range must be marked by two operands of same type" msgstr "el rango de la elipsis debe estar marcada mediante dos operandos del mismo tipo" -#: locale/programs/ld-ctype.c:2527 +#: locale/programs/ld-ctype.c:2524 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "con valores de rango nombre simbólico la elipsis absoluta `...' no debe usarse" -#: locale/programs/ld-ctype.c:2542 +#: locale/programs/ld-ctype.c:2539 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "con valores de rango UCS se debe utilizar la elipsis simbólica hexadecimal `..'" -#: locale/programs/ld-ctype.c:2556 +#: locale/programs/ld-ctype.c:2553 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "con valores de rango código de caracteres se debe utilizar la elipsis absoluta `...'" -#: locale/programs/ld-ctype.c:2707 +#: locale/programs/ld-ctype.c:2704 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "definición duplicada para la asignación `%s'" -#: locale/programs/ld-ctype.c:2793 locale/programs/ld-ctype.c:2937 +#: locale/programs/ld-ctype.c:2790 locale/programs/ld-ctype.c:2934 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: la sección `translit_start' no termina con `translit_end'" -#: locale/programs/ld-ctype.c:2888 +#: locale/programs/ld-ctype.c:2885 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: definición `default_missing' duplicada" -#: locale/programs/ld-ctype.c:2893 +#: locale/programs/ld-ctype.c:2890 msgid "previous definition was here" msgstr "aquí estaba la definición anterior" -#: locale/programs/ld-ctype.c:2915 +#: locale/programs/ld-ctype.c:2912 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: no se ha encontrado ninguna definición de `default_missing' representable" -#: locale/programs/ld-ctype.c:3068 locale/programs/ld-ctype.c:3152 -#: locale/programs/ld-ctype.c:3172 locale/programs/ld-ctype.c:3193 -#: locale/programs/ld-ctype.c:3214 locale/programs/ld-ctype.c:3235 -#: locale/programs/ld-ctype.c:3256 locale/programs/ld-ctype.c:3296 -#: locale/programs/ld-ctype.c:3317 locale/programs/ld-ctype.c:3384 -#: locale/programs/ld-ctype.c:3426 locale/programs/ld-ctype.c:3451 +#: locale/programs/ld-ctype.c:3065 locale/programs/ld-ctype.c:3149 +#: locale/programs/ld-ctype.c:3169 locale/programs/ld-ctype.c:3190 +#: locale/programs/ld-ctype.c:3211 locale/programs/ld-ctype.c:3232 +#: locale/programs/ld-ctype.c:3253 locale/programs/ld-ctype.c:3293 +#: locale/programs/ld-ctype.c:3314 locale/programs/ld-ctype.c:3381 +#: locale/programs/ld-ctype.c:3423 locale/programs/ld-ctype.c:3448 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: el carácter `%s' no está definido cuando se necesitó como valor predeterminado" -#: locale/programs/ld-ctype.c:3073 locale/programs/ld-ctype.c:3157 -#: locale/programs/ld-ctype.c:3177 locale/programs/ld-ctype.c:3198 -#: locale/programs/ld-ctype.c:3219 locale/programs/ld-ctype.c:3240 -#: locale/programs/ld-ctype.c:3261 locale/programs/ld-ctype.c:3301 -#: locale/programs/ld-ctype.c:3322 locale/programs/ld-ctype.c:3389 +#: locale/programs/ld-ctype.c:3070 locale/programs/ld-ctype.c:3154 +#: locale/programs/ld-ctype.c:3174 locale/programs/ld-ctype.c:3195 +#: locale/programs/ld-ctype.c:3216 locale/programs/ld-ctype.c:3237 +#: locale/programs/ld-ctype.c:3258 locale/programs/ld-ctype.c:3298 +#: locale/programs/ld-ctype.c:3319 locale/programs/ld-ctype.c:3386 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: el carácter `%s' en la tabla de caracteres no es representable con un byte" -#: locale/programs/ld-ctype.c:3433 locale/programs/ld-ctype.c:3458 +#: locale/programs/ld-ctype.c:3430 locale/programs/ld-ctype.c:3455 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "" @@ -2349,7 +2447,7 @@ msgstr "" "con un byte" # FIXME: Lo mismo de antes. -#: locale/programs/ld-ctype.c:3514 +#: locale/programs/ld-ctype.c:3511 #, c-format msgid "no output digits defined and none of the standard names in the charmap" msgstr "" @@ -2357,229 +2455,229 @@ msgstr "" "en el conjunto de caracteres" # Pregunta: ¿De verdad existe transliteración en español? sv -#: locale/programs/ld-ctype.c:3805 +#: locale/programs/ld-ctype.c:3802 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: los datos de transliteración del local `%s' no están disponibles" -#: locale/programs/ld-ctype.c:3906 +#: locale/programs/ld-ctype.c:3903 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: tabla para la clase \"%s\": %lu bytes\n" -#: locale/programs/ld-ctype.c:3975 +#: locale/programs/ld-ctype.c:3972 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: tabla para la asignación \"%s\": %lu bytes\n" -#: locale/programs/ld-ctype.c:4108 +#: locale/programs/ld-ctype.c:4105 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: tabla para el ancho: %lu bytes\n" -#: locale/programs/ld-identification.c:170 +#: locale/programs/ld-identification.c:169 #, c-format msgid "%s: no identification for category `%s'" msgstr "%s: no hay ninguna identificación para la categoría `%s'" -#: locale/programs/ld-identification.c:435 +#: locale/programs/ld-identification.c:434 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: definición duplicada de la versión de la categoría" # Ídem. 1984. -#: locale/programs/ld-measurement.c:113 +#: locale/programs/ld-measurement.c:112 #, c-format msgid "%s: invalid value for field `%s'" msgstr "%s: valor inválido para el campo `%s'" # FIXME: Este mensaje se parece sospechosamente al anterior. sv -#: locale/programs/ld-messages.c:114 locale/programs/ld-messages.c:148 +#: locale/programs/ld-messages.c:113 locale/programs/ld-messages.c:147 #, c-format msgid "%s: field `%s' undefined" msgstr "%s: el campo `%s' no está definido" -#: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:155 -#: locale/programs/ld-monetary.c:256 locale/programs/ld-numeric.c:118 +#: locale/programs/ld-messages.c:120 locale/programs/ld-messages.c:154 +#: locale/programs/ld-monetary.c:255 locale/programs/ld-numeric.c:117 #, c-format msgid "%s: value for field `%s' must not be an empty string" msgstr "%s: el valor para el campo `%s' no debe ser la cadena vacía" -#: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:171 +#: locale/programs/ld-messages.c:136 locale/programs/ld-messages.c:170 #, c-format msgid "%s: no correct regular expression for field `%s': %s" msgstr "%s: la expresión regular para el campo `%s' no es correcta: %s" # ¿Errónea? em+ # También se puede poner equivocada. sv+ -#: locale/programs/ld-monetary.c:224 +#: locale/programs/ld-monetary.c:223 #, c-format msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: el valor del campo `int_curr_symbol' tiene una longitud errónea" -#: locale/programs/ld-monetary.c:237 +#: locale/programs/ld-monetary.c:236 #, c-format msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217" msgstr "" "%s: el valor del campo `int_curr_symbol' no se corresponde con un nombre\n" "válido en ISO 4217" -#: locale/programs/ld-monetary.c:285 locale/programs/ld-monetary.c:315 +#: locale/programs/ld-monetary.c:284 locale/programs/ld-monetary.c:314 #, c-format msgid "%s: value for field `%s' must be in range %d...%d" msgstr "%s: el valor para el campo `%s' debe estar en el rango %d...%d" -#: locale/programs/ld-monetary.c:747 locale/programs/ld-numeric.c:274 +#: locale/programs/ld-monetary.c:746 locale/programs/ld-numeric.c:273 #, c-format msgid "%s: value for field `%s' must be a single character" msgstr "%s: el valor para el campo `%s' debe ser un único carácter" -#: locale/programs/ld-monetary.c:844 locale/programs/ld-numeric.c:318 +#: locale/programs/ld-monetary.c:843 locale/programs/ld-numeric.c:317 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1' debe ser la última entrada del campo `%s'" -#: locale/programs/ld-monetary.c:866 locale/programs/ld-numeric.c:335 +#: locale/programs/ld-monetary.c:865 locale/programs/ld-numeric.c:334 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: los valores para el campo `%s' deben ser menores que 127" -#: locale/programs/ld-monetary.c:909 +#: locale/programs/ld-monetary.c:908 msgid "conversion rate value cannot be zero" msgstr "el valor de la tasa de conversión no puede ser cero" -#: locale/programs/ld-name.c:129 locale/programs/ld-telephone.c:126 -#: locale/programs/ld-telephone.c:149 +#: locale/programs/ld-name.c:128 locale/programs/ld-telephone.c:125 +#: locale/programs/ld-telephone.c:148 #, c-format msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: secuencia de escape inválida en el campo `%s'" -#: locale/programs/ld-time.c:247 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es '+' ni '-'" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:257 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es un único carácter" -#: locale/programs/ld-time.c:271 +#: locale/programs/ld-time.c:270 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: número de desplazamiento ilegal en la cadena %Zd en el campo `era'" -#: locale/programs/ld-time.c:279 +#: locale/programs/ld-time.c:278 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "" "%s: incongruencias al final del valor de desplazamiento en la cadena %Zd\n" "en el campo `era'" -#: locale/programs/ld-time.c:330 +#: locale/programs/ld-time.c:329 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: fecha de comienzo inválida en la cadena %Zd en el campo `era'" # FIXME: ¿Por qué el espacio final? sv -#: locale/programs/ld-time.c:339 +#: locale/programs/ld-time.c:338 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "" "%s: incongruencias al final de la fecha de comienzo en la cadena %Zd\n" "en el campo `era' " -#: locale/programs/ld-time.c:358 +#: locale/programs/ld-time.c:357 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: la fecha de comienzo es inválida en la cadena %Zd del campo `era'" -#: locale/programs/ld-time.c:407 locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:406 locale/programs/ld-time.c:434 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: fecha de parada inválida en la cadena %Zd en el campo `era'" -#: locale/programs/ld-time.c:416 +#: locale/programs/ld-time.c:415 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "" "%s: incongruencias al final de la fecha de parada en la cadena %Zd\n" "en el campo `era'" -#: locale/programs/ld-time.c:444 +#: locale/programs/ld-time.c:443 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: falta el nombre de la era en la cadena %Zd en el campo `era'" -#: locale/programs/ld-time.c:456 +#: locale/programs/ld-time.c:455 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: falta el formato de era en la cadena %Zd en el campo `era'" -#: locale/programs/ld-time.c:497 +#: locale/programs/ld-time.c:496 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: el tercer operando para el valor del campo `%s' no debe ser mayor que %d" -#: locale/programs/ld-time.c:505 locale/programs/ld-time.c:513 -#: locale/programs/ld-time.c:521 +#: locale/programs/ld-time.c:504 locale/programs/ld-time.c:512 +#: locale/programs/ld-time.c:520 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: los valores para el campo `%s' no deben ser mayores que %d" -#: locale/programs/ld-time.c:1004 +#: locale/programs/ld-time.c:1003 #, c-format msgid "%s: too few values for field `%s'" msgstr "%s: insuficiente número de valores para el campo `%s'" -#: locale/programs/ld-time.c:1049 +#: locale/programs/ld-time.c:1048 msgid "extra trailing semicolon" msgstr "sobra un punto y coma al final" -#: locale/programs/ld-time.c:1052 +#: locale/programs/ld-time.c:1051 #, c-format msgid "%s: too many values for field `%s'" msgstr "%s: demasiados valores para el campo `%s'" -#: locale/programs/linereader.c:130 +#: locale/programs/linereader.c:129 msgid "trailing garbage at end of line" msgstr "hay inconsistencias al final de la línea" -#: locale/programs/linereader.c:298 +#: locale/programs/linereader.c:297 msgid "garbage at end of number" msgstr "inconsistencias al final del número" -#: locale/programs/linereader.c:410 +#: locale/programs/linereader.c:409 msgid "garbage at end of character code specification" msgstr "inconsistencia al final de la especificación del código de caracteres" -#: locale/programs/linereader.c:496 +#: locale/programs/linereader.c:495 msgid "unterminated symbolic name" msgstr "nombre simbólico sin terminar" -#: locale/programs/linereader.c:623 +#: locale/programs/linereader.c:622 msgid "illegal escape sequence at end of string" msgstr "secuencia de escape ilegal al final de la cadena de caracteres" -#: locale/programs/linereader.c:627 locale/programs/linereader.c:855 +#: locale/programs/linereader.c:626 locale/programs/linereader.c:854 msgid "unterminated string" msgstr "cadena de caracteres sin terminar" -#: locale/programs/linereader.c:669 +#: locale/programs/linereader.c:668 msgid "non-symbolic character value should not be used" msgstr "los valores de caracteres no simbólicos no deben utilizarse" -#: locale/programs/linereader.c:816 +#: locale/programs/linereader.c:815 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "el símbolo `%.*s' no está en la tabla de caracteres" -#: locale/programs/linereader.c:837 +#: locale/programs/linereader.c:836 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "el símbolo `%.*s' no está en el repertorio" -#: locale/programs/locale-spec.c:131 +#: locale/programs/locale-spec.c:130 #, c-format msgid "unknown name \"%s\"" msgstr "nombre desconocido \"%s\"" @@ -2644,84 +2742,84 @@ msgstr "No se puede establecer LC_COLLATE al local predeterminado" msgid "Cannot set LC_ALL to default locale" msgstr "No se puede establecer LC_ALL al local predeterminado" -#: locale/programs/locale.c:518 +#: locale/programs/locale.c:521 #, c-format msgid "while preparing output" msgstr "al preparar la salida" -#: locale/programs/localedef.c:120 +#: locale/programs/localedef.c:119 msgid "Input Files:" msgstr "Ficheros de Entrada:" -#: locale/programs/localedef.c:122 +#: locale/programs/localedef.c:121 msgid "Symbolic character names defined in FILE" msgstr "Nombres simbólicos de caracteres definidos en FICHERO" -#: locale/programs/localedef.c:123 +#: locale/programs/localedef.c:122 msgid "Source definitions are found in FILE" msgstr "Las definiciones fuente se encuentran en FICHERO" -#: locale/programs/localedef.c:125 +#: locale/programs/localedef.c:124 msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "El FICHERO contiene una asignación de nombres simbólicos a valores UCS4" -#: locale/programs/localedef.c:129 +#: locale/programs/localedef.c:128 msgid "Create output even if warning messages were issued" msgstr "Crea la salida incluso si hubo mensajes de aviso" -#: locale/programs/localedef.c:130 +#: locale/programs/localedef.c:129 msgid "Create old-style tables" msgstr "Crea tablas en estilo antiguo" -#: locale/programs/localedef.c:131 +#: locale/programs/localedef.c:130 msgid "Optional output file prefix" msgstr "Prefijo opcional del fichero de salida" -#: locale/programs/localedef.c:132 +#: locale/programs/localedef.c:131 msgid "Be strictly POSIX conform" msgstr "Actúa estrictamente de acuerdo con la norma POSIX" -#: locale/programs/localedef.c:134 +#: locale/programs/localedef.c:133 msgid "Suppress warnings and information messages" msgstr "Suprime los avisos y los mensajes de información" -#: locale/programs/localedef.c:135 +#: locale/programs/localedef.c:134 msgid "Print more messages" msgstr "Muestra más mensajes" -#: locale/programs/localedef.c:136 +#: locale/programs/localedef.c:135 msgid "Archive control:" msgstr "Control del archivo:" -#: locale/programs/localedef.c:138 +#: locale/programs/localedef.c:137 msgid "Don't add new data to archive" msgstr "No añade nuevos datos al archivo" -#: locale/programs/localedef.c:140 +#: locale/programs/localedef.c:139 msgid "Add locales named by parameters to archive" msgstr "Añade locales nombrados por parámetros al archivo" -#: locale/programs/localedef.c:141 +#: locale/programs/localedef.c:140 msgid "Replace existing archive content" msgstr "Reemplaza el contenido del archivo que exista" -#: locale/programs/localedef.c:143 +#: locale/programs/localedef.c:142 msgid "Remove locales named by parameters from archive" msgstr "Elimina locales nombrados por parámetros del archivo" -#: locale/programs/localedef.c:144 +#: locale/programs/localedef.c:143 msgid "List content of archive" msgstr "Lista el contenido del archivo" -#: locale/programs/localedef.c:146 +#: locale/programs/localedef.c:145 msgid "locale.alias file to consult when making archive" msgstr "fichero locale.alias que se consultará al crear el archivo" -#: locale/programs/localedef.c:151 +#: locale/programs/localedef.c:150 msgid "Compile locale specification" msgstr "Compila una especificación de locales" -#: locale/programs/localedef.c:154 +#: locale/programs/localedef.c:153 msgid "" "NAME\n" "[--add-to-archive|--delete-from-archive] FILE...\n" @@ -2731,30 +2829,30 @@ msgstr "" "[--add-to-archive|--delete-from-archive] FICHERO...\n" "--list-archive [FICHERO]" -#: locale/programs/localedef.c:232 +#: locale/programs/localedef.c:228 #, c-format msgid "cannot create directory for output files" msgstr "no se puede crear el directorio para los ficheros de salida" -#: locale/programs/localedef.c:243 +#: locale/programs/localedef.c:239 #, c-format msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'" msgstr "Error fatal: el sistema no define `_POSIX2_LOCALEDEF'" -#: locale/programs/localedef.c:257 locale/programs/localedef.c:273 -#: locale/programs/localedef.c:599 locale/programs/localedef.c:619 +#: locale/programs/localedef.c:253 locale/programs/localedef.c:269 +#: locale/programs/localedef.c:601 locale/programs/localedef.c:621 #, c-format msgid "cannot open locale definition file `%s'" msgstr "no se puede abrir el fichero de definición de locales `%s'" # OJO: %s podría ser un directorio. -#: locale/programs/localedef.c:285 +#: locale/programs/localedef.c:281 #, c-format msgid "cannot write output files to `%s'" msgstr "no se puede escribir en el fichero de salida `%s'" # ¿repertorios? -#: locale/programs/localedef.c:366 +#: locale/programs/localedef.c:367 #, c-format msgid "" "System's directory for character maps : %s\n" @@ -2767,208 +2865,209 @@ msgstr "" "\t\t ruta de búsqueda de locales : %s\n" "%s" -#: locale/programs/localedef.c:567 +#: locale/programs/localedef.c:569 #, c-format msgid "circular dependencies between locale definitions" msgstr "dependencias circulares entre definiciones de locales" -#: locale/programs/localedef.c:573 +#: locale/programs/localedef.c:575 #, c-format msgid "cannot add already read locale `%s' a second time" msgstr "no se puede añadir el local ya leído `%s' por segunda vez" -#: locale/programs/locarchive.c:92 locale/programs/locarchive.c:338 +#: locale/programs/locarchive.c:113 locale/programs/locarchive.c:347 +#: nss/makedb.c:290 #, c-format msgid "cannot create temporary file" msgstr "no se puede crear un fichero temporal" -#: locale/programs/locarchive.c:122 locale/programs/locarchive.c:384 +#: locale/programs/locarchive.c:143 locale/programs/locarchive.c:393 #, c-format msgid "cannot initialize archive file" msgstr "no se puede inicializar el archivo" -#: locale/programs/locarchive.c:129 locale/programs/locarchive.c:391 +#: locale/programs/locarchive.c:150 locale/programs/locarchive.c:400 #, c-format msgid "cannot resize archive file" msgstr "no se puede cambiar el tamaño del archivo" -#: locale/programs/locarchive.c:152 locale/programs/locarchive.c:414 -#: locale/programs/locarchive.c:633 +#: locale/programs/locarchive.c:163 locale/programs/locarchive.c:413 +#: locale/programs/locarchive.c:619 #, c-format msgid "cannot map archive header" msgstr "no se puede leer la cabecera del archivo" -#: locale/programs/locarchive.c:174 +#: locale/programs/locarchive.c:185 #, c-format msgid "failed to create new locale archive" msgstr "fallo al crear un nuevo archivo de locales" -#: locale/programs/locarchive.c:186 +#: locale/programs/locarchive.c:197 #, c-format msgid "cannot change mode of new locale archive" msgstr "no se puede cambiar el modo del nuevo archivo de locales" -#: locale/programs/locarchive.c:285 +#: locale/programs/locarchive.c:296 #, c-format msgid "cannot read data from locale archive" msgstr "no se pueden leer datos del archivo de locales" -#: locale/programs/locarchive.c:318 +#: locale/programs/locarchive.c:327 #, c-format msgid "cannot map locale archive file" msgstr "no se puede leer el fichero de locales" -#: locale/programs/locarchive.c:422 +#: locale/programs/locarchive.c:421 #, c-format msgid "cannot lock new archive" msgstr "no se puede bloquear el archivo nuevo" -#: locale/programs/locarchive.c:488 +#: locale/programs/locarchive.c:485 #, c-format msgid "cannot extend locale archive file" msgstr "no se puede extender el archivo de locales" -#: locale/programs/locarchive.c:497 +#: locale/programs/locarchive.c:494 #, c-format msgid "cannot change mode of resized locale archive" msgstr "no se puede cambiar el modo de un archivo de locales redimensionado" -#: locale/programs/locarchive.c:505 +#: locale/programs/locarchive.c:502 #, c-format msgid "cannot rename new archive" msgstr "no se puede renombrar el nuevo archivo" -#: locale/programs/locarchive.c:558 +#: locale/programs/locarchive.c:555 #, c-format msgid "cannot open locale archive \"%s\"" msgstr "no se puede abrir el archivo de locales \"%s\"" -#: locale/programs/locarchive.c:563 +#: locale/programs/locarchive.c:560 #, c-format msgid "cannot stat locale archive \"%s\"" msgstr "no se puede efectuar `stat' sobre el archivo de locales \"%s\"" -#: locale/programs/locarchive.c:582 +#: locale/programs/locarchive.c:579 #, c-format msgid "cannot lock locale archive \"%s\"" msgstr "no se puede bloquear el archivo de locales \"%s\"" -#: locale/programs/locarchive.c:605 +#: locale/programs/locarchive.c:602 #, c-format msgid "cannot read archive header" msgstr "no se puede leer la cabecera del archivo" -#: locale/programs/locarchive.c:680 +#: locale/programs/locarchive.c:666 #, c-format msgid "locale '%s' already exists" msgstr "el local `%s' ya existe" -#: locale/programs/locarchive.c:942 locale/programs/locarchive.c:957 -#: locale/programs/locarchive.c:969 locale/programs/locarchive.c:981 -#: locale/programs/locfile.c:344 +#: locale/programs/locarchive.c:928 locale/programs/locarchive.c:943 +#: locale/programs/locarchive.c:955 locale/programs/locarchive.c:967 +#: locale/programs/locfile.c:343 #, c-format msgid "cannot add to locale archive" msgstr "no se puede añadir al archivo de locales" -#: locale/programs/locarchive.c:1139 +#: locale/programs/locarchive.c:1125 #, c-format msgid "locale alias file `%s' not found" msgstr "no se encontró el fichero de alias de locales `%s'" -#: locale/programs/locarchive.c:1289 +#: locale/programs/locarchive.c:1275 #, c-format msgid "Adding %s\n" msgstr "Añadiendo %s\n" -#: locale/programs/locarchive.c:1295 +#: locale/programs/locarchive.c:1281 #, c-format msgid "stat of \"%s\" failed: %s: ignored" msgstr "falló la llamada a `stat' sobre \"%s\": %s: descartado" -#: locale/programs/locarchive.c:1301 +#: locale/programs/locarchive.c:1287 #, c-format msgid "\"%s\" is no directory; ignored" msgstr "\"%s\" no es un directorio; descartado" -#: locale/programs/locarchive.c:1308 +#: locale/programs/locarchive.c:1294 #, c-format msgid "cannot open directory \"%s\": %s: ignored" msgstr "no se puede abrir el directorio \"%s\": %s: descartado" -#: locale/programs/locarchive.c:1380 +#: locale/programs/locarchive.c:1366 #, c-format msgid "incomplete set of locale files in \"%s\"" msgstr "conjunto incompleto de ficheros de locales en \"%s\"" -#: locale/programs/locarchive.c:1444 +#: locale/programs/locarchive.c:1430 #, c-format msgid "cannot read all files in \"%s\": ignored" msgstr "no se pueden leer todos los ficheros de \"%s\": descartado" -#: locale/programs/locarchive.c:1514 +#: locale/programs/locarchive.c:1500 #, c-format msgid "locale \"%s\" not in archive" msgstr "el local \"%s\" no está en el archivo" -#: locale/programs/locfile.c:132 +#: locale/programs/locfile.c:131 #, c-format msgid "argument to `%s' must be a single character" msgstr "el argumento para `%s' debe ser un único carácter" -#: locale/programs/locfile.c:252 +#: locale/programs/locfile.c:251 msgid "syntax error: not inside a locale definition section" msgstr "error de sintaxis: no está dentro de una sección de definición para un local" -#: locale/programs/locfile.c:626 +#: locale/programs/locfile.c:625 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "no se puede abrir el fichero de salida `%s' para la categoría `%s'" -#: locale/programs/locfile.c:650 +#: locale/programs/locfile.c:649 #, c-format msgid "failure while writing data for category `%s'" msgstr "error al escribir los datos para la categoría `%s'" -#: locale/programs/locfile.c:746 +#: locale/programs/locfile.c:745 #, c-format msgid "cannot create output file `%s' for category `%s'" msgstr "no se puede crear el fichero de salida `%s' para la categoría `%s'" -#: locale/programs/locfile.c:782 +#: locale/programs/locfile.c:781 msgid "expecting string argument for `copy'" msgstr "se esperaba un argumento de cadena de caracteres para `copy'" -#: locale/programs/locfile.c:786 +#: locale/programs/locfile.c:785 msgid "locale name should consist only of portable characters" msgstr "el nombre del local debe estar formado por caracteres portables únicamente" -#: locale/programs/locfile.c:805 +#: locale/programs/locfile.c:804 msgid "no other keyword shall be specified when `copy' is used" msgstr "cuando se utiliza `copy' no debe especificarse ninguna otra palabra clave" -#: locale/programs/locfile.c:819 +#: locale/programs/locfile.c:818 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "La definición `%1$s' no termina con `END %1$s'" -#: locale/programs/repertoire.c:229 locale/programs/repertoire.c:270 -#: locale/programs/repertoire.c:295 +#: locale/programs/repertoire.c:228 locale/programs/repertoire.c:269 +#: locale/programs/repertoire.c:294 #, c-format msgid "syntax error in repertoire map definition: %s" msgstr "error de sintaxis en la definición de la asignación: %s" -#: locale/programs/repertoire.c:271 +#: locale/programs/repertoire.c:270 msgid "no <Uxxxx> or <Uxxxxxxxx> value given" msgstr "no se ha dado ningún valor <Uxxxx> o <Uxxxxxxxx>" # No sé qué es eso del "repertoire map", pero creo que el repertoire # es una simple aclaración. sv -#: locale/programs/repertoire.c:331 +#: locale/programs/repertoire.c:330 #, c-format msgid "cannot save new repertoire map" msgstr "no se puede guardar el nuevo repertorio" -#: locale/programs/repertoire.c:342 +#: locale/programs/repertoire.c:341 #, c-format msgid "repertoire map file `%s' not found" msgstr "el fichero de tabla de caracteres `%s' no se encontró" @@ -2978,7 +3077,7 @@ msgstr "el fichero de tabla de caracteres `%s' no se encontró" msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n" msgstr "Establece el propietario, grupo y permisos de acceso del pseudoterminal esclavo correspondiente al pseudoterminal maestro que se le pasa en el descriptor de fichero `%d'. Este es el programa de apoyo para la función `grantpt'. No está pensada para ejecutarse directamente desde la línea de órdenes.\n" -#: login/programs/pt_chown.c:88 +#: login/programs/pt_chown.c:92 #, c-format msgid "" "The owner is set to the current user, the group is set to `%s', and the access permission is set to `%o'.\n" @@ -2989,42 +3088,42 @@ msgstr "" "\n" "%s" -#: login/programs/pt_chown.c:192 +#: login/programs/pt_chown.c:198 #, c-format msgid "too many arguments" msgstr "demasiados argumentos" -#: login/programs/pt_chown.c:200 +#: login/programs/pt_chown.c:206 #, c-format msgid "needs to be installed setuid `root'" msgstr "necesita ser instalado setuid `root'" -#: malloc/mcheck.c:350 +#: malloc/mcheck.c:348 msgid "memory is consistent, library is buggy\n" -msgstr "la memoria es consistente, la biblioteca tiene un bicho\n" +msgstr "la memoria es consistente, la biblioteca tiene un error\n" -#: malloc/mcheck.c:353 +#: malloc/mcheck.c:351 msgid "memory clobbered before allocated block\n" msgstr "memoria alterada antes del bloque de memoria asignado\n" -#: malloc/mcheck.c:356 +#: malloc/mcheck.c:354 msgid "memory clobbered past end of allocated block\n" msgstr "memoria alterada pasado el final del bloque de memoria asignado\n" -#: malloc/mcheck.c:359 +#: malloc/mcheck.c:357 msgid "block freed twice\n" msgstr "bloque liberado dos veces\n" # Revisar lo de bogus. creo que es eso. -#: malloc/mcheck.c:362 +#: malloc/mcheck.c:360 msgid "bogus mcheck_status, library is buggy\n" -msgstr "valor de mcheck_status incorrecto, la biblioteca tiene un bicho\n" +msgstr "valor de mcheck_status incorrecto, la biblioteca tiene un error\n" -#: malloc/memusage.sh:33 +#: malloc/memusage.sh:32 msgid "%s: option '%s' requires an argument\\n" msgstr "%s: la opción '%s' requiere un argumento\\n" -#: malloc/memusage.sh:39 +#: malloc/memusage.sh:38 msgid "" "Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...\n" "Profile memory usage of PROGRAM.\n" @@ -3077,7 +3176,7 @@ msgstr "" "Los argumentos obligatorios para las opciones largas son también obligatorios\n" "para las opciones cortas correspondientes.\n" -#: malloc/memusage.sh:101 +#: malloc/memusage.sh:99 msgid "" "Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n" "\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n" @@ -3089,58 +3188,58 @@ msgstr "" "\t [--title=CADENA] [--x-size=TAMAÑO] [--y-size=TAMAÑO]\n" "\t PROGRAMA [OPCIÓNDEPROGRAMA]..." -#: malloc/memusage.sh:193 +#: malloc/memusage.sh:191 msgid "memusage: option \\`${1##*=}' is ambiguous" msgstr "memusage: la opción \\`${1##*=}' es ambigua" -#: malloc/memusage.sh:202 +#: malloc/memusage.sh:200 msgid "memusage: unrecognized option \\`$1'" msgstr "memusage: opción no reconocida \\`$1'" -#: malloc/memusage.sh:215 +#: malloc/memusage.sh:213 msgid "No program name given" msgstr "No se ha dado ningún nombre de programa" # Supondremos que se trata de un imperativo. sv -#: malloc/memusagestat.c:57 +#: malloc/memusagestat.c:55 msgid "Name output file" msgstr "Nombre el fichero de salida" -#: malloc/memusagestat.c:58 +#: malloc/memusagestat.c:56 msgid "Title string used in output graphic" msgstr "Se ha utilizado una cadena de título en la gráfica de salida" -#: malloc/memusagestat.c:59 +#: malloc/memusagestat.c:57 msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "" "Genera un resultado lineal en el tiempo (por omisión es lineal en el número\n" "de llamadas a función)" -#: malloc/memusagestat.c:61 +#: malloc/memusagestat.c:59 msgid "Also draw graph for total memory consumption" msgstr "Dibuja también una gráfica del total de memoria consumida" -#: malloc/memusagestat.c:62 +#: malloc/memusagestat.c:60 msgid "Make output graphic VALUE pixels wide" msgstr "Hace que la salida gráfica tenga VALOR pixels de ancho" -#: malloc/memusagestat.c:63 +#: malloc/memusagestat.c:61 msgid "Make output graphic VALUE pixels high" msgstr "Hace que la salida gráfica tenga VALOR pixels de alto" -#: malloc/memusagestat.c:68 +#: malloc/memusagestat.c:66 msgid "Generate graphic from memory profiling data" msgstr "Genera un gráfico a partir de los datos de `profiling' de memoria" -#: malloc/memusagestat.c:71 +#: malloc/memusagestat.c:69 msgid "DATAFILE [OUTFILE]" msgstr "FICHERODEDATOS [FICHERODESALIDA]" -#: misc/error.c:118 +#: misc/error.c:117 msgid "Unknown system error" msgstr "Error del sistema desconocido" -#: nis/nis_callback.c:189 +#: nis/nis_callback.c:188 msgid "unable to free arguments" msgstr "no se pueden liberar los argumentos" @@ -3148,7 +3247,7 @@ msgstr "no se pueden liberar los argumentos" # me gustaría que hubiera otra palabra mejor. SV # Siempre me han gustado F&C ;-) # A mí también :-) sv -#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:132 +#: nis/nis_error.h:1 nis/ypclnt.c:832 nis/ypclnt.c:920 posix/regcomp.c:131 #: sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Conseguido" @@ -3190,7 +3289,7 @@ msgid "First/next chain broken" msgstr "Cadena primero/siguiente rota" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.h:11 nis/ypclnt.c:878 sysdeps/gnu/errlist.c:157 +#: nis/nis_error.h:11 nis/ypclnt.c:877 sysdeps/gnu/errlist.c:157 msgid "Permission denied" msgstr "Permiso denegado" @@ -3346,130 +3445,130 @@ msgstr "No se puede crear el proceso en el servidor" msgid "Master server busy, full dump rescheduled." msgstr "El servidor maestro está ocupado, el volcado completo se postpone." -#: nis/nis_local_names.c:122 +#: nis/nis_local_names.c:121 #, c-format msgid "LOCAL entry for UID %d in directory %s not unique\n" msgstr "La entrada LOCAL para el UID %d en el directorio %s no es única\n" -#: nis/nis_print.c:51 +#: nis/nis_print.c:50 msgid "UNKNOWN" msgstr "DESCONOCIDO" -#: nis/nis_print.c:109 +#: nis/nis_print.c:108 msgid "BOGUS OBJECT\n" msgstr "OBJETO INVÁLIDO\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:111 msgid "NO OBJECT\n" msgstr "NO HAY NINGÚN OBJETO\n" -#: nis/nis_print.c:115 +#: nis/nis_print.c:114 msgid "DIRECTORY\n" msgstr "DIRECTORIO\n" -#: nis/nis_print.c:118 +#: nis/nis_print.c:117 msgid "GROUP\n" msgstr "GRUPO\n" -#: nis/nis_print.c:121 +#: nis/nis_print.c:120 msgid "TABLE\n" msgstr "TABLA\n" -#: nis/nis_print.c:124 +#: nis/nis_print.c:123 msgid "ENTRY\n" msgstr "ENTRADA\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:126 msgid "LINK\n" msgstr "ENLACE\n" -#: nis/nis_print.c:130 +#: nis/nis_print.c:129 msgid "PRIVATE\n" msgstr "PRIVADO\n" -#: nis/nis_print.c:133 +#: nis/nis_print.c:132 msgid "(Unknown object)\n" msgstr "(Objeto desconocido)\n" -#: nis/nis_print.c:167 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Nombre : `%s'\n" -#: nis/nis_print.c:168 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Tipo : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Servidor Maestro :\n" # ¿Replicate? -#: nis/nis_print.c:175 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Replicado :\n" -#: nis/nis_print.c:176 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNombre : %s\n" -#: nis/nis_print.c:177 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tClave Pública : " -#: nis/nis_print.c:181 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Ninguno.\n" -#: nis/nis_print.c:184 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bits)\n" -#: nis/nis_print.c:189 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bits)\n" # Véase "Investigación y Ciencia" sv -#: nis/nis_print.c:192 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Cerbero.\n" -#: nis/nis_print.c:195 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Desconocido (tipo = %d, bits = %d)\n" -#: nis/nis_print.c:206 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tDirección universal (%u)\n" -#: nis/nis_print.c:228 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Tiempo de vida : " -#: nis/nis_print.c:230 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Derechos de acceso predeterminados :\n" -#: nis/nis_print.c:239 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tTipo : %s\n" -#: nis/nis_print.c:240 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tDerechos de acceso: " -#: nis/nis_print.c:254 +#: nis/nis_print.c:253 msgid "Group Flags :" msgstr "Opciones de Grupo :" -#: nis/nis_print.c:257 +#: nis/nis_print.c:256 msgid "" "\n" "Group Members :\n" @@ -3477,95 +3576,95 @@ msgstr "" "\n" "Miembros del Grupo :\n" -#: nis/nis_print.c:269 +#: nis/nis_print.c:268 #, c-format msgid "Table Type : %s\n" msgstr "Tipo de Tabla : %s\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:269 #, c-format msgid "Number of Columns : %d\n" msgstr "Número de Columnas : %d\n" -#: nis/nis_print.c:271 +#: nis/nis_print.c:270 #, c-format msgid "Character Separator : %c\n" msgstr "Separador de Caracteres : %c\n" -#: nis/nis_print.c:272 +#: nis/nis_print.c:271 #, c-format msgid "Search Path : %s\n" msgstr "Ruta de búsqueda : %s\n" -#: nis/nis_print.c:273 +#: nis/nis_print.c:272 msgid "Columns :\n" msgstr "Columnas :\n" -#: nis/nis_print.c:276 +#: nis/nis_print.c:275 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNombre : %s\n" -#: nis/nis_print.c:278 +#: nis/nis_print.c:277 msgid "\t\tAttributes : " msgstr "\t\tAtributos : " -#: nis/nis_print.c:280 +#: nis/nis_print.c:279 msgid "\t\tAccess Rights : " msgstr "\t\tDerechos de Acceso : " -#: nis/nis_print.c:290 +#: nis/nis_print.c:289 msgid "Linked Object Type : " msgstr "Tipo de objeto enlazado : " -#: nis/nis_print.c:292 +#: nis/nis_print.c:291 #, c-format msgid "Linked to : %s\n" msgstr "Enlazado a : %s\n" -#: nis/nis_print.c:302 +#: nis/nis_print.c:301 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tEntrada de tipo %s\n" -#: nis/nis_print.c:305 +#: nis/nis_print.c:304 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u bytes] " -#: nis/nis_print.c:308 +#: nis/nis_print.c:307 msgid "Encrypted data\n" msgstr "Datos cifrados\n" -#: nis/nis_print.c:310 +#: nis/nis_print.c:309 msgid "Binary data\n" msgstr "Datos binarios\n" -#: nis/nis_print.c:326 +#: nis/nis_print.c:325 #, c-format msgid "Object Name : %s\n" msgstr "Nombre del Objeto : %s\n" -#: nis/nis_print.c:327 +#: nis/nis_print.c:326 #, c-format msgid "Directory : %s\n" msgstr "Directorio : %s\n" -#: nis/nis_print.c:328 +#: nis/nis_print.c:327 #, c-format msgid "Owner : %s\n" msgstr "Propietario : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:328 #, c-format msgid "Group : %s\n" msgstr "Grupo : %s\n" -#: nis/nis_print.c:330 +#: nis/nis_print.c:329 msgid "Access Rights : " msgstr "Derechos de acceso : " -#: nis/nis_print.c:332 +#: nis/nis_print.c:331 #, c-format msgid "" "\n" @@ -3574,37 +3673,37 @@ msgstr "" "\n" "Tiempo de Vida : " -#: nis/nis_print.c:335 +#: nis/nis_print.c:334 #, c-format msgid "Creation Time : %s" msgstr "Fecha de creación : %s" -#: nis/nis_print.c:337 +#: nis/nis_print.c:336 #, c-format msgid "Mod. Time : %s" msgstr "Fecha de modificación: %s" -#: nis/nis_print.c:338 +#: nis/nis_print.c:337 msgid "Object Type : " msgstr "Tipo del Objeto : " -#: nis/nis_print.c:358 +#: nis/nis_print.c:357 #, c-format msgid " Data Length = %u\n" msgstr " Longitud de los datos = %u\n" -#: nis/nis_print.c:372 +#: nis/nis_print.c:371 #, c-format msgid "Status : %s\n" msgstr "Estado : %s\n" -#: nis/nis_print.c:373 +#: nis/nis_print.c:372 #, c-format msgid "Number of objects : %u\n" msgstr "Número de objetos : %u\n" # Tal vez habría que poner núm en vez de #. sv -#: nis/nis_print.c:377 +#: nis/nis_print.c:376 #, c-format msgid "Object #%d:\n" msgstr "Objeto #%d:\n" @@ -3662,107 +3761,107 @@ msgstr " No miembros recursivos:\n" msgid " No recursive nonmembers\n" msgstr " No hay ningún no miembro recursivo\n" -#: nis/nss_nisplus/nisplus-publickey.c:101 -#: nis/nss_nisplus/nisplus-publickey.c:183 +#: nis/nss_nisplus/nisplus-publickey.c:100 +#: nis/nss_nisplus/nisplus-publickey.c:182 #, c-format msgid "DES entry for netname %s not unique\n" msgstr "La entrada DES para el nombre %s no es única\n" -#: nis/nss_nisplus/nisplus-publickey.c:220 +#: nis/nss_nisplus/nisplus-publickey.c:219 #, c-format msgid "netname2user: missing group id list in `%s'" msgstr "netname2user: falta la lista de ids de grupo en `%s'" -#: nis/nss_nisplus/nisplus-publickey.c:302 -#: nis/nss_nisplus/nisplus-publickey.c:308 -#: nis/nss_nisplus/nisplus-publickey.c:373 -#: nis/nss_nisplus/nisplus-publickey.c:382 +#: nis/nss_nisplus/nisplus-publickey.c:301 +#: nis/nss_nisplus/nisplus-publickey.c:307 +#: nis/nss_nisplus/nisplus-publickey.c:372 +#: nis/nss_nisplus/nisplus-publickey.c:381 #, c-format msgid "netname2user: (nis+ lookup): %s\n" msgstr "netname2user: (búsqueda nis+): %s\n" -#: nis/nss_nisplus/nisplus-publickey.c:321 +#: nis/nss_nisplus/nisplus-publickey.c:320 #, c-format msgid "netname2user: DES entry for %s in directory %s not unique" msgstr "netname2user: la entrada DES para %s en el directorio %s no es única" -#: nis/nss_nisplus/nisplus-publickey.c:339 +#: nis/nss_nisplus/nisplus-publickey.c:338 #, c-format msgid "netname2user: principal name `%s' too long" msgstr "netname2user: el nombre principal `%s' es demasiado largo" -#: nis/nss_nisplus/nisplus-publickey.c:395 +#: nis/nss_nisplus/nisplus-publickey.c:394 #, c-format msgid "netname2user: LOCAL entry for %s in directory %s not unique" msgstr "netname2user: la entrada LOCAL para %s en el directorio %s no es única" -#: nis/nss_nisplus/nisplus-publickey.c:402 +#: nis/nss_nisplus/nisplus-publickey.c:401 msgid "netname2user: should not have uid 0" msgstr "netname2user: no debería tener uid 0" -#: nis/ypclnt.c:836 +#: nis/ypclnt.c:835 msgid "Request arguments bad" msgstr "Los argumentos de la petición son incorrectos" -#: nis/ypclnt.c:839 +#: nis/ypclnt.c:838 msgid "RPC failure on NIS operation" msgstr "Fallo RPC en una operación NIS" -#: nis/ypclnt.c:842 +#: nis/ypclnt.c:841 msgid "Can't bind to server which serves this domain" msgstr "Ha fallado la llamada a bind() con el servidor que sirve a este dominio" -#: nis/ypclnt.c:845 +#: nis/ypclnt.c:844 msgid "No such map in server's domain" msgstr "No existe esa tabla en el dominio del servidor" -#: nis/ypclnt.c:848 +#: nis/ypclnt.c:847 msgid "No such key in map" msgstr "No existe esta clave en la tabla" -#: nis/ypclnt.c:851 +#: nis/ypclnt.c:850 msgid "Internal NIS error" msgstr "Error interno de NIS" -#: nis/ypclnt.c:854 +#: nis/ypclnt.c:853 msgid "Local resource allocation failure" msgstr "La asignación de recursos locales ha fallado" -#: nis/ypclnt.c:857 +#: nis/ypclnt.c:856 msgid "No more records in map database" msgstr "No hay más registros en la base de datos" -#: nis/ypclnt.c:860 +#: nis/ypclnt.c:859 msgid "Can't communicate with portmapper" msgstr "No se puede comunicar con el asignador de puertos" -#: nis/ypclnt.c:863 +#: nis/ypclnt.c:862 msgid "Can't communicate with ypbind" msgstr "No se puede establecer comunicación con `ypbind'" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:865 msgid "Can't communicate with ypserv" msgstr "No se puede establecer comunicación con `ypserv'" -#: nis/ypclnt.c:869 +#: nis/ypclnt.c:868 msgid "Local domain name not set" msgstr "No se ha establecido el nombre del dominio local" -#: nis/ypclnt.c:872 +#: nis/ypclnt.c:871 msgid "NIS map database is bad" msgstr "La base de datos de la tabla NIS no es correcta" -#: nis/ypclnt.c:875 +#: nis/ypclnt.c:874 msgid "NIS client/server version mismatch - can't supply service" msgstr "" "Discordancia en las versiones de NIS del cliente y el servidor.\n" "No se puede suministrar el servicio." -#: nis/ypclnt.c:881 +#: nis/ypclnt.c:880 msgid "Database is busy" msgstr "La base de datos está ocupada" -#: nis/ypclnt.c:884 +#: nis/ypclnt.c:883 msgid "Unknown NIS error code" msgstr "Error de NIS desconocido" @@ -3773,411 +3872,440 @@ msgstr "Error de NIS desconocido" # De acuerdo. # [ Antes decía ... la llamada a bind para el servicio de páginas amarillas ] # Un poco demasiado explicativo. sv -#: nis/ypclnt.c:924 +#: nis/ypclnt.c:923 msgid "Internal ypbind error" msgstr "Error interno en ypbind" # FUZZY -#: nis/ypclnt.c:927 +#: nis/ypclnt.c:926 msgid "Domain not bound" msgstr "No se pudo conectar con el dominio" -#: nis/ypclnt.c:930 +#: nis/ypclnt.c:929 msgid "System resource allocation failure" msgstr "Fallo en la asignación de recursos del sistema" -#: nis/ypclnt.c:933 +#: nis/ypclnt.c:932 msgid "Unknown ypbind error" msgstr "Error desconocido en la llamada a `ypbind()'" -#: nis/ypclnt.c:974 +#: nis/ypclnt.c:973 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: no se puede convertir el nombre del `host' a nombre de red\n" -#: nis/ypclnt.c:992 +#: nis/ypclnt.c:991 msgid "yp_update: cannot get server address\n" msgstr "yp_update: no se puede encontrar la dirección del servidor\n" -#: nscd/aicache.c:83 nscd/hstcache.c:492 +#: nscd/aicache.c:82 nscd/hstcache.c:493 #, c-format msgid "Haven't found \"%s\" in hosts cache!" msgstr "No se ha encontrado \"%s\" en el caché de `hosts'" -#: nscd/aicache.c:85 nscd/hstcache.c:494 +#: nscd/aicache.c:84 nscd/hstcache.c:495 #, c-format msgid "Reloading \"%s\" in hosts cache!" msgstr "Recargando \"%s\" en el caché de hosts" -#: nscd/cache.c:150 +#: nscd/cache.c:151 #, c-format msgid "add new entry \"%s\" of type %s for %s to cache%s" msgstr "añade nueva entrada \"%s\" de tipo %s para %s al caché%s" -#: nscd/cache.c:152 +#: nscd/cache.c:153 msgid " (first)" msgstr " (primero)" -#: nscd/cache.c:276 nscd/connections.c:861 +#: nscd/cache.c:285 nscd/connections.c:1002 #, c-format msgid "cannot stat() file `%s': %s" msgstr "no se puede ejecutar stat() sobre el fichero `%s': %s" -#: nscd/cache.c:318 +#: nscd/cache.c:331 #, c-format msgid "pruning %s cache; time %ld" msgstr "limpiando %s caché; tiempo %ld" -#: nscd/cache.c:347 +#: nscd/cache.c:360 #, c-format msgid "considering %s entry \"%s\", timeout %<PRIu64>" msgstr "considerando la entrada %s \"%s\", tiempo límite %<PRIu64>" -#: nscd/connections.c:565 +#: nscd/connections.c:570 #, c-format msgid "invalid persistent database file \"%s\": %s" msgstr "fichero de base de datos persistente inválido \"%s\": %s" -#: nscd/connections.c:573 +#: nscd/connections.c:578 msgid "uninitialized header" msgstr "cabecera no inicializada" -#: nscd/connections.c:578 +#: nscd/connections.c:583 msgid "header size does not match" msgstr "el tamaño de la cabecera no coincide" -#: nscd/connections.c:588 +#: nscd/connections.c:593 msgid "file size does not match" msgstr "el tamaño del fichero no coincide" -#: nscd/connections.c:605 +#: nscd/connections.c:610 msgid "verification failed" msgstr "falló la verificación" -#: nscd/connections.c:619 +#: nscd/connections.c:624 #, c-format msgid "suggested size of table for database %s larger than the persistent database's table" msgstr "el tamaño sugerido de tabla para la base de datos %s es más grande que la tabla de la base de datos persistente" -#: nscd/connections.c:630 nscd/connections.c:715 +#: nscd/connections.c:635 nscd/connections.c:720 #, c-format msgid "cannot create read-only descriptor for \"%s\"; no mmap" msgstr "no se puede crear descriptor de sólo lectura para \"%s\"; no hay mmap" -#: nscd/connections.c:646 +#: nscd/connections.c:651 #, c-format msgid "cannot access '%s'" msgstr "no se puede acceder a '%s'" -#: nscd/connections.c:694 +#: nscd/connections.c:699 #, c-format msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart" msgstr "la base de datos %s está corrupta o se está usando simultáneamente; borre %s manualmente si fuera necesario y reinicie" -#: nscd/connections.c:701 +#: nscd/connections.c:706 #, c-format msgid "cannot create %s; no persistent database used" msgstr "no se puede crear %s; no se ha utilizado una base de datos persistente" -#: nscd/connections.c:704 +#: nscd/connections.c:709 #, c-format msgid "cannot create %s; no sharing possible" msgstr "no se puede crear %s; no es posible la compartición" -#: nscd/connections.c:775 +#: nscd/connections.c:780 #, c-format msgid "cannot write to database file %s: %s" msgstr "no se puede escribir al fichero de datos %s: %s" -#: nscd/connections.c:814 +#: nscd/connections.c:819 #, c-format msgid "cannot set socket to close on exec: %s; disabling paranoia mode" msgstr "no se puede establecer el `socket' para cerrar en ejecutación: %s; se desactiva el modo paranoia" -#: nscd/connections.c:897 +#: nscd/connections.c:868 #, c-format msgid "cannot open socket: %s" msgstr "no se puede abrir el `socket': %s" -#: nscd/connections.c:917 +#: nscd/connections.c:888 nscd/connections.c:952 #, c-format msgid "cannot change socket to nonblocking mode: %s" msgstr "no se puede cambiar el `socket' a modo no bloqueante: %s" -#: nscd/connections.c:925 +#: nscd/connections.c:896 nscd/connections.c:962 #, c-format msgid "cannot set socket to close on exec: %s" msgstr "no se puede establecer el `socket' para que se cierre en ejecución: %s" -#: nscd/connections.c:938 +#: nscd/connections.c:909 #, c-format msgid "cannot enable socket to accept connections: %s" msgstr "no se puede activar el `socket' para aceptar conexiones: %s" -#: nscd/connections.c:1039 +#: nscd/connections.c:986 +#, c-format +msgid "register trace file %s for database %s" +msgstr "registra el fichero de seguimiento %s para la base de datos %s" + +#: nscd/connections.c:1116 #, c-format msgid "provide access to FD %d, for %s" msgstr "proporciona acceso al descriptor de fichero %d, para %s" -#: nscd/connections.c:1051 +#: nscd/connections.c:1128 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "" "no se pueden manejar peticiones de la versión %d, la versión\n" "actual es %d" -#: nscd/connections.c:1073 +#: nscd/connections.c:1150 #, c-format msgid "request from %ld not handled due to missing permission" msgstr "la petición de %ld no ha sido atendida por falta de permisos" -#: nscd/connections.c:1078 +#: nscd/connections.c:1155 #, c-format msgid "request from '%s' [%ld] not handled due to missing permission" msgstr "la petición de '%s' [%ld] no ha sido atendida por falta de permisos" -#: nscd/connections.c:1083 +#: nscd/connections.c:1160 msgid "request not handled due to missing permission" msgstr "la petición no ha sido atendida por falta de permisos" -#: nscd/connections.c:1121 nscd/connections.c:1174 +#: nscd/connections.c:1198 nscd/connections.c:1251 #, c-format msgid "cannot write result: %s" msgstr "no se puede escribir el resultado: %s" -#: nscd/connections.c:1257 +#: nscd/connections.c:1342 #, c-format msgid "error getting caller's id: %s" msgstr "error al obtener el id de los llamantes: %s" -#: nscd/connections.c:1316 +#: nscd/connections.c:1402 #, c-format msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode" msgstr "no se puede abrir /proc/self/cmdline: %s; se desactiva el modo paranoia" -#: nscd/connections.c:1330 +#: nscd/connections.c:1416 #, c-format msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode" msgstr "no se puede leer /proc/self/cmdline: %s; se desactiva el modo paranoia" -#: nscd/connections.c:1370 +#: nscd/connections.c:1456 #, c-format msgid "cannot change to old UID: %s; disabling paranoia mode" msgstr "no se puede cambiar al UID antiguo: %s; se desactiva el modo paranoia" -#: nscd/connections.c:1380 +#: nscd/connections.c:1466 #, c-format msgid "cannot change to old GID: %s; disabling paranoia mode" msgstr "no se puede cambiar al GID antiguo: %s; se desactiva el modo paranoia" -#: nscd/connections.c:1393 +#: nscd/connections.c:1479 #, c-format msgid "cannot change to old working directory: %s; disabling paranoia mode" msgstr "no se puede cambiar al directorio de trabajo antiguo: %s; se desactiva el modo paranoia" -#: nscd/connections.c:1439 +#: nscd/connections.c:1525 #, c-format msgid "re-exec failed: %s; disabling paranoia mode" msgstr "falló la re-ejecución: %s; se desactiva el modo paranoia" -#: nscd/connections.c:1448 +#: nscd/connections.c:1534 #, c-format msgid "cannot change current working directory to \"/\": %s" msgstr "no se puede cambiar el directorio de trabajo a \"/\": %s" -#: nscd/connections.c:1641 +#: nscd/connections.c:1727 #, c-format msgid "short read while reading request: %s" msgstr "lectura insuficiente mientras se leía la petición: %s" -#: nscd/connections.c:1674 +#: nscd/connections.c:1760 #, c-format msgid "key length in request too long: %d" msgstr "la longitud de la clave en la petición es demasiado larga: %d" -#: nscd/connections.c:1687 +#: nscd/connections.c:1773 #, c-format msgid "short read while reading request key: %s" msgstr "se acabaron los datos mientras se leía la clave de petición: %s" -#: nscd/connections.c:1696 +#: nscd/connections.c:1782 #, c-format msgid "handle_request: request received (Version = %d) from PID %ld" msgstr "handle_request: petición recibida (Versión = %d) del PID %ld" -#: nscd/connections.c:1701 +#: nscd/connections.c:1787 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: petición recibida (Versión = %d)" -#: nscd/connections.c:1901 nscd/connections.c:2099 +#: nscd/connections.c:1999 nscd/connections.c:2227 #, c-format msgid "disabled inotify after read error %d" msgstr "se desactiva `inotify' después de un error de lectura %d" -#: nscd/connections.c:2228 +#: nscd/connections.c:2374 msgid "could not initialize conditional variable" msgstr "no se pudo inicializar la variable condicional" -#: nscd/connections.c:2236 +#: nscd/connections.c:2382 msgid "could not start clean-up thread; terminating" msgstr "no se pudo iniciar el hilo de limpieza; terminando" -#: nscd/connections.c:2250 +#: nscd/connections.c:2396 msgid "could not start any worker thread; terminating" msgstr "no se pudo iniciar ningún hilo de trabajo; terminando" -#: nscd/connections.c:2301 nscd/connections.c:2302 nscd/connections.c:2319 -#: nscd/connections.c:2328 nscd/connections.c:2346 nscd/connections.c:2357 -#: nscd/connections.c:2368 +#: nscd/connections.c:2447 nscd/connections.c:2448 nscd/connections.c:2465 +#: nscd/connections.c:2474 nscd/connections.c:2492 nscd/connections.c:2503 +#: nscd/connections.c:2514 #, c-format msgid "Failed to run nscd as user '%s'" msgstr "Fallo al ejecutar nscd como usuario `%s'" -#: nscd/connections.c:2320 +#: nscd/connections.c:2466 #, c-format msgid "initial getgrouplist failed" msgstr "falló el `getgrouplist' inicial" -#: nscd/connections.c:2329 +#: nscd/connections.c:2475 #, c-format msgid "getgrouplist failed" msgstr "falló `getgrouplist'" -#: nscd/connections.c:2347 +#: nscd/connections.c:2493 #, c-format msgid "setgroups failed" msgstr "falló `setgroups'" -#: nscd/grpcache.c:383 nscd/hstcache.c:439 nscd/initgrcache.c:406 -#: nscd/pwdcache.c:378 nscd/servicescache.c:332 +#: nscd/grpcache.c:407 nscd/hstcache.c:440 nscd/initgrcache.c:411 +#: nscd/pwdcache.c:383 nscd/servicescache.c:338 #, c-format msgid "short write in %s: %s" msgstr "escritura insuficiente en %s: %s" -#: nscd/grpcache.c:428 nscd/initgrcache.c:78 +#: nscd/grpcache.c:452 nscd/initgrcache.c:77 #, c-format msgid "Haven't found \"%s\" in group cache!" msgstr "No se ha encontrado \"%s\" en el caché de grupos" -#: nscd/grpcache.c:430 nscd/initgrcache.c:80 +#: nscd/grpcache.c:454 nscd/initgrcache.c:79 #, c-format msgid "Reloading \"%s\" in group cache!" msgstr "Recargando \"%s\" en el caché de grupos" -#: nscd/grpcache.c:509 +#: nscd/grpcache.c:533 #, c-format msgid "Invalid numeric gid \"%s\"!" msgstr "¡gid numérico inválido \"%s\"!" -#: nscd/mem.c:431 +#: nscd/mem.c:425 #, c-format msgid "freed %zu bytes in %s cache" msgstr "se han liberado %zu bytes en la caché %s" -#: nscd/mem.c:574 +#: nscd/mem.c:568 #, c-format msgid "no more memory for database '%s'" msgstr "no hay más memoria para la base de datos '%s'" -#: nscd/nscd.c:101 +#: nscd/netgroupcache.c:77 +#, c-format +msgid "Haven't found \"%s\" in netgroup cache!" +msgstr "No se ha encontrado \"%s\" en el caché de netgroup" + +#: nscd/netgroupcache.c:79 +#, c-format +msgid "Reloading \"%s\" in netgroup cache!" +msgstr "Recargando \"%s\" en el caché de netgroup" + +#: nscd/netgroupcache.c:467 +#, c-format +msgid "Haven't found \"%s (%s,%s,%s)\" in netgroup cache!" +msgstr "No se ha encontrado \"%s (%s,%s,%s)\" en el caché de netgroup" + +#: nscd/netgroupcache.c:470 +#, c-format +msgid "Reloading \"%s (%s,%s,%s)\" in netgroup cache!" +msgstr "Recargando \"%s (%s,%s,%s)\" en el caché de netgroup" + +#: nscd/nscd.c:116 msgid "Read configuration data from NAME" msgstr "Lee datos de configuración de NOMBRE" -#: nscd/nscd.c:103 +#: nscd/nscd.c:118 msgid "Do not fork and display messages on the current tty" msgstr "No se divide y muestra los mensajes en la terminal actual" -#: nscd/nscd.c:104 +#: nscd/nscd.c:120 +msgid "Do not fork, but otherwise behave like a daemon" +msgstr "No hace fork, pero se comporta como un daemon" + +#: nscd/nscd.c:121 msgid "NUMBER" msgstr "NÚMERO" -#: nscd/nscd.c:104 +#: nscd/nscd.c:121 msgid "Start NUMBER threads" msgstr "Comienza NÚMERO hilos" -#: nscd/nscd.c:105 +#: nscd/nscd.c:122 msgid "Shut the server down" msgstr "Apagar el servidor" -#: nscd/nscd.c:106 +#: nscd/nscd.c:123 msgid "Print current configuration statistics" msgstr "Muestra estadísticas sobre la configuración actual" -#: nscd/nscd.c:107 +#: nscd/nscd.c:124 msgid "TABLE" msgstr "TABLA" -#: nscd/nscd.c:108 +#: nscd/nscd.c:125 msgid "Invalidate the specified cache" msgstr "Invalida la caché especificada" -#: nscd/nscd.c:109 +#: nscd/nscd.c:126 msgid "TABLE,yes" msgstr "TABLA,sí" -#: nscd/nscd.c:110 +#: nscd/nscd.c:127 msgid "Use separate cache for each user" msgstr "Utiliza una caché separada para cada usuario" -#: nscd/nscd.c:115 +#: nscd/nscd.c:132 msgid "Name Service Cache Daemon." msgstr "Daemon de Caché del Servicio de Nombres." -#: nscd/nscd.c:147 nss/getent.c:952 nss/makedb.c:123 +#: nscd/nscd.c:164 nss/getent.c:999 nss/makedb.c:208 #, c-format msgid "wrong number of arguments" msgstr "número incorrecto de argumentos" -#: nscd/nscd.c:157 +#: nscd/nscd.c:174 #, c-format msgid "failure while reading configuration file; this is fatal" msgstr "fallo al leer el fichero de configuración; este error es fatal" -#: nscd/nscd.c:166 +#: nscd/nscd.c:183 #, c-format msgid "already running" msgstr "ya está funcionando" -#: nscd/nscd.c:181 nscd/nscd.c:236 +#: nscd/nscd.c:201 nscd/nscd.c:259 #, c-format msgid "cannot fork" msgstr "no se puede hacer `fork'" -#: nscd/nscd.c:244 +#: nscd/nscd.c:268 #, c-format msgid "cannot change current working directory to \"/\"" msgstr "no se puede cambiar el directorio de trabajo a \"/\"" -#: nscd/nscd.c:252 +#: nscd/nscd.c:276 msgid "Could not create log file" msgstr "No se pudo crear el fichero de registro" -#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:174 +#: nscd/nscd.c:348 nscd/nscd.c:373 nscd/nscd_stat.c:173 #, c-format msgid "Only root is allowed to use this option!" msgstr "Solamente root puede usar esta opción" -#: nscd/nscd.c:345 +#: nscd/nscd.c:388 #, c-format msgid "'%s' is not a known database" msgstr "'%s' no es una base de datos conocida" -#: nscd/nscd.c:370 nscd/nscd_stat.c:193 +#: nscd/nscd.c:413 nscd/nscd_stat.c:192 #, c-format msgid "write incomplete" msgstr "escritura incompleta" -#: nscd/nscd.c:381 +#: nscd/nscd.c:424 #, c-format msgid "cannot read invalidate ACK" msgstr "no se puede leer el ACK de invalidación" -#: nscd/nscd.c:387 +#: nscd/nscd.c:430 #, c-format msgid "invalidation failed" msgstr "fallo en la invalidación" -#: nscd/nscd.c:397 +#: nscd/nscd.c:440 #, c-format msgid "secure services not implemented anymore" msgstr "los servicios seguros ya no están implementados" @@ -4202,61 +4330,55 @@ msgstr "Debe especificar un nombre de usuario para la opción `server-user'" msgid "Must specify user name for stat-user option" msgstr "Debe especificar un nombre de usuario para la opción `stat-user'" -# Ídem. 1984. -#: nscd/nscd_conf.c:245 -#, c-format -msgid "invalid value for 'reload-count': %u" -msgstr "valor inválido para 'reload-count': %u" - -#: nscd/nscd_conf.c:260 +#: nscd/nscd_conf.c:258 #, c-format msgid "Must specify value for restart-interval option" msgstr "Debe especificar un valor para la opción `restart-interval'" -#: nscd/nscd_conf.c:274 +#: nscd/nscd_conf.c:272 #, c-format msgid "Unknown option: %s %s %s" msgstr "Opción desconocida: %s %s %s" -#: nscd/nscd_conf.c:287 +#: nscd/nscd_conf.c:285 #, c-format msgid "cannot get current working directory: %s; disabling paranoia mode" msgstr "no se puede obtener el directorio actual: %s; se desactiva el modo paranoia" -#: nscd/nscd_conf.c:307 +#: nscd/nscd_conf.c:305 #, c-format msgid "maximum file size for %s database too small" msgstr "el tamaño máximo de fichero para la base de datos %s es demasiado pequeño" -#: nscd/nscd_stat.c:143 +#: nscd/nscd_stat.c:142 #, c-format msgid "cannot write statistics: %s" msgstr "no se pueden escribir las estadísticas: %s" -#: nscd/nscd_stat.c:158 +#: nscd/nscd_stat.c:157 msgid "yes" msgstr "sí" -#: nscd/nscd_stat.c:159 +#: nscd/nscd_stat.c:158 msgid "no" msgstr "no" -#: nscd/nscd_stat.c:170 +#: nscd/nscd_stat.c:169 #, c-format msgid "Only root or %s is allowed to use this option!" msgstr "Solamente root o %s puede usar esta opción" -#: nscd/nscd_stat.c:181 +#: nscd/nscd_stat.c:180 #, c-format msgid "nscd not running!\n" msgstr "nscd no está en ejecución\n" -#: nscd/nscd_stat.c:205 +#: nscd/nscd_stat.c:204 #, c-format msgid "cannot read statistics data" msgstr "no se pueden leer los datos de estadística" -#: nscd/nscd_stat.c:208 +#: nscd/nscd_stat.c:207 #, c-format msgid "" "nscd configuration:\n" @@ -4267,27 +4389,27 @@ msgstr "" "\n" "%15d nivel de depuración del servidor\n" -#: nscd/nscd_stat.c:232 +#: nscd/nscd_stat.c:231 #, c-format msgid "%3ud %2uh %2um %2lus server runtime\n" msgstr "%3ud %2uh %2um %2lus tiempo de funcionamiento del servidor\n" -#: nscd/nscd_stat.c:235 +#: nscd/nscd_stat.c:234 #, c-format msgid " %2uh %2um %2lus server runtime\n" msgstr " %2uh %2um %2lus tiempo de funcionamiento del servidor\n" -#: nscd/nscd_stat.c:237 +#: nscd/nscd_stat.c:236 #, c-format msgid " %2um %2lus server runtime\n" msgstr " %2um %2lus tiempo de funcionamiento del servidor\n" -#: nscd/nscd_stat.c:239 +#: nscd/nscd_stat.c:238 #, c-format msgid " %2lus server runtime\n" msgstr " %2lus tiempo de funcionamiento del servidor\n" -#: nscd/nscd_stat.c:241 +#: nscd/nscd_stat.c:240 #, c-format msgid "" "%15d current number of threads\n" @@ -4304,7 +4426,7 @@ msgstr "" "%15lu reinicio interno\n" "%15u recarga contadores\n" -#: nscd/nscd_stat.c:276 +#: nscd/nscd_stat.c:275 #, c-format msgid "" "\n" @@ -4355,99 +4477,99 @@ msgstr "" "%15<PRIuMAX> fallos de asignación de memoria\n" "%15s compruebe /etc/%s para cambios\n" -#: nscd/pwdcache.c:423 +#: nscd/pwdcache.c:428 #, c-format msgid "Haven't found \"%s\" in password cache!" msgstr "No se ha encontrado \"%s\" en el caché de contraseñas" -#: nscd/pwdcache.c:425 +#: nscd/pwdcache.c:430 #, c-format msgid "Reloading \"%s\" in password cache!" msgstr "Recargando \"%s\" en el caché de contraseñas" -#: nscd/pwdcache.c:506 +#: nscd/pwdcache.c:511 #, c-format msgid "Invalid numeric uid \"%s\"!" msgstr "¡uid numérico inválido \"%s\"!" -#: nscd/selinux.c:156 +#: nscd/selinux.c:160 #, c-format msgid "Failed opening connection to the audit subsystem: %m" msgstr "Fallo al abrir la conexión al subsistema de auditoría: %m" -#: nscd/selinux.c:177 +#: nscd/selinux.c:181 msgid "Failed to set keep-capabilities" msgstr "Fallo al establecer las capacidades que se mantienen" -#: nscd/selinux.c:178 nscd/selinux.c:241 +#: nscd/selinux.c:182 nscd/selinux.c:245 #, c-format msgid "prctl(KEEPCAPS) failed" msgstr "Falló prctl(KEEPCAPS)" -#: nscd/selinux.c:192 +#: nscd/selinux.c:196 msgid "Failed to initialize drop of capabilities" msgstr "Fallo al inicializar el abandono de capacidades" # ## Lo mismo con lstat. sv # Antes decía: No se pudo obtener información (lstat) del fichero .rhosts -#: nscd/selinux.c:193 +#: nscd/selinux.c:197 #, c-format msgid "cap_init failed" msgstr "cap_init ha fallado" -#: nscd/selinux.c:214 nscd/selinux.c:231 +#: nscd/selinux.c:218 nscd/selinux.c:235 msgid "Failed to drop capabilities" msgstr "Fallo al abandonar capacidades" -#: nscd/selinux.c:215 nscd/selinux.c:232 +#: nscd/selinux.c:219 nscd/selinux.c:236 #, c-format msgid "cap_set_proc failed" msgstr "cap_set_proc ha fallado" -#: nscd/selinux.c:240 +#: nscd/selinux.c:244 msgid "Failed to unset keep-capabilities" msgstr "Fallo al desactivar las capacidades que se mantienen" -#: nscd/selinux.c:256 +#: nscd/selinux.c:260 msgid "Failed to determine if kernel supports SELinux" msgstr "Fallo al determinar si el núcleo admite SELinux" -#: nscd/selinux.c:271 +#: nscd/selinux.c:275 #, c-format msgid "Failed to start AVC thread" msgstr "Fallo al iniciar hilo AVC" -#: nscd/selinux.c:293 +#: nscd/selinux.c:297 #, c-format msgid "Failed to create AVC lock" msgstr "Fallo al crear bloqueo AVC" -#: nscd/selinux.c:333 +#: nscd/selinux.c:337 #, c-format msgid "Failed to start AVC" msgstr "Fallo al iniciar AVC" -#: nscd/selinux.c:335 +#: nscd/selinux.c:339 msgid "Access Vector Cache (AVC) started" msgstr "Access Vector Cache (AVC) iniciado" -#: nscd/selinux.c:356 +#: nscd/selinux.c:360 msgid "Error getting context of socket peer" msgstr "Error al obtener el contexto del `socket' remoto" -#: nscd/selinux.c:361 +#: nscd/selinux.c:365 msgid "Error getting context of nscd" msgstr "Error al obtener el contexto de nscd" -#: nscd/selinux.c:367 +#: nscd/selinux.c:371 msgid "Error getting sid from context" msgstr "Error al obtener sid del contexto" -#: nscd/selinux.c:374 +#: nscd/selinux.c:378 msgid "compile-time support for database policy missing" msgstr "falta el soporte de tiempo de compilación para la base de datos de políticas" -#: nscd/selinux.c:407 +#: nscd/selinux.c:411 #, c-format msgid "" "\n" @@ -4474,68 +4596,76 @@ msgstr "" "%15u consultas de CAV\n" "%15u fallos de CAV\n" -#: nscd/servicescache.c:381 +#: nscd/servicescache.c:387 #, c-format msgid "Haven't found \"%s\" in services cache!" msgstr "No se ha encontrado \"%s\" en el caché de `services'" -#: nscd/servicescache.c:383 +#: nscd/servicescache.c:389 #, c-format msgid "Reloading \"%s\" in services cache!" msgstr "Recargando \"%s\" en el caché de services" -#: nss/getent.c:54 +#: nss/getent.c:53 msgid "database [key ...]" msgstr "basededatos [clave ...]" -#: nss/getent.c:59 +#: nss/getent.c:58 msgid "Service configuration to be used" msgstr "Configuración del servicio" -#: nss/getent.c:60 +#: nss/getent.c:59 msgid "disable IDN encoding" msgstr "desactiva la codificación IDN" -#: nss/getent.c:65 +#: nss/getent.c:64 msgid "Get entries from administrative database." msgstr "Obtiene entradas de la base de datos administrativa." -#: nss/getent.c:149 nss/getent.c:479 +#: nss/getent.c:148 nss/getent.c:477 nss/getent.c:522 #, c-format msgid "Enumeration not supported on %s\n" msgstr "La enumeración no está soportada sobre %s\n" -#: nss/getent.c:866 +#: nss/getent.c:913 #, c-format msgid "Unknown database name" msgstr "Nombre de base de datos desconocido" -#: nss/getent.c:896 +#: nss/getent.c:943 msgid "Supported databases:\n" msgstr "Bases de datos admitidas:\n" -#: nss/getent.c:962 +#: nss/getent.c:1009 #, c-format msgid "Unknown database: %s\n" msgstr "Base de datos desconocida: %s\n" -#: nss/makedb.c:60 +#: nss/makedb.c:118 msgid "Convert key to lower case" msgstr "Convierte la clave a minúsculas" -#: nss/makedb.c:63 +#: nss/makedb.c:121 msgid "Do not print messages while building database" msgstr "No muestra ningún mensaje mientras construye la base de datos" -#: nss/makedb.c:65 +#: nss/makedb.c:123 msgid "Print content of database file, one entry a line" msgstr "Muestra el contenido de un fichero de base de datos, una entrada por línea" -#: nss/makedb.c:70 -msgid "Create simple DB database from textual input." -msgstr "Crea una base de datos DB simple a partir de una entrada de texto." +#: nss/makedb.c:124 +msgid "CHAR" +msgstr "CARÁCTER" -#: nss/makedb.c:73 +#: nss/makedb.c:125 +msgid "Generated line not part of iteration" +msgstr "La línea generada no es parte de la iteración" + +#: nss/makedb.c:130 +msgid "Create simple database from textual input." +msgstr "Crea una base de datos simple a partir de una entrada de texto." + +#: nss/makedb.c:133 msgid "" "INPUT-FILE OUTPUT-FILE\n" "-o OUTPUT-FILE INPUT-FILE\n" @@ -4545,50 +4675,86 @@ msgstr "" "-o FICHERO-SALIDA FICHERO-ENTRADA\n" "-u FICHERO-ENTRADA" -#: nss/makedb.c:142 +#: nss/makedb.c:229 #, c-format -msgid "No usable database library found." -msgstr "No se ha encontrado ninguna biblioteca de base de datos utilizable." +msgid "cannot open database file `%s'" +msgstr "no se puede abrir el fichero de base de datos `%s'" -#: nss/makedb.c:149 +#: nss/makedb.c:274 #, c-format -msgid "cannot open database file `%s': %s" -msgstr "no se puede abrir el fichero de datos `%s': %s" +msgid "no entries to be processed" +msgstr "no hay entradas que procesar" -#: nss/makedb.c:151 -msgid "incorrectly formatted file" -msgstr "fichero formateado incorrectamente" +#: nss/makedb.c:284 +#, c-format +msgid "cannot create temporary file name" +msgstr "no se puede crear un nombre de fichero temporal" -#: nss/makedb.c:331 -msgid "duplicate key" -msgstr "clave duplicada" +#: nss/makedb.c:306 +#, c-format +msgid "cannot stat newly created file" +msgstr "no se puede efectuar stat sobre el fichero recién creado" + +#: nss/makedb.c:317 +#, c-format +msgid "cannot rename temporary file" +msgstr "no se puede renombrar el fichero temporal" -#: nss/makedb.c:337 +#: nss/makedb.c:533 nss/makedb.c:556 #, c-format -msgid "while writing database file" -msgstr "al escribir la base de datos" +msgid "cannot create search tree" +msgstr "no se puede crear el árbol de búsqueda" -#: nss/makedb.c:348 +#: nss/makedb.c:562 +msgid "duplicate key" +msgstr "clave duplicada" + +#: nss/makedb.c:574 #, c-format msgid "problems while reading `%s'" msgstr "problemas mientras se leía `%s'" -#: nss/makedb.c:368 nss/makedb.c:385 +#: nss/makedb.c:801 +#, c-format +msgid "failed to write new database file" +msgstr "fallo al escribir la base de datos" + +#: nss/makedb.c:814 +#, c-format +msgid "cannot stat database file" +msgstr "no se puede efectuar stat sobre el fichero de la base de datos" + +#: nss/makedb.c:819 +#, c-format +msgid "cannot map database file" +msgstr "no se puede efectuar map sobre el fichero de la base de datos" + +#: nss/makedb.c:822 +#, c-format +msgid "file not a database file" +msgstr "el fichero no es un fichero de base de datos" + +#: nss/makedb.c:873 +#, c-format +msgid "cannot set file creation context for `%s'" +msgstr "no se puede establecer el contexto de creación de fichero para `%s'" + +#: ports/sysdeps/unix/sysv/linux/ia64/makecontext.c:62 #, c-format -msgid "while reading database" -msgstr "al leer el fichero de datos" +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: no sabe cómo manejar más de 8 argumentos\n" -#: posix/getconf.c:1036 +#: posix/getconf.c:1035 #, c-format msgid "Usage: %s [-v specification] variable_name [pathname]\n" msgstr "Modo de empleo: %s [-v especificación] nombre_de_variable [ruta]\n" -#: posix/getconf.c:1039 +#: posix/getconf.c:1038 #, c-format msgid " %s -a [pathname]\n" msgstr " %s -a [ruta]\n" -#: posix/getconf.c:1115 +#: posix/getconf.c:1114 #, c-format msgid "" "Usage: getconf [-v SPEC] VAR\n" @@ -4606,51 +4772,51 @@ msgstr "" "variable RUTA_VAR para la ruta RUTA. Si se especifica ESP, se dan\n" "los valores para el entorno de compilación ESP.\n" -#: posix/getconf.c:1173 +#: posix/getconf.c:1172 #, c-format msgid "unknown specification \"%s\"" msgstr "especificación \"%s\" desconocida" -#: posix/getconf.c:1225 +#: posix/getconf.c:1224 #, c-format msgid "Couldn't execute %s" msgstr "No se pudo ejecutar %s" -#: posix/getconf.c:1269 posix/getconf.c:1285 +#: posix/getconf.c:1268 posix/getconf.c:1284 msgid "undefined" msgstr "sin definir" -#: posix/getconf.c:1307 +#: posix/getconf.c:1306 #, c-format msgid "Unrecognized variable `%s'" msgstr "Variable no reconocida `%s'" -#: posix/getopt.c:594 posix/getopt.c:623 +#: posix/getopt.c:593 posix/getopt.c:622 #, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: la opción '%s' es ambigua; posibilidades:" -#: posix/getopt.c:664 posix/getopt.c:668 +#: posix/getopt.c:663 posix/getopt.c:667 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: la opción '--%s' no admite ningún argumento\n" -#: posix/getopt.c:677 posix/getopt.c:682 +#: posix/getopt.c:676 posix/getopt.c:681 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: la opción '%c%s' no admite ningún argumento\n" -#: posix/getopt.c:725 posix/getopt.c:744 +#: posix/getopt.c:724 posix/getopt.c:743 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: la opción '--%s' requiere un argumento\n" -#: posix/getopt.c:782 posix/getopt.c:785 +#: posix/getopt.c:781 posix/getopt.c:784 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: opción no reconocida '--%s'\n" -#: posix/getopt.c:793 posix/getopt.c:796 +#: posix/getopt.c:792 posix/getopt.c:795 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: opción no reconocida '%c%s'\n" @@ -4669,101 +4835,101 @@ msgstr "%s: opción no reconocida '%c%s'\n" # Después de leer "1984", lo cambio. # Aquí y en todas partes. sv # -#: posix/getopt.c:845 posix/getopt.c:848 +#: posix/getopt.c:844 posix/getopt.c:847 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opción inválida -- '%c'\n" -#: posix/getopt.c:898 posix/getopt.c:915 posix/getopt.c:1123 -#: posix/getopt.c:1141 +#: posix/getopt.c:900 posix/getopt.c:917 posix/getopt.c:1127 +#: posix/getopt.c:1145 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: la opción requiere un argumento -- '%c'\n" -#: posix/getopt.c:971 posix/getopt.c:987 +#: posix/getopt.c:973 posix/getopt.c:989 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: la opción '-W %s' es ambigua\n" -#: posix/getopt.c:1011 posix/getopt.c:1029 +#: posix/getopt.c:1013 posix/getopt.c:1031 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: la opción '-W %s' no admite ningún argumento\n" -#: posix/getopt.c:1050 posix/getopt.c:1068 +#: posix/getopt.c:1052 posix/getopt.c:1070 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: la opción '-W %s' requiere un argumento\n" -#: posix/regcomp.c:135 +#: posix/regcomp.c:134 msgid "No match" msgstr "No hay ninguna coincidencia" -#: posix/regcomp.c:138 +#: posix/regcomp.c:137 msgid "Invalid regular expression" msgstr "La expresión regular es errónea" -#: posix/regcomp.c:141 +#: posix/regcomp.c:140 msgid "Invalid collation character" msgstr "Carácter de unión inválido" -#: posix/regcomp.c:144 +#: posix/regcomp.c:143 msgid "Invalid character class name" msgstr "Nombre de clase de carácter inválido" -#: posix/regcomp.c:147 +#: posix/regcomp.c:146 msgid "Trailing backslash" msgstr "Barra invertida extra al final `\\'" -#: posix/regcomp.c:150 +#: posix/regcomp.c:149 msgid "Invalid back reference" msgstr "Referencia hacia atrás inválida" -#: posix/regcomp.c:153 +#: posix/regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ ó ^[ desemparejados" -#: posix/regcomp.c:156 +#: posix/regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( ó \\( desemparejados" -#: posix/regcomp.c:159 +#: posix/regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ desemparejado" -#: posix/regcomp.c:162 +#: posix/regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenido de \\{\\} inválido" -#: posix/regcomp.c:165 +#: posix/regcomp.c:164 msgid "Invalid range end" msgstr "Final de rango inválido" -#: posix/regcomp.c:168 +#: posix/regcomp.c:167 msgid "Memory exhausted" msgstr "Memoria agotada" -#: posix/regcomp.c:171 +#: posix/regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "La expresión regular precedente es inválida" -#: posix/regcomp.c:174 +#: posix/regcomp.c:173 msgid "Premature end of regular expression" msgstr "Fin no esperado de la expresión regular" -#: posix/regcomp.c:177 +#: posix/regcomp.c:176 msgid "Regular expression too big" msgstr "La expresión regular es demasiado grande" -#: posix/regcomp.c:180 +#: posix/regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ó \\) desemparejados" -#: posix/regcomp.c:680 +#: posix/regcomp.c:679 msgid "No previous regular expression" msgstr "No existe ninguna expresión regular anterior" -#: posix/wordexp.c:1832 +#: posix/wordexp.c:1830 msgid "parameter null or not set" msgstr "parámetro nulo o no establecido" @@ -4800,27 +4966,27 @@ msgid "Unknown resolver error" msgstr "Error del determinador de nombres desconocido" # ¿Qué son dominios trim? -#: resolv/res_hconf.c:124 +#: resolv/res_hconf.c:122 #, c-format msgid "%s: line %d: cannot specify more than %d trim domains" msgstr "%s: línea %d: no se pueden especificar más de % dominios" -#: resolv/res_hconf.c:145 +#: resolv/res_hconf.c:143 #, c-format msgid "%s: line %d: list delimiter not followed by domain" msgstr "%s: línea %d: el delimitador de lista no está seguido por el dominio" -#: resolv/res_hconf.c:204 +#: resolv/res_hconf.c:202 #, c-format msgid "%s: line %d: expected `on' or `off', found `%s'\n" msgstr "%s: línea %d: se esperaba `on' o `off', se encontró `%s'\n" -#: resolv/res_hconf.c:247 +#: resolv/res_hconf.c:245 #, c-format msgid "%s: line %d: bad command `%s'\n" msgstr "%s: línea %d: orden errónea `%s'\n" -#: resolv/res_hconf.c:282 +#: resolv/res_hconf.c:280 #, c-format msgid "%s: line %d: ignoring trailing garbage `%s'\n" msgstr "%s: línea %d: se descarta lo que sigue `%s'\n" @@ -4970,108 +5136,108 @@ msgstr "Entrada de alta prioridad disponible" msgid "Device disconnected" msgstr "Dispositivo desconectado" -#: stdio-common/psiginfo.c:145 +#: stdio-common/psiginfo.c:139 msgid "Signal sent by kill()" msgstr "Señal enviada por kill()" -#: stdio-common/psiginfo.c:148 +#: stdio-common/psiginfo.c:142 msgid "Signal sent by sigqueue()" msgstr "Señal enviada por sigqueue()" -#: stdio-common/psiginfo.c:151 +#: stdio-common/psiginfo.c:145 msgid "Signal generated by the expiration of a timer" msgstr "Señal generada por la expiración de un temporizador" -#: stdio-common/psiginfo.c:154 +#: stdio-common/psiginfo.c:148 msgid "Signal generated by the completion of an asynchronous I/O request" msgstr "Señal generada por la compleción de una petición de E/S asíncrona" -#: stdio-common/psiginfo.c:158 +#: stdio-common/psiginfo.c:152 msgid "Signal generated by the arrival of a message on an empty message queue" msgstr "Señal generada por la llegada de un mensaje en una cola de mensajes vacía" -#: stdio-common/psiginfo.c:163 +#: stdio-common/psiginfo.c:157 msgid "Signal sent by tkill()" msgstr "Señal enviada por tkill()" -#: stdio-common/psiginfo.c:168 +#: stdio-common/psiginfo.c:162 msgid "Signal generated by the completion of an asynchronous name lookup request" msgstr "Señal generada por la compleción de una petición de búsqueda de nombres asíncrona" -#: stdio-common/psiginfo.c:174 +#: stdio-common/psiginfo.c:168 msgid "Signal generated by the completion of an I/O request" msgstr "Señal generada por la compleción de una petición de E/S" -#: stdio-common/psiginfo.c:180 +#: stdio-common/psiginfo.c:174 msgid "Signal sent by the kernel" msgstr "Señal enviada por el núcleo" -#: stdio-common/psiginfo.c:204 +#: stdio-common/psiginfo.c:198 #, c-format msgid "Unknown signal %d\n" msgstr "Señal desconocida %d\n" -#: stdio-common/psignal.c:51 +#: stdio-common/psignal.c:43 #, c-format msgid "%s%sUnknown signal %d\n" msgstr "%s%sSeñal desconocida %d\n" -#: stdio-common/psignal.c:52 +#: stdio-common/psignal.c:44 msgid "Unknown signal" msgstr "Señal desconocida" -#: string/_strerror.c:47 sysdeps/mach/_strerror.c:87 +#: string/_strerror.c:46 sysdeps/mach/_strerror.c:86 msgid "Unknown error " msgstr "Error desconocido " -#: string/strerror.c:43 +#: string/strerror.c:42 msgid "Unknown error" msgstr "Error desconocido" -#: string/strsignal.c:65 +#: string/strsignal.c:60 #, c-format msgid "Real-time signal %d" msgstr "Señal de tiempo real %d" -#: string/strsignal.c:69 +#: string/strsignal.c:64 #, c-format msgid "Unknown signal %d" msgstr "Señal desconocida %d" -#: sunrpc/auth_unix.c:113 sunrpc/clnt_tcp.c:125 sunrpc/clnt_udp.c:136 -#: sunrpc/clnt_unix.c:126 sunrpc/svc_tcp.c:173 sunrpc/svc_tcp.c:218 -#: sunrpc/svc_udp.c:147 sunrpc/svc_unix.c:174 sunrpc/svc_unix.c:215 -#: sunrpc/xdr.c:632 sunrpc/xdr.c:792 sunrpc/xdr_array.c:100 -#: sunrpc/xdr_rec.c:154 sunrpc/xdr_ref.c:79 +#: sunrpc/auth_unix.c:111 sunrpc/clnt_tcp.c:123 sunrpc/clnt_udp.c:134 +#: sunrpc/clnt_unix.c:124 sunrpc/svc_tcp.c:188 sunrpc/svc_tcp.c:233 +#: sunrpc/svc_udp.c:162 sunrpc/svc_unix.c:188 sunrpc/svc_unix.c:229 +#: sunrpc/xdr.c:630 sunrpc/xdr.c:790 sunrpc/xdr_array.c:97 +#: sunrpc/xdr_rec.c:151 sunrpc/xdr_ref.c:76 msgid "out of memory\n" msgstr "memoria agotada\n" # ??? mariscalización ? -#: sunrpc/auth_unix.c:351 +#: sunrpc/auth_unix.c:349 msgid "auth_unix.c: Fatal marshalling problem" msgstr "auth_unix.c: - Problema muy grave con autorización marshall" # FIXME: ¿¿No será major y minor?? -#: sunrpc/clnt_perr.c:98 sunrpc/clnt_perr.c:114 +#: sunrpc/clnt_perr.c:95 sunrpc/clnt_perr.c:111 #, c-format msgid "%s: %s; low version = %lu, high version = %lu" msgstr "%s: %s; versión menor = %lu, versión mayor = %lu" -#: sunrpc/clnt_perr.c:105 +#: sunrpc/clnt_perr.c:102 #, c-format msgid "%s: %s; why = %s\n" msgstr "%s: %s; causa = %s\n" -#: sunrpc/clnt_perr.c:107 +#: sunrpc/clnt_perr.c:104 #, c-format msgid "%s: %s; why = (unknown authentication error - %d)\n" msgstr "%s: %s; causa = (error de autentificación desconocido - %d)\n" -#: sunrpc/clnt_perr.c:156 +#: sunrpc/clnt_perr.c:153 msgid "RPC: Success" msgstr "RPC: Conseguido" -#: sunrpc/clnt_perr.c:159 +#: sunrpc/clnt_perr.c:156 msgid "RPC: Can't encode arguments" msgstr "RPC: No se pudieron codificar los argumentos" @@ -5081,12 +5247,12 @@ msgstr "RPC: No se pudieron codificar los argumentos" # indiferentemente. Ya se sabe lo mal que les suena el pasado de can, # sobre todo en frases afirmativas ( que no es el caso, pero bueno ) # -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:160 msgid "RPC: Can't decode result" msgstr "RPC: No se pudo descodificar la respuesta" # Sugerencia: No se puede enviar. (?) (no estoy muy seguro) sv -#: sunrpc/clnt_perr.c:167 +#: sunrpc/clnt_perr.c:164 msgid "RPC: Unable to send" msgstr "RPC: No se puede enviar" @@ -5095,27 +5261,27 @@ msgstr "RPC: No se puede enviar" # da la impresión de que ni siquiera se intenta # A lo mejor es que ni siquiera puede intentarlo ... sv # Me suena horrible lo de "Incapaz", lo cambio. sv -#: sunrpc/clnt_perr.c:171 +#: sunrpc/clnt_perr.c:168 msgid "RPC: Unable to receive" msgstr "RPC: No se puede recibir" -#: sunrpc/clnt_perr.c:175 +#: sunrpc/clnt_perr.c:172 msgid "RPC: Timed out" msgstr "RPC: El tiempo expiró" -#: sunrpc/clnt_perr.c:179 +#: sunrpc/clnt_perr.c:176 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: Versiones incompatibles de RPC" -#: sunrpc/clnt_perr.c:183 +#: sunrpc/clnt_perr.c:180 msgid "RPC: Authentication error" msgstr "RPC: Error de autentificación" -#: sunrpc/clnt_perr.c:187 +#: sunrpc/clnt_perr.c:184 msgid "RPC: Program unavailable" msgstr "RPC: Programa no disponible" -#: sunrpc/clnt_perr.c:191 +#: sunrpc/clnt_perr.c:188 msgid "RPC: Program/version mismatch" msgstr "RPC: La versión del programa no coincide" @@ -5136,72 +5302,72 @@ msgstr "RPC: La versión del programa no coincide" # # Por cierto, unavailable es NO disponible. Lo cambio. # Y quito el "rpc" sv+ -#: sunrpc/clnt_perr.c:195 +#: sunrpc/clnt_perr.c:192 msgid "RPC: Procedure unavailable" msgstr "RPC: Procedimiento no disponible" -#: sunrpc/clnt_perr.c:199 +#: sunrpc/clnt_perr.c:196 msgid "RPC: Server can't decode arguments" msgstr "RPC: El servidor no puede descifrar los argumentos" -#: sunrpc/clnt_perr.c:203 +#: sunrpc/clnt_perr.c:200 msgid "RPC: Remote system error" msgstr "RPC: Error del sistema remoto" -#: sunrpc/clnt_perr.c:207 +#: sunrpc/clnt_perr.c:204 msgid "RPC: Unknown host" msgstr "RPC: `Host' desconocido" -#: sunrpc/clnt_perr.c:211 +#: sunrpc/clnt_perr.c:208 msgid "RPC: Unknown protocol" msgstr "RPC: Protocolo desconocido" -#: sunrpc/clnt_perr.c:215 +#: sunrpc/clnt_perr.c:212 msgid "RPC: Port mapper failure" msgstr "RPC: Fallo del asignador de puertos" -#: sunrpc/clnt_perr.c:219 +#: sunrpc/clnt_perr.c:216 msgid "RPC: Program not registered" msgstr "RPC: Programa no registrado" # ??? Falló, fracasó, pinchó ;-) -#: sunrpc/clnt_perr.c:223 +#: sunrpc/clnt_perr.c:220 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Falló (error no especificado)" -#: sunrpc/clnt_perr.c:264 +#: sunrpc/clnt_perr.c:261 msgid "RPC: (unknown error code)" msgstr "RPC: (código de error desconocido)" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:333 msgid "Authentication OK" msgstr "Autentificación válida" -#: sunrpc/clnt_perr.c:339 +#: sunrpc/clnt_perr.c:336 msgid "Invalid client credential" msgstr "Credenciales del cliente inválidas" -#: sunrpc/clnt_perr.c:343 +#: sunrpc/clnt_perr.c:340 msgid "Server rejected credential" msgstr "El servidor rechazó la credencial" -#: sunrpc/clnt_perr.c:347 +#: sunrpc/clnt_perr.c:344 msgid "Invalid client verifier" msgstr "Verificación del cliente inválida" -#: sunrpc/clnt_perr.c:351 +#: sunrpc/clnt_perr.c:348 msgid "Server rejected verifier" msgstr "El servidor rechazó el verificador" -#: sunrpc/clnt_perr.c:355 +#: sunrpc/clnt_perr.c:352 msgid "Client credential too weak" msgstr "Las credenciales del cliente son poco fiables" -#: sunrpc/clnt_perr.c:359 +#: sunrpc/clnt_perr.c:356 msgid "Invalid server verifier" msgstr "Verificación del servidor inválido" -#: sunrpc/clnt_perr.c:363 +#: sunrpc/clnt_perr.c:360 msgid "Failed (unspecified error)" msgstr "Falló (error no especificado)" @@ -5240,250 +5406,256 @@ msgstr "Problema en el `poll' del `broadcast'" msgid "Cannot receive reply to broadcast" msgstr "No se puede recibir la respuesta al `broadcast'" -#: sunrpc/rpc_main.c:288 +#: sunrpc/rpc_main.c:277 #, c-format msgid "%s: output would overwrite %s\n" msgstr "%s: la salida sobreescribiría %s\n" -#: sunrpc/rpc_main.c:295 +#: sunrpc/rpc_main.c:284 #, c-format msgid "%s: unable to open %s: %m\n" msgstr "%s: no se pudo abrir %s: %m\n" -#: sunrpc/rpc_main.c:307 +#: sunrpc/rpc_main.c:296 #, c-format msgid "%s: while writing output %s: %m" msgstr "%s: al escribir el resultado %s: %m:" -# FIXME: El espacio final. -#: sunrpc/rpc_main.c:342 +#: sunrpc/rpc_main.c:332 sunrpc/rpc_main.c:371 #, c-format -msgid "cannot find C preprocessor: %s \n" -msgstr "no se puede encontrar el preprocesador de C: %s \n" - -#: sunrpc/rpc_main.c:350 -msgid "cannot find any C preprocessor (cpp)\n" -msgstr "no se puede encontrar ningún preprocesador de C (cpp)\n" +msgid "cannot find C preprocessor: %s\n" +msgstr "no se puede encontrar el preprocesador de C: %s\n" -#: sunrpc/rpc_main.c:419 +#: sunrpc/rpc_main.c:407 #, c-format msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: El preprocesador de C falló con la señal %d\n" -#: sunrpc/rpc_main.c:422 +#: sunrpc/rpc_main.c:410 #, c-format msgid "%s: C preprocessor failed with exit code %d\n" msgstr "%s: El preprocesador de C falló con un código de retorno %d\n" -#: sunrpc/rpc_main.c:462 +#: sunrpc/rpc_main.c:450 #, c-format msgid "illegal nettype: `%s'\n" msgstr "tipodered ilegal: `%s'\n" -#: sunrpc/rpc_main.c:1128 +#: sunrpc/rpc_main.c:1085 #, c-format msgid "rpcgen: too many defines\n" msgstr "rpcgen: demasiados defines\n" -#: sunrpc/rpc_main.c:1140 +#: sunrpc/rpc_main.c:1097 #, c-format msgid "rpcgen: arglist coding error\n" msgstr "rpcgen: error de codificación de la lista de argumentos\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. -#: sunrpc/rpc_main.c:1173 +#: sunrpc/rpc_main.c:1130 #, c-format msgid "file `%s' already exists and may be overwritten\n" msgstr "el fichero `%s' ya existe y podría ser sobreescrito\n" -#: sunrpc/rpc_main.c:1218 +#: sunrpc/rpc_main.c:1175 #, c-format msgid "Cannot specify more than one input file!\n" msgstr "No se puede especificar más de un fichero de entrada\n" # Se admiten sugerencias para MT-safe. sv -#: sunrpc/rpc_main.c:1392 +#: sunrpc/rpc_main.c:1345 #, c-format msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "¡Esta implementación no admite código de nuevo estilo o `MT-safe'!\n" -#: sunrpc/rpc_main.c:1401 +#: sunrpc/rpc_main.c:1354 #, c-format msgid "Cannot use netid flag with inetd flag!\n" msgstr "No se puede usar la opción netid con la opción inetd\n" -#: sunrpc/rpc_main.c:1413 +#: sunrpc/rpc_main.c:1363 #, c-format msgid "Cannot use netid flag without TIRPC!\n" msgstr "No se puede usar la opción netid sin TIRPC\n" -#: sunrpc/rpc_main.c:1420 +#: sunrpc/rpc_main.c:1370 #, c-format msgid "Cannot use table flags with newstyle!\n" msgstr "No se pueden usar las opciones de la tabla con el nuevo estilo\n" -#: sunrpc/rpc_main.c:1439 +#: sunrpc/rpc_main.c:1389 #, c-format msgid "\"infile\" is required for template generation flags.\n" msgstr "" "se necesita un \"fichero_de_entrada\" para las opciones de generación\n" "de plantillas\n" -#: sunrpc/rpc_main.c:1444 +#: sunrpc/rpc_main.c:1394 #, c-format msgid "Cannot have more than one file generation flag!\n" msgstr "No se puede tener más de una opción de generación de fichero\n" -#: sunrpc/rpc_main.c:1453 +#: sunrpc/rpc_main.c:1403 #, c-format msgid "usage: %s infile\n" msgstr "modo de empleo: %s fichero_de_entrada\n" # Este mensaje tal vez habría que cortarlo por algún lado. sv -#: sunrpc/rpc_main.c:1454 +#: sunrpc/rpc_main.c:1404 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dnombre[=valor]] [-i tamaño] [-I [-K segundos]] [-Y camino] fichero_de_entrada\n" # Y este también. sv -#: sunrpc/rpc_main.c:1456 +#: sunrpc/rpc_main.c:1406 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fichero_de_salida] [fichero_de_entrada]\n" -#: sunrpc/rpc_main.c:1458 +#: sunrpc/rpc_main.c:1408 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s tipored]* [-o fichero_de_salida] [fichero_de_entrada]\n" -#: sunrpc/rpc_main.c:1459 +#: sunrpc/rpc_main.c:1409 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n netid]* [-o fichero_de_salida] [fichero_de_entrada]\n" -#: sunrpc/rpc_main.c:1467 +#: sunrpc/rpc_main.c:1417 #, c-format msgid "options:\n" msgstr "opciones:\n" -#: sunrpc/rpc_main.c:1468 +#: sunrpc/rpc_main.c:1418 #, c-format msgid "-a\t\tgenerate all files, including samples\n" msgstr "-a\t\tgenera todos los ficheros, incluyendo las muestras\n" -#: sunrpc/rpc_main.c:1469 +#: sunrpc/rpc_main.c:1419 #, c-format msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n" msgstr "-b\t\tmodo de compatibilidad hacia atrás (genera código para SunOS 4.1)\n" -#: sunrpc/rpc_main.c:1470 +#: sunrpc/rpc_main.c:1420 #, c-format msgid "-c\t\tgenerate XDR routines\n" msgstr "-c\t\tgenera rutinas XDR\n" -#: sunrpc/rpc_main.c:1471 +#: sunrpc/rpc_main.c:1421 #, c-format msgid "-C\t\tANSI C mode\n" msgstr "-C\t\tmodo ANSI C\n" -#: sunrpc/rpc_main.c:1472 +#: sunrpc/rpc_main.c:1422 #, c-format msgid "-Dname[=value]\tdefine a symbol (same as #define)\n" msgstr "-Dnombre[=valor]\tdefine un símbolo (igual que #define)\n" -#: sunrpc/rpc_main.c:1473 +#: sunrpc/rpc_main.c:1423 #, c-format msgid "-h\t\tgenerate header file\n" msgstr "-h\t\tgenera un fichero de cabecera\n" -#: sunrpc/rpc_main.c:1474 +#: sunrpc/rpc_main.c:1424 #, c-format msgid "-i size\t\tsize at which to start generating inline code\n" msgstr "-i tamaño\t\ttamaño en el que comienza a generar código `inline'\n" -#: sunrpc/rpc_main.c:1475 +#: sunrpc/rpc_main.c:1425 #, c-format msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n" msgstr "-I\t\tgenera código para soporte de inetd en el servidor (para SunOS 4.1)\n" # FIXME: Tendría que ser después de "segundos" segundos de inactividad -#: sunrpc/rpc_main.c:1476 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "-K seconds\tserver exits after K seconds of inactivity\n" msgstr "-K segundos\tel servidor termina después de K segundos de inactividad\n" # Se admiten sugerencias para "stubs" -#: sunrpc/rpc_main.c:1477 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "-l\t\tgenerate client side stubs\n" msgstr "-l\t\tgenera `stubs' para el lado del cliente\n" -#: sunrpc/rpc_main.c:1478 +#: sunrpc/rpc_main.c:1428 #, c-format msgid "-L\t\tserver errors will be printed to syslog\n" msgstr "-L\t\tlos errores del servidor se escribirán en syslog\n" -#: sunrpc/rpc_main.c:1479 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "-m\t\tgenerate server side stubs\n" msgstr "-m\t\tgenera `stubs' para el lado del servidor\n" -#: sunrpc/rpc_main.c:1480 +#: sunrpc/rpc_main.c:1430 #, c-format msgid "-M\t\tgenerate MT-safe code\n" msgstr "-M\t\tgenera código multi-hilo seguro\n" -#: sunrpc/rpc_main.c:1481 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "-n netid\tgenerate server code that supports named netid\n" msgstr "-n netid\tgenera código servidor que soporta netid nombrado\n" -#: sunrpc/rpc_main.c:1482 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "-N\t\tsupports multiple arguments and call-by-value\n" msgstr "-N\t\tsoporta varios argumentos y llamada por valor\n" -#: sunrpc/rpc_main.c:1483 +#: sunrpc/rpc_main.c:1433 #, c-format msgid "-o outfile\tname of the output file\n" msgstr "-o fichero_de_salida\tnombre del fichero de salida\n" -#: sunrpc/rpc_main.c:1484 +#: sunrpc/rpc_main.c:1434 #, c-format msgid "-s nettype\tgenerate server code that supports named nettype\n" msgstr "-s nettype\tgenera código servidor que soporta nettype nombrado\n" -#: sunrpc/rpc_main.c:1485 +#: sunrpc/rpc_main.c:1435 #, c-format msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n" msgstr "-Sc\t\tgenera código cliente de muestra que usa procedimientos remotos\n" -#: sunrpc/rpc_main.c:1486 +#: sunrpc/rpc_main.c:1436 #, c-format msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n" msgstr "-Ss\t\tgenera código servidor de muestra que define procedimientos remotos\n" -#: sunrpc/rpc_main.c:1487 +#: sunrpc/rpc_main.c:1437 #, c-format msgid "-Sm \t\tgenerate makefile template \n" msgstr "-Sm \t\tgenera una plantilla de makefile\n" -#: sunrpc/rpc_main.c:1488 +#: sunrpc/rpc_main.c:1438 #, c-format msgid "-t\t\tgenerate RPC dispatch table\n" msgstr "-t\t\tgenera tabla de ejecución RPC\n" -#: sunrpc/rpc_main.c:1489 +#: sunrpc/rpc_main.c:1439 #, c-format msgid "-T\t\tgenerate code to support RPC dispatch tables\n" msgstr "-T\t\tgenera código para soportar tablas de ejecución RPC\n" -#: sunrpc/rpc_main.c:1490 +#: sunrpc/rpc_main.c:1440 #, c-format msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n" msgstr "-Y ruta\t\tnombre del directorio donde encontrar el preprocesador de C (cpp)\n" +#: sunrpc/rpc_main.c:1442 +#, c-format +msgid "" +"\n" +"For bug reporting instructions, please see:\n" +"%s.\n" +msgstr "" +"\n" +"Para instrucciones sobre informes de fallo, por favor consulte:\n" +"%s.\n" + #: sunrpc/rpc_scan.c:112 msgid "constant or identifier expected" msgstr "se esperaba una constante o un identificador" @@ -5612,55 +5784,55 @@ msgstr "svc_run: - memoria agotada" msgid "svc_run: - poll failed" msgstr "svc_run: - poll falló" -#: sunrpc/svc_simple.c:81 +#: sunrpc/svc_simple.c:80 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "no se puede reasignar el número de procedimiento %ld\n" -#: sunrpc/svc_simple.c:91 +#: sunrpc/svc_simple.c:90 msgid "couldn't create an rpc server\n" msgstr "no se pudo crear un servidor rpc\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:98 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "no se pudo registrar el programa %ld versión %ld\n" -#: sunrpc/svc_simple.c:107 +#: sunrpc/svc_simple.c:106 msgid "registerrpc: out of memory\n" msgstr "registerrpc: memoria agotada\n" -#: sunrpc/svc_simple.c:168 +#: sunrpc/svc_simple.c:169 #, c-format msgid "trouble replying to prog %d\n" msgstr "dificultades para responder al programa %d\n" -#: sunrpc/svc_simple.c:177 +#: sunrpc/svc_simple.c:178 #, c-format msgid "never registered prog %d\n" msgstr "el programa %d no fue registrado nunca\n" -#: sunrpc/svc_tcp.c:149 +#: sunrpc/svc_tcp.c:164 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - problema al crear el `socket' tcp" -#: sunrpc/svc_tcp.c:164 +#: sunrpc/svc_tcp.c:179 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - fallo en la ejecución de `getsockname()' o `listen()'" -#: sunrpc/svc_udp.c:122 +#: sunrpc/svc_udp.c:137 msgid "svcudp_create: socket creation problem" msgstr "svcudp_create: problemas para crear el `socket'" -#: sunrpc/svc_udp.c:136 +#: sunrpc/svc_udp.c:151 msgid "svcudp_create - cannot getsockname" msgstr "svcudp_create - fallo en la ejecución de `getsockname'" -#: sunrpc/svc_udp.c:168 +#: sunrpc/svc_udp.c:183 msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad es demasiado pequeño para IP_PKTINFO\n" -#: sunrpc/svc_udp.c:476 +#: sunrpc/svc_udp.c:495 msgid "enablecache: cache already enabled" msgstr "enablecache: el caché ya estaba activado" @@ -5668,79 +5840,79 @@ msgstr "enablecache: el caché ya estaba activado" # Parece ser indistinto, así que unas veces puede ser "la" y otras "el". # dependiendo del caso (lo que mejor suene). # -#: sunrpc/svc_udp.c:482 +#: sunrpc/svc_udp.c:501 msgid "enablecache: could not allocate cache" msgstr "enablecache: no se pudo crear espacio para el caché" -#: sunrpc/svc_udp.c:491 +#: sunrpc/svc_udp.c:510 msgid "enablecache: could not allocate cache data" msgstr "enablecache: no se pudo crear espacio para los datos del caché" -#: sunrpc/svc_udp.c:499 +#: sunrpc/svc_udp.c:518 msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: no se pudo crear espacio para la pila del caché" -#: sunrpc/svc_udp.c:535 +#: sunrpc/svc_udp.c:554 msgid "cache_set: victim not found" msgstr "cache_set: no se encontró el objetivo" -#: sunrpc/svc_udp.c:546 +#: sunrpc/svc_udp.c:565 msgid "cache_set: victim alloc failed" msgstr "cache_set: falló la asignación de espacio para el objetivo" -#: sunrpc/svc_udp.c:553 +#: sunrpc/svc_udp.c:572 msgid "cache_set: could not allocate new rpc_buffer" msgstr "cache_set: no se pudo asignar espacio para un nuevo búfer rpc" -#: sunrpc/svc_unix.c:148 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - problema al crear el `socket' AF_UNIX" -#: sunrpc/svc_unix.c:164 +#: sunrpc/svc_unix.c:178 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - fallo en la ejecución de `getsockname()' o `listen()'" # Habrá que mirar esto # Mirado, efectivamente esto es una señal que habrá # que dejarla con su nombre original ( entre paréntesis ) -#: sysdeps/generic/siglist.h:29 sysdeps/unix/siglist.c:27 +#: sysdeps/generic/siglist.h:28 msgid "Hangup" msgstr "Colgar (hangup)" -#: sysdeps/generic/siglist.h:30 sysdeps/unix/siglist.c:28 +#: sysdeps/generic/siglist.h:29 msgid "Interrupt" msgstr "Interrupción" # Podría ser también "Abandonar" sv -#: sysdeps/generic/siglist.h:31 sysdeps/unix/siglist.c:29 +#: sysdeps/generic/siglist.h:30 msgid "Quit" msgstr "Abandona" # Se trata de una instrucción ilegal en el juego de instrucciones del 486 # que provoca una "excepción". -#: sysdeps/generic/siglist.h:32 sysdeps/unix/siglist.c:30 +#: sysdeps/generic/siglist.h:31 msgid "Illegal instruction" msgstr "Instrucción ilegal" -#: sysdeps/generic/siglist.h:33 sysdeps/unix/siglist.c:31 +#: sysdeps/generic/siglist.h:32 msgid "Trace/breakpoint trap" msgstr "`trap' para punto de parada/seguimiento" -#: sysdeps/generic/siglist.h:34 +#: sysdeps/generic/siglist.h:33 msgid "Aborted" msgstr "Abortado" -#: sysdeps/generic/siglist.h:35 sysdeps/unix/siglist.c:34 +#: sysdeps/generic/siglist.h:34 msgid "Floating point exception" msgstr "Excepción de coma flotante" # A quien se le ocurra `matar' un proceso, que especifique con qué señal. # En todo caso ` Terminado ( KILL ) ' sería apropiado. Ver fuentes -#: sysdeps/generic/siglist.h:36 sysdeps/unix/siglist.c:35 +#: sysdeps/generic/siglist.h:35 msgid "Killed" msgstr "Terminado (killed)" -#: sysdeps/generic/siglist.h:37 sysdeps/unix/siglist.c:36 +#: sysdeps/generic/siglist.h:36 msgid "Bus error" msgstr "Error del bus" @@ -5752,7 +5924,7 @@ msgstr "Error del bus" # No, en inglés siempre se ha dicho así. Siempre he traducido # Segmentation fault como violación de segmento. Consultémoslo, # es un mensaje que se ve demasiado a menudo em -#: sysdeps/generic/siglist.h:38 sysdeps/unix/siglist.c:37 +#: sysdeps/generic/siglist.h:37 msgid "Segmentation fault" msgstr "Violación de segmento" @@ -5767,65 +5939,64 @@ msgstr "Violación de segmento" #. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled #. TRANS or blocked. Thus, your program will never actually see @code{EPIPE} #. TRANS unless it has handled or blocked @code{SIGPIPE}. -#: sysdeps/generic/siglist.h:39 sysdeps/gnu/errlist.c:359 -#: sysdeps/unix/siglist.c:39 +#: sysdeps/generic/siglist.h:38 sysdeps/gnu/errlist.c:359 msgid "Broken pipe" msgstr "Tubería rota" -#: sysdeps/generic/siglist.h:40 sysdeps/unix/siglist.c:40 +#: sysdeps/generic/siglist.h:39 msgid "Alarm clock" msgstr "Temporizador" -#: sysdeps/generic/siglist.h:41 sysdeps/unix/siglist.c:41 +#: sysdeps/generic/siglist.h:40 msgid "Terminated" msgstr "Terminado" # ?? sigo pensando en una traducción para condición -#: sysdeps/generic/siglist.h:42 sysdeps/unix/siglist.c:42 +#: sysdeps/generic/siglist.h:41 msgid "Urgent I/O condition" msgstr "Condición urgente de E/S" -#: sysdeps/generic/siglist.h:43 sysdeps/unix/siglist.c:43 +#: sysdeps/generic/siglist.h:42 msgid "Stopped (signal)" msgstr "Parado (por una señal)" -#: sysdeps/generic/siglist.h:44 sysdeps/unix/siglist.c:44 +#: sysdeps/generic/siglist.h:43 msgid "Stopped" msgstr "Parado" -#: sysdeps/generic/siglist.h:45 sysdeps/unix/siglist.c:45 +#: sysdeps/generic/siglist.h:44 msgid "Continued" msgstr "Continúa" -#: sysdeps/generic/siglist.h:46 sysdeps/unix/siglist.c:46 +#: sysdeps/generic/siglist.h:45 msgid "Child exited" msgstr "El proceso hijo terminó" # Perdonad que sea tan largo, pero es algo que nunca está de más # Creo que mejora al original ;) -#: sysdeps/generic/siglist.h:47 sysdeps/unix/siglist.c:47 +#: sysdeps/generic/siglist.h:46 msgid "Stopped (tty input)" msgstr "Parado (requiere entrada de terminal)" # Perdonad que sea tan largo, pero es algo que nunca está de más # Creo que mejora al original ;) -#: sysdeps/generic/siglist.h:48 sysdeps/unix/siglist.c:48 +#: sysdeps/generic/siglist.h:47 msgid "Stopped (tty output)" msgstr "Parado (requiere salida por terminal)" -#: sysdeps/generic/siglist.h:49 sysdeps/unix/siglist.c:49 +#: sysdeps/generic/siglist.h:48 msgid "I/O possible" msgstr "Operación de E/S permitida" -#: sysdeps/generic/siglist.h:50 sysdeps/unix/siglist.c:50 +#: sysdeps/generic/siglist.h:49 msgid "CPU time limit exceeded" msgstr "Rebasado el límite de tiempo de CPU" -#: sysdeps/generic/siglist.h:51 sysdeps/unix/siglist.c:51 +#: sysdeps/generic/siglist.h:50 msgid "File size limit exceeded" msgstr "Superado el límite de tamaño de fichero" -#: sysdeps/generic/siglist.h:52 sysdeps/unix/siglist.c:52 +#: sysdeps/generic/siglist.h:51 msgid "Virtual timer expired" msgstr "El temporizador virtual llegó al final" @@ -5839,48 +6010,48 @@ msgstr "El temporizador virtual llegó al final" # me acuerdo de cuál. sv # Gracias por la explicación, sé que era algo referente # al trace o debug de un programa. Miro a la alemana. -#: sysdeps/generic/siglist.h:53 sysdeps/unix/siglist.c:53 +#: sysdeps/generic/siglist.h:52 msgid "Profiling timer expired" msgstr "El tiempo de CPU expiró" -#: sysdeps/generic/siglist.h:54 sysdeps/unix/siglist.c:54 -msgid "Window changed" -msgstr "La ventana ha cambiado" - -#: sysdeps/generic/siglist.h:55 sysdeps/unix/siglist.c:56 +#: sysdeps/generic/siglist.h:53 msgid "User defined signal 1" msgstr "Señal definida por el usuario 1" -#: sysdeps/generic/siglist.h:56 sysdeps/unix/siglist.c:57 +#: sysdeps/generic/siglist.h:54 msgid "User defined signal 2" msgstr "Señal definida por el usuario 2" # ???, siempre lo he usado como trap, nunca encontramos la palabra # y es una señal estándar Unix, así que no creo conveniente traducirla -#: sysdeps/generic/siglist.h:60 sysdeps/unix/siglist.c:33 +#: sysdeps/generic/siglist.h:58 msgid "EMT trap" msgstr "`trap' de EMT" -#: sysdeps/generic/siglist.h:63 sysdeps/unix/siglist.c:38 +#: sysdeps/generic/siglist.h:61 msgid "Bad system call" msgstr "Llamada al sistema errónea" -#: sysdeps/generic/siglist.h:66 +#: sysdeps/generic/siglist.h:64 msgid "Stack fault" msgstr "Fallo en la pila" -#: sysdeps/generic/siglist.h:69 +#: sysdeps/generic/siglist.h:67 msgid "Information request" msgstr "Petición de información" -#: sysdeps/generic/siglist.h:71 +#: sysdeps/generic/siglist.h:69 msgid "Power failure" msgstr "Fallo de alimentación" -#: sysdeps/generic/siglist.h:74 sysdeps/unix/siglist.c:55 +#: sysdeps/generic/siglist.h:72 msgid "Resource lost" msgstr "Recurso perdido" +#: sysdeps/generic/siglist.h:75 +msgid "Window changed" +msgstr "La ventana ha cambiado" + #. TRANS Operation not permitted; only the owner of the file (or other resource) #. TRANS or processes with special privileges can perform the operation. #: sysdeps/gnu/errlist.c:25 @@ -5926,8 +6097,8 @@ msgstr "No existe el dispositivo o la dirección" #. TRANS Argument list too long; used when the arguments passed to a new program #. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a -#. TRANS File}) occupy too much memory space. This condition never arises in the -#. TRANS GNU system. +#. TRANS File}) occupy too much memory space. This condition never arises on +#. TRANS @gnuhurdsystems{}. #: sysdeps/gnu/errlist.c:94 msgid "Argument list too long" msgstr "La lista de argumentos es demasiado larga" @@ -5978,7 +6149,7 @@ msgid "Cannot allocate memory" msgstr "No se pudo asignar memoria" #. TRANS Bad address; an invalid pointer was detected. -#. TRANS In the GNU system, this error never happens; you get a signal instead. +#. TRANS On @gnuhurdsystems{}, this error never happens; you get a signal instead. #: sysdeps/gnu/errlist.c:167 msgid "Bad address" msgstr "Dirección incorrecta" @@ -6047,7 +6218,7 @@ msgstr "Demasiados ficheros abiertos" #. TRANS There are too many distinct file openings in the entire system. Note #. TRANS that any number of linked channels count as just one file opening; see -#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system. +#. TRANS @ref{Linked Channels}. This error never occurs on @gnuhurdsystems{}. #: sysdeps/gnu/errlist.c:275 msgid "Too many open files in system" msgstr "Demasiados ficheros abiertos en el sistema" @@ -6062,7 +6233,7 @@ msgstr "Función ioctl no apropiada para el dispositivo" #. TRANS write to a file that is currently being executed. Often using a #. TRANS debugger to run a program is considered having it open for writing and #. TRANS will cause this error. (The name stands for ``text file busy''.) This -#. TRANS is not an error in the GNU system; the text is copied as necessary. +#. TRANS is not an error on @gnuhurdsystems{}; the text is copied as necessary. #: sysdeps/gnu/errlist.c:298 msgid "Text file busy" msgstr "El fichero de texto está ocupado" @@ -6117,7 +6288,7 @@ msgstr "Resultado numérico fuera de rango" #. TRANS Resource temporarily unavailable; the call might work if you try again #. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN}; -#. TRANS they are always the same in the GNU C library. +#. TRANS they are always the same in @theglibc{}. #. TRANS #. TRANS This error can happen in a few different situations: #. TRANS @@ -6148,7 +6319,7 @@ msgstr "Resultado numérico fuera de rango" msgid "Resource temporarily unavailable" msgstr "Recurso no disponible temporalmente" -#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above). +#. TRANS In @theglibc{}, this is another name for @code{EAGAIN} (above). #. TRANS The values are always the same, on every operating system. #. TRANS #. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a @@ -6214,7 +6385,7 @@ msgstr "Tipo de `socket' no soportado" #. TRANS The operation you requested is not supported. Some socket functions #. TRANS don't make sense for all types of sockets, and others may not be -#. TRANS implemented for all communications protocols. In the GNU system, this +#. TRANS implemented for all communications protocols. On @gnuhurdsystems{}, this #. TRANS error can happen for many calls when the object does not support the #. TRANS particular operation; it is a generic indication that the server knows #. TRANS nothing to do for that call. @@ -6430,7 +6601,7 @@ msgstr "`handle' de fichero NFS en desuso" #. TRANS An attempt was made to NFS-mount a remote file system with a file name that #. TRANS already specifies an NFS-mounted file. #. TRANS (This is an error on some operating systems, but we expect it to work -#. TRANS properly on the GNU system, making this error code impossible.) +#. TRANS properly on @gnuhurdsystems{}, making this error code impossible.) #: sysdeps/gnu/errlist.c:799 msgid "Object is remote" msgstr "El objeto es remoto" @@ -6484,7 +6655,7 @@ msgstr "RPC: procedimiento erróneo para el programa" # Miro la versión alemana. # ??? ¿locks? ¿cómo diablos? #. TRANS No locks available. This is used by the file locking facilities; see -#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but +#. TRANS @ref{File Locks}. This error is never generated by @gnuhurdsystems{}, but #. TRANS it can result from an operation to an NFS server running another #. TRANS operating system. #: sysdeps/gnu/errlist.c:856 @@ -6554,7 +6725,7 @@ msgstr "El carácter multibyte o extendido está incompleto o es inválido" # # En este caso, creo que sobran el "La" y el "es". Por eso le he quitado # el "es". sv -#. TRANS In the GNU system, servers supporting the @code{term} protocol return +#. TRANS On @gnuhurdsystems{}, servers supporting the @code{term} protocol return #. TRANS this error for certain operations when the caller is not in the #. TRANS foreground process group of the terminal. Users do not usually see this #. TRANS error because functions such as @code{read} and @code{write} translate @@ -6576,7 +6747,7 @@ msgstr "Operación no válida para un proceso en segundo plano" # # Muy bien, pero lo pongo en pretérito perfecto. sv # -#. TRANS In the GNU system, opening a file returns this error when the file is +#. TRANS On @gnuhurdsystems{}, opening a file returns this error when the file is #. TRANS translated by a program and the translator program dies while starting #. TRANS up, before it has connected to the file. #: sysdeps/gnu/errlist.c:955 @@ -6915,9 +7086,13 @@ msgstr "El estado es irrecuperable" msgid "Operation not possible due to RF-kill" msgstr "Operación imposible por estar la radiofrecuencia desactivada" +#: sysdeps/gnu/errlist.c:1469 +msgid "Memory page has hardware error" +msgstr "La página de memoria tiene un error de hardware" + # ¿Qué demonios es esto? # ¿Error en el error del sistema desconocido? sv -#: sysdeps/mach/_strerror.c:57 +#: sysdeps/mach/_strerror.c:56 msgid "Error in unknown error system: " msgstr "Error de sistema desconocido: " @@ -6992,27 +7167,12 @@ msgstr "Interrumpido por una señal" msgid "Parameter string not correctly encoded" msgstr "Cadena de parámetros codificada incorrectamente" -#: sysdeps/unix/siglist.c:26 -msgid "Signal 0" -msgstr "Señal 0" - -# ???, siempre lo he usado como trap, nunca encontramos la palabra -# y es una señal estándar Unix, así que no creo conveniente traducirla -#: sysdeps/unix/siglist.c:32 -msgid "IOT trap" -msgstr "`trap' de IOT" - -#: sysdeps/unix/sysv/linux/i386/readelflib.c:49 +#: sysdeps/unix/sysv/linux/i386/readelflib.c:65 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s es para la máquina desconocida %d.\n" -#: sysdeps/unix/sysv/linux/ia64/makecontext.c:63 -#, c-format -msgid "makecontext: does not know how to handle more than 8 arguments\n" -msgstr "makecontext: no sabe cómo manejar más de 8 argumentos\n" - -#: sysdeps/unix/sysv/linux/lddlibc4.c:61 +#: sysdeps/unix/sysv/linux/lddlibc4.c:60 #, c-format msgid "" "Usage: lddlibc4 FILE\n" @@ -7021,164 +7181,164 @@ msgstr "" "Modo de empleo: lddlibc4 FICHERO\n" "\n" -#: sysdeps/unix/sysv/linux/lddlibc4.c:82 +#: sysdeps/unix/sysv/linux/lddlibc4.c:81 #, c-format msgid "cannot open `%s'" msgstr "no se puede abrir `%s'" -#: sysdeps/unix/sysv/linux/lddlibc4.c:86 +#: sysdeps/unix/sysv/linux/lddlibc4.c:85 #, c-format msgid "cannot read header from `%s'" msgstr "no se puede leer la cabecera de `%s'" -#: timezone/zdump.c:215 +#: timezone/zdump.c:246 msgid "lacks alphabetic at start" msgstr "no tiene caracteres alfabéticos al comienzo" -#: timezone/zdump.c:217 +#: timezone/zdump.c:248 msgid "has fewer than 3 alphabetics" msgstr "tiene menos de 3 caracteres alfabéticos" -#: timezone/zdump.c:219 +#: timezone/zdump.c:250 msgid "has more than 6 alphabetics" msgstr "tiene más de 6 caracteres alfabéticos" -#: timezone/zdump.c:227 +#: timezone/zdump.c:258 msgid "differs from POSIX standard" msgstr "difiere del estándar POSIX" -#: timezone/zdump.c:233 +#: timezone/zdump.c:264 #, c-format msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n" msgstr "%s: atención: zona \"%s\" abreviatura \"%s\" %s\n" -#: timezone/zdump.c:242 +#: timezone/zdump.c:273 #, c-format msgid "" "%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n" "\n" -"Report bugs to tz@elsie.nci.nih.gov.\n" +"Report bugs to %s.\n" msgstr "" "%s: el modo de empleo es %s [ --version ] [ -v ] [ -c [añoinf,]añosup ] nombrezona ...\n" "\n" -"Comunicar errores a tz@elsie.nci.nih.gov.\n" +"Comunicar errores a %s.\n" -#: timezone/zdump.c:311 +#: timezone/zdump.c:340 #, c-format msgid "%s: wild -c argument %s\n" msgstr "%s: argumento %s descabellado para -c\n" -#: timezone/zdump.c:398 +#: timezone/zdump.c:426 msgid "Error writing to standard output" msgstr "Error al escribir en la salida estándar" -#: timezone/zdump.c:421 +#: timezone/zdump.c:439 #, c-format msgid "%s: use of -v on system with floating time_t other than float or double\n" msgstr "%s: uso de -v en un sistema con time_t flotante distinto float o double\n" -#: timezone/zic.c:388 +#: timezone/zic.c:361 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Memoria agotada: %s\n" -#: timezone/zic.c:434 +#: timezone/zic.c:401 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", línea %d: %s" -#: timezone/zic.c:437 +#: timezone/zic.c:404 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regla desde \"%s\", línea %d)" -#: timezone/zic.c:449 +#: timezone/zic.c:415 msgid "warning: " msgstr "atención: " # FIXME: Decir al autor que no use tabs. sv -#: timezone/zic.c:459 +#: timezone/zic.c:425 #, c-format msgid "" "%s: usage is %s [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" "\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n" "\n" -"Report bugs to tz@elsie.nci.nih.gov.\n" +"Report bugs to %s.\n" msgstr "" "%s: el modo de empleo es %s [ --version ] [ -v ] [ -l hora_local ] [ -p reglasposix ] \\\n" " [ -d directorio ] [ -L segundos_intercalares ] [ -y tipoaño ] [ fichero ... ]\n" "\n" -"Comunicar errores a tz@elstz@elsie.nci.nih.gov.\n" +"Comunicar errores a %s.\n" -#: timezone/zic.c:496 +#: timezone/zic.c:460 msgid "wild compilation-time specification of zic_t" msgstr "especificación de zic_t en tiempo de compilación descabellada" -#: timezone/zic.c:515 +#: timezone/zic.c:479 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: La opción -d se ha especificado más de una vez\n" -#: timezone/zic.c:525 +#: timezone/zic.c:489 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: La opción -l se ha especificado más de una vez\n" -#: timezone/zic.c:535 +#: timezone/zic.c:499 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: La opción -p se ha especificado más de una vez\n" -#: timezone/zic.c:545 +#: timezone/zic.c:509 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: La opción -y se ha especificado más de una vez\n" -#: timezone/zic.c:555 +#: timezone/zic.c:519 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: La opción -L se ha especificado más de una vez\n" -#: timezone/zic.c:604 +#: timezone/zic.c:566 msgid "link to link" msgstr "enlace a un enlace" -#: timezone/zic.c:669 +#: timezone/zic.c:629 msgid "hard link failed, symbolic link used" msgstr "el enlace duro falló, se usará un enlace simbólico" -#: timezone/zic.c:677 +#: timezone/zic.c:637 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: No se pudo crear un enlace de %s a %s: %s\n" -#: timezone/zic.c:749 timezone/zic.c:751 +#: timezone/zic.c:697 timezone/zic.c:699 msgid "same rule name in multiple files" msgstr "mismo nombre de regla en varios ficheros" -#: timezone/zic.c:792 +#: timezone/zic.c:740 msgid "unruly zone" msgstr "zona sin reglas" -#: timezone/zic.c:799 +#: timezone/zic.c:747 #, c-format msgid "%s in ruleless zone" msgstr "%s en una zona sin reglas" -#: timezone/zic.c:820 +#: timezone/zic.c:767 msgid "standard input" msgstr "entrada estándar" -#: timezone/zic.c:825 +#: timezone/zic.c:772 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: No se puede abrir %s: %s\n" -#: timezone/zic.c:836 +#: timezone/zic.c:783 msgid "line too long" msgstr "línea demasiado larga" -#: timezone/zic.c:856 +#: timezone/zic.c:803 msgid "input line of unknown type" msgstr "línea de entrada de tipo desconocido" @@ -7213,7 +7373,7 @@ msgstr "línea de entrada de tipo desconocido" # Segundo, según he visto en la documentación, sólo existe un fichero # de leap lines, por eso pongo 'el'... em+ # -#: timezone/zic.c:872 +#: timezone/zic.c:819 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "" @@ -7221,83 +7381,83 @@ msgstr "" "ajuste de años bisiestos %s\n" # Ídem. 1984. -#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338 +#: timezone/zic.c:826 timezone/zic.c:1243 timezone/zic.c:1265 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: grave: valor_l %d inválido\n" -#: timezone/zic.c:887 +#: timezone/zic.c:834 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Error al leer %s\n" -#: timezone/zic.c:894 +#: timezone/zic.c:841 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Error al cerrar %s: %s\n" -#: timezone/zic.c:899 +#: timezone/zic.c:846 msgid "expected continuation line not found" msgstr "la línea de continuación esperada no se encuentra" # Sugerencia: Desbordamiento de fecha. (?) sv+ -#: timezone/zic.c:943 timezone/zic.c:2480 timezone/zic.c:2499 +#: timezone/zic.c:887 timezone/zic.c:2411 timezone/zic.c:2425 msgid "time overflow" msgstr "desbordamiento horario" -#: timezone/zic.c:947 +#: timezone/zic.c:891 msgid "24:00 not handled by pre-1998 versions of zic" msgstr "24:00 no se puede tratar por versiones de zic anteriores a 1998" -#: timezone/zic.c:950 +#: timezone/zic.c:894 msgid "values over 24 hours not handled by pre-2007 versions of zic" msgstr "las versiones de zic anteriores a 2007 no manejan valores por encima de 24 horas" -#: timezone/zic.c:963 +#: timezone/zic.c:905 msgid "wrong number of fields on Rule line" msgstr "número incorrecto de argumentos en la línea de regla (Rule)" -#: timezone/zic.c:967 +#: timezone/zic.c:909 msgid "nameless rule" msgstr "regla sin nombre" -#: timezone/zic.c:972 +#: timezone/zic.c:914 msgid "invalid saved time" msgstr "la hora almacenada no es válida" -#: timezone/zic.c:993 +#: timezone/zic.c:932 msgid "wrong number of fields on Zone line" msgstr "número de campos incorrecto en la línea de zona (Zone)" -#: timezone/zic.c:999 +#: timezone/zic.c:938 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "la línea \"Zone %s\" y la opción -l son mutuamente excluyentes" -#: timezone/zic.c:1007 +#: timezone/zic.c:946 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "la línea \"Zone %s\" y la opción -p son mutuamente excluyentes" -#: timezone/zic.c:1019 +#: timezone/zic.c:958 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "nombre de zona %s duplicado (fichero \"%s\", línea %d)" -#: timezone/zic.c:1035 +#: timezone/zic.c:972 msgid "wrong number of fields on Zone continuation line" msgstr "número de campos incorrecto en la línea de continuación de zona (Zone)" -#: timezone/zic.c:1075 +#: timezone/zic.c:1009 msgid "invalid UTC offset" msgstr "desplazamiento UTC inválido" -#: timezone/zic.c:1078 +#: timezone/zic.c:1012 msgid "invalid abbreviation format" msgstr "formato de abreviatura incorrecto" # VER -#: timezone/zic.c:1107 +#: timezone/zic.c:1041 msgid "Zone continuation line end time is not after end time of previous line" msgstr "" "La línea de continuación de la zona no está después del tiempo de final\n" @@ -7313,148 +7473,147 @@ msgstr "" # Si es mejor, ponlo en todos los sitios. Y si no, en ninguno. # Yo creo que es mucho mejor poner "número incorrecto ..." # Si no, queda como "al revés". sv+ -#: timezone/zic.c:1135 +#: timezone/zic.c:1066 msgid "wrong number of fields on Leap line" msgstr "número incorrecto de campos en la línea de bisiesto (Leap)" -#: timezone/zic.c:1144 +#: timezone/zic.c:1075 msgid "invalid leaping year" msgstr "año bisiesto inválido" -#: timezone/zic.c:1164 timezone/zic.c:1270 +#: timezone/zic.c:1095 timezone/zic.c:1197 msgid "invalid month name" msgstr "nombre de mes incorrecto" -#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397 +#: timezone/zic.c:1108 timezone/zic.c:1310 timezone/zic.c:1324 msgid "invalid day of month" msgstr "día del mes inválido" -#: timezone/zic.c:1182 +#: timezone/zic.c:1113 msgid "time before zero" msgstr "hora antes de cero" -#: timezone/zic.c:1186 +#: timezone/zic.c:1117 msgid "time too small" msgstr "tiempo demasiado pequeño" -#: timezone/zic.c:1190 +#: timezone/zic.c:1121 msgid "time too large" msgstr "tiempo demasiado grande" -#: timezone/zic.c:1194 timezone/zic.c:1299 +#: timezone/zic.c:1125 timezone/zic.c:1226 msgid "invalid time of day" msgstr "hora del día inválida" -#: timezone/zic.c:1213 +#: timezone/zic.c:1144 msgid "illegal CORRECTION field on Leap line" msgstr "El campo CORRECTION en la línea de año bisiesto es ilegal" -#: timezone/zic.c:1218 +#: timezone/zic.c:1149 msgid "illegal Rolling/Stationary field on Leap line" msgstr "Campo Rolling/Stationary ilegal en la línea de año bisiesto" -#: timezone/zic.c:1234 +#: timezone/zic.c:1163 msgid "wrong number of fields on Link line" msgstr "número incorrecto de campos en la línea de enlace (Link)" -#: timezone/zic.c:1238 +#: timezone/zic.c:1167 msgid "blank FROM field on Link line" msgstr "Campo FROM vacío en la línea `Link'" -#: timezone/zic.c:1242 +#: timezone/zic.c:1171 msgid "blank TO field on Link line" msgstr "Campo TO vacío en la línea `Link'" -#: timezone/zic.c:1320 +#: timezone/zic.c:1247 msgid "invalid starting year" msgstr "año de comienzo inválido" -#: timezone/zic.c:1342 +#: timezone/zic.c:1269 msgid "invalid ending year" msgstr "año de final inválido" -#: timezone/zic.c:1346 +#: timezone/zic.c:1273 msgid "starting year greater than ending year" msgstr "año de comienzo mayor que año de final" -#: timezone/zic.c:1353 +#: timezone/zic.c:1280 msgid "typed single year" msgstr "tecleado un único año" -#: timezone/zic.c:1388 +#: timezone/zic.c:1315 msgid "invalid weekday name" msgstr "nombre del día de la semana incorrecto" -#: timezone/zic.c:1566 +#: timezone/zic.c:1481 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: No se puede eliminar %s: %s\n" -#: timezone/zic.c:1576 +#: timezone/zic.c:1491 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: No se puede crear %s: %s\n" -#: timezone/zic.c:1726 +#: timezone/zic.c:1683 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Error al escribir %s\n" -#: timezone/zic.c:2019 +#: timezone/zic.c:1964 msgid "no POSIX environment variable for zone" msgstr "no hay ninguna variable de entorno POSIX para la zona" # FUZZY -#: timezone/zic.c:2176 +#: timezone/zic.c:2131 msgid "can't determine time zone abbreviation to use just after until time" msgstr "" "No se puede determinar la abreviación de zona horaria que se usará justo\n" "después" -#: timezone/zic.c:2222 +#: timezone/zic.c:2175 msgid "too many transitions?!" msgstr "¡¿demasiadas transiciones?!" -#: timezone/zic.c:2241 +#: timezone/zic.c:2190 msgid "internal error - addtype called with bad isdst" msgstr "error interno - se llamó a `addtype' con un `isdst' erróneo" -#: timezone/zic.c:2245 +#: timezone/zic.c:2194 msgid "internal error - addtype called with bad ttisstd" msgstr "error interno - se llamó a `addtype' con un `ttisstd' erróneo" -#: timezone/zic.c:2249 +#: timezone/zic.c:2198 msgid "internal error - addtype called with bad ttisgmt" msgstr "error interno - se llamó a `addtype' con un `ttisgmt' erróneo" -#: timezone/zic.c:2268 +#: timezone/zic.c:2217 msgid "too many local time types" msgstr "demasiados tipos de hora local" -#: timezone/zic.c:2272 +#: timezone/zic.c:2221 msgid "UTC offset out of range" msgstr "desplazamiento UTC fuera de rango" -#: timezone/zic.c:2300 +#: timezone/zic.c:2245 msgid "too many leap seconds" msgstr "demasiados segundos intercalares" -#: timezone/zic.c:2306 +#: timezone/zic.c:2251 msgid "repeated leap second moment" msgstr "segundo intercalar repetido" # # Otra opción, resultado incongruente al ejecutar la orden em -#: timezone/zic.c:2358 +#: timezone/zic.c:2301 msgid "Wild result from command execution" msgstr "Resultado salvaje en la ejecución de la orden" -# FIXME: `%s' -#: timezone/zic.c:2359 +#: timezone/zic.c:2302 #, c-format msgid "%s: command was '%s', result was %d\n" -msgstr "%s: la orden fue `%s', el resultado fue %d\n" +msgstr "%s: la orden fue '%s', el resultado fue %d\n" -#: timezone/zic.c:2457 +#: timezone/zic.c:2393 msgid "Odd number of quotation marks" msgstr "Número impar de comillas" @@ -7463,40 +7622,40 @@ msgstr "Número impar de comillas" # se entiende mejor. no sé. sv # Si, estas pensando lo mismo que yo, 29 de febrero puede confundir, porque # en el fichero pondrá 2/29 em -#: timezone/zic.c:2546 +#: timezone/zic.c:2470 msgid "use of 2/29 in non leap-year" msgstr "uso de 2/29 en un año no bisiesto" -#: timezone/zic.c:2581 +#: timezone/zic.c:2505 msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic" msgstr "la regla sobrepasa el comienzo/final del mes--no funcionará con versiones de zic anteriores a 2004" -#: timezone/zic.c:2613 +#: timezone/zic.c:2536 msgid "time zone abbreviation lacks alphabetic at start" msgstr "la abreviatura de la zona horaria no comienza con un carácter alfabético" -#: timezone/zic.c:2615 -msgid "time zone abbreviation has more than 3 alphabetics" -msgstr "la abreviatura de la zona horaria tiene más de 3 caracteres alfabéticos" +#: timezone/zic.c:2538 +msgid "time zone abbreviation has fewer than 3 alphabetics" +msgstr "la abreviatura de la zona horaria tiene menos de 3 caracteres alfabéticos" -#: timezone/zic.c:2617 +#: timezone/zic.c:2540 msgid "time zone abbreviation has too many alphabetics" msgstr "la abreviatura de la zona horaria tiene demasiados caracteres alfabéticos" -#: timezone/zic.c:2627 +#: timezone/zic.c:2550 msgid "time zone abbreviation differs from POSIX standard" msgstr "la abreviatura de la zona horaria difiere del estándar POSIX" -#: timezone/zic.c:2639 +#: timezone/zic.c:2562 msgid "too many, or too long, time zone abbreviations" msgstr "demasiadas abreviaturas de zona horaria, o demasiado largas" -#: timezone/zic.c:2680 +#: timezone/zic.c:2602 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: No se puede crear el directorio %s: %s\n" -#: timezone/zic.c:2702 +#: timezone/zic.c:2623 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d no extendió el signo correctamente\n" diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64 index 5a42510cb6..f01388f384 100644 --- a/ports/ChangeLog.aarch64 +++ b/ports/ChangeLog.aarch64 @@ -1,3 +1,48 @@ +2013-03-19 Andreas Schwab <schwab@suse.de> + + * sysdeps/unix/sysv/linux/aarch64/configure.in: Set + libc_cv_rtlddir. + * sysdeps/unix/sysv/linux/aarch64/configure: Regenerate. + +2013-03-14 Andreas Schwab <schwab@suse.de> + + * sysdeps/unix/sysv/linux/aarch64/configure.in: Set + libc_cv_slibdir, libdir and libc_cv_localedir. + * sysdeps/unix/sysv/linux/aarch64/configure: Regenerate. + +2013-03-11 Andreas Schwab <schwab@suse.de> + + [BZ #15234] + * sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist + (GLIBC_2.17): Remove pthread_atfork. + +2013-03-07 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/aarch64/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + +2013-02-14 Marcus Shawcroft <marcus.shawcroft@linaro.org> + + * sysdeps/aarch64/libm-test-ulps: Regenerate. + +2013-02-13 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/aarch64/sigaction.c (__libc_sigaction): + Do not use __ptrvalue. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/aarch64/gettimeofday.c: Do not include + <bp-checks.h>. + (__gettimeofday): Do not use CHECK_1. + 2013-01-23 Marcus Shawcroft <marcus.shawcroft@linaro.org> * sysdeps/aarch64/strncmp.S: New file. diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha index 758e97c950..9a77d276ab 100644 --- a/ports/ChangeLog.alpha +++ b/ports/ChangeLog.alpha @@ -1,3 +1,56 @@ +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MAP_HUGE_MASK) + (MAP_HUGE_SHIFT): Define. + * sysdeps/unix/sysv/linux/alpha/bits/msq.h (MSG_COPY): Define. + +2013-02-19 Richard Henderson <rth@redhat.com> + + [BZ #14920] + * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + +2013-02-20 Richard Henderson <rth@redhat.com> + + * sysdeps/unix/alpha/sysdep.h: Include <errno.h>. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + +2013-02-14 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/alpha/memchr.c: Do not include <bp-sym.h>. + (memchr): Do not use BP_SYM in weak_alias. + +2013-02-13 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/alpha/sigaction.c + (__syscall_rt_sigaction): Do not use __unbounded in prototype. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/alpha/fdatasync.c: Don't include + <bp-checks.h>. + * sysdeps/unix/sysv/linux/alpha/gethostname.c: Likewise. + (__gethostname): Don't use CHECK_N. + + [BZ #13550] + * sysdeps/unix/sysv/linux/alpha/msgctl.c: Do not include + <bp-checks.h>. + (__new_msgctl): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/alpha/shmctl.c: Do not include + <bp-checks.h>. + (__new_shmctl): Do not use CHECK_1. + 2013-01-31 Joseph Myers <joseph@codesourcery.com> [BZ #13550] diff --git a/ports/ChangeLog.am33 b/ports/ChangeLog.am33 index 015fa9066e..42548b2c2b 100644 --- a/ports/ChangeLog.am33 +++ b/ports/ChangeLog.am33 @@ -1,3 +1,28 @@ +2013-03-11 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/am33/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + +2013-02-28 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/am33/elf/start.S: Don't include "bp-sym.h". + (_start): Don't use BP_SYM. + * sysdeps/unix/sysv/linux/am33/clone.S: Don't include <bp-sym.h>. + (__clone): Don't use BP_SYM. + +2013-02-14 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/am33/dl-machine.h [!PROF && !__BOUNDED_POINTERS__]: + Remove __BOUNDED_POINTERS__ from condition. + +2013-02-13 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/am33/dl-machine.h (fixup): Do not use __unbounded. + * sysdeps/unix/sysv/linux/am33/brk.c (__brk): Do not use + __ptrvalue. + 2013-01-02 Joseph Myers <joseph@codesourcery.com> * All files with FSF copyright notices: Update copyright dates diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm index d44ea76244..355d980ba5 100644 --- a/ports/ChangeLog.arm +++ b/ports/ChangeLog.arm @@ -1,3 +1,328 @@ +2013-03-26 Mans Rullgard <mans@mansr.com> + + * sysdeps/arm/preconfigure.in: Use "test" instead of [ ]. + * sysdeps/arm/preconfigure: Regenerated. + +2013-03-20 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/arm/configure.in (default-abi): Set using + LIBC_CONFIG_VAR. + * sysdeps/arm/configure: Regenerated. + * sysdeps/unix/sysv/linux/arm/Makefile: Do not include + default-abi.make. + +2013-03-18 Roland McGrath <roland@hack.frob.com> + + * sysdeps/arm/dl-tlsdesc.S: Include <arm-features.h>. + Use sfi_breg macro throughout. + (_dl_tlsdesc_dynamic) [!ARM_NO_INDEX_REGISTER]: Avoid two-register + addressing mode. + (_dl_tlsdesc_dynamic) [ARM_ALWAYS_BX]: Don't pop into pc. + + * sysdeps/arm/arm-features.h: Add comment for ARM_NO_INDEX_REGISTER. + +2013-03-15 Roland McGrath <roland@hack.frob.com> + + * sysdeps/arm/sysdep.h [!ARM_SFI_MACROS] (sfi_sp): New macro. + * sysdeps/arm/__longjmp.S: Use it. + + * sysdeps/arm/sysdep.h [!ARM_SFI_MACROS] + (ARM_SFI_MACROS): Define it. + (sfi_breg, sfi_pld): New assembler macros. + * sysdeps/arm/__longjmp.S: Use them for all memory references not + through the pc or sp registers. + * sysdeps/arm/add_n.S: Likewise. + * sysdeps/arm/addmul_1.S: Likewise. + * sysdeps/arm/arm-mcount.S: Likewise. + * sysdeps/arm/armv6/rawmemchr.S: Likewise. + * sysdeps/arm/armv6/strchr.S: Likewise. + * sysdeps/arm/armv6/strcpy.S: Likewise. + * sysdeps/arm/armv6/strlen.S: Likewise. + * sysdeps/arm/armv6/strrchr.S: Likewise. + * sysdeps/arm/armv6t2/memchr.S: Likewise. + * sysdeps/arm/memcpy.S: Likewise. + * sysdeps/arm/memmove.S: Likewise. + * sysdeps/arm/memset.S: Likewise. + * sysdeps/arm/setjmp.S: Likewise. + * sysdeps/arm/strlen.S: Likewise. + * sysdeps/arm/submul_1.S: Likewise. + +2013-03-13 Roland McGrath <roland@hack.frob.com> + + * sysdeps/arm/arm-features.h (ARM_BX_ALIGN_LOG2): New macro. + * sysdeps/arm/memcpy.S: Respect ARM_BX_ALIGN_LOG2. + * sysdeps/arm/memmove.S: Likewise. + + * sysdeps/arm/add_n.S: Include <arm-features.h>. + [ARM_ALWAYS_BX]: Don't pop into pc. + + * sysdeps/arm/arm-features.h: Add comment about ARM_ALWAYS_BX. + * sysdeps/arm/memcpy.S: Include <arm-features.h>. + [ARM_ALWAYS_BX]: Avoid pc as destination. + * sysdeps/arm/memmove.S: Likewise. + +2013-03-12 Roland McGrath <roland@hack.frob.com> + + * sysdeps/arm/armv6t2/memchr.S [NO_THUMB]: + Use .arm rather than .thumb, .thumb_func. Avoid cbz/cnbz instructions. + + * sysdeps/arm/armv6t2/memchr.S: Change register allocation so ldrd use + is r4,r5 rather than r5,r6; this way ARM mode will allow that ldrd. + +2013-03-11 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/arm/preconfigure.in: Add comment about + -fno-unwind-tables addition to CFLAGS. + * sysdeps/arm/preconfigure: Regenerated. + * sysdeps/unix/sysv/linux/arm/configure.in: Add comment about + -fno-unwind-tables removal from CFLAGS. + * sysdeps/unix/sysv/linux/arm/configure: Regenerated. + +2013-03-11 Roland McGrath <roland@hack.frob.com> + + * sysdeps/arm/bits/setjmp.h: Test [!__ASSEMBLER__] rather than [!_ASM]. + * sysdeps/arm/jmpbuf-offsets.h: File removed. + * sysdeps/arm/jmpbuf-unwind.h: Don't #include it. + * sysdeps/arm/include/bits/setjmp.h: New file. + * sysdeps/arm/setjmp.S (_SETJMP_H, _ASM): Macros removed. + Use JMP_BUF_REGLIST macro. + * sysdeps/arm/__longjmp.S: Likewise. + + * sysdeps/arm/memcpy.S: Convert to unified assembly syntax. + * sysdeps/arm/memmove.S: Likewise. + * sysdeps/arm/memset.S: Likewise. + * sysdeps/arm/strlen.S: Likewise. + + * sysdeps/arm/memcpy.S: Use r10 instead of r9. + * sysdeps/arm/memmove.S: Likewise. + + * sysdeps/arm/preconfigure.in: New file. + * sysdeps/arm/preconfigure: Replaced with generated file. + +2013-03-11 Andreas Schwab <schwab@suse.de> + + [BZ #15234] + * sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist (GLIBC_2.4): + Remove pthread_atfork. + +2013-03-06 Richard Henderson <rth@redhat.com> + + * sysdeps/arm/armv6/rawmemchr.S: New file. + * sysdeps/arm/armv6/stpcpy.S: New file. + * sysdeps/arm/armv6/strchr.S: New file. + * sysdeps/arm/armv6/strcpy.S: New file. + * sysdeps/arm/armv6/strlen.S: New file. + * sysdeps/arm/armv6/strrchr.S: New file. + * sysdeps/arm/armv6t2/Implies: New file. + +2013-03-06 Richard Henderson <rth@redhat.com> + + * sysdeps/arm/add_n.S: New file. + * sysdeps/arm/sub_n.S: New file. + * sysdeps/arm/submul_1.S: New file. + * sysdeps/arm/addmul_1.S: New file. + * sysdeps/arm/armv6t2/ffs.S: New file. + * sysdeps/arm/armv6t2/ffsll.S: New file. + + * sysdeps/arm/sysdep.h (ARCH_HAS_HARD_TP): New macro. + (GET_TLS): Use hard-tp if ARCH_HAS_HARD_TP. + * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h (GET_TLS): Don't override + the default definition if ARCH_HAS_HARD_TP. + + * sysdeps/arm/sysdep.h (__ARM_ARCH): New macro. + (ARCH_HAS_BX, ARCH_HAS_BLX, ARCH_HAS_T2): New macros. + (BX): Select on ARCH_HAS_BX instead of __USE_BX__. + (BLX): Select on ARCH_HAS_BLX instead of __ARM_ARCH_4T__. + * ports/sysdeps/arm/dl-machine.h (BX): Select on ARCH_HAS_BX + instead of __USE_BX__. + + * sysdeps/arm/arm-mcount.S (_mcount): Use pop into pc unless + __ARM_ARCH_4T__ and __THUMB_INTERWORK__. + * sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Likewise. + + * sysdeps/arm/sysdep.h (BX, BXC, BLX): New macros. + (DO_RET): Use BX. + (RETINSTR): Use BXC. + * sysdeps/arm/dl-tlsdesc.S (BX): Remove. + * sysdeps/arm/dl-trampoline.S (BX): Remove. + (_dl_runtime_profile): Use BLX. + + * sysdeps/arm/__longjmp.S (__longjmp): Use ldmia insn directly. + * sysdeps/arm/sysdep.h (LOADREGS): Remove. + + * sysdeps/arm/arm-mcount.S (_mcount): Use push/pop mnemonics. + * sysdeps/arm/crti.S, sysdeps/arm/crtn.S: Likewise. + * sysdeps/arm/dl-tlsdesc.S: Likewise. + * sysdeps/arm/dl-trampoline.S: Likewise. + * sysdeps/arm/start.S: Likewise. + * sysdeps/arm/memcpy.S (PULL): Rename macro from pull. + (PUSH): Rename macro from push. + (memcpy): Use push/pop mnemonics. + * sysdeps/arm/memmove.S: Similarly. + * sysdeps/arm/sysdep.h (CALL_MCOUNT): Use push/pop mnemonics. + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: Likewise. + * sysdeps/unix/sysv/linux/arm/clone.S: Likewise. + * sysdeps/unix/sysv/linux/arm/mmap.S: Likewise. + * sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: Likewise. + * sysdeps/unix/sysv/linux/arm/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise. + + * sysdeps/arm/sysdep.h [__ASSEMBLER__]: Enable thumb2 if __thumb2__. + (PC_OFS): Respect __thumb__ if __ASSEMBLER__. + + * sysdeps/arm/sysdep.h (GET_TLS): New macro. + * sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_undefweak): Use it. + (_dl_tlsdesc_dynamic): Likewise. + * sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h (GET_TLS): New macro. + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (SINGLE_THREAD_P): + Likewise. + * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S (__aeabi_read_tp): + Add thumb2 alternative. + + * sysdeps/arm/sysdep.h (NEGOFF_ADJ_BASE): New macro. + (NEGOFF_ADJ_BASE2, NEGOFF_OFF1, NEGOFF_OFF2): New macros. + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use them. + * sysdeps/unix/sysv/linux/arm/nptl/vfork.S: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (SINGLE_THREAD_P): + Likewise. + + * sysdeps/arm/sysdep.h (LDST_PCREL): New macro. + * sysdeps/unix/arm/sysdep.S (__syscall_error): Use LDST_PCREL. + Fix up gottpoff load of errno for thumb2. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h + (SINGLE_THREAD_P): Use LDST_PCREL. + (PSEUDO_PROLOGUE): Remove. + (PSEUDO): Don't use it. + * sysdeps/unix/sysv/linux/arm/sysdep.h (SYSCALL_ERROR_HANDLER): + Use LDST_PCREL. + +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/arm/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + +2013-02-28 Richard Henderson <rth@redhat.com> + + * sysdeps/arm/preconfigure: Adjust scan for __ARM_ARCH_* defines. + + * sysdeps/arm/preconfigure: Handle __ARM_ARCH_6*__. + + * sysdeps/unix/sysv/linux/arm/Makefile [elf] (sysdep-rtld-routines): + Include libc-do-syscall. + + * sysdeps/arm/sysdep.h: Fix assembly whitespace. + * ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. + + * sysdeps/arm/sysdep.h (PC_OFS): New macros. + * sysdeps/arm/__longjmp.S (__longjmp): Use PC_OFS. + * sysdeps/arm/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise. + * sysdeps/unix/sysv/linux/arm/getcontext.S (__getcontext): Likewise. + * sysdeps/unix/sysv/linux/arm/setcontext.S (__startcontext): Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h + (SINGLE_THREAD_P): Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h + (SYSCALL_ERROR_HANDLER): Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c + (_Unwind_Resume): Use stringified PC_OFS. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c + (_Unwind_Resume): Likewise. + + * ports/sysdeps/arm/arm-mcount.S: Always use unified syntax and + always add IT markup. + * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Likewise. + * sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add IT markup. + * sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise. + * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise. + * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Likewise. + * sysdeps/unix/sysv/linux/arm/syscall.S (syscall): Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET): Likewise. + * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Likewise. + + * ports/sysdeps/arm/__longjmp.S: Define NO_THUMB before <sysdep.h> + * sysdeps/arm/crti.S, sysdeps/arm/crtn.S: Likewise. + * sysdeps/arm/dl-trampoline.S: Likewise. + * sysdeps/arm/memcpy.S: Likewise. + * sysdeps/arm/memmove.S: Likewise. + * sysdeps/arm/memset.S: Likewise. + * sysdeps/arm/setjmp.S: Likewise. + * sysdeps/arm/strlen.S: Likewise. + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: Likewise. + * sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise. + +2013-02-27 Roland McGrath <roland@hack.frob.com> + + * sysdeps/arm/sysdep.h (CFI_SECTIONS): New macro. + (ENTRY): Use it. + * sysdeps/arm/dl-tlsdesc.S: Likewise. + * sysdeps/arm/dl-trampoline.S: Likewise. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (PSEUDO): Likewise. + +2013-02-18 Joseph Myers <joseph@codesourcery.com> + + [BZ #14920] + * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/arm/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + +2013-02-13 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/arm/frame.h (struct layout): Do not use __unbounded. + * sysdeps/unix/sysv/linux/arm/sigaction.c (__libc_sigaction): Do + not use __ptrvalue. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/arm/pread.c: Don't include + <bp-checks.h>. + (__libc_pread): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/arm/pread64.c: Don't include + <bp-checks.h>. + (__libc_pread64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/arm/pwrite.c: Don't include + <bp-checks.h>. + (__libc_pwrite): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/arm/pwrite64.c: Don't include + <bp-checks.h>. + (__libc_pwrite64): Don't use CHECK_N. + +2013-02-08 Carlos O'Donell <carlos@redhat.com> + + [BZ #15006] + * sysdeps/unix/sysv/linux/arm/dl-cache.h + [__ARM_PCS_VFP] (_dl_cache_check_flags): Allow plain FLAG_ELF_LIBC6. + [!__ARM_PCS_VFP] (_dl_cache_check_flags): Likewise. + * sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file): + Set FLAG_ARM_LIBSF for soft-float ABI otherwise just FLAG_ELF_LIBC6. + +2013-02-04 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/arm/truncate64.c: Do not include + <bp-checks.h>. + (truncate64): Do not use CHECK_STRING. + 2013-01-02 Joseph Myers <joseph@codesourcery.com> * All files with FSF copyright notices: Update copyright dates diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa index ef904c2671..0610c177d9 100644 --- a/ports/ChangeLog.hppa +++ b/ports/ChangeLog.hppa @@ -1,3 +1,16 @@ +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/hppa/bits/msq.h (MSG_COPY): Define. + * ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h (MAP_HUGE_MASK) + (MAP_HUGE_SHIFT): Define. + +2013-02-14 Carlos O'Donell <carlos@redhat.com> + + * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c + (lll_unlock_wake_cb): Remove. + * ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: + Remove prototype for lll_unlock_wake_cb. + 2013-01-10 Joseph Myers <joseph@codesourcery.com> * sysdeps/hppa/fpu/fpu_control.h (_FPU_GETCW): Use __extension__ diff --git a/ports/ChangeLog.ia64 b/ports/ChangeLog.ia64 index 4b76b4f6bf..50b5604ec1 100644 --- a/ports/ChangeLog.ia64 +++ b/ports/ChangeLog.ia64 @@ -1,3 +1,90 @@ +2013-03-12 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/unix/sysv/linux/ia64/sysdep.h (INTERNAL_SYSCALL_DECL): Add + __attribute__ ((unused)) to err decl. + (INTERNAL_SYSCALL_ERROR_P): Add (void)val dummy reference. + +2013-03-12 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/ia64/fpu/libm_error.c (STATIC): Delete redundant definition. + (_DECL_NUM, DECL_FLOAT, DECL_DOUBLE, DECL_LONG_DOUBLE): New defines. + (float_inf): Change definition to use DECL_FLOAT. + (float_huge, float_zero, float_neg_inf, float_neg_huge, + float_neg_zero): Likewise. + (double_inf): Change definition to use DECL_DOUBLE. + (double_huge, double_zero, double_neg_inf, double_neg_huge, + double_neg_zero): Likewise. + (long_double_inf): Change definition to use DECL_LONG_DOUBLE. + (long_double_huge, long_double_zero, long_double_neg_inf, + long_double_neg_huge, long_double_neg_zero): Likewise. + (RETVAL_HUGE_VALL): Change from casting a pointer to using the num + field of the union. + (RETVAL_NEG_HUGE_VALL, RETVAL_HUGEL, RETVAL_NEG_HUGEL, + RETVAL_HUGE_VALL, RETVAL_NEG_HUGE_VALL, RETVAL_HUGEL, + RETVAL_NEG_HUGEL, RETVAL_HUGE_VALD, RETVAL_NEG_HUGE_VALD, + RETVAL_HUGED, RETVAL_NEG_HUGED, RETVAL_HUGE_VALF, + RETVAL_NEG_HUGE_VALF, RETVAL_HUGEF, RETVAL_NEG_HUGEF, + ZEROL_VALUE, ZEROD_VALUE, ZEROF_VALUE, RETVAL_ZEROL, + RETVAL_ZEROD, RETVAL_ZEROF, RETVAL_NEG_ZEROL, RETVAL_NEG_ZEROD, + RETVAL_NEG_ZEROF): Likewise. + +2013-03-12 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/ia64/dl-fptr.h (ELF_PTR_TO_FDESC): New definition. + * sysdeps/ia64/dl-machine.h (elf_machine_runtime_setup): Change + struct fdesc * casts to use new ELF_PTR_TO_FDESC helper. + * sysdeps/ia64/entry.h: Include link.h and dl-fptr.h. + (ENTRY_POINT): Change cast to use new ELF_PTR_TO_FDESC helper. + * sysdeps/unix/sysv/linux/ia64/makecontext.c: Include link.h and + dl-fptr.h. + (struct fdesc): Remove structure, now redundant. + (makecontext): Change casts to use new ELF_PTR_TO_FDESC helper. + +2013-03-11 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + +2013-03-10 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Change + type of rbs to unsigned. Change stack_start cast to unsigned. + +2013-03-10 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h: + Change multiple inclusion guard to _LINUX_IA64_DL_SYSDEP_H. + Use #include_next. + (RTLD_PRIVATE_ERRNO): Remove definition, now redundant. + (NEED_DL_SYSINFO, _dl_discover_osversion, + HAVE_DL_DISCOVER_OSVERSION): Likewise. + +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/ia64/bits/msq.h (MSG_COPY): Define. + (MSG_EXCEPT): Make conditional on __USE_GNU. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/ia64/sigaction.c: Do not include + <bp-checks.h>. + (__libc_sigaction): Do not use CHECK_1_NULL_OK. + +2013-02-04 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/ia64/memchr.S [!__BOUNDED_POINTERS__] (__ubp_memchr): + Remove alias. + * sysdeps/unix/sysv/linux/ia64/umount.c: Do not include + <bp-checks.h>. + (umount): Do not use CHECK_STRING. + 2013-01-31 Joseph Myers <joseph@codesourcery.com> [BZ #13550] diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k index 688cce431a..5e4fc6c468 100644 --- a/ports/ChangeLog.m68k +++ b/ports/ChangeLog.m68k @@ -1,3 +1,36 @@ +2013-03-11 Andreas Schwab <schwab@suse.de> + + [BZ #15234] + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist + (GLIBC_2.4): Remove pthread_atfork. + +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: + Likewise. + +2013-02-08 Andreas Schwab <schwab@linux-m68k.org> + + * sysdeps/unix/sysv/linux/m68k/kernel-features.h + (__ASSUME_O_CLOEXEC): Define for 2.6.23 or later. + (__ASSUME_SOCK_CLOEXEC, __ASSUME_IN_NONBLOCK, __ASSUME_PIPE2) + (__ASSUME_EVENTFD2, __ASSUME_SIGNALFD4, __ASSUME_DUP3): Define for + 2.6.27 or later. + (__ASSUME_ACCEPT4): Define for 2.6.28 or later. + +2013-02-04 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/m68k/memchr.S [!__BOUNDED_POINTERS__] (__ubp_memchr): + Remove alias. + 2013-01-20 Andreas Schwab <schwab@linux-m68k.org> * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips index 49a3938314..539cacf19d 100644 --- a/ports/ChangeLog.mips +++ b/ports/ChangeLog.mips @@ -1,3 +1,322 @@ +2013-03-20 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/unix/sysv/linux/mips/configure.in (default-abi): Set + using LIBC_CONFIG_VAR. + * sysdeps/unix/sysv/linux/mips/configure: Regenerated. + * sysdeps/unix/sysv/linux/mips/Makefile: Do not include + default-abi.make. + +2013-03-15 Thomas Schwinge <thomas@codesourcery.com> + + * sysdeps/unix/sysv/linux/mips/bits/mman.h [__USE_MISC] + (MAP_ANONYMOUS): Don't define. + +2013-03-06 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + (__MAP_ANONYMOUS): Define. + + * sysdeps/unix/sysv/linux/mips/bits/msq.h (MSG_COPY): Define. + +2013-02-27 Chung-Lin Tang <cltang@codesourcery.com> + Maciej W. Rozycki <macro@codesourcery.com> + Maxim Kuvyrkov <maxim@codesourcery.com> + + * sysdeps/mips/abort-instr.h (ABORT_INSTRUCTION) [__mips16]: + New macro. + * sysdeps/mips/dl-machine.h (elf_machine_load_address): Add + MIPS16 version of assembly code. + (RTLD_START) [__mips16]: New macro. + * sysdeps/mips/fpu_control.h (__mips_fpu_getcw): New prototype. + (__mips_fpu_setcw): Likewise. + (_FPU_GETCW) [__mips16]: New macro. + (_FPU_SETCW) [__mips16]: Likewise. + * sysdeps/mips/machine-gmon.h (MCOUNT): Add `.set nomips16'. + * sysdeps/mips/tls-macros.h (LOAD_GP) [__mips16]: New macro. + (TLS_GD, TLS_LD, TLS_IE, TLS_LE) [__mips16]: Likewise. + * sysdeps/mips/bits/atomic.h: Also use __atomic_* builtins with + GCC 4.7 in MIPS16 code. + (atomic_compare_and_exchange_val_acq) [__mips16]: New macro. + (atomic_compare_and_exchange_bool_acq) [__mips16]: Likewise. + (atomic_exchange_acq) [__mips16]: Likewise. + (atomic_exchange_and_add) [__mips16]: Likewise. + (atomic_bit_test_set) [__mips16]: Likewise. + (atomic_and, atomic_and_val) [__mips16]: Likewise. + (atomic_or, atomic_or_val) [__mips16]: Likewise. + (atomic_full_barrier) [__mips16]: Likewise. + * sysdeps/mips/nptl/tls.h (READ_THREAD_POINTER) [__mips16]: + Likewise. + * sysdeps/mips/sys/tas.h (_test_and_set): Add `__nomips16__' + attribute. + * sysdeps/unix/mips/sysdep.h (PSEUDO_NOERRNO): Add + `.set nomips16'. + (PSEUDO_ERRVAL): Likewise. + * sysdeps/unix/mips/mips32/sysdep.h (PSEUDO): Likewise. + * sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Likewise. + * sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (INTERNAL_SYSCALL, INTERNAL_SYSCALL_NCS) [__mips16]: New macros. + (INTERNAL_SYSCALL_MIPS16) [__mips16]: Likewise. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h: + New file. + * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (PSEUDO): + Add `.set nomips16'. + * sysdeps/mips/bsd-_setjmp.S (_setjmp): Likewise. + * sysdeps/mips/bsd-setjmp.S (setjmp): Likewise. + * sysdeps/mips/memset.S (memset): Likewise. + * sysdeps/mips/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/mips/start.S (ENTRY_POINT) [__mips16]: New function. + * sysdeps/mips/mips32/crti.S: Add `.set nomips16'. + * sysdeps/mips/mips32/crtn.S: Likewise. + * sysdeps/mips/mips64/n32/crti.S: Likewise. + * sysdeps/mips/mips64/n32/crtn.S: Likewise. + * sysdeps/mips/mips64/n64/crti.S: Likewise. + * sysdeps/mips/mips64/n64/crtn.S: Likewise. + * sysdeps/unix/mips/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. + * sysdeps/unix/sysv/linux/mips/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/mips/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/mips/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/mips/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/mips/vfork.S: Likewise. + * sysdeps/mips/__longjmp.c (__longjmp): Rename function to... + (____longjmp): ... this. Make static and add `nomips16' + attribute. + (__longjmp): New alias. + * sysdeps/mips/dl-trampoline.c (_dl_runtime_resolve) [__mips16]: + New function. + (_dl_runtime_pltresolve): Likewise. + * sysdeps/mips/setjmp_aux.c (__sigsetjmp_aux): Add `nomips16' + attribute. + * sysdeps/mips/fpu/e_sqrt.c (__ieee754_sqrt): Likewise. + * sysdeps/mips/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise. + * sysdeps/unix/sysv/linux/mips/brk.c (__brk): Rewrite in terms + of INTERNAL_SYSCALL. + * sysdeps/mips/mips32/fpu/fpu_control.c: New file. + * sysdeps/mips/mips32/mips16/add_n.c: New file. + * sysdeps/mips/mips32/mips16/addmul_1.c: New file. + * sysdeps/mips/mips32/mips16/lshift.c: New file. + * sysdeps/mips/mips32/mips16/mul_1.c: New file. + * sysdeps/mips/mips32/mips16/rshift.c: New file. + * sysdeps/mips/mips32/mips16/sub_n.c: New file. + * sysdeps/mips/mips32/mips16/submul_1.c: New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall5.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall6.c: + New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall7.c: + New file. + * sysdeps/mips/mips32/fpu/Versions: New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/Versions: New file. + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: New + file. + * sysdeps/mips/mips32/mips16/fpu/Makefile: New file. + * sysdeps/unix/sysv/linux/mips/mips32/mips16/Makefile: New file. + * sysdeps/mips/preconfigure: Handle o32 MIPS16 compilation. + +2013-02-20 Thomas Schwinge <thomas@codesourcery.com> + + * sysdeps/mips/bits/nan.h [!__GNUC__] (__nan_union): Change + __attribute__ ((unused)) to __attribute__ ((__unused__)). + + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Sort + properly. + + * sysdeps/mips/bits/nan.h [!__GNUC__] (__nan_union): Change + __attribute_used__ to __attribute__ ((unused)). + + * sysdeps/mips/bits/nan.h [!__GNUC__] (__nan_union): Add + __attribute_used__. + + * sysdeps/mips/bits/nan.h: Align to generic IEEE 754 file. + +2013-02-19 Joseph Myers <joseph@codesourcery.com> + + [BZ #14920] + * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Add + __cxa_thread_atexit_impl. + * sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist: + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist: + Likewise. + +2013-02-13 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c (__fxstat64): Do + not use __ptrvalue. + * sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c (__fxstatat64): + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c (__lxstat64): + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/xstat64.c (__xstat64): + Likewise. + * sysdeps/unix/sysv/linux/mips/sigaction.c (__libc_sigaction): + Likewise. + +2013-02-11 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/mips/include/sys/asm.h: New file. + * sysdeps/mips/mips64/bsd-_setjmp.S (_setjmp): Use SETUP_GP64_REG + and RESTORE_GP64_REG. + * sysdeps/mips/mips64/bsd-setjmp.S (setjmp): Likewise. + * sysdeps/mips/mips64/setjmp.S (__sigsetjmp): Likewise. + * sysdeps/mips/sys/asm.h (__mips_cfi_startproc): Define to empty. + (__mips_cfi_endproc): Likewise. + (LEAF): Use __mips_cfi_startproc. + (NESTED): Likewise. + (END): Use __mips_cfi_endproc. + (EXPORT): Use __mips_cfi_startproc. + * sysdeps/unix/mips/mips32/sysdep.h (PSEUDO): Add CFI information + for error-handling code in both definitions. + * sysdeps/unix/mips/mips64/n32/sysdep.h (PSEUDO): Likewise. + * sysdeps/unix/mips/mips64/n64/sysdep.h (PSEUDO): Likewise. + * sysdeps/unix/mips/sysdep.h (ENTRY): Use cfi_startproc. + (END): Use cfi_endproc. + (PSEUDO_END): Likewise. + (PSEUDO_END_NOERRNO): Likewise. + (PSEUDO_END_ERRVAL): Likewise. + * sysdeps/unix/sysv/linux/mips/clone.S (__clone): Add CFI + information. Use SETUP_GP64_STACK and RESTORE_GP64_STACK. + * sysdeps/unix/sysv/linux/mips/getcontext.S (__getcontext): + Likewise. + * sysdeps/unix/sysv/linux/mips/makecontext.S (__makecontext): + Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use + SETUP_GP64_REG and RESTORE_GP64_REG. + * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h + [(!NOT_IN_libc || IS_IN_libpthread || IS_IN_librt) && __PIC__] + (PSEUDO): Use cfi_endproc before ENTRY. + * sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Add CFI + information. Use SETUP_GP64_REG and RESTORE_GP64_REG. + * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h [(!NOT_IN_libc + || IS_IN_libpthread || IS_IN_librt) && __PIC__] (PSEUDO): Use + cfi_endproc before ENTRY. + * sysdeps/unix/sysv/linux/mips/setcontext.S (__setcontext): Add + CFI information. Use SETUP_GP64_STACK and RESTORE_GP64_STACK. + * sysdeps/unix/sysv/linux/mips/swapcontext.S (__swapcontext): + Likewise. + * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Add CFI + information. Use SETUP_GP64_REG and RESTORE_GP64_REG. + +2013-02-08 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c: Don't include + <bp-checks.h>. + * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. + (__libc_pread): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/mips/pread64.c: Don't include + <bp-checks.h>. + (__libc_pread64): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/mips/pwrite.c: Don't include + <bp-checks.h>. + (__libc_pwrite): Don't use CHECK_N. + * sysdeps/unix/sysv/linux/mips/pwrite64.c: Don't include + <bp-checks.h>. + (__libc_pwrite64): Don't use CHECK_N. + + * sysdeps/mips/add_n.S (__mpn_add_n): Use END. + * sysdeps/mips/bsd-_setjmp.S (_setjmp): Likewise. + * sysdeps/mips/bsd-setjmp.S (setjmp): Likewise. + * sysdeps/mips/mips64/add_n.S (__mpn_add_n): Use ENTRY and END. + * sysdeps/mips/mips64/addmul_1.S (__mpn_addmul_1): Likewise. + * sysdeps/mips/mips64/bsd-_setjmp.S (_setjmp): Use END. + * sysdeps/mips/mips64/bsd-setjmp.S (setjmp): Likewise. + * sysdeps/mips/mips64/lshift.S (__mpn_lshift): Use ENTRY and END. + * sysdeps/mips/mips64/mul_1.S (__mpn_mul_1): Likewise. + * sysdeps/mips/mips64/rshift.S (__mpn_rshift): Likewise. + * sysdeps/mips/mips64/setjmp.S (__sigsetjmp): Use END. + * sysdeps/mips/mips64/sub_n.S (__mpn_sub_n): Use ENTRY and END. + * sysdeps/mips/mips64/submul_1.S (__mpn_submul_1): Likewise. + * sysdeps/mips/setjmp.S (__sigsetjmp): Use END. + + [BZ #13550] + * sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: Do not include + <bp-checks.h>. + (__msgctl): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/mips/mips64/shmctl.c: Do not include + <bp-checks.h>. + (__shmctl): Do not use CHECK_1. + * sysdeps/unix/sysv/linux/mips/ustat.c: Do not include + <bp-checks.h>. + (ustat): Do not use CHECK_1. + +2013-02-05 Maciej W. Rozycki <macro@codesourcery.com> + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Add a missing + space in asm register specifiers throughout. + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise. + + [BZ #15054] + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (MOVE32): + New macro. + (INTERNAL_SYSCALL_NCS): Use it. Rewrite to respect the syscall + restart convention. + (INTERNAL_SYSCALL): Rewrite to respect the syscall restart + convention. + (internal_syscall0, internal_syscall1): Likewise. + (internal_syscall2, internal_syscall3): Likewise. + (internal_syscall4, internal_syscall5): Likewise. + (internal_syscall6, internal_syscall7): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (MOVE32): + New macro. + (INTERNAL_SYSCALL_NCS): Use it. Rewrite to respect the syscall + restart convention. + (INTERNAL_SYSCALL): Rewrite to respect the syscall restart + convention. + (internal_syscall0, internal_syscall1): Likewise. + (internal_syscall2, internal_syscall3): Likewise. + (internal_syscall4, internal_syscall5): Likewise. + (internal_syscall6): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (MOVE32): + New macro. + (INTERNAL_SYSCALL_NCS): Use it. Rewrite to respect the syscall + restart convention. + (INTERNAL_SYSCALL): Rewrite to respect the syscall restart + convention. + (internal_syscall0, internal_syscall1): Likewise. + (internal_syscall2, internal_syscall3): Likewise. + (internal_syscall4, internal_syscall5): Likewise. + (internal_syscall6): Likewise. + +2013-02-04 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/unix/sysv/linux/mips/mips32/truncate64.c: Do not include + <bp-checks.h>. + (truncate64): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Do not include + <bp-checks.h>. + (__fxstatat64): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c: Do not include + <bp-checks.h>. + (__lxstat64): Do not use CHECK_STRING. + * sysdeps/unix/sysv/linux/mips/mips64/xstat64.c: Do not include + <bp-checks.h>. + (__xstat64): Do not use CHECK_STRING. + 2013-01-31 Joseph Myers <joseph@codesourcery.com> [BZ #13550] diff --git a/ports/ChangeLog.powerpc b/ports/ChangeLog.powerpc index 2746f37669..2ba8e3754f 100644 --- a/ports/ChangeLog.powerpc +++ b/ports/ChangeLog.powerpc @@ -1,3 +1,54 @@ +2013-02-28 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/powerpc/powerpc32/405/memcmp.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (memcmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/405/memcpy.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (memcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/405/memset.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (memset): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/405/strcmp.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (strcmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/405/strcpy.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (strcpy): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/405/strlen.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (strlen): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/405/strncmp.S: Don't include + <bp-sym.h> and <bp-asm.h>. + (strncmp): Don't use BP_SYM. + * sysdeps/powerpc/powerpc32/476/memset.S: Don't include <bp-sym.h> + and <bp-asm.h>. + (memset): Don't use BP_SYM. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist: + Add __cxa_thread_atexit_impl. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist: + Likewise. + +2013-02-14 Joseph Myers <joseph@codesourcery.com> + + [BZ #13550] + * sysdeps/powerpc/nofpu/fegetenv.c: Do not include <bp-sym.h>. + (fegetenv): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/nofpu/fesetenv.c: Do not include <bp-sym.h>. + (fesetenv): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/nofpu/feupdateenv.c: Do not include <bp-sym.h>. + (feupdateenv): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/nofpu/fgetexcptflg.c: Do not include <bp-sym.h>. + (fegetexceptflag): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/nofpu/fraiseexcpt.c: Do not include <bp-sym.h>. + (feraiseexcept): Do not use BP_SYM in versioned symbols. + * sysdeps/powerpc/nofpu/fsetexcptflg.c: Do not include <bp-sym.h>. + (fesetexceptflag): Do not use BP_SYM in versioned symbols. + 2013-01-02 Joseph Myers <joseph@codesourcery.com> * All files with FSF copyright notices: Update copyright dates diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile index a5eaec3a9b..f63bde486b 100644 --- a/ports/ChangeLog.tile +++ b/ports/ChangeLog.tile @@ -1,3 +1,34 @@ +2013-03-11 Andreas Schwab <schwab@suse.de> + + [BZ #15234] + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist + (GLIBC_2.12): Remove pthread_atfork. + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist + (GLIBC_2.12): Likewise. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist + (GLIBC_2.12): Likewise. + +2013-03-05 Andreas Jaeger <aj@suse.de> + + * sysdeps/unix/sysv/linux/tile/bits/mman.h: Remove all defines + provided by bits/mman-linux.h and include <bits/mman-linux.h>. + +2013-02-28 Chris Metcalf <cmetcalf@tilera.com> + + * sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + +2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com> + + * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist: + Add __cxa_thread_atexit_impl. + * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist: + Likewise. + 2013-01-10 Chris Metcalf <cmetcalf@tilera.com> * sysdeps/unix/sysv/linux/tile/tilegx/ldd-rewrite.sed: New file. diff --git a/ports/sysdeps/aarch64/libm-test-ulps b/ports/sysdeps/aarch64/libm-test-ulps index eda0e77f88..aebc46f469 100644 --- a/ports/sysdeps/aarch64/libm-test-ulps +++ b/ports/sysdeps/aarch64/libm-test-ulps @@ -146,6 +146,8 @@ ldouble: 2 Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -182,6 +184,8 @@ ldouble: 2 Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -194,6 +198,74 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (-0.5 + +0 i) == 2.094395102393195492308428922186335256131 - 0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.5 - 0 i) == 2.094395102393195492308428922186335256131 + +0 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-16385 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-16385 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1p500 + 1.0 i) == 3.141592653589793238462643383279502884197 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1p500 - 1.0 i) == 3.141592653589793238462643383279502884197 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1p5000 + 1.0 i) == 3.141592653589793238462643383279502884197 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1p5000 - 1.0 i) == 3.141592653589793238462643383279502884197 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-1.0 + 0x1p50 i) == 1.570796326794897507409741391764983781004 - 3.535050620855721078027883819436759661753e1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1p500 i) == 1.570796326794896619231321691639751442099 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1p5000 i) == 1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-1.0 - 0x1p50 i) == 1.570796326794897507409741391764983781004 + 3.535050620855721078027883819436759661753e1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1p500 i) == 1.570796326794896619231321691639751442099 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1p5000 i) == 1.570796326794896619231321691639751442099 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -201,6 +273,11 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 idouble: 1 @@ -214,6 +291,65 @@ ldouble: 1 Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442097 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442097 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-16385 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-16385 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp16383 + 0x1.fp16383 i) == 7.853981633974483096156608458198757210493e-1 - 1.135753137836666928715489992987020363057e4 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1p500 + 1.0 i) == 3.054936363499604682051979393213617699789e-151 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1p500 - 1.0 i) == 3.054936363499604682051979393213617699789e-151 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1p5000 + 1.0 i) == 7.079811261048172892385615158694057552948e-1506 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1p5000 - 1.0 i) == 7.079811261048172892385615158694057552948e-1506 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 + 0x1p500 i) == 1.570796326794896619231321691639751442099 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 + 0x1p5000 i) == 1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 - 0x1p500 i) == 1.570796326794896619231321691639751442099 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 - 0x1p5000 i) == 1.570796326794896619231321691639751442099 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -332,6 +468,8 @@ ldouble: 2 Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -368,6 +506,8 @@ ldouble: 2 Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -380,6 +520,56 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i) == -2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i) == -2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i) == -1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i) == -1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-16385 + 1.5 i) == -4.516698239814521372306784062043266700598e-4933 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-16385 - 1.5 i) == -4.516698239814521372306784062043266700598e-4933 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1p500 + 1.0 i) == -1.570796326794896619231321691639751442099 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1p500 - 1.0 i) == -1.570796326794896619231321691639751442099 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1p5000 + 1.0 i) == -1.570796326794896619231321691639751442099 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1p5000 - 1.0 i) == -1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0x1p500 i) == -3.054936363499604682051979393213617699789e-151 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0x1p5000 i) == -7.079811261048172892385615158694057552948e-1506 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0x1p500 i) == -3.054936363499604682051979393213617699789e-151 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0x1p5000 i) == -7.079811261048172892385615158694057552948e-1506 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -395,6 +585,65 @@ ifloat: 1 Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i) == 2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i) == 2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i) == 1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i) == 1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-16385 + 1.5 i) == 4.516698239814521372306784062043266700598e-4933 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-16385 - 1.5 i) == 4.516698239814521372306784062043266700598e-4933 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 + 7.107906849659093345062145442726115449315e2 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 + 8.973081118419833726837456344608533993585e1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp16383 + 0x1.fp16383 i) == 7.853981633974483096156608458198757210493e-1 + 1.135753137836666928715489992987020363057e4 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1p500 + 1.0 i) == 1.570796326794896619231321691639751442099 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1p500 - 1.0 i) == 1.570796326794896619231321691639751442099 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1p5000 + 1.0 i) == 1.570796326794896619231321691639751442099 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1p5000 - 1.0 i) == 1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0x1p500 i) == 3.054936363499604682051979393213617699789e-151 + 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0x1p5000 i) == 7.079811261048172892385615158694057552948e-1506 + 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0x1p500 i) == 3.054936363499604682051979393213617699789e-151 - 3.472667374605326000180332928505464606058e2 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0x1p5000 i) == 7.079811261048172892385615158694057552948e-1506 - 3.466429049980286492395577839412341016946e3 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -432,6 +681,18 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0x1p500 + 1.0 i) == -3.472667374605326000180332928505464606058e2 + 3.054936363499604682051979393213617699789e-151 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p500 - 1.0 i) == -3.472667374605326000180332928505464606058e2 - 3.054936363499604682051979393213617699789e-151 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p5000 + 1.0 i) == -3.466429049980286492395577839412341016946e3 + 7.079811261048172892385615158694057552948e-1506 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p5000 - 1.0 i) == -3.466429049980286492395577839412341016946e3 - 7.079811261048172892385615158694057552948e-1506 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": double: 2 float: 1 @@ -439,6 +700,12 @@ idouble: 2 ifloat: 1 ildouble: 3 ldouble: 3 +Test "Real part of: casinh (-1.0 + 0x1p500 i) == -3.472667374605326000180332928505464606058e2 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1p5000 i) == -3.466429049980286492395577839412341016946e3 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": double: 2 float: 1 @@ -446,6 +713,12 @@ idouble: 2 ifloat: 1 ildouble: 3 ldouble: 3 +Test "Real part of: casinh (-1.0 - 0x1p500 i) == -3.472667374605326000180332928505464606058e2 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1p5000 i) == -3.466429049980286492395577839412341016946e3 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": double: 2 float: 1 @@ -453,6 +726,19 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.5 + 0x1.fp-1025 i) == -1.194763217287109304111930828519090523536 + 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 + 0x1.fp-129 i) == -1.194763217287109304111930828519090523536 + 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 + 0x1.fp-16385 i) == -1.194763217287109304111930828519090523536 + 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": double: 2 float: 1 @@ -460,6 +746,19 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.5 - 0x1.fp-1025 i) == -1.194763217287109304111930828519090523536 - 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 - 0x1.fp-129 i) == -1.194763217287109304111930828519090523536 - 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 - 0x1.fp-16385 i) == -1.194763217287109304111930828519090523536 - 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 @@ -477,9 +776,13 @@ ldouble: 2 Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -492,6 +795,27 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i) == 7.107906849659093345062145442726115449315e2 + 7.853981633974483096156608458198757210493e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i) == 8.973081118419833726837456344608533993585e1 + 7.853981633974483096156608458198757210493e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (0x1.fp16383 + 0x1.fp16383 i) == 1.135753137836666928715489992987020363057e4 + 7.853981633974483096156608458198757210493e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p500 + 1.0 i) == 3.472667374605326000180332928505464606058e2 + 3.054936363499604682051979393213617699789e-151 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p500 - 1.0 i) == 3.472667374605326000180332928505464606058e2 - 3.054936363499604682051979393213617699789e-151 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p5000 + 1.0 i) == 3.466429049980286492395577839412341016946e3 + 7.079811261048172892385615158694057552948e-1506 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p5000 - 1.0 i) == 3.466429049980286492395577839412341016946e3 - 7.079811261048172892385615158694057552948e-1506 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": double: 1 float: 1 @@ -499,6 +823,12 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1p500 i) == 3.472667374605326000180332928505464606058e2 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1p5000 i) == 3.466429049980286492395577839412341016946e3 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": double: 1 float: 1 @@ -506,16 +836,48 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1p500 i) == 3.472667374605326000180332928505464606058e2 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1p5000 i) == 3.466429049980286492395577839412341016946e3 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.5 + 0x1.fp-1025 i) == 1.194763217287109304111930828519090523536 + 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 + 0x1.fp-129 i) == 1.194763217287109304111930828519090523536 + 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 + 0x1.fp-16385 i) == 1.194763217287109304111930828519090523536 + 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.5 - 0x1.fp-1025 i) == 1.194763217287109304111930828519090523536 - 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 - 0x1.fp-129 i) == 1.194763217287109304111930828519090523536 - 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 - 0x1.fp-16385 i) == 1.194763217287109304111930828519090523536 - 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -3090,7 +3452,9 @@ ifloat: 1 Function: Real part of "cacos": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 diff --git a/ports/sysdeps/alpha/memchr.c b/ports/sysdeps/alpha/memchr.c index 70416d5575..67f718a50e 100644 --- a/ports/sysdeps/alpha/memchr.c +++ b/ports/sysdeps/alpha/memchr.c @@ -16,7 +16,6 @@ <http://www.gnu.org/licenses/>. */ #include <string.h> -#include <bp-sym.h> typedef unsigned long word; @@ -170,6 +169,6 @@ __memchr (const void *s, int xc, size_t n) } #ifdef weak_alias -weak_alias (__memchr, BP_SYM (memchr)) +weak_alias (__memchr, memchr) #endif libc_hidden_builtin_def (memchr) diff --git a/ports/sysdeps/am33/dl-machine.h b/ports/sysdeps/am33/dl-machine.h index 2db27378db..924319d039 100644 --- a/ports/sysdeps/am33/dl-machine.h +++ b/ports/sysdeps/am33/dl-machine.h @@ -55,16 +55,14 @@ elf_machine_load_address (void) return off + gotaddr - gotval; } -#if !defined PROF && !__BOUNDED_POINTERS__ +#ifndef PROF /* We add a declaration of this function here so that in dl-runtime.c the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters in registers. We cannot use this scheme for profiling because the _mcount call destroys the passed register information. */ -/* GKM FIXME: Fix trampoline to pass bounds so we can do - without the `__unbounded' qualifier. */ -static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset) +static ElfW(Addr) fixup (struct link_map *l, ElfW(Word) reloc_offset) __attribute__ ((unused)); static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset, ElfW(Addr) retaddr) @@ -116,7 +114,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* This code is used in dl-runtime.c to call the `fixup' function and then redirect to the address it returns. */ -#if !defined PROF && !__BOUNDED_POINTERS__ +#ifndef PROF # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\ .text\n\ .globl _dl_runtime_resolve\n\ diff --git a/ports/sysdeps/am33/elf/start.S b/ports/sysdeps/am33/elf/start.S index 0ca71f14a4..e89f9db15c 100644 --- a/ports/sysdeps/am33/elf/start.S +++ b/ports/sysdeps/am33/elf/start.S @@ -37,8 +37,6 @@ NULL */ -#include "bp-sym.h" - .text .globl _start .type _start,@function @@ -63,13 +61,13 @@ _start: mov 0,a3 mov (32,sp), d1 /* argc. */ - mov BP_SYM (main), d0 /* main. */ + mov main, d0 /* main. */ /* Call the user's main function, and exit with its value. But let the libc call main. */ - call BP_SYM (__libc_start_main),[],0 + call __libc_start_main,[],0 - call BP_SYM (abort),[],0 /* Crash if somehow `exit' does return. */ + call abort,[],0 /* Crash if somehow `exit' does return. */ /* Define a symbol for the first piece of initialized data. */ .data diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S index 5c04f36457..8de9fa1c7b 100644 --- a/ports/sysdeps/arm/__longjmp.S +++ b/ports/sysdeps/arm/__longjmp.S @@ -16,9 +16,9 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include <sysdep.h> -#define _SETJMP_H -#define _ASM #include <bits/setjmp.h> #include <rtld-global-offsets.h> #include <arm-features.h> @@ -31,11 +31,13 @@ ENTRY (__longjmp) moveq r0, #1 /* can't let setjmp() return zero! */ #ifdef CHECK_SP - ldr r4, [ip, #32] /* jmpbuf's sp */ + sfi_breg ip, \ + ldr r4, [\B, #32] /* jmpbuf's sp */ cfi_undefined (r4) CHECK_SP (r4) #endif - LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr}) + sfi_sp sfi_breg ip, \ + ldmia \B!, JMP_BUF_REGLIST cfi_restore (v1) cfi_restore (v2) cfi_restore (v3) @@ -79,9 +81,11 @@ ENTRY (__longjmp) /* Restore the VFP registers. */ /* Following instruction is vldmia ip!, {d8-d15}. */ - ldc p11, cr8, [r12], #64 + sfi_breg r12, \ + ldc p11, cr8, [\B], #64 /* Restore the floating-point status register. */ - ldr a3, [ip], #4 + sfi_breg ip, \ + ldr a3, [\B], #4 /* Following instruction is fmxr fpscr, a3. */ mcr p10, 7, a3, cr1, cr0, 0 .Lno_vfp: @@ -92,12 +96,18 @@ ENTRY (__longjmp) /* Restore the call-preserved iWMMXt registers. */ /* Following instructions are wldrd wr10, [ip], #8 (etc.) */ - ldcl p1, cr10, [r12], #8 - ldcl p1, cr11, [r12], #8 - ldcl p1, cr12, [r12], #8 - ldcl p1, cr13, [r12], #8 - ldcl p1, cr14, [r12], #8 - ldcl p1, cr15, [r12], #8 + sfi_breg r12, \ + ldcl p1, cr10, [\B], #8 + sfi_breg r12, \ + ldcl p1, cr11, [\B], #8 + sfi_breg r12, \ + ldcl p1, cr12, [\B], #8 + sfi_breg r12, \ + ldcl p1, cr13, [\B], #8 + sfi_breg r12, \ + ldcl p1, cr14, [\B], #8 + sfi_breg r12, \ + ldcl p1, cr15, [\B], #8 .Lno_iwmmxt: #endif @@ -105,12 +115,12 @@ ENTRY (__longjmp) #ifdef NEED_HWCAP # ifdef IS_IN_rtld -1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS .Lrtld_local_ro: .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) # else # ifdef PIC -1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS .Lrtld_global_ro: .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) # else diff --git a/ports/sysdeps/arm/add_n.S b/ports/sysdeps/arm/add_n.S new file mode 100644 index 0000000000..c6b0147972 --- /dev/null +++ b/ports/sysdeps/arm/add_n.S @@ -0,0 +1,99 @@ +/* mpn_add_n -- add (or subtract) bignums. + Copyright (C) 2013 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 <arm-features.h> + + .syntax unified + .text + +#ifdef USE_AS_SUB_N +# define INITC cmp r0, r0 +# define OPC sbcs +# define RETC sbc r0, r0, r0; neg r0, r0 +# define FUNC __mpn_sub_n +#else +# define INITC cmn r0, #0 +# define OPC adcs +# define RETC mov r0, #0; adc r0, r0, r0 +# define FUNC __mpn_add_n +#endif + +/* mp_limb_t mpn_add_n(res_ptr, src1_ptr, src2_ptr, size) */ + +ENTRY (FUNC) + push { r4, r5, r6, r7, r8, r10, lr } + cfi_adjust_cfa_offset (28) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + cfi_rel_offset (r8, 16) + cfi_rel_offset (r10, 20) + cfi_rel_offset (lr, 24) + + INITC /* initialize carry flag */ + tst r3, #1 /* count & 1 == 1? */ + add lr, r1, r3, lsl #2 /* compute end src1 */ + beq 1f + + sfi_breg r1, \ + ldr r4, [\B], #4 /* do one to make count even */ + sfi_breg r2, \ + ldr r5, [\B], #4 + OPC r4, r4, r5 + teq r1, lr /* end of count? (preserve carry) */ + sfi_breg r0, \ + str r4, [\B], #4 + beq 9f +1: + tst r3, #2 /* count & 2 == 2? */ + beq 2f + sfi_breg r1, \ + ldm \B!, { r4, r5 } /* do two to make count 0 mod 4 */ + sfi_breg r2, \ + ldm \B!, { r6, r7 } + OPC r4, r4, r6 + OPC r5, r5, r7 + teq r1, lr /* end of count? */ + sfi_breg r0, \ + stm \B!, { r4, r5 } + beq 9f +2: + sfi_breg r1, \ + ldm \B!, { r3, r5, r7, r10 } /* do four each loop */ + sfi_breg r2, \ + ldm \B!, { r4, r6, r8, ip } + OPC r3, r3, r4 + OPC r5, r5, r6 + OPC r7, r7, r8 + OPC r10, r10, ip + teq r1, lr + sfi_breg r0, \ + stm \B!, { r3, r5, r7, r10 } + bne 2b + +9: + RETC /* copy carry out */ +#ifndef ARM_ALWAYS_BX + pop { r4, r5, r6, r7, r8, r10, pc } +#else + pop { r4, r5, r6, r7, r8, r10, lr } + bx lr +#endif +END (FUNC) diff --git a/ports/sysdeps/arm/addmul_1.S b/ports/sysdeps/arm/addmul_1.S new file mode 100644 index 0000000000..d204c887e3 --- /dev/null +++ b/ports/sysdeps/arm/addmul_1.S @@ -0,0 +1,73 @@ +/* mpn_addmul_1 -- multiply and accumulate bignums. + Copyright (C) 2013 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> + + .syntax unified + .text + +@ cycles/limb +@ StrongArm ? +@ Cortex-A8 ? +@ Cortex-A9 ? +@ Cortex-A15 4 + +/* mp_limb_t mpn_addmul_1(res_ptr, src1_ptr, size, s2_limb) */ + +ENTRY (__mpn_addmul_1) + push { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + + sfi_breg r1, \ + ldr r6, [\B], #4 + sfi_breg r0, \ + ldr r5, [\B] + mov r4, #0 /* init carry in */ + b 1f +0: + sfi_breg r1, \ + ldr r6, [\B], #4 /* load next ul */ + adds r7, r4, r5 /* (out, c) = cl + lpl */ + sfi_breg r0, \ + ldr r5, [\B, #4] /* load next rl */ + adc r4, ip, #0 /* cl = hpl + c */ + sfi_breg r0, \ + str r7, [\B], #4 +1: + mov ip, #0 /* zero-extend rl */ + umlal r5, ip, r6, r3 /* (hpl, lpl) = ul * vl + rl */ + subs r2, r2, #1 + bne 0b + + adds r4, r4, r5 /* (out, c) = cl + llpl */ + sfi_breg r0, \ + str r4, [\B] + adc r0, ip, #0 /* return hpl + c */ + + pop { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + DO_RET (lr) +END (__mpn_addmul_1) diff --git a/ports/sysdeps/arm/arm-features.h b/ports/sysdeps/arm/arm-features.h index 31801cf408..336b6905af 100644 --- a/ports/sysdeps/arm/arm-features.h +++ b/ports/sysdeps/arm/arm-features.h @@ -36,4 +36,24 @@ at runtime (or that we never care about its state) and so need not be checked for. */ +/* A more-specific arm-features.h file may define ARM_ALWAYS_BX to indicate + that instructions using pc as a destination register must never be used, + so a "bx" (or "blx") instruction is always required. */ + +/* The log2 of the minimum alignment required for an address that + is the target of a computed branch (i.e. a "bx" instruction). + A more-specific arm-features.h file may define this to set a more + stringent requirement. + + Using this only makes sense for code in ARM mode (where instructions + always have a fixed size of four bytes), or for Thumb-mode code that is + specifically aligning all the related branch targets to match (since + Thumb instructions might be either two or four bytes). */ +#ifndef ARM_BX_ALIGN_LOG2 +# define ARM_BX_ALIGN_LOG2 2 +#endif + +/* An OS-specific arm-features.h file may define ARM_NO_INDEX_REGISTER to + indicate that the two-register addressing modes must never be used. */ + #endif /* arm-features.h */ diff --git a/ports/sysdeps/arm/arm-mcount.S b/ports/sysdeps/arm/arm-mcount.S index 6c24271396..f61e978f5e 100644 --- a/ports/sysdeps/arm/arm-mcount.S +++ b/ports/sysdeps/arm/arm-mcount.S @@ -24,8 +24,8 @@ #ifdef __thumb2__ .thumb - .syntax unified #endif + .syntax unified /* Use an assembly stub with a special ABI. The calling lr has been @@ -69,7 +69,7 @@ END(__gnu_mcount_nc) code be compiled with APCS frame pointers. */ ENTRY(_mcount) - stmdb sp!, {r0, r1, r2, r3, fp, lr} + push {r0, r1, r2, r3, fp, lr} cfi_adjust_cfa_offset (24) cfi_rel_offset (r0, 0) cfi_rel_offset (r1, 4) @@ -77,20 +77,14 @@ ENTRY(_mcount) cfi_rel_offset (r3, 12) cfi_rel_offset (fp, 16) cfi_rel_offset (lr, 20) -#ifdef __thumb2__ movs r0, fp ittt ne - ldrne r0, [r0, #-4] -#else - movs fp, fp - ldrne r0, [fp, #-4] -#endif - movnes r1, lr + sfi_breg r0, \ + ldrne r0, [\B, #-4] + movsne r1, lr blne __mcount_internal -#ifdef __thumb2__ - ldmia sp!, {r0, r1, r2, r3, fp, pc} -#else - ldmia sp!, {r0, r1, r2, r3, fp, lr} +#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__) + pop {r0, r1, r2, r3, fp, lr} cfi_adjust_cfa_offset (-24) cfi_restore (r0) cfi_restore (r1) @@ -99,6 +93,8 @@ ENTRY(_mcount) cfi_restore (fp) cfi_restore (lr) bx lr +#else + pop {r0, r1, r2, r3, fp, pc} #endif END(_mcount) diff --git a/ports/sysdeps/arm/armv6/rawmemchr.S b/ports/sysdeps/arm/armv6/rawmemchr.S new file mode 100644 index 0000000000..b5e4a16f03 --- /dev/null +++ b/ports/sysdeps/arm/armv6/rawmemchr.S @@ -0,0 +1,109 @@ +/* rawmemchr -- find a byte within an unsized memory block. + Copyright (C) 2013 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> + + .syntax unified + .text + +ENTRY (__rawmemchr) + @ r0 = start of string + @ r1 = character to match + @ returns a pointer to the match, which must be present. + sfi_breg r0, \ + ldrb r2, [\B] @ load first byte asap + + @ To cater to long strings, we want to search through a few + @ characters until we reach an aligned pointer. To cater to + @ small strings, we don't want to start doing word operations + @ immediately. The compromise is a maximum of 16 bytes less + @ whatever is required to end with an aligned pointer. + @ r3 = number of characters to search in alignment loop + and r3, r0, #7 + uxtb r1, r1 + rsb r3, r3, #15 @ 16 - 1 peeled loop iteration + cmp r2, r1 + it eq + bxeq lr + + @ Loop until we find ... +1: sfi_breg r0, \ + ldrb r2, [\B, #1]! + subs r3, r3, #1 @ ... the alignment point + it ne + cmpne r2, r1 @ ... or C + bne 1b + + @ Disambiguate the exit possibilites above + cmp r2, r1 @ Found C + it eq + bxeq lr + add r0, r0, #1 + + @ So now we're aligned. + sfi_breg r0, \ + ldrd r2, r3, [\B], #8 + orr r1, r1, r1, lsl #8 @ Replicate C to all bytes +#ifdef ARCH_HAS_T2 + movw ip, #0x0101 + sfi_pld r0, #64 + movt ip, #0x0101 +#else + ldr ip, =0x01010101 + sfi_pld r0, #64 +#endif + orr r1, r1, r1, lsl #16 + + @ Loop searching for C, 8 bytes at a time. + @ Subtracting (unsigned saturating) from 1 means result of 1 for + @ any byte that was originally zero and 0 otherwise. Therefore + @ we consider the lsb of each byte the "found" bit. +2: eor r2, r2, r1 @ Convert C bytes to 0 + eor r3, r3, r1 + uqsub8 r2, ip, r2 @ Find C + uqsub8 r3, ip, r3 + sfi_pld r0, #128 + orrs r3, r3, r2 @ Test both words for found + it eq + sfi_breg r0, \ + ldrdeq r2, r3, [\B], #8 + beq 2b + + @ Found something. Disambiguate between first and second words. + @ Adjust r0 to point to the word containing the match. + @ Adjust r2 to the found bits for the word containing the match. + cmp r2, #0 + sub r0, r0, #4 + ite eq + moveq r2, r3 + subne r0, r0, #4 + + @ Find the bit-offset of the match within the word. Note that the + @ bit result from clz will be 7 higher than "true", but we'll + @ immediately discard those bits converting to a byte offset. +#ifdef __ARMEL__ + rev r2, r2 @ For LE, count from the little end +#endif + clz r2, r2 + add r0, r0, r2, lsr #3 @ Adjust the pointer to the found byte + bx lr + +END (__rawmemchr) + +weak_alias (__rawmemchr, rawmemchr) +libc_hidden_def (__rawmemchr) diff --git a/ports/sysdeps/arm/armv6/stpcpy.S b/ports/sysdeps/arm/armv6/stpcpy.S new file mode 100644 index 0000000000..21a4f385be --- /dev/null +++ b/ports/sysdeps/arm/armv6/stpcpy.S @@ -0,0 +1 @@ +/* Defined in strcpy.S. */ diff --git a/ports/sysdeps/arm/armv6/strchr.S b/ports/sysdeps/arm/armv6/strchr.S new file mode 100644 index 0000000000..936c2be666 --- /dev/null +++ b/ports/sysdeps/arm/armv6/strchr.S @@ -0,0 +1,147 @@ +/* strchr -- find the first instance of C in a nul-terminated string. + Copyright (C) 2013 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> + + .syntax unified + .text + +ENTRY (strchr) + @ r0 = start of string + @ r1 = character to match + @ returns NULL for no match, or a pointer to the match + sfi_breg r0, \ + ldrb r2, [\B] @ load the first byte asap + uxtb r1, r1 + + @ To cater to long strings, we want to search through a few + @ characters until we reach an aligned pointer. To cater to + @ small strings, we don't want to start doing word operations + @ immediately. The compromise is a maximum of 16 bytes less + @ whatever is required to end with an aligned pointer. + @ r3 = number of characters to search in alignment loop + and r3, r0, #7 + rsb r3, r3, #15 @ 16 - 1 peeled loop iteration + cmp r2, r1 @ Found C? + it ne + cmpne r2, #0 @ Found EOS? + beq 99f + + @ Loop until we find ... +1: sfi_breg r0, \ + ldrb r2, [\B, #1]! + subs r3, r3, #1 @ ... the aligment point + it ne + cmpne r2, r1 @ ... or the character + it ne + cmpne r2, #0 @ ... or EOS + bne 1b + + @ Disambiguate the exit possibilites above + cmp r2, r1 @ Found the character + it ne + cmpne r2, #0 @ Found EOS + beq 99f + add r0, r0, #1 + + @ So now we're aligned. Now we actually need a stack frame. + push { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + + sfi_breg r0, \ + ldrd r2, r3, [\B], #8 + orr r1, r1, r1, lsl #8 @ Replicate C to all bytes +#ifdef ARCH_HAS_T2 + movw ip, #0x0101 + sfi_pld r0, #64 + movt ip, #0x0101 +#else + ldr ip, =0x01010101 + sfi_pld r0, #64 +#endif + orr r1, r1, r1, lsl #16 + + @ Loop searching for EOS or C, 8 bytes at a time. +2: + @ Subtracting (unsigned saturating) from 1 means result of 1 for + @ any byte that was originally zero and 0 otherwise. Therefore + @ we consider the lsb of each byte the "found" bit. + uqsub8 r4, ip, r2 @ Find EOS + eor r6, r2, r1 @ Convert C bytes to 0 + uqsub8 r5, ip, r3 + eor r7, r3, r1 + uqsub8 r6, ip, r6 @ Find C + sfi_pld r0, #128 @ Prefetch 2 lines ahead + uqsub8 r7, ip, r7 + orr r4, r4, r6 @ Combine found for EOS and C + orr r5, r5, r7 + orrs r6, r4, r5 @ Combine the two words + it eq + sfi_breg r0, \ + ldrdeq r2, r3, [\B], #8 + beq 2b + + @ Found something. Disambiguate between first and second words. + @ Adjust r0 to point to the word containing the match. + @ Adjust r2 to the contents of the word containing the match. + @ Adjust r4 to the found bits for the word containing the match. + cmp r4, #0 + sub r0, r0, #4 + itte eq + moveq r4, r5 + moveq r2, r3 + subne r0, r0, #4 + + @ Find the bit-offset of the match within the word. +#if defined(__ARMEL__) + @ For LE, swap the found word so clz searches from the little end. + rev r4, r4 +#else + @ For BE, byte swap the word to make it easier to extract the byte. + rev r2, r2 +#endif + @ We're counting 0x01 (not 0x80), so the bit offset is 7 too high. + clz r3, r4 + sub r3, r3, #7 + lsr r2, r2, r3 @ Shift down found byte + uxtb r1, r1 @ Undo replication of C + uxtb r2, r2 @ Extract found byte + add r0, r0, r3, lsr #3 @ Adjust the pointer to the found byte + + pop { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + + @ Disambiguate between EOS and C. +99: + cmp r2, r1 + it ne + movne r0, #0 @ Found EOS, return NULL + bx lr + +END (strchr) + +weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) diff --git a/ports/sysdeps/arm/armv6/strcpy.S b/ports/sysdeps/arm/armv6/strcpy.S new file mode 100644 index 0000000000..cd13ff7ecf --- /dev/null +++ b/ports/sysdeps/arm/armv6/strcpy.S @@ -0,0 +1,231 @@ +/* strcpy -- copy a nul-terminated string. + Copyright (C) 2013 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> + +/* Endian independent macros for shifting bytes within registers. */ +#ifdef __ARMEB__ +#define lsh_gt lsr +#define lsh_ls lsl +#else +#define lsh_gt lsl +#define lsh_ls lsr +#endif + + .syntax unified + .text + +ENTRY (__stpcpy) + @ Signal stpcpy with NULL in IP. + mov ip, #0 + b 0f +END (__stpcpy) + +weak_alias (__stpcpy, stpcpy) +libc_hidden_def (__stpcpy) +libc_hidden_builtin_def (stpcpy) + +ENTRY (strcpy) + @ Signal strcpy with DEST in IP. + mov ip, r0 +0: + sfi_pld r0 + sfi_pld r1 + + @ To cater to long strings, we want 8 byte alignment in the source. + @ To cater to small strings, we don't want to start that right away. + @ Loop up to 16 times, less whatever it takes to reach alignment. + and r3, r1, #7 + rsb r3, r3, #16 + + @ Loop until we find ... +1: sfi_breg r1, \ + ldrb r2, [\B], #1 + subs r3, r3, #1 @ ... the alignment point + sfi_breg r0, \ + strb r2, [\B], #1 + it ne + cmpne r2, #0 @ ... or EOS + bne 1b + + @ Disambiguate the exit possibilites above + cmp r2, #0 @ Found EOS + beq .Lreturn + + @ Load the next two words asap + sfi_breg r1, \ + ldrd r2, r3, [\B], #8 + sfi_pld r0, #64 + sfi_pld r1, #64 + + @ For longer strings, we actaully need a stack frame. + push { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + + @ Subtracting (unsigned saturating) from 1 for any byte means result + @ of 1 for any byte that was originally zero and 0 otherwise. + @ Therefore we consider the lsb of each byte the "found" bit. +#ifdef ARCH_HAS_T2 + movw r7, #0x0101 + tst r0, #3 @ Test alignment of DEST + movt r7, #0x0101 +#else + ldr ip, =0x01010101 + tst r0, #3 +#endif + bne .Lunaligned + + @ So now source (r1) is aligned to 8, and dest (r0) is aligned to 4. + @ Loop, reading 8 bytes at a time, searching for EOS. + .balign 16 +2: uqsub8 r4, r7, r2 @ Find EOS + uqsub8 r5, r7, r3 + sfi_pld r1, #128 + cmp r4, #0 @ EOS in first word? + sfi_pld r0, #128 + bne 3f + sfi_breg r0, \ + str r2, [\B], #4 + cmp r5, #0 @ EOS in second word? + bne 4f + sfi_breg r0, \ + str r3, [\B], #4 + sfi_breg r1, \ + ldrd r2, r3, [\B], #8 + b 2b + +3: sub r1, r1, #4 @ backup to first word +4: sub r1, r1, #4 @ backup to second word + + @ ... then finish up any tail a byte at a time. + @ Note that we generally back up and re-read source bytes, + @ but we'll not re-write dest bytes. +.Lbyte_loop: + sfi_breg r1, \ + ldrb r2, [\B], #1 + cmp r2, #0 + sfi_breg r0, \ + strb r2, [\B], #1 + bne .Lbyte_loop + + pop { r4, r5, r6, r7 } + cfi_remember_state + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + +.Lreturn: + cmp ip, #0 @ Was this strcpy or stpcpy? + ite eq + subeq r0, r0, #1 @ stpcpy: undo post-inc from store + movne r0, ip @ strcpy: return original dest + bx lr + +.Lunaligned: + cfi_restore_state + @ Here, source is aligned to 8, but the destination is not word + @ aligned. Therefore we have to shift the data in order to be + @ able to perform aligned word stores. + + @ Find out which misalignment we're dealing with. + tst r0, #1 + beq .Lunaligned2 + tst r0, #2 + bne .Lunaligned3 + @ Fallthru to .Lunaligned1. + +.macro unaligned_copy unalign + @ Prologue to unaligned loop. Seed shifted non-zero bytes. + uqsub8 r4, r7, r2 @ Find EOS + uqsub8 r5, r7, r3 + mvns r4, r4 @ EOS in first word? + it ne + subne r1, r1, #8 + bne .Lbyte_loop +#ifdef __ARMEB__ + rev r2, r2 @ Byte stores below need LE data +#endif + @ Store a few bytes from the first word. + @ At the same time we align r0 and shift out bytes from r2. +.rept 4-\unalign + sfi_breg r0, \ + strb r2, [\B], #1 + lsr r2, r2, #8 +.endr +#ifdef __ARMEB__ + rev r2, r2 @ Undo previous rev +#endif + @ Rotated unaligned copy loop. The tail of the prologue is + @ shared with the loop itself. + .balign 8 +1: mvns r5, r5 @ EOS in second word? + bne 4f + @ Combine first and second words + orr r2, r2, r3, lsh_gt #(\unalign*8) + @ Save leftover bytes from the two words + lsh_ls r6, r3, #((4-\unalign)*8) + sfi_breg r0, \ + str r2, [\B], #4 + @ The "real" start of the unaligned copy loop. + sfi_breg r1, \ + ldrd r2, r3, [\B], #8 @ Load 8 more bytes + uqsub8 r4, r7, r2 @ Find EOS + sfi_pld r1, #128 + uqsub8 r5, r7, r3 + sfi_pld r0, #128 + mvns r4, r4 @ EOS in first word? + bne 3f + @ Combine the leftover and the first word + orr r6, r6, r2, lsh_gt #(\unalign*8) + @ Discard used bytes from the first word. + lsh_ls r2, r2, #((4-\unalign)*8) + sfi_breg r0, \ + str r6, [\B], #4 + b 1b + @ Found EOS in one of the words; adjust backward +3: sub r1, r1, #4 + mov r2, r6 +4: sub r1, r1, #4 + @ And store the remaining bytes from the leftover +#ifdef __ARMEB__ + rev r2, r2 +#endif +.rept \unalign + sfi_breg r0, \ + strb r2, [\B], #1 + lsr r2, r2, #8 +.endr + b .Lbyte_loop +.endm + +.Lunaligned1: + unaligned_copy 1 +.Lunaligned2: + unaligned_copy 2 +.Lunaligned3: + unaligned_copy 3 + +END (strcpy) + +libc_hidden_builtin_def (strcpy) diff --git a/ports/sysdeps/arm/armv6/strlen.S b/ports/sysdeps/arm/armv6/strlen.S new file mode 100644 index 0000000000..59ff6b5d93 --- /dev/null +++ b/ports/sysdeps/arm/armv6/strlen.S @@ -0,0 +1,103 @@ +/* strlen -- find the length of a nul-terminated string. + Copyright (C) 2013 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> + + .syntax unified + .text + +ENTRY (strlen) + @ r0 = start of string + sfi_breg r0, \ + ldrb r2, [\B] @ load the first byte asap + + @ To cater to long strings, we want to search through a few + @ characters until we reach an aligned pointer. To cater to + @ small strings, we don't want to start doing word operations + @ immediately. The compromise is a maximum of 16 bytes less + @ whatever is required to end with an aligned pointer. + @ r3 = number of characters to search in alignment loop + and r3, r0, #7 + mov r1, r0 @ Save the input pointer + rsb r3, r3, #15 @ 16 - 1 peeled loop iteration + cmp r2, #0 + beq 99f + + @ Loop until we find ... +1: sfi_breg r0, \ + ldrb r2, [\B, #1]! + subs r3, r3, #1 @ ... the aligment point + it ne + cmpne r2, #0 @ ... or EOS + bne 1b + + @ Disambiguate the exit possibilites above + cmp r2, #0 @ Found EOS + beq 99f + add r0, r0, #1 + + @ So now we're aligned. + sfi_breg r0, \ + ldrd r2, r3, [\B], #8 +#ifdef ARCH_HAS_T2 + movw ip, #0x0101 + sfi_pld r0, #64 + movt ip, #0x0101 +#else + ldr ip, =0x01010101 + sfi_pld r0, #64 +#endif + + @ Loop searching for EOS, 8 bytes at a time. + @ Subtracting (unsigned saturating) from 1 for any byte means that + @ we get 1 for any byte that was originally zero and 0 otherwise. + @ Therefore we consider the lsb of each byte the "found" bit. + .balign 16 +2: uqsub8 r2, ip, r2 @ Find EOS + uqsub8 r3, ip, r3 + sfi_pld r0, #128 @ Prefetch 2 lines ahead + orrs r3, r3, r2 @ Combine the two words + it eq + sfi_breg r0, \ + ldrdeq r2, r3, [\B], #8 + beq 2b + + @ Found something. Disambiguate between first and second words. + @ Adjust r0 to point to the word containing the match. + @ Adjust r2 to the found bits for the word containing the match. + cmp r2, #0 + sub r0, r0, #4 + ite eq + moveq r2, r3 + subne r0, r0, #4 + + @ Find the bit-offset of the match within the word. Note that the + @ bit result from clz will be 7 higher than "true", but we'll + @ immediately discard those bits converting to a byte offset. +#ifdef __ARMEL__ + rev r2, r2 @ For LE, count from the little end +#endif + clz r2, r2 + add r0, r0, r2, lsr #3 @ Adjust the pointer to the found byte +99: + sub r0, r0, r1 @ Subtract input to compute length + bx lr + +END (strlen) + +libc_hidden_builtin_def (strlen) diff --git a/ports/sysdeps/arm/armv6/strrchr.S b/ports/sysdeps/arm/armv6/strrchr.S new file mode 100644 index 0000000000..e40df90a72 --- /dev/null +++ b/ports/sysdeps/arm/armv6/strrchr.S @@ -0,0 +1,131 @@ +/* strrchr -- find the last occurence of C in a nul-terminated string + Copyright (C) 2013 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> + + .syntax unified + .text + +ENTRY (strrchr) + @ r0 = start of string + @ r1 = character to match + @ returns NULL for no match, or a pointer to the match + + mov r3, r0 + mov r0, #0 + uxtb r1, r1 + + @ Loop a few times until we're aligned. + tst r3, #7 + beq 2f +1: sfi_breg r3, \ + ldrb r2, [\B], #1 + cmp r2, r1 @ Find the character + it eq + subeq r0, r3, #1 + cmp r2, #0 @ Find EOS + it eq + bxeq lr + tst r3, #7 @ Find the aligment point + bne 1b + + @ So now we're aligned. Now we actually need a stack frame. +2: push { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + + orr r1, r1, r1, lsl #8 @ Replicate C to all bytes +#ifdef ARCH_HAS_T2 + movw ip, #0x0101 + movt ip, #0x0101 +#else + ldr ip, =0x01010101 +#endif + orr r1, r1, r1, lsl #16 + mov r2, #0 @ No found bits yet + + @ Loop searching for EOS and C, 8 bytes at a time. + @ Any time we find a match in a word, we copy the address of + @ the word to r0, and the found bits to r2. +3: sfi_breg r3, \ + ldrd r4, r5, [\B], #8 + @ Subtracting (unsigned saturating) from 1 means result of 1 for + @ any byte that was originally zero and 0 otherwise. Therefore + @ we consider the lsb of each byte the "found" bit. + uqsub8 r6, ip, r4 @ Find EOS + uqsub8 r7, ip, r5 + eor r4, r4, r1 @ Convert C bytes to 0 + eor r5, r5, r1 + uqsub8 r4, ip, r4 @ Find C + uqsub8 r5, ip, r5 + cmp r6, #0 @ Found EOS, first word + bne 4f + cmp r4, #0 @ Handle C, first word + itt ne + subne r0, r3, #8 + movne r2, r4 + cmp r7, #0 @ Found EOS, second word + bne 5f + cmp r5, #0 @ Handle C, second word + itt ne + subne r0, r3, #4 + movne r2, r5 + b 3b + + @ Found EOS in second word; fold to first word. +5: add r3, r3, #4 @ Dec pointer to 2nd word, with below + mov r4, r5 @ Overwrite first word C found + mov r6, r7 @ Overwrite first word EOS found + + @ Found EOS. Zap found C after EOS. +4: sub r3, r3, #8 @ Decrement pointer to first word +#ifdef __ARMEB__ + @ Byte swap to be congruent with LE, which is easier from here on. + rev r6, r6 @ Byte swap found EOS, + rev r4, r4 @ ... this found C + rev r2, r2 @ ... prev found C +#endif + sub r7, r6, #1 @ Toggle EOS lsb and below + eor r6, r6, r7 @ All bits below and including lsb + ands r4, r4, r6 @ Zap C above EOS + itt ne + movne r2, r4 @ Copy to result, if still non-zero + movne r0, r3 + + pop { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (-16) + cfi_restore (r4) + cfi_restore (r5) + cfi_restore (r6) + cfi_restore (r7) + + @ Adjust the result pointer if we found a word containing C. + cmp r2, #0 + clz r2, r2 @ Find the bit offset of the last C + itt ne + rsbne r2, r2, #32 @ Convert to a count from the right + addne r0, r0, r2, lsr #3 @ Convert to byte offset and add. + bx lr + +END (strrchr) + +weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) diff --git a/ports/sysdeps/arm/armv6t2/Implies b/ports/sysdeps/arm/armv6t2/Implies new file mode 100644 index 0000000000..20a87fc8a5 --- /dev/null +++ b/ports/sysdeps/arm/armv6t2/Implies @@ -0,0 +1,2 @@ +# We can do everything that 6 can +arm/armv6 diff --git a/ports/sysdeps/arm/jmpbuf-offsets.h b/ports/sysdeps/arm/armv6t2/ffs.S index beeccbb40f..b2c88b9460 100644 --- a/ports/sysdeps/arm/jmpbuf-offsets.h +++ b/ports/sysdeps/arm/armv6t2/ffs.S @@ -1,5 +1,5 @@ -/* Private macros for accessing __jmp_buf contents. ARM EABI version. - Copyright (C) 2007-2013 Free Software Foundation, Inc. +/* ffs -- find first set bit in an int, from least significant end. + Copyright (C) 2013 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,4 +16,20 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ -#define __JMP_BUF_SP 8 +#include <sysdep.h> + + .syntax unified + .text + +ENTRY (__ffs) + cmp r0, #0 + rbit r0, r0 + itt ne + clzne r0, r0 + addne r0, r0, #1 + bx lr +END (__ffs) + +weak_alias (__ffs, ffs) +weak_alias (__ffs, ffsl) +libc_hidden_builtin_def (ffs) diff --git a/ports/sysdeps/arm/armv6t2/ffsll.S b/ports/sysdeps/arm/armv6t2/ffsll.S new file mode 100644 index 0000000000..e49c70fdf1 --- /dev/null +++ b/ports/sysdeps/arm/armv6t2/ffsll.S @@ -0,0 +1,50 @@ +/* ffsll -- find first set bit in a long long, from least significant end. + Copyright (C) 2013 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> + + .syntax unified + .text + +ENTRY (ffsll) + @ If low part is 0, operate on the high part. Ensure that the + @ word on which we operate is in r0. Set r2 to the bit offset + @ of the word being considered. Set the flags for the word + @ being operated on. +#ifdef __ARMEL__ + cmp r0, #0 + itee ne + movne r2, #0 + moveq r2, #32 + movseq r0, r1 +#else + cmp r1, #0 + ittee ne + movne r2, #0 + movne r0, r1 + moveq r2, #32 + cmpeq r0, #0 +#endif + @ Perform the ffs on r0. + rbit r0, r0 + ittt ne + clzne r0, r0 + addne r2, r2, #1 + addne r0, r0, r2 + bx lr +END (ffsll) diff --git a/ports/sysdeps/arm/armv6t2/memchr.S b/ports/sysdeps/arm/armv6t2/memchr.S index 6d35f478b7..f758971438 100644 --- a/ports/sysdeps/arm/armv6t2/memchr.S +++ b/ports/sysdeps/arm/armv6t2/memchr.S @@ -42,10 +42,12 @@ .syntax unified .text +#ifdef NO_THUMB + .arm +#else .thumb - -@ --------------------------------------------------------------------------- .thumb_func +#endif .global memchr .type memchr,%function ENTRY(memchr) @@ -63,7 +65,8 @@ ENTRY(memchr) @ Work up to an aligned point 5: - ldrb r3, [r0],#1 + sfi_breg r0, \ + ldrb r3, [\B],#1 subs r2, r2, #1 cmp r3, r1 beq 50f @ If it matches exit found @@ -83,20 +86,29 @@ ENTRY(memchr) orr r1, r1, r1, lsl #8 @ expand the match word across to all bytes orr r1, r1, r1, lsl #16 - bic r4, r2, #7 @ Number of double words to work with * 8 + bic r6, r2, #7 @ Number of double words to work with * 8 mvns r7, #0 @ all F's movs r3, #0 15: - ldrd r5,r6, [r0],#8 - subs r4, r4, #8 - eor r5,r5, r1 @ Get it so that r5,r6 have 00's where the bytes match the target - eor r6,r6, r1 + sfi_breg r0, \ + ldrd r4,r5, [\B],#8 +#ifndef NO_THUMB + subs r6, r6, #8 +#endif + eor r4,r4, r1 @ Get it so that r4,r5 have 00's where the bytes match the target + eor r5,r5, r1 + uadd8 r4, r4, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 + sel r4, r3, r7 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION uadd8 r5, r5, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 - sel r5, r3, r7 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION - uadd8 r6, r6, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 - sel r6, r5, r7 @ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION - cbnz r6, 60f + sel r5, r4, r7 @ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION +#ifndef NO_THUMB + cbnz r5, 60f +#else + cmp r5, #0 + bne 60f + subs r6, r6, #8 +#endif bne 15b @ (Flags from the subs above) If not run out of bytes then go around again pop {r4,r5,r6,r7} @@ -110,13 +122,25 @@ ENTRY(memchr) and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done 20: +#ifndef NO_THUMB cbz r2, 40f @ 0 length or hit the end already then not found +#else + cmp r2, #0 + beq 40f +#endif 21: @ Post aligned section, or just a short call - ldrb r3,[r0],#1 + sfi_breg r0, \ + ldrb r3,[\B],#1 +#ifndef NO_THUMB subs r2,r2,#1 eor r3,r3,r1 @ r3 = 0 if match - doesn't break flags from sub cbz r3, 50f +#else + eors r3, r3, r1 + beq 50f + subs r2, r2, #1 +#endif bne 21b @ on r2 flags 40: @@ -129,22 +153,22 @@ ENTRY(memchr) 60: @ We're here because the fast path found a hit - now we have to track down exactly which word it was @ r0 points to the start of the double word after the one that was tested - @ r5 has the 00/ff pattern for the first word, r6 has the chained value + @ r4 has the 00/ff pattern for the first word, r5 has the chained value cfi_restore_state - cmp r5, #0 + cmp r4, #0 itte eq - moveq r5, r6 @ the end is in the 2nd word + moveq r4, r5 @ the end is in the 2nd word subeq r0,r0,#3 @ Points to 2nd byte of 2nd word subne r0,r0,#7 @ or 2nd byte of 1st word @ r0 currently points to the 2nd byte of the word containing the hit - tst r5, # CHARTSTMASK(0) @ 1st character + tst r4, # CHARTSTMASK(0) @ 1st character bne 61f adds r0,r0,#1 - tst r5, # CHARTSTMASK(1) @ 2nd character + tst r4, # CHARTSTMASK(1) @ 2nd character ittt eq addeq r0,r0,#1 - tsteq r5, # (3<<15) @ 2nd & 3rd character + tsteq r4, # (3<<15) @ 2nd & 3rd character @ If not the 3rd must be the last one addeq r0,r0,#1 diff --git a/ports/sysdeps/arm/bits/setjmp.h b/ports/sysdeps/arm/bits/setjmp.h index 1f7ddd3653..21bbf7f57d 100644 --- a/ports/sysdeps/arm/bits/setjmp.h +++ b/ports/sysdeps/arm/bits/setjmp.h @@ -24,7 +24,7 @@ # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif -#ifndef _ASM +#ifndef __ASSEMBLER__ /* The exact set of registers saved may depend on the particular core in use, as some coprocessor registers may need to be saved. The C Library ABI requires that the buffer be 8-byte aligned, and diff --git a/ports/sysdeps/arm/configure b/ports/sysdeps/arm/configure index 91239cdf3e..b84b3f69a9 100644 --- a/ports/sysdeps/arm/configure +++ b/ports/sysdeps/arm/configure @@ -197,7 +197,9 @@ $as_echo "$libc_cv_arm_pcs_vfp" >&6; } if test $libc_cv_arm_pcs_vfp = yes; then $as_echo "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h - echo "default-abi := hard" > default-abi.make + config_vars="$config_vars +default-abi = hard" else - echo "default-abi := soft" > default-abi.make + config_vars="$config_vars +default-abi = soft" fi diff --git a/ports/sysdeps/arm/configure.in b/ports/sysdeps/arm/configure.in index 6073d0ee86..d66500b3fd 100644 --- a/ports/sysdeps/arm/configure.in +++ b/ports/sysdeps/arm/configure.in @@ -40,7 +40,7 @@ AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) if test $libc_cv_arm_pcs_vfp = yes; then AC_DEFINE(HAVE_ARM_PCS_VFP) - echo "default-abi := hard" > default-abi.make + LIBC_CONFIG_VAR([default-abi], [hard]) else - echo "default-abi := soft" > default-abi.make + LIBC_CONFIG_VAR([default-abi], [soft]) fi diff --git a/ports/sysdeps/arm/crti.S b/ports/sysdeps/arm/crti.S index 44e20f0c11..be20a11995 100644 --- a/ports/sysdeps/arm/crti.S +++ b/ports/sysdeps/arm/crti.S @@ -38,6 +38,8 @@ they can be called as functions. The symbols _init and _fini are magic and cause the linker to emit DT_INIT and DT_FINI. */ +/* Always build .init and .fini sections in ARM mode. */ +#define NO_THUMB #include <libc-symbols.h> #include <sysdep.h> @@ -78,7 +80,7 @@ call_weak_fn: .globl _init .type _init, %function _init: - stmfd sp!, {r3, lr} + push {r3, lr} #if PREINIT_FUNCTION_WEAK bl call_weak_fn #else @@ -90,4 +92,4 @@ _init: .globl _fini .type _fini, %function _fini: - stmfd sp!, {r3, lr} + push {r3, lr} diff --git a/ports/sysdeps/arm/crtn.S b/ports/sysdeps/arm/crtn.S index 5ff3661f18..ae7546c5e7 100644 --- a/ports/sysdeps/arm/crtn.S +++ b/ports/sysdeps/arm/crtn.S @@ -33,6 +33,8 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* Always build .init and .fini sections in ARM mode. */ +#define NO_THUMB #include <sysdep.h> /* crtn.S puts function epilogues in the .init and .fini sections @@ -40,16 +42,16 @@ .section .init,"ax",%progbits #ifdef __ARM_ARCH_4T__ - ldmfd sp!, {r3, lr} + pop {r3, lr} bx lr #else - ldmfd sp!, {r3, pc} + pop {r3, pc} #endif .section .fini,"ax",%progbits #ifdef __ARM_ARCH_4T__ - ldmfd sp!, {r3, lr} + pop {r3, lr} bx lr #else - ldmfd sp!, {r3, pc} + pop {r3, pc} #endif diff --git a/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h index 30ad46c255..5a424f841f 100644 --- a/ports/sysdeps/arm/dl-machine.h +++ b/ports/sysdeps/arm/dl-machine.h @@ -136,7 +136,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) return lazy; } -#if defined(__USE_BX__) +#if defined(ARCH_HAS_BX) #define BX(x) "bx\t" #x #else #define BX(x) "mov\tpc, " #x diff --git a/ports/sysdeps/arm/dl-tlsdesc.S b/ports/sysdeps/arm/dl-tlsdesc.S index 0ae3abb38d..7203c06ae6 100644 --- a/ports/sysdeps/arm/dl-tlsdesc.S +++ b/ports/sysdeps/arm/dl-tlsdesc.S @@ -17,19 +17,14 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <arm-features.h> #include <tls.h> #include "tlsdesc.h" -#ifdef __USE_BX__ - #define BX(x) bx x -#else - #define BX(x) mov pc, x -#endif - .text @ emit debug information with cfi @ use arm-specific pseudos for unwinding itself - .cfi_sections .debug_frame + CFI_SECTIONS .hidden _dl_tlsdesc_return .global _dl_tlsdesc_return .type _dl_tlsdesc_return,#function @@ -37,7 +32,8 @@ .fnstart .align 2 _dl_tlsdesc_return: - ldr r0, [r0] + sfi_breg r0, \ + ldr r0, [\B] BX (lr) .fnend cfi_endproc @@ -50,18 +46,9 @@ _dl_tlsdesc_return: .fnstart .align 2 _dl_tlsdesc_undefweak: - @ Are we allowed a misaligned stack pointer calling read_tp? - .save {lr} - stmdb sp!, {lr} - cfi_adjust_cfa_offset (4) - cfi_rel_offset (lr,0) - bl __aeabi_read_tp + GET_TLS (r1) rsb r0, r0, #0 - ldmia sp!, {lr} - cfi_adjust_cfa_offset (-4) - cfi_restore (lr) BX (lr) - cfi_endproc .fnend .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak @@ -99,23 +86,35 @@ _dl_tlsdesc_dynamic: /* Our calling convention is to clobber r0, r1 and the processor flags. All others that are modified must be saved */ .save {r2,r3,r4,lr} - stmdb sp!, {r2,r3,r4,lr} + push {r2,r3,r4,lr} cfi_adjust_cfa_offset (16) cfi_rel_offset (r2,0) cfi_rel_offset (r3,4) cfi_rel_offset (r4,8) cfi_rel_offset (lr,12) - ldr r1, [r0] /* td */ - bl __aeabi_read_tp + sfi_breg r0, \ + ldr r1, [\B] /* td */ + GET_TLS (lr) mov r4, r0 /* r4 = tp */ - ldr r0, [r0] - ldr r2, [r1, #8] /* gen_count */ - ldr r3, [r0] + sfi_breg r0, \ + ldr r0, [\B] + sfi_breg r1, \ + ldr r2, [\B, #8] /* gen_count */ + sfi_breg r0, \ + ldr r3, [\B] cmp r2, r3 bhi 1f - ldr r3, [r1] + sfi_breg r1, \ + ldr r3, [\B] +#ifndef ARM_NO_INDEX_REGISTER ldr r2, [r0, r3, lsl #3] +#else + add lr, r0, r3, lsl #3 + sfi_breg lr, \ + ldr r2, [\B] +#endif cmn r2, #1 + ittt ne ldrne r3, [r1, #4] addne r3, r2, r3 rsbne r0, r4, r3 @@ -123,13 +122,19 @@ _dl_tlsdesc_dynamic: 1: mov r0, r1 bl __tls_get_addr rsb r0, r4, r0 -2: ldmia sp!, {r2,r3,r4, lr} +2: +#if ((defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)) \ + || defined (ARM_ALWAYS_BX)) + pop {r2,r3,r4, lr} cfi_adjust_cfa_offset (-16) cfi_restore (lr) cfi_restore (r4) cfi_restore (r3) cfi_restore (r2) - BX (lr) + bx lr +#else + pop {r2,r3,r4, pc} +#endif .fnend cfi_endproc .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic @@ -154,7 +159,7 @@ _dl_tlsdesc_lazy_resolver: cfi_adjust_cfa_offset (4) cfi_rel_offset (r2, 0) .save {r0,r1,r3,ip,lr} - stmdb sp!, {r0, r1, r3, ip, lr} + push {r0, r1, r3, ip, lr} cfi_adjust_cfa_offset (20) cfi_rel_offset (r0, 0) cfi_rel_offset (r1, 4) @@ -162,17 +167,18 @@ _dl_tlsdesc_lazy_resolver: cfi_rel_offset (ip, 12) cfi_rel_offset (lr, 16) bl _dl_tlsdesc_lazy_resolver_fixup - ldmia sp!, {r0, r1, r3, ip, lr} + pop {r0, r1, r3, ip, lr} cfi_adjust_cfa_offset (-20) cfi_restore (lr) cfi_restore (ip) cfi_restore (r3) cfi_restore (r1) cfi_restore (r0) - ldmia sp!, {r2} + pop {r2} cfi_adjust_cfa_offset (-4) cfi_restore (r2) - ldr r1, [r0, #4] + sfi_breg r0, \ + ldr r1, [\B, #4] BX (r1) .fnend cfi_endproc @@ -192,7 +198,7 @@ _dl_tlsdesc_resolve_hold: cfi_adjust_cfa_offset (4) cfi_rel_offset (r2, 0) .save {r0,r1,r3,ip,lr} - stmdb sp!, {r0, r1, r3, ip, lr} + push {r0, r1, r3, ip, lr} cfi_adjust_cfa_offset (20) cfi_rel_offset (r0, 0) cfi_rel_offset (r1, 4) @@ -201,17 +207,18 @@ _dl_tlsdesc_resolve_hold: cfi_rel_offset (lr, 16) adr r2, _dl_tlsdesc_resolve_hold bl _dl_tlsdesc_resolve_hold_fixup - ldmia sp!, {r0, r1, r3, ip, lr} + pop {r0, r1, r3, ip, lr} cfi_adjust_cfa_offset (-20) cfi_restore (lr) cfi_restore (ip) cfi_restore (r3) cfi_restore (r1) cfi_restore (r0) - ldmia sp!, {r2} + pop {r2} cfi_adjust_cfa_offset (-4) cfi_restore (r2) - ldr r1, [r0, #4] + sfi_breg r0, \ + ldr r1, [\B, #4] BX (r1) .fnend cfi_endproc diff --git a/ports/sysdeps/arm/dl-trampoline.S b/ports/sysdeps/arm/dl-trampoline.S index ebf221c85c..9366976762 100644 --- a/ports/sysdeps/arm/dl-trampoline.S +++ b/ports/sysdeps/arm/dl-trampoline.S @@ -16,19 +16,15 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include <sysdep.h> #include <libc-symbols.h> -#if defined(__USE_BX__) -#define BX(x) bx x -#else -#define BX(x) mov pc, x -#endif - .text .globl _dl_runtime_resolve .type _dl_runtime_resolve, #function - .cfi_sections .debug_frame + CFI_SECTIONS cfi_startproc .align 2 _dl_runtime_resolve: @@ -41,7 +37,7 @@ _dl_runtime_resolve: @ lr points to &GOT[2] @ Save arguments. We save r4 to realign the stack. - stmdb sp!,{r0-r4} + push {r0-r4} cfi_adjust_cfa_offset (20) cfi_rel_offset (r0, 0) cfi_rel_offset (r1, 4) @@ -65,7 +61,7 @@ _dl_runtime_resolve: @ get arguments and return address back. We restore r4 @ only to realign the stack. - ldmia sp!, {r0-r4,lr} + pop {r0-r4,lr} cfi_adjust_cfa_offset (-24) @ jump to the newly found address @@ -77,7 +73,7 @@ _dl_runtime_resolve: #ifndef PROF .globl _dl_runtime_profile .type _dl_runtime_profile, #function - .cfi_sections .debug_frame + CFI_SECTIONS cfi_startproc .align 2 _dl_runtime_profile: @@ -190,8 +186,7 @@ _dl_runtime_profile: add ip, r7, #72 ldmia ip, {r0-r3} ldr ip, [r7, #264] - mov lr, pc - BX(ip) + BLX(ip) stmia r7, {r0-r3} @ Call pltexit. diff --git a/ports/sysdeps/arm/frame.h b/ports/sysdeps/arm/frame.h index c5a8ed17ec..db3529939b 100644 --- a/ports/sysdeps/arm/frame.h +++ b/ports/sysdeps/arm/frame.h @@ -19,9 +19,9 @@ /* This is the APCS stack backtrace structure. */ struct layout { - struct layout *__unbounded next; - void *__unbounded sp; - void *__unbounded return_address; + struct layout *next; + void *sp; + void *return_address; }; #define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0)) diff --git a/ports/sysdeps/arm/include/bits/setjmp.h b/ports/sysdeps/arm/include/bits/setjmp.h new file mode 100644 index 0000000000..23d8f75cf2 --- /dev/null +++ b/ports/sysdeps/arm/include/bits/setjmp.h @@ -0,0 +1,34 @@ +/* Private jmp_buf-related definitions. ARM EABI version. + Copyright (C) 2013 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 _INCLUDE_BITS_SETJMP_H +#define _INCLUDE_BITS_SETJMP_H 1 + +#ifndef __ASSEMBLER__ +/* Get the public declarations. */ +# include <sysdeps/arm/bits/setjmp.h> +#endif + +/* Register list for a ldm/stm instruction to load/store + the general registers from a __jmp_buf. */ +#define JMP_BUF_REGLIST {v1-v6, sl, fp, sp, lr} + +/* Index of __jmp_buf where the sp register resides. */ +#define __JMP_BUF_SP 8 + +#endif /* include/bits/setjmp.h */ diff --git a/ports/sysdeps/arm/jmpbuf-unwind.h b/ports/sysdeps/arm/jmpbuf-unwind.h index 7f7770aea0..0863540ce0 100644 --- a/ports/sysdeps/arm/jmpbuf-unwind.h +++ b/ports/sysdeps/arm/jmpbuf-unwind.h @@ -16,7 +16,6 @@ <http://www.gnu.org/licenses/>. */ #include <setjmp.h> -#include <jmpbuf-offsets.h> #include <stdint.h> #include <unwind.h> diff --git a/ports/sysdeps/arm/memcpy.S b/ports/sysdeps/arm/memcpy.S index d8164b4d70..add82e2d18 100644 --- a/ports/sysdeps/arm/memcpy.S +++ b/ports/sysdeps/arm/memcpy.S @@ -17,7 +17,10 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include <sysdep.h> +#include <arm-features.h> /* * Data preload for architectures that support it (ARM V5TE and above) @@ -43,20 +46,21 @@ * Endian independent macros for shifting bytes within registers. */ #ifndef __ARMEB__ -#define pull lsr -#define push lsl +#define PULL lsr +#define PUSH lsl #else -#define pull lsl -#define push lsr +#define PULL lsl +#define PUSH lsr #endif .text + .syntax unified /* Prototype: void *memcpy(void *dest, const void *src, size_t n); */ ENTRY(memcpy) - stmfd sp!, {r0, r4, lr} + push {r0, r4, lr} cfi_adjust_cfa_offset (12) cfi_rel_offset (r4, 4) cfi_rel_offset (lr, 8) @@ -66,13 +70,13 @@ ENTRY(memcpy) subs r2, r2, #4 blt 8f ands ip, r0, #3 - PLD( pld [r1, #0] ) + PLD( sfi_pld r1, #0 ) bne 9f ands ip, r1, #3 bne 10f 1: subs r2, r2, #(28) - stmfd sp!, {r5 - r8} + push {r5 - r8} cfi_adjust_cfa_offset (16) cfi_rel_offset (r5, 0) cfi_rel_offset (r6, 4) @@ -82,54 +86,112 @@ ENTRY(memcpy) CALGN( ands ip, r1, #31 ) CALGN( rsb r3, ip, #32 ) - CALGN( sbcnes r4, r3, r2 ) @ C is always set here + CALGN( sbcsne r4, r3, r2 ) @ C is always set here CALGN( bcs 2f ) CALGN( adr r4, 6f ) CALGN( subs r2, r2, r3 ) @ C gets set - CALGN( add pc, r4, ip ) +#ifndef ARM_ALWAYS_BX + CALGN( add pc, r4, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)) +#else + CALGN( add r4, r4, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)) + CALGN( bx r4 ) +#endif - PLD( pld [r1, #0] ) + PLD( sfi_pld r1, #0 ) 2: PLD( subs r2, r2, #96 ) - PLD( pld [r1, #28] ) + PLD( sfi_pld r1, #28 ) PLD( blt 4f ) - PLD( pld [r1, #60] ) - PLD( pld [r1, #92] ) + PLD( sfi_pld r1, #60 ) + PLD( sfi_pld r1, #92 ) -3: PLD( pld [r1, #124] ) -4: ldmia r1!, {r3, r4, r5, r6, r7, r8, ip, lr} +3: PLD( sfi_pld r1, #124 ) +4: sfi_breg r1, \ + ldmia \B!, {r3, r4, r5, r6, r7, r8, ip, lr} subs r2, r2, #32 - stmia r0!, {r3, r4, r5, r6, r7, r8, ip, lr} + sfi_breg r0, \ + stmia \B!, {r3, r4, r5, r6, r7, r8, ip, lr} bge 3b PLD( cmn r2, #96 ) PLD( bge 4b ) 5: ands ip, r2, #28 rsb ip, ip, #32 - addne pc, pc, ip @ C is always clear here +#ifndef ARM_ALWAYS_BX + /* C is always clear here. */ + addne pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) b 7f +#else + beq 7f + push {r10} + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r10, 0) + add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) + bx r10 +#endif + .p2align ARM_BX_ALIGN_LOG2 6: nop - ldr r3, [r1], #4 - ldr r4, [r1], #4 - ldr r5, [r1], #4 - ldr r6, [r1], #4 - ldr r7, [r1], #4 - ldr r8, [r1], #4 - ldr lr, [r1], #4 - - add pc, pc, ip + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r3, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r4, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r5, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r6, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r7, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r8, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr lr, [\B], #4 + +#ifndef ARM_ALWAYS_BX + add pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) nop +#else + add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) + bx r10 +#endif + .p2align ARM_BX_ALIGN_LOG2 nop - str r3, [r0], #4 - str r4, [r0], #4 - str r5, [r0], #4 - str r6, [r0], #4 - str r7, [r0], #4 - str r8, [r0], #4 - str lr, [r0], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r3, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r4, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r5, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r6, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r7, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r8, [\B], #4 + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str lr, [\B], #4 + +#ifdef ARM_ALWAYS_BX + pop {r10} + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) +#endif CALGN( bcs 2b ) -7: ldmfd sp!, {r5 - r8} +7: pop {r5 - r8} cfi_adjust_cfa_offset (-16) cfi_restore (r5) cfi_restore (r6) @@ -137,41 +199,55 @@ ENTRY(memcpy) cfi_restore (r8) 8: movs r2, r2, lsl #31 - ldrneb r3, [r1], #1 - ldrcsb r4, [r1], #1 - ldrcsb ip, [r1] - strneb r3, [r0], #1 - strcsb r4, [r0], #1 - strcsb ip, [r0] - -#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) - ldmfd sp!, {r0, r4, lr} + sfi_breg r1, \ + ldrbne r3, [\B], #1 + sfi_breg r1, \ + ldrbcs r4, [\B], #1 + sfi_breg r1, \ + ldrbcs ip, [\B] + sfi_breg r0, \ + strbne r3, [\B], #1 + sfi_breg r0, \ + strbcs r4, [\B], #1 + sfi_breg r0, \ + strbcs ip, [\B] + +#if ((defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)) \ + || defined (ARM_ALWAYS_BX)) + pop {r0, r4, lr} cfi_adjust_cfa_offset (-12) cfi_restore (r4) cfi_restore (lr) bx lr #else - ldmfd sp!, {r0, r4, pc} + pop {r0, r4, pc} #endif cfi_restore_state 9: rsb ip, ip, #4 cmp ip, #2 - ldrgtb r3, [r1], #1 - ldrgeb r4, [r1], #1 - ldrb lr, [r1], #1 - strgtb r3, [r0], #1 - strgeb r4, [r0], #1 + sfi_breg r1, \ + ldrbgt r3, [\B], #1 + sfi_breg r1, \ + ldrbge r4, [\B], #1 + sfi_breg r1, \ + ldrb lr, [\B], #1 + sfi_breg r0, \ + strbgt r3, [\B], #1 + sfi_breg r0, \ + strbge r4, [\B], #1 subs r2, r2, ip - strb lr, [r0], #1 + sfi_breg r0, \ + strb lr, [\B], #1 blt 8b ands ip, r1, #3 beq 1b 10: bic r1, r1, #3 cmp ip, #2 - ldr lr, [r1], #4 + sfi_breg r1, \ + ldr lr, [\B], #4 beq 17f bgt 18f @@ -183,66 +259,71 @@ ENTRY(memcpy) CALGN( ands ip, r1, #31 ) CALGN( rsb ip, ip, #32 ) - CALGN( sbcnes r4, ip, r2 ) @ C is always set here + CALGN( sbcsne r4, ip, r2 ) @ C is always set here CALGN( subcc r2, r2, ip ) CALGN( bcc 15f ) -11: stmfd sp!, {r5 - r9} +11: push {r5 - r8, r10} cfi_adjust_cfa_offset (20) cfi_rel_offset (r5, 0) cfi_rel_offset (r6, 4) cfi_rel_offset (r7, 8) cfi_rel_offset (r8, 12) - cfi_rel_offset (r9, 16) + cfi_rel_offset (r10, 16) - PLD( pld [r1, #0] ) + PLD( sfi_pld r1, #0 ) PLD( subs r2, r2, #96 ) - PLD( pld [r1, #28] ) + PLD( sfi_pld r1, #28 ) PLD( blt 13f ) - PLD( pld [r1, #60] ) - PLD( pld [r1, #92] ) + PLD( sfi_pld r1, #60 ) + PLD( sfi_pld r1, #92 ) -12: PLD( pld [r1, #124] ) -13: ldmia r1!, {r4, r5, r6, r7} - mov r3, lr, pull #\pull +12: PLD( sfi_pld r1, #124 ) +13: sfi_breg r1, \ + ldmia \B!, {r4, r5, r6, r7} + mov r3, lr, PULL #\pull subs r2, r2, #32 - ldmia r1!, {r8, r9, ip, lr} - orr r3, r3, r4, push #\push - mov r4, r4, pull #\pull - orr r4, r4, r5, push #\push - mov r5, r5, pull #\pull - orr r5, r5, r6, push #\push - mov r6, r6, pull #\pull - orr r6, r6, r7, push #\push - mov r7, r7, pull #\pull - orr r7, r7, r8, push #\push - mov r8, r8, pull #\pull - orr r8, r8, r9, push #\push - mov r9, r9, pull #\pull - orr r9, r9, ip, push #\push - mov ip, ip, pull #\pull - orr ip, ip, lr, push #\push - stmia r0!, {r3, r4, r5, r6, r7, r8, r9, ip} + sfi_breg r1, \ + ldmia \B!, {r8, r10, ip, lr} + orr r3, r3, r4, PUSH #\push + mov r4, r4, PULL #\pull + orr r4, r4, r5, PUSH #\push + mov r5, r5, PULL #\pull + orr r5, r5, r6, PUSH #\push + mov r6, r6, PULL #\pull + orr r6, r6, r7, PUSH #\push + mov r7, r7, PULL #\pull + orr r7, r7, r8, PUSH #\push + mov r8, r8, PULL #\pull + orr r8, r8, r10, PUSH #\push + mov r10, r10, PULL #\pull + orr r10, r10, ip, PUSH #\push + mov ip, ip, PULL #\pull + orr ip, ip, lr, PUSH #\push + sfi_breg r0, \ + stmia \B!, {r3, r4, r5, r6, r7, r8, r10, ip} bge 12b PLD( cmn r2, #96 ) PLD( bge 13b ) - ldmfd sp!, {r5 - r9} + pop {r5 - r8, r10} cfi_adjust_cfa_offset (-20) cfi_restore (r5) cfi_restore (r6) cfi_restore (r7) cfi_restore (r8) - cfi_restore (r9) + cfi_restore (r10) 14: ands ip, r2, #28 beq 16f -15: mov r3, lr, pull #\pull - ldr lr, [r1], #4 +15: mov r3, lr, PULL #\pull + sfi_breg r1, \ + ldr lr, [\B], #4 subs ip, ip, #4 - orr r3, r3, lr, push #\push - str r3, [r0], #4 + orr r3, r3, lr, PUSH #\push + sfi_breg r0, \ + str r3, [\B], #4 bgt 15b CALGN( cmp r2, #0 ) CALGN( bge 11b ) diff --git a/ports/sysdeps/arm/memmove.S b/ports/sysdeps/arm/memmove.S index d33c1cef84..9d4d5b099e 100644 --- a/ports/sysdeps/arm/memmove.S +++ b/ports/sysdeps/arm/memmove.S @@ -17,7 +17,10 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include <sysdep.h> +#include <arm-features.h> /* * Data preload for architectures that support it (ARM V5TE and above) @@ -43,14 +46,15 @@ * Endian independent macros for shifting bytes within registers. */ #ifndef __ARMEB__ -#define pull lsr -#define push lsl +#define PULL lsr +#define PUSH lsl #else -#define pull lsl -#define push lsr +#define PULL lsl +#define PUSH lsr #endif .text + .syntax unified /* * Prototype: void *memmove(void *dest, const void *src, size_t n); @@ -71,7 +75,7 @@ ENTRY(memmove) bls HIDDEN_JUMPTARGET(memcpy) #endif - stmfd sp!, {r0, r4, lr} + push {r0, r4, lr} cfi_adjust_cfa_offset (12) cfi_rel_offset (r4, 4) cfi_rel_offset (lr, 8) @@ -83,13 +87,13 @@ ENTRY(memmove) subs r2, r2, #4 blt 8f ands ip, r0, #3 - PLD( pld [r1, #-4] ) + PLD( sfi_pld r1, #-4 ) bne 9f ands ip, r1, #3 bne 10f 1: subs r2, r2, #(28) - stmfd sp!, {r5 - r8} + push {r5 - r8} cfi_adjust_cfa_offset (16) cfi_rel_offset (r5, 0) cfi_rel_offset (r6, 4) @@ -98,54 +102,112 @@ ENTRY(memmove) blt 5f CALGN( ands ip, r1, #31 ) - CALGN( sbcnes r4, ip, r2 ) @ C is always set here + CALGN( sbcsne r4, ip, r2 ) @ C is always set here CALGN( bcs 2f ) CALGN( adr r4, 6f ) CALGN( subs r2, r2, ip ) @ C is set here - CALGN( add pc, r4, ip ) +#ifndef ARM_ALWAYS_BX + CALGN( add pc, r4, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)) +#else + CALGN( add r4, r4, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2)) + CALGN( bx r4 ) +#endif - PLD( pld [r1, #-4] ) + PLD( sfi_pld r1, #-4 ) 2: PLD( subs r2, r2, #96 ) - PLD( pld [r1, #-32] ) + PLD( sfi_pld r1, #-32 ) PLD( blt 4f ) - PLD( pld [r1, #-64] ) - PLD( pld [r1, #-96] ) + PLD( sfi_pld r1, #-64 ) + PLD( sfi_pld r1, #-96 ) -3: PLD( pld [r1, #-128] ) -4: ldmdb r1!, {r3, r4, r5, r6, r7, r8, ip, lr} +3: PLD( sfi_pld r1, #-128 ) +4: sfi_breg r1, \ + ldmdb \B!, {r3, r4, r5, r6, r7, r8, ip, lr} subs r2, r2, #32 - stmdb r0!, {r3, r4, r5, r6, r7, r8, ip, lr} + sfi_breg r0, \ + stmdb \B!, {r3, r4, r5, r6, r7, r8, ip, lr} bge 3b PLD( cmn r2, #96 ) PLD( bge 4b ) 5: ands ip, r2, #28 rsb ip, ip, #32 - addne pc, pc, ip @ C is always clear here +#ifndef ARM_ALWAYS_BX + /* C is always clear here. */ + addne pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) b 7f +#else + beq 7f + push {r10} + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r10, 0) + add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) + bx r10 +#endif + .p2align ARM_BX_ALIGN_LOG2 6: nop - ldr r3, [r1, #-4]! - ldr r4, [r1, #-4]! - ldr r5, [r1, #-4]! - ldr r6, [r1, #-4]! - ldr r7, [r1, #-4]! - ldr r8, [r1, #-4]! - ldr lr, [r1, #-4]! - - add pc, pc, ip + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r3, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r4, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r5, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r6, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r7, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr r8, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r1, \ + ldr lr, [\B, #-4]! + +#ifndef ARM_ALWAYS_BX + add pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) nop +#else + add r10, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) + bx r10 +#endif + .p2align ARM_BX_ALIGN_LOG2 nop - str r3, [r0, #-4]! - str r4, [r0, #-4]! - str r5, [r0, #-4]! - str r6, [r0, #-4]! - str r7, [r0, #-4]! - str r8, [r0, #-4]! - str lr, [r0, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r3, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r4, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r5, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r6, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r7, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str r8, [\B, #-4]! + .p2align ARM_BX_ALIGN_LOG2 + sfi_breg r0, \ + str lr, [\B, #-4]! + +#ifdef ARM_ALWAYS_BX + pop {r10} + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) +#endif CALGN( bcs 2b ) -7: ldmfd sp!, {r5 - r8} +7: pop {r5 - r8} cfi_adjust_cfa_offset (-16) cfi_restore (r5) cfi_restore (r6) @@ -153,40 +215,54 @@ ENTRY(memmove) cfi_restore (r8) 8: movs r2, r2, lsl #31 - ldrneb r3, [r1, #-1]! - ldrcsb r4, [r1, #-1]! - ldrcsb ip, [r1, #-1] - strneb r3, [r0, #-1]! - strcsb r4, [r0, #-1]! - strcsb ip, [r0, #-1] - -#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__) - ldmfd sp!, {r0, r4, lr} + sfi_breg r1, \ + ldrbne r3, [\B, #-1]! + sfi_breg r1, \ + ldrbcs r4, [\B, #-1]! + sfi_breg r1, \ + ldrbcs ip, [\B, #-1] + sfi_breg r0, \ + strbne r3, [\B, #-1]! + sfi_breg r0, \ + strbcs r4, [\B, #-1]! + sfi_breg r0, \ + strbcs ip, [\B, #-1] + +#if ((defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)) \ + || defined (ARM_ALWAYS_BX)) + pop {r0, r4, lr} cfi_adjust_cfa_offset (-12) cfi_restore (r4) cfi_restore (lr) bx lr #else - ldmfd sp!, {r0, r4, pc} + pop {r0, r4, pc} #endif cfi_restore_state 9: cmp ip, #2 - ldrgtb r3, [r1, #-1]! - ldrgeb r4, [r1, #-1]! - ldrb lr, [r1, #-1]! - strgtb r3, [r0, #-1]! - strgeb r4, [r0, #-1]! + sfi_breg r1, \ + ldrbgt r3, [\B, #-1]! + sfi_breg r1, \ + ldrbge r4, [\B, #-1]! + sfi_breg r1, \ + ldrb lr, [\B, #-1]! + sfi_breg r0, \ + strbgt r3, [\B, #-1]! + sfi_breg r0, \ + strbge r4, [\B, #-1]! subs r2, r2, ip - strb lr, [r0, #-1]! + sfi_breg r0, \ + strb lr, [\B, #-1]! blt 8b ands ip, r1, #3 beq 1b 10: bic r1, r1, #3 cmp ip, #2 - ldr r3, [r1, #0] + sfi_breg r1, \ + ldr r3, [\B, #0] beq 17f blt 18f @@ -198,66 +274,71 @@ ENTRY(memmove) CALGN( ands ip, r1, #31 ) CALGN( rsb ip, ip, #32 ) - CALGN( sbcnes r4, ip, r2 ) @ C is always set here + CALGN( sbcsne r4, ip, r2 ) @ C is always set here CALGN( subcc r2, r2, ip ) CALGN( bcc 15f ) -11: stmfd sp!, {r5 - r9} +11: push {r5 - r8, r10} cfi_adjust_cfa_offset (20) cfi_rel_offset (r5, 0) cfi_rel_offset (r6, 4) cfi_rel_offset (r7, 8) cfi_rel_offset (r8, 12) - cfi_rel_offset (r9, 16) + cfi_rel_offset (r10, 16) - PLD( pld [r1, #-4] ) + PLD( sfi_pld r1, #-4 ) PLD( subs r2, r2, #96 ) - PLD( pld [r1, #-32] ) + PLD( sfi_pld r1, #-32 ) PLD( blt 13f ) - PLD( pld [r1, #-64] ) - PLD( pld [r1, #-96] ) + PLD( sfi_pld r1, #-64 ) + PLD( sfi_pld r1, #-96 ) -12: PLD( pld [r1, #-128] ) -13: ldmdb r1!, {r7, r8, r9, ip} - mov lr, r3, push #\push +12: PLD( sfi_pld r1, #-128 ) +13: sfi_breg r1, \ + ldmdb \B!, {r7, r8, r10, ip} + mov lr, r3, PUSH #\push subs r2, r2, #32 - ldmdb r1!, {r3, r4, r5, r6} - orr lr, lr, ip, pull #\pull - mov ip, ip, push #\push - orr ip, ip, r9, pull #\pull - mov r9, r9, push #\push - orr r9, r9, r8, pull #\pull - mov r8, r8, push #\push - orr r8, r8, r7, pull #\pull - mov r7, r7, push #\push - orr r7, r7, r6, pull #\pull - mov r6, r6, push #\push - orr r6, r6, r5, pull #\pull - mov r5, r5, push #\push - orr r5, r5, r4, pull #\pull - mov r4, r4, push #\push - orr r4, r4, r3, pull #\pull - stmdb r0!, {r4 - r9, ip, lr} + sfi_breg r1, \ + ldmdb \B!, {r3, r4, r5, r6} + orr lr, lr, ip, PULL #\pull + mov ip, ip, PUSH #\push + orr ip, ip, r10, PULL #\pull + mov r10, r10, PUSH #\push + orr r10, r10, r8, PULL #\pull + mov r8, r8, PUSH #\push + orr r8, r8, r7, PULL #\pull + mov r7, r7, PUSH #\push + orr r7, r7, r6, PULL #\pull + mov r6, r6, PUSH #\push + orr r6, r6, r5, PULL #\pull + mov r5, r5, PUSH #\push + orr r5, r5, r4, PULL #\pull + mov r4, r4, PUSH #\push + orr r4, r4, r3, PULL #\pull + sfi_breg r0, \ + stmdb \B!, {r4 - r8, r10, ip, lr} bge 12b PLD( cmn r2, #96 ) PLD( bge 13b ) - ldmfd sp!, {r5 - r9} + pop {r5 - r8, r10} cfi_adjust_cfa_offset (-20) cfi_restore (r5) cfi_restore (r6) cfi_restore (r7) cfi_restore (r8) - cfi_restore (r9) + cfi_restore (r10) 14: ands ip, r2, #28 beq 16f -15: mov lr, r3, push #\push - ldr r3, [r1, #-4]! +15: mov lr, r3, PUSH #\push + sfi_breg r1, \ + ldr r3, [\B, #-4]! subs ip, ip, #4 - orr lr, lr, r3, pull #\pull - str lr, [r0, #-4]! + orr lr, lr, r3, PULL #\pull + sfi_breg r0, \ + str lr, [\B, #-4]! bgt 15b CALGN( cmp r2, #0 ) CALGN( bge 11b ) diff --git a/ports/sysdeps/arm/memset.S b/ports/sysdeps/arm/memset.S index 3152a84e80..a28cdc6205 100644 --- a/ports/sysdeps/arm/memset.S +++ b/ports/sysdeps/arm/memset.S @@ -16,8 +16,13 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include <sysdep.h> + .text + .syntax unified + /* void *memset (dstpp, c, len) */ ENTRY(memset) @@ -27,7 +32,8 @@ ENTRY(memset) 1: tst r3, #3 @ aligned yet? - strneb r1, [r3], #1 + sfi_breg r3, \ + strbne r1, [\B], #1 subne r2, r2, #1 bne 1b @@ -38,27 +44,35 @@ ENTRY(memset) 1: subs r2, r2, #8 - stmcsia r3!, {r1, ip} @ store up to 32 bytes per loop iteration - subcss r2, r2, #8 - stmcsia r3!, {r1, ip} - subcss r2, r2, #8 - stmcsia r3!, {r1, ip} - subcss r2, r2, #8 - stmcsia r3!, {r1, ip} + sfi_breg r3, \ + stmiacs \B!, {r1, ip} @ store up to 32 bytes per loop iteration + subscs r2, r2, #8 + sfi_breg r3, \ + stmiacs \B!, {r1, ip} + subscs r2, r2, #8 + sfi_breg r3, \ + stmiacs \B!, {r1, ip} + subscs r2, r2, #8 + sfi_breg r3, \ + stmiacs \B!, {r1, ip} bcs 1b and r2, r2, #7 2: subs r2, r2, #1 @ store up to 4 bytes per loop iteration - strcsb r1, [r3], #1 - subcss r2, r2, #1 - strcsb r1, [r3], #1 - subcss r2, r2, #1 - strcsb r1, [r3], #1 - subcss r2, r2, #1 - strcsb r1, [r3], #1 + sfi_breg r3, \ + strbcs r1, [\B], #1 + subscs r2, r2, #1 + sfi_breg r3, \ + strbcs r1, [\B], #1 + subscs r2, r2, #1 + sfi_breg r3, \ + strbcs r1, [\B], #1 + subscs r2, r2, #1 + sfi_breg r3, \ + strbcs r1, [\B], #1 bcs 2b - + DO_RET(lr) END(memset) libc_hidden_builtin_def (memset) diff --git a/ports/sysdeps/arm/preconfigure b/ports/sysdeps/arm/preconfigure index 20f6d91a12..908cd34303 100644 --- a/ports/sysdeps/arm/preconfigure +++ b/ports/sysdeps/arm/preconfigure @@ -1,50 +1,63 @@ +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local preconfigure fragment for sysdeps/arm + case "$machine" in arm*) - base_machine=arm - case $config_os in - linux-gnueabi*) - # Lets ask the compiler which ARM family we've got - # Unfortunately it doesn't define any flags for implementations - # that you might pass to -mcpu or -mtune - # Note if you add patterns here you must ensure that - # an appropriate directory exists in sysdeps/arm - archcppflag=`echo "" | - $CC $CFLAGS $CPPFLAGS -E -dM - | - grep __ARM_ARCH | - sed -e 's/^#define //' -e 's/ .*//'` + case $config_os in + linux-gnueabi*) + # If the compiler enables unwind tables by default, this causes + # problems with undefined symbols in -nostdlib link tests. To + # avoid this, add -fno-unwind-tables here and remove it in + # sysdeps/unix/sysv/linux/arm/configure.in after those tests have + # been run. + if test "${CFLAGS+set}" != "set"; then + CFLAGS="-g -O2" + fi + CFLAGS="$CFLAGS -fno-unwind-tables" + ;; + linux*) + as_fn_error $? "Old ABI no longer supported" "$LINENO" 5 + ;; + esac - case x$archcppflag in - x__ARM_ARCH_[89]*__) - machine=armv7 - echo "Found compiler is configured for something newer than v7 - using v7" - ;; + base_machine=arm + # Lets ask the compiler which ARM family we've got + # Unfortunately it doesn't define any flags for implementations + # that you might pass to -mcpu or -mtune + # Note if you add patterns here you must ensure that + # an appropriate directory exists in sysdeps/arm + archcppflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | + sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'` - x__ARM_ARCH_7A__) - machine=armv7 - echo "Found compiler is configured for $machine" - ;; + case "x$archcppflag" in + x__ARM_ARCH_89*__) + machine=armv7 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for something newer than v7 - using v7" >&5 +$as_echo "$as_me: Found compiler is configured for something newer than v7 - using v7" >&6;} + ;; - x__ARM_ARCH_6T2__) - machine=armv6t2 - echo "Found compiler is configured for $machine" - ;; + x__ARM_ARCH_7A__) + machine=armv7 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for $machine" >&5 +$as_echo "$as_me: Found compiler is configured for $machine" >&6;} + ;; - *) - machine=arm - echo 2>&1 "arm/preconfigure: Did not find ARM architecture type; using default" - ;; - esac + x__ARM_ARCH_6T2__) + machine=armv6t2 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for $machine" >&5 +$as_echo "$as_me: Found compiler is configured for $machine" >&6;} + ;; + x__ARM_ARCH_6*__) + machine=armv6 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for $machine" >&5 +$as_echo "$as_me: Found compiler is configured for $machine" >&6;} + ;; + *) + machine=arm + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: arm/preconfigure: Did not find ARM architecture type; using default" >&5 +$as_echo "$as_me: WARNING: arm/preconfigure: Did not find ARM architecture type; using default" >&2;} + ;; + esac - machine=arm/$machine - if [ "${CFLAGS+set}" != "set" ]; then - CFLAGS="-g -O2" - fi - CFLAGS="$CFLAGS -fno-unwind-tables" - ;; - linux*) - echo "Old ABI no longer supported" 2>&1 - exit 1 - ;; - esac - ;; + machine=arm/$machine esac diff --git a/ports/sysdeps/arm/preconfigure.in b/ports/sysdeps/arm/preconfigure.in new file mode 100644 index 0000000000..f8357955eb --- /dev/null +++ b/ports/sysdeps/arm/preconfigure.in @@ -0,0 +1,58 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local preconfigure fragment for sysdeps/arm + +case "$machine" in +arm*) + case $config_os in + linux-gnueabi*) + # If the compiler enables unwind tables by default, this causes + # problems with undefined symbols in -nostdlib link tests. To + # avoid this, add -fno-unwind-tables here and remove it in + # sysdeps/unix/sysv/linux/arm/configure.in after those tests have + # been run. + if test "${CFLAGS+set}" != "set"; then + CFLAGS="-g -O2" + fi + CFLAGS="$CFLAGS -fno-unwind-tables" + ;; + linux*) + AC_MSG_ERROR([Old ABI no longer supported]) + ;; + esac + + base_machine=arm + # Lets ask the compiler which ARM family we've got + # Unfortunately it doesn't define any flags for implementations + # that you might pass to -mcpu or -mtune + # Note if you add patterns here you must ensure that + # an appropriate directory exists in sysdeps/arm + archcppflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | + sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'` + + case "x$archcppflag" in + x__ARM_ARCH_[89]*__) + machine=armv7 + AC_MSG_NOTICE([Found compiler is configured for something newer than v7 - using v7]) + ;; + + x__ARM_ARCH_7A__) + machine=armv7 + AC_MSG_NOTICE([Found compiler is configured for $machine]) + ;; + + x__ARM_ARCH_6T2__) + machine=armv6t2 + AC_MSG_NOTICE([Found compiler is configured for $machine]) + ;; + x__ARM_ARCH_6*__) + machine=armv6 + AC_MSG_NOTICE([Found compiler is configured for $machine]) + ;; + *) + machine=arm + AC_MSG_WARN([arm/preconfigure: Did not find ARM architecture type; using default]) + ;; + esac + + machine=arm/$machine +esac diff --git a/ports/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S index 4b7542ad35..f750470652 100644 --- a/ports/sysdeps/arm/setjmp.S +++ b/ports/sysdeps/arm/setjmp.S @@ -16,9 +16,9 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* ??? Needs more rearrangement for the STM to handle thumb mode. */ +#define NO_THUMB #include <sysdep.h> -#define _SETJMP_H -#define _ASM #include <bits/setjmp.h> #include <rtld-global-offsets.h> #include <arm-features.h> @@ -27,7 +27,8 @@ ENTRY (__sigsetjmp) mov ip, r0 /* Save registers */ - stmia ip!, {v1-v6, sl, fp, sp, lr} + sfi_breg ip, \ + stmia \B!, JMP_BUF_REGLIST #if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__ # define NEED_HWCAP 1 @@ -64,11 +65,13 @@ ENTRY (__sigsetjmp) Don't use VFP instructions directly because this code is used in non-VFP multilibs. */ /* Following instruction is vstmia ip!, {d8-d15}. */ - stc p11, cr8, [ip], #64 + sfi_breg ip, \ + stc p11, cr8, [\B], #64 /* Store the floating-point status register. */ /* Following instruction is vmrs a4, fpscr. */ mrc p10, 7, a4, cr1, cr0, 0 - str a4, [ip], #4 + sfi_breg ip, \ + str a4, [\B], #4 .Lno_vfp: #ifndef ARM_ASSUME_NO_IWMMXT @@ -77,12 +80,18 @@ ENTRY (__sigsetjmp) /* Save the call-preserved iWMMXt registers. */ /* Following instructions are wstrd wr10, [ip], #8 (etc.) */ - stcl p1, cr10, [r12], #8 - stcl p1, cr11, [r12], #8 - stcl p1, cr12, [r12], #8 - stcl p1, cr13, [r12], #8 - stcl p1, cr14, [r12], #8 - stcl p1, cr15, [r12], #8 + sfi_breg r12, \ + stcl p1, cr10, [\B], #8 + sfi_breg r12, \ + stcl p1, cr11, [\B], #8 + sfi_breg r12, \ + stcl p1, cr12, [\B], #8 + sfi_breg r12, \ + stcl p1, cr13, [\B], #8 + sfi_breg r12, \ + stcl p1, cr14, [\B], #8 + sfi_breg r12, \ + stcl p1, cr15, [\B], #8 .Lno_iwmmxt: #endif @@ -91,12 +100,12 @@ ENTRY (__sigsetjmp) #ifdef NEED_HWCAP # ifdef IS_IN_rtld -1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS .Lrtld_local_ro: .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) # else # ifdef PIC -1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS .Lrtld_global_ro: .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) # else diff --git a/ports/sysdeps/arm/start.S b/ports/sysdeps/arm/start.S index a1d15b8104..0a57b0becb 100644 --- a/ports/sysdeps/arm/start.S +++ b/ports/sysdeps/arm/start.S @@ -80,14 +80,14 @@ _start: mov lr, #0 /* Pop argc off the stack and save a pointer to argv */ - ldr a2, [sp], #4 + pop { a2 } mov a3, sp /* Push stack limit */ - str a3, [sp, #-4]! + push { a3 } /* Push rtld_fini */ - str a1, [sp, #-4]! + push { a1 } #ifdef SHARED ldr sl, .L_GOT @@ -97,7 +97,7 @@ _start: ldr ip, .L_GOT+4 /* __libc_csu_fini */ ldr ip, [sl, ip] - str ip, [sp, #-4]! /* Push __libc_csu_fini */ + push { ip } /* Push __libc_csu_fini */ ldr a4, .L_GOT+8 /* __libc_csu_init */ ldr a4, [sl, a4] @@ -113,7 +113,7 @@ _start: ldr ip, =__libc_csu_fini /* Push __libc_csu_fini */ - str ip, [sp, #-4]! + push { ip } /* Set up the other arguments in registers */ ldr a1, =main diff --git a/ports/sysdeps/arm/strlen.S b/ports/sysdeps/arm/strlen.S index 15e922118a..7d358a7249 100644 --- a/ports/sysdeps/arm/strlen.S +++ b/ports/sysdeps/arm/strlen.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include <sysdep.h> /* size_t strlen(const char *S) @@ -23,9 +25,13 @@ * exit: r0 = len */ + .syntax unified + .text + ENTRY(strlen) bic r1, r0, $3 @ addr of word containing first byte - ldr r2, [r1], $4 @ get the first word + sfi_breg r1, \ + ldr r2, [\B], $4 @ get the first word ands r3, r0, $3 @ how many bytes are duff? rsb r0, r3, $0 @ get - that number into counter. beq Laligned @ skip into main check routine if no @@ -49,7 +55,8 @@ Laligned: @ here, we have a word in r2. Does it tstne r2, $0x00ff0000 @ tstne r2, $0xff000000 @ addne r0, r0, $4 @ if not, the string is 4 bytes longer - ldrne r2, [r1], $4 @ and we continue to the next word + sfi_breg r1, \ + ldrne r2, [\B], $4 @ and we continue to the next word bne Laligned @ Llastword: @ drop through to here once we find a #ifdef __ARMEB__ diff --git a/ports/sysdeps/arm/sub_n.S b/ports/sysdeps/arm/sub_n.S new file mode 100644 index 0000000000..8eafa41e64 --- /dev/null +++ b/ports/sysdeps/arm/sub_n.S @@ -0,0 +1,2 @@ +#define USE_AS_SUB_N +#include "add_n.S" diff --git a/ports/sysdeps/arm/submul_1.S b/ports/sysdeps/arm/submul_1.S new file mode 100644 index 0000000000..2d17490d8b --- /dev/null +++ b/ports/sysdeps/arm/submul_1.S @@ -0,0 +1,74 @@ +/* mpn_submul_1 -- multiply and subtract bignums. + Copyright (C) 2013 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> + + .syntax unified + .text + +@ cycles/limb +@ StrongArm ? +@ Cortex-A8 ? +@ Cortex-A9 ? +@ Cortex-A15 4 + +/* mp_limb_t mpn_submul_1(res_ptr, src1_ptr, size, s2_limb) */ + +ENTRY (__mpn_submul_1) + push { r4, r5, r6, r7 } + cfi_adjust_cfa_offset (16) + cfi_rel_offset (r4, 0) + cfi_rel_offset (r5, 4) + cfi_rel_offset (r6, 8) + cfi_rel_offset (r7, 12) + + sfi_breg r1, \ + ldr r6, [\B], #4 + sfi_breg r0, \ + ldr r7, [\B] + mov r4, #0 /* init carry in */ + b 1f +0: + sfi_breg r1, \ + ldr r6, [\B], #4 /* load next ul */ + adds r5, r5, r4 /* (lpl, c) = lpl + cl */ + adc r4, ip, #0 /* cl = hpl + c */ + subs r5, r7, r5 /* (lpl, !c) = rl - lpl */ + sfi_breg r0, \ + ldr r7, [\B, #4] /* load next rl */ + it cc + addcc r4, r4, #1 /* cl += !c */ + sfi_breg r0, \ + str r5, [\B], #4 +1: + umull r5, ip, r6, r3 /* (hpl, lpl) = ul * vl */ + subs r2, r2, #1 + bne 0b + + adds r5, r5, r4 /* (lpl, c) = lpl + cl */ + adc r4, ip, #0 /* cl = hpl + c */ + subs r5, r7, r5 /* (lpl, !c) = rl - lpl */ + sfi_breg r0, \ + str r5, [\B], #4 + it cc + addcc r4, r4, #1 /* cl += !c */ + mov r0, r4 /* return carry */ + + pop { r4, r5, r6, r7 } + DO_RET (lr) +END (__mpn_submul_1) diff --git a/ports/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h index 0e6f645e80..83df7ebc3a 100644 --- a/ports/sysdeps/arm/sysdep.h +++ b/ports/sysdeps/arm/sysdep.h @@ -19,9 +19,42 @@ #include <sysdeps/generic/sysdep.h> #include <features.h> -#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \ - && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__)) -# define __USE_BX__ +/* The __ARM_ARCH define is provided by gcc 4.8. Construct it otherwise. */ +#ifndef __ARM_ARCH +# ifdef __ARM_ARCH_2__ +# define __ARM_ARCH 2 +# elif defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) +# define __ARM_ARCH 3 +# elif defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__) +# define __ARM_ARCH 4 +# elif defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5E__) \ + || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) \ + || defined(__ARM_ARCH_5TEJ__) +# define __ARM_ARCH 5 +# elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ + || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \ + || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) +# define __ARM_ARCH 6 +# elif defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ + || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ + || defined(__ARM_ARCH_7EM__) +# define __ARM_ARCH 7 +# else +# error unknown arm architecture +# endif +#endif + +#if __ARM_ARCH > 4 || defined (__ARM_ARCH_4T__) +# define ARCH_HAS_BX +#endif +#if __ARM_ARCH > 4 +# define ARCH_HAS_BLX +#endif +#if __ARM_ARCH > 6 || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) +# define ARCH_HAS_HARD_TP +#endif +#if __ARM_ARCH > 6 || defined (__ARM_ARCH_6T2__) +# define ARCH_HAS_T2 #endif #ifdef __ASSEMBLER__ @@ -33,65 +66,61 @@ #define PLTJMP(_x) _x##(PLT) -/* APCS-32 doesn't preserve the condition codes across function call. */ -#ifdef __APCS_32__ -#define LOADREGS(cond, base, reglist...)\ - ldm##cond base,reglist -#ifdef __USE_BX__ -#define RETINSTR(cond, reg) \ - bx##cond reg -#define DO_RET(_reg) \ - bx _reg +#ifdef ARCH_HAS_BX +# define BX(R) bx R +# define BXC(C, R) bx##C R +# ifdef ARCH_HAS_BLX +# define BLX(R) blx R +# else +# define BLX(R) mov lr, pc; bx R +# endif #else -#define RETINSTR(cond, reg) \ - mov##cond pc, reg -#define DO_RET(_reg) \ - mov pc, _reg -#endif -#else /* APCS-26 */ -#define LOADREGS(cond, base, reglist...)\ - ldm##cond base,reglist^ -#define RETINSTR(cond, reg) \ - mov##cond##s pc, reg -#define DO_RET(_reg) \ - movs pc, _reg +# define BX(R) mov pc, R +# define BXC(C, R) mov##C pc, R +# define BLX(R) mov lr, pc; mov pc, R #endif +#define DO_RET(R) BX(R) +#define RETINSTR(C, R) BXC(C, R) + /* Define an entry point visible from C. */ -#define ENTRY(name) \ - .globl C_SYMBOL_NAME(name); \ - .type C_SYMBOL_NAME(name),%function; \ - .align ALIGNARG(4); \ - C_LABEL(name) \ - .cfi_sections .debug_frame; \ - cfi_startproc; \ - CALL_MCOUNT +#define ENTRY(name) \ + .globl C_SYMBOL_NAME(name); \ + .type C_SYMBOL_NAME(name),%function; \ + .align ALIGNARG(4); \ + C_LABEL(name) \ + CFI_SECTIONS; \ + cfi_startproc; \ + CALL_MCOUNT + +#define CFI_SECTIONS \ + .cfi_sections .debug_frame #undef END -#define END(name) \ - cfi_endproc; \ - ASM_SIZE_DIRECTIVE(name) +#define END(name) \ + cfi_endproc; \ + ASM_SIZE_DIRECTIVE(name) /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF /* Call __gnu_mcount_nc if GCC >= 4.4. */ #if __GNUC_PREREQ(4,4) -#define CALL_MCOUNT \ - str lr,[sp, #-4]!; \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (lr, 0); \ - bl PLTJMP(mcount); \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (lr) +#define CALL_MCOUNT \ + push {lr}; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ + bl PLTJMP(mcount); \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr) #else /* else call _mcount */ -#define CALL_MCOUNT \ - str lr,[sp, #-4]!; \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (lr, 0); \ - bl PLTJMP(mcount); \ - ldr lr, [sp], #4; \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (lr) +#define CALL_MCOUNT \ + push {lr}; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ + bl PLTJMP(mcount); \ + pops {lr}; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr) #endif #else #define CALL_MCOUNT /* Do nothing. */ @@ -114,4 +143,125 @@ the caller. */ .eabi_attribute 24, 1 +/* The thumb2 encoding is reasonably complete. Unless suppressed, use it. */ + .syntax unified +# if defined(__thumb2__) && !defined(NO_THUMB) + .thumb +#else +# undef __thumb__ +# undef __thumb2__ + .arm +# endif + +/* Load or store to/from a pc-relative EXPR into/from R, using T. */ +# ifdef __thumb2__ +# define LDST_PCREL(OP, R, T, EXPR) \ + ldr T, 98f; \ + .subsection 2; \ +98: .word EXPR - 99f - PC_OFS; \ + .previous; \ +99: add T, T, pc; \ + OP R, [T] +# else +# define LDST_PCREL(OP, R, T, EXPR) \ + ldr T, 98f; \ + .subsection 2; \ +98: .word EXPR - 99f - PC_OFS; \ + .previous; \ +99: OP R, [pc, T] +# endif + +/* Cope with negative memory offsets, which thumb can't encode. + Use NEGOFF_ADJ_BASE to (conditionally) alter the base register, + and then NEGOFF_OFF1 to use 0 for thumb and the offset for arm, + or NEGOFF_OFF2 to use A-B for thumb and A for arm. */ +# ifdef __thumb2__ +# define NEGOFF_ADJ_BASE(R, OFF) add R, R, $OFF +# define NEGOFF_ADJ_BASE2(D, S, OFF) add D, S, $OFF +# define NEGOFF_OFF1(R, OFF) [R] +# define NEGOFF_OFF2(R, OFFA, OFFB) [R, $((OFFA) - (OFFB))] +# else +# define NEGOFF_ADJ_BASE(R, OFF) +# define NEGOFF_ADJ_BASE2(D, S, OFF) mov D, S +# define NEGOFF_OFF1(R, OFF) [R, $OFF] +# define NEGOFF_OFF2(R, OFFA, OFFB) [R, $OFFA] +# endif + +/* Helper to get the TLS base pointer. The interface is that TMP is a + register that may be used to hold the LR, if necessary. TMP may be + LR itself to indicate that LR need not be saved. The base pointer + is returned in R0. Only R0 and TMP are modified. */ + +# ifdef ARCH_HAS_HARD_TP +/* If the cpu has cp15 available, use it. */ +# define GET_TLS(TMP) mrc p15, 0, r0, c13, c0, 3 +# else +/* At this generic level we have no tricks to pull. Call the ABI routine. */ +# define GET_TLS(TMP) \ + push { r1, r2, r3, lr }; \ + cfi_remember_state; \ + cfi_adjust_cfa_offset (16); \ + cfi_rel_offset (r1, 0); \ + cfi_rel_offset (r2, 4); \ + cfi_rel_offset (r3, 8); \ + cfi_rel_offset (lr, 12); \ + bl __aeabi_read_tp; \ + pop { r1, r2, r3, lr }; \ + cfi_restore_state +# endif /* ARCH_HAS_HARD_TP */ + +# ifndef ARM_SFI_MACROS +# define ARM_SFI_MACROS 1 +/* This assembly macro is prepended to any load/store instruction, + pulling the base register out of the addressing mode syntax and + making it the first operand of the macro. For example: + ldr r0, [r1] + becomes: + sfi_breg r1, ldr r0, [\B] + The \B stands in for the base register that is the first operand + to the macro, so we can avoid error-prone repetition of the base + register in two places on the line. + + This is used for all memory access through a base register other + than PC or SP. It's intended to support SFI schemes such as + Native Client, where the OS will enforce that all load/store + instructions use a special form. In any such configuration, + another sysdep.h file will have defined ARM_SFI_MACROS and + provided its own assembly macros with the same interface. */ + + .macro sfi_breg basereg, insn, operands:vararg + .macro _sfi_breg_doit B + \insn \operands + .endm + _sfi_breg_doit \basereg + .purgem _sfi_breg_doit + .endm + +/* This assembly macro replaces the "pld" instruction. + The syntax: + sfi_pld REGISTER, #OFFSET + is exactly equivalent to: + sfi_breg REGISTER, pld [\B, #OFFSET] + (and ", #OFFSET" is optional). We have a separate macro + only to work around a bug in GAS versions prior to 2.23.2, + that misparses the sfi_breg macro expansion in this case. */ + + .macro sfi_pld basereg, offset=#0 + pld [\basereg, \offset] + .endm + +/* This macro precedes any instruction that directly changes the SP. + It's not needed for push/pop or for any kind of load or store that + implicitly changes the SP via the ! syntax. */ +# define sfi_sp /* Nothing to do. */ + +# endif + #endif /* __ASSEMBLER__ */ + +/* This number is the offset from the pc at the current location. */ +#ifdef __thumb__ +# define PC_OFS 4 +#else +# define PC_OFS 8 +#endif diff --git a/ports/sysdeps/ia64/dl-fptr.h b/ports/sysdeps/ia64/dl-fptr.h index c2bef6c288..447c098aff 100644 --- a/ports/sysdeps/ia64/dl-fptr.h +++ b/ports/sysdeps/ia64/dl-fptr.h @@ -32,4 +32,14 @@ #define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \ asm ("movl %0 = @gprel (" #symbol ");; add %0 = %0, gp" : "=&r" (var)); +/* We don't have a gcc helper to extract the plabel info. */ +#define ELF_PTR_TO_FDESC(ptr) \ + ({ union { \ + void *_ptr; \ + struct fdesc *_fdesc; \ + } _u; \ + _u._ptr = ptr; \ + _u._fdesc; \ + }) + #endif /* !dl_ia64_fptr_h */ diff --git a/ports/sysdeps/ia64/dl-machine.h b/ports/sysdeps/ia64/dl-machine.h index 2eb80d752f..dd469d7a73 100644 --- a/ports/sysdeps/ia64/dl-machine.h +++ b/ports/sysdeps/ia64/dl-machine.h @@ -119,7 +119,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) /* This function will be called to perform the relocation. */ if (!profile) - doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_resolve)->ip; + doit = (Elf64_Addr) ELF_PTR_TO_FDESC (&_dl_runtime_resolve)->ip; else { if (GLRO(dl_profile) != NULL @@ -129,7 +129,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) want profiling and the timers are started. */ GL(dl_profile_map) = l; } - doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_profile)->ip; + doit = (Elf64_Addr) ELF_PTR_TO_FDESC (&_dl_runtime_profile)->ip; } reserve[1] = doit; diff --git a/ports/sysdeps/ia64/entry.h b/ports/sysdeps/ia64/entry.h index b93e1b6a57..e11b49fc53 100644 --- a/ports/sysdeps/ia64/entry.h +++ b/ports/sysdeps/ia64/entry.h @@ -1,10 +1,13 @@ +#include <link.h> +#include <dl-fptr.h> + #ifndef __ASSEMBLY__ extern void _start (void); #endif /* The function's entry point is stored in the first word of the function descriptor (plabel) of _start(). */ -#define ENTRY_POINT (((long int *) _start)[0]) +#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip /* We have to provide a special declaration. */ #define ENTRY_POINT_DECL(class) class void _start (void); diff --git a/ports/sysdeps/ia64/fpu/libm_error.c b/ports/sysdeps/ia64/fpu/libm_error.c index 8ef4bb5a73..a9307dd4b5 100644 --- a/ports/sysdeps/ia64/fpu/libm_error.c +++ b/ports/sysdeps/ia64/fpu/libm_error.c @@ -162,80 +162,79 @@ struct exceptionl excl; # endif -#define STATIC static +#define _DECL_NUM(type, prefix, var, bytes...) \ + ALIGNIT static const union { \ + const char _bytes[sizeof (type)]; \ + const type num; \ + } prefix ## var = { \ + ._bytes = bytes, \ + } + +#define DECL_FLOAT(var, bytes...) \ + _DECL_NUM (float, float_, var, ##bytes) + +DECL_FLOAT(inf, {0x00,0x00,0x80,0x7F}); +DECL_FLOAT(huge, {0xFF,0xFF,0x7F,0x7F}); +DECL_FLOAT(zero, {0x00,0x00,0x00,0x00}); +DECL_FLOAT(neg_inf, {0x00,0x00,0x80,0xFF}); +DECL_FLOAT(neg_huge, {0xFF,0xFF,0x7F,0xFF}); +DECL_FLOAT(neg_zero, {0x00,0x00,0x00,0x80}); -ALIGNIT -STATIC const char float_inf[4] = {0x00,0x00,0x80,0x7F}; -ALIGNIT -STATIC const char float_huge[4] = {0xFF,0xFF,0x7F,0x7F}; -ALIGNIT -STATIC const char float_zero[4] = {0x00,0x00,0x00,0x00}; -ALIGNIT -STATIC const char float_neg_inf[4] = {0x00,0x00,0x80,0xFF}; -ALIGNIT -STATIC const char float_neg_huge[4] = {0xFF,0xFF,0x7F,0xFF}; -ALIGNIT -STATIC const char float_neg_zero[4] = {0x00,0x00,0x00,0x80}; -ALIGNIT -STATIC const char double_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F}; +#define DECL_DOUBLE(var, bytes...) \ + _DECL_NUM (double, double_, var, ##bytes) + +DECL_DOUBLE(inf, {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F}); #ifndef _LIBC -ALIGNIT -STATIC const char double_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F}; +DECL_DOUBLE(huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F}); #endif -ALIGNIT -STATIC const char double_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; -ALIGNIT -STATIC const char double_neg_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF}; +DECL_DOUBLE(zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}); +DECL_DOUBLE(neg_inf, {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF}); #ifndef _LIBC -ALIGNIT -STATIC const char double_neg_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF}; +DECL_DOUBLE(neg_huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF}); #endif -ALIGNIT -STATIC const char double_neg_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80}; -ALIGNIT -STATIC const char long_double_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00}; -ALIGNIT +DECL_DOUBLE(neg_zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80}); + +#define DECL_LONG_DOUBLE(var, bytes...) \ + _DECL_NUM (long double, long_double_, var, ##bytes) + +DECL_LONG_DOUBLE(inf, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00}); #ifndef _LIBC -STATIC const char long_double_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00}; +DECL_LONG_DOUBLE(huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00}); #endif -ALIGNIT -STATIC const char long_double_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; -ALIGNIT -STATIC const char long_double_neg_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}; -ALIGNIT +DECL_LONG_DOUBLE(zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}); +DECL_LONG_DOUBLE(neg_inf, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}); #ifndef _LIBC -STATIC const char long_double_neg_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}; +DECL_LONG_DOUBLE(neg_huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}); #endif -ALIGNIT -STATIC const char long_double_neg_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00}; +DECL_LONG_DOUBLE(neg_zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00}); -#define RETVAL_HUGE_VALL *(long double *)retval = *(long double *)long_double_inf -#define RETVAL_NEG_HUGE_VALL *(long double *)retval = *(long double *)long_double_neg_inf -#define RETVAL_HUGEL *(long double *)retval = (long double)*(float *)float_huge -#define RETVAL_NEG_HUGEL *(long double *)retval =(long double)*(float*)float_neg_huge +#define RETVAL_HUGE_VALL *(long double *)retval = long_double_inf.num +#define RETVAL_NEG_HUGE_VALL *(long double *)retval = long_double_neg_inf.num +#define RETVAL_HUGEL *(long double *)retval = (long double)float_huge.num +#define RETVAL_NEG_HUGEL *(long double *)retval = (long double)float_neg_huge.num -#define RETVAL_HUGE_VALD *(double *)retval = *(double *) double_inf -#define RETVAL_NEG_HUGE_VALD *(double *)retval = *(double *) double_neg_inf -#define RETVAL_HUGED *(double *)retval = (double) *(float *)float_huge -#define RETVAL_NEG_HUGED *(double *)retval = (double) *(float *) float_neg_huge +#define RETVAL_HUGE_VALD *(double *)retval = double_inf.num +#define RETVAL_NEG_HUGE_VALD *(double *)retval = double_neg_inf.num +#define RETVAL_HUGED *(double *)retval = (double)float_huge.num +#define RETVAL_NEG_HUGED *(double *)retval = (double)float_neg_huge.num -#define RETVAL_HUGE_VALF *(float *)retval = *(float *) float_inf -#define RETVAL_NEG_HUGE_VALF *(float *)retval = *(float *) float_neg_inf -#define RETVAL_HUGEF *(float *)retval = *(float *) float_huge -#define RETVAL_NEG_HUGEF *(float *)retval = *(float *) float_neg_huge +#define RETVAL_HUGE_VALF *(float *)retval = float_inf.num +#define RETVAL_NEG_HUGE_VALF *(float *)retval = float_neg_inf.num +#define RETVAL_HUGEF *(float *)retval = float_huge.num +#define RETVAL_NEG_HUGEF *(float *)retval = float_neg_huge.num -#define ZEROL_VALUE *(long double *)long_double_zero -#define ZEROD_VALUE *(double *)double_zero -#define ZEROF_VALUE *(float *)float_zero +#define ZEROL_VALUE long_double_zero.num +#define ZEROD_VALUE double_zero.num +#define ZEROF_VALUE float_zero.num -#define RETVAL_ZEROL *(long double *)retval = *(long double *)long_double_zero -#define RETVAL_ZEROD *(double *)retval = *(double *)double_zero -#define RETVAL_ZEROF *(float *)retval = *(float *)float_zero +#define RETVAL_ZEROL *(long double *)retval = long_double_zero.num +#define RETVAL_ZEROD *(double *)retval = double_zero.num +#define RETVAL_ZEROF *(float *)retval = float_zero.num -#define RETVAL_NEG_ZEROL *(long double *)retval = *(long double *)long_double_neg_zero -#define RETVAL_NEG_ZEROD *(double *)retval = *(double *)double_neg_zero -#define RETVAL_NEG_ZEROF *(float *)retval = *(float *)float_neg_zero +#define RETVAL_NEG_ZEROL *(long double *)retval = long_double_neg_zero.num +#define RETVAL_NEG_ZEROD *(double *)retval = double_neg_zero.num +#define RETVAL_NEG_ZEROF *(float *)retval = float_neg_zero.num #define RETVAL_ONEL *(long double *)retval = (long double) 1.0 #define RETVAL_ONED *(double *)retval = 1.0 diff --git a/ports/sysdeps/ia64/memchr.S b/ports/sysdeps/ia64/memchr.S index f23a41cb76..6102644071 100644 --- a/ports/sysdeps/ia64/memchr.S +++ b/ports/sysdeps/ia64/memchr.S @@ -154,7 +154,4 @@ ENTRY(__memchr) END(__memchr) weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif libc_hidden_builtin_def (memchr) diff --git a/ports/sysdeps/m68k/memchr.S b/ports/sysdeps/m68k/memchr.S index a15ebded00..07b102523d 100644 --- a/ports/sysdeps/m68k/memchr.S +++ b/ports/sysdeps/m68k/memchr.S @@ -304,7 +304,4 @@ L(L9:) END(__memchr) weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif libc_hidden_builtin_def (memchr) diff --git a/ports/sysdeps/mips/__longjmp.c b/ports/sysdeps/mips/__longjmp.c index a9efb0dac4..67bdb86cf8 100644 --- a/ports/sysdeps/mips/__longjmp.c +++ b/ports/sysdeps/mips/__longjmp.c @@ -23,8 +23,8 @@ #error This file uses GNU C extensions; you must compile with GCC. #endif -void -__longjmp (env_arg, val_arg) +static void __attribute__ ((nomips16)) +____longjmp (env_arg, val_arg) __jmp_buf env_arg; int val_arg; { @@ -86,3 +86,5 @@ __longjmp (env_arg, val_arg) /* Avoid `volatile function does return' warnings. */ for (;;); } + +strong_alias (____longjmp, __longjmp); diff --git a/ports/sysdeps/mips/abort-instr.h b/ports/sysdeps/mips/abort-instr.h index d7d8d501b3..7ccae5736b 100644 --- a/ports/sysdeps/mips/abort-instr.h +++ b/ports/sysdeps/mips/abort-instr.h @@ -1,2 +1,6 @@ /* An instruction which should crash any program is a breakpoint. */ -#define ABORT_INSTRUCTION asm ("break 255") +#ifdef __mips16 +# define ABORT_INSTRUCTION asm ("break 63") +#else +# define ABORT_INSTRUCTION asm ("break 255") +#endif diff --git a/ports/sysdeps/mips/add_n.S b/ports/sysdeps/mips/add_n.S index 7a3848f600..e83fc81707 100644 --- a/ports/sysdeps/mips/add_n.S +++ b/ports/sysdeps/mips/add_n.S @@ -118,4 +118,4 @@ L(end): addu $11,$11,$2 sw $11,0($4) j $31 or $2,$2,$8 - .end __mpn_add_n +END (__mpn_add_n) diff --git a/ports/sysdeps/mips/bits/atomic.h b/ports/sysdeps/mips/bits/atomic.h index 566b3dd2b8..bdc3acef7b 100644 --- a/ports/sysdeps/mips/bits/atomic.h +++ b/ports/sysdeps/mips/bits/atomic.h @@ -78,9 +78,12 @@ typedef uintmax_t uatomic_max_t; #define MIPS_SYNC_STR_1(X) MIPS_SYNC_STR_2(X) #define MIPS_SYNC_STR MIPS_SYNC_STR_1(MIPS_SYNC) -#if __GNUC_PREREQ (4, 8) +#if __GNUC_PREREQ (4, 8) || (defined __mips16 && __GNUC_PREREQ (4, 7)) /* The __atomic_* builtins are available in GCC 4.7 and later, but MIPS - support for their efficient implementation was added only in GCC 4.8. */ + support for their efficient implementation was added only in GCC 4.8. + We still want to use them even with GCC 4.7 for MIPS16 code where we + have no assembly alternative available and want to avoid the __sync_* + if at all possible. */ /* Compare and exchange. For all "bool" routines, we return FALSE if exchange succesful. */ @@ -200,7 +203,33 @@ typedef uintmax_t uatomic_max_t; # define atomic_exchange_and_add_rel(mem, value) \ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \ __ATOMIC_RELEASE) -#else /* !__GNUC_PREREQ (4, 8) */ + +#elif defined __mips16 /* !__GNUC_PREREQ (4, 7) */ +/* This implementation using __sync* builtins will be removed once glibc + requires GCC 4.7 or later to build. */ + +# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ + __sync_val_compare_and_swap ((mem), (oldval), (newval)) +# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ + (!__sync_bool_compare_and_swap ((mem), (oldval), (newval))) + +# define atomic_exchange_acq(mem, newval) \ + __sync_lock_test_and_set ((mem), (newval)) + +# define atomic_exchange_and_add(mem, val) \ + __sync_fetch_and_add ((mem), (val)) + +# define atomic_bit_test_set(mem, bit) \ + ({ __typeof (bit) __bit = (bit); \ + (__sync_fetch_and_or ((mem), 1 << (__bit)) & (1 << (__bit))); }) + +# define atomic_and(mem, mask) (void) __sync_fetch_and_and ((mem), (mask)) +# define atomic_and_val(mem, mask) __sync_fetch_and_and ((mem), (mask)) + +# define atomic_or(mem, mask) (void) __sync_fetch_and_or ((mem), (mask)) +# define atomic_or_val(mem, mask) __sync_fetch_and_or ((mem), (mask)) + +#else /* !__mips16 && !__GNUC_PREREQ (4, 8) */ /* This implementation using inline assembly will be removed once glibc requires GCC 4.8 or later to build. */ @@ -443,15 +472,21 @@ typedef uintmax_t uatomic_max_t; # define atomic_exchange_and_add_rel(mem, value) \ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \ MIPS_SYNC_STR, "") -#endif /* __GNUC_PREREQ (4, 8) */ + +#endif /* !__mips16 && !__GNUC_PREREQ (4, 8) */ /* TODO: More atomic operations could be implemented efficiently; only the basic requirements are done. */ -#define atomic_full_barrier() \ +#ifdef __mips16 +# define atomic_full_barrier() __sync_synchronize () + +#else /* !__mips16 */ +# define atomic_full_barrier() \ __asm__ __volatile__ (".set push\n\t" \ MIPS_PUSH_MIPS2 \ MIPS_SYNC_STR "\n\t" \ ".set pop" : : : "memory") +#endif /* !__mips16 */ #endif /* bits/atomic.h */ diff --git a/ports/sysdeps/mips/bits/nan.h b/ports/sysdeps/mips/bits/nan.h index ffbb3b5d5d..80f7866a97 100644 --- a/ports/sysdeps/mips/bits/nan.h +++ b/ports/sysdeps/mips/bits/nan.h @@ -1,4 +1,4 @@ -/* `NAN' constant for IEEE 754 machines. +/* `NAN' constant for IEEE 754 machines. MIPS version. Copyright (C) 1992-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,7 +13,7 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _MATH_H @@ -21,20 +21,21 @@ #endif -/* IEEE Not A Number (QNaN). Note that MIPS has the QNaN and SNaN patterns - reversed compared to most other architectures. The IEEE spec left - the definition of this open to implementations, and for MIPS the top - bit of the mantissa must be SET to indicate a SNaN. */ +/* IEEE Not A Number. */ +/* Note that MIPS has the qNaN and sNaN patterns reversed compared to most + other architectures. IEEE 754-1985 left the definition of this open to + implementations, and for MIPS the top bit of the mantissa must be SET to + indicate a sNaN. */ #if __GNUC_PREREQ(3,3) -# define NAN (__builtin_nanf("")) +# define NAN (__builtin_nanf ("")) #elif defined __GNUC__ # define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ + (__extension__ \ + ((union { unsigned __l __attribute__ ((__mode__ (__SI__))); float __d; }) \ { __l: 0x7fbfffffUL }).__d) #else @@ -42,13 +43,14 @@ # include <endian.h> # if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xbf, 0xff, 0xff } +# define __qnan_bytes { 0x7f, 0xbf, 0xff, 0xff } # endif # if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0xff, 0xff, 0xbf, 0x7f } +# define __qnan_bytes { 0xff, 0xff, 0xbf, 0x7f } # endif -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) +static union { unsigned char __c[4]; float __d; } __qnan_union + __attribute__ ((__unused__)) = { __qnan_bytes }; +# define NAN (__qnan_union.__d) #endif /* GCC. */ diff --git a/ports/sysdeps/mips/bsd-_setjmp.S b/ports/sysdeps/mips/bsd-_setjmp.S index a932096a0a..50cce7e725 100644 --- a/ports/sysdeps/mips/bsd-_setjmp.S +++ b/ports/sysdeps/mips/bsd-_setjmp.S @@ -22,6 +22,8 @@ #include <sysdep.h> + .set nomips16 + #ifdef __PIC__ .option pic2 #endif @@ -38,5 +40,5 @@ ENTRY (_setjmp) #else j C_SYMBOL_NAME (__sigsetjmp) #endif - .end _setjmp +END (_setjmp) libc_hidden_def (_setjmp) diff --git a/ports/sysdeps/mips/bsd-setjmp.S b/ports/sysdeps/mips/bsd-setjmp.S index 406c8492dd..18e8b0f908 100644 --- a/ports/sysdeps/mips/bsd-setjmp.S +++ b/ports/sysdeps/mips/bsd-setjmp.S @@ -22,6 +22,8 @@ #include <sysdep.h> + .set nomips16 + #ifdef __PIC__ .option pic2 #endif @@ -38,4 +40,4 @@ ENTRY (setjmp) #else j C_SYMBOL_NAME (__sigsetjmp) #endif - .end setjmp +END (setjmp) diff --git a/ports/sysdeps/mips/dl-machine.h b/ports/sysdeps/mips/dl-machine.h index 91f7a7bb5e..a7c784fec5 100644 --- a/ports/sysdeps/mips/dl-machine.h +++ b/ports/sysdeps/mips/dl-machine.h @@ -119,6 +119,7 @@ static inline ElfW(Addr) elf_machine_load_address (void) { ElfW(Addr) addr; +#ifndef __mips16 asm (" .set noreorder\n" " " STRINGXP (PTR_LA) " %0, 0f\n" " bltzal $0, 0f\n" @@ -128,6 +129,19 @@ elf_machine_load_address (void) : "=r" (addr) : /* No inputs */ : "$31"); +#else + ElfW(Addr) tmp; + asm (" .set noreorder\n" + " move %1,$gp\n" + " lw %1,%%got(0f)(%1)\n" + "0: .fill 0\n" /* Clear the ISA bit on 0:. */ + " la %0,0b\n" + " addiu %1,%%lo(0b)\n" + " subu %0,%1\n" + " .set reorder\n" + : "=d" (addr), "=d" (tmp) + : /* No inputs */); +#endif return addr; } @@ -210,7 +224,8 @@ do { \ 2) That under Unix the entry is named __start and not just plain _start. */ -#define RTLD_START asm (\ +#ifndef __mips16 +# define RTLD_START asm (\ ".text\n\ " _RTLD_PROLOGUE(ENTRY_POINT) "\ " STRINGXV(SETUP_GPX($25)) "\n\ @@ -283,6 +298,91 @@ do { \ ".previous"\ ); +#else /* __mips16 */ +/* MIPS16 version. We currently only support O32 under MIPS16; the proper + assembly preprocessor abstractions will need to be added if other ABIs + are to be supported. */ + +# define RTLD_START asm (\ + ".text\n\ + .set mips16\n\ + " _RTLD_PROLOGUE (ENTRY_POINT) "\ + # Construct GP value in $3.\n\ + li $3, %hi(_gp_disp)\n\ + addiu $4, $pc, %lo(_gp_disp)\n\ + sll $3, 16\n\ + addu $3, $4\n\ + move $28, $3\n\ + lw $4, %got(_DYNAMIC)($3)\n\ + sw $4, -0x7ff0($3)\n\ + move $4, $sp\n\ + addiu $sp, -16\n\ + # _dl_start() is sufficiently near to use pc-relative\n\ + # load address.\n\ + la $3, _dl_start\n\ + move $25, $3\n\ + jalr $3\n\ + addiu $sp, 16\n\ + " _RTLD_EPILOGUE (ENTRY_POINT) "\ + \n\ + \n\ + " _RTLD_PROLOGUE (_dl_start_user) "\ + li $16, %hi(_gp_disp)\n\ + addiu $4, $pc, %lo(_gp_disp)\n\ + sll $16, 16\n\ + addu $16, $4\n\ + move $17, $2\n\ + move $28, $16\n\ + lw $4, %got(_dl_skip_args)($16)\n\ + lw $4, 0($4)\n\ + beqz $4, 1f\n\ + # Load the original argument count.\n\ + lw $5, 0($sp)\n\ + # Subtract _dl_skip_args from it.\n\ + subu $5, $4\n\ + # Adjust the stack pointer to skip _dl_skip_args words.\n\ + sll $4, " STRINGXP (PTRLOG) "\n\ + move $6, $sp\n\ + addu $6, $4\n\ + move $sp, $6\n\ + # Save back the modified argument count.\n\ + sw $5, 0($sp)\n\ +1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\ + lw $4, %got(_rtld_local)($16)\n\ + lw $4, 0($4)\n\ + lw $5, 0($sp)\n\ + addiu $6, $sp, " STRINGXP (PTRSIZE) "\n\ + sll $7, $5, " STRINGXP (PTRLOG) "\n\ + addu $7, $6\n\ + addu $7, " STRINGXP (PTRSIZE) "\n\ + # Make sure the stack pointer is aligned for _dl_init_internal.\n\ + li $2, 2 * " STRINGXP (SZREG) "\n\ + neg $2, $2\n\ + move $3, $sp\n\ + and $2, $3\n\ + sw $3, -" STRINGXP (SZREG) "($2)\n\ + addiu $2, -32\n\ + move $sp, $2\n\ + sw $16, 16($sp)\n\ + # Call the function to run the initializers.\n\ + lw $2, %call16(_dl_init_internal)($16)\n\ + move $25, $2\n\ + jalr $2\n\ + # Restore the stack pointer for _start.\n\ + lw $2, 32-" STRINGXP (SZREG) "($sp)\n\ + move $sp, $2\n\ + move $28, $16\n\ + # Pass our finalizer function to the user in $2 as per ELF ABI.\n\ + lw $2, %call16(_dl_fini)($16)\n\ + # Jump to the user entry point.\n\ + move $25, $17\n\ + jr $17\n\t"\ + _RTLD_EPILOGUE (_dl_start_user)\ + ".previous"\ +); + +#endif /* __mips16 */ + /* Names of the architecture-specific auditing callback functions. */ # if _MIPS_SIM == _ABIO32 # define ARCH_LA_PLTENTER mips_o32_gnu_pltenter diff --git a/ports/sysdeps/mips/dl-trampoline.c b/ports/sysdeps/mips/dl-trampoline.c index 57fb05b86d..605e44e181 100644 --- a/ports/sysdeps/mips/dl-trampoline.c +++ b/ports/sysdeps/mips/dl-trampoline.c @@ -292,9 +292,11 @@ __dl_runtime_resolve (ElfW(Word) sym_index, #endif +#ifndef __mips16 asm ("\n\ .text\n\ .align 2\n\ + .set nomips16\n\ .globl _dl_runtime_resolve\n\ .type _dl_runtime_resolve,@function\n\ .ent _dl_runtime_resolve\n\ @@ -351,6 +353,7 @@ _dl_runtime_resolve:\n\ asm ("\n\ .text\n\ .align 2\n\ + .set nomips16\n\ .globl _dl_runtime_pltresolve\n\ .type _dl_runtime_pltresolve,@function\n\ .ent _dl_runtime_pltresolve\n\ @@ -381,3 +384,130 @@ _dl_runtime_pltresolve:\n\ .previous\n\ "); +#elif _MIPS_SIM == _ABIO32 /* __mips16 */ +/* MIPS16 version, O32 only. */ +asm ("\n\ + .text\n\ + .align 2\n\ + .set mips16\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve,@function\n\ + .ent _dl_runtime_resolve\n\ +_dl_runtime_resolve:\n\ + .frame $29, " STRINGXP (ELF_DL_FRAME_SIZE) ", $31\n\ + # Save arguments and sp value in stack.\n\t" +# if _MIPS_ISA >= _MIPS_ISA_MIPS32 + "save " STRINGXP (ELF_DL_FRAME_SIZE) ", $4-$7, $ra\n\t" +# else + "addiu $sp, -" STRINGXP (ELF_DL_FRAME_SIZE) "\n\ + sw $7, 32($sp)\n\ + sw $6, 28($sp)\n\ + sw $5, 24($sp)\n\ + sw $4, 20($sp)\n\t" +# endif + "# Preserve caller's $ra, for RESTORE instruction below.\n\ + move $5, $15\n\ + sw $5, 36($sp)\n\ + # Compute GP into $2.\n\ + li $2, %hi(_gp_disp)\n\ + addiu $3, $pc, %lo(_gp_disp)\n\ + sll $2, 16\n\ + addu $2, $3\n\ + lw $3, %got(__dl_runtime_resolve)($2)\n\ + move $4, $24\n\ + addiu $3, %lo(__dl_runtime_resolve)\n\ + move $7, $ra\n\ + move $6, $28\n\ + move $25, $3\n\ + jalr $3\n\t" +# if _MIPS_ISA >= _MIPS_ISA_MIPS32 + "restore " STRINGXP(ELF_DL_FRAME_SIZE) ", $4-$7, $ra\n\t" +# else + "# Restore $ra, move placed further down to hide latency.\n\ + lw $4, 36($sp)\n\ + lw $5, 24($sp)\n\ + lw $6, 28($sp)\n\ + lw $7, 32($sp)\n\ + move $ra, $4\n\ + lw $4, 20($sp)\n\ + addiu $sp, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\t" +# endif + "move $25, $2\n\ + jr $2\n\ + .end _dl_runtime_resolve\n\ + .previous\n\ +"); + +asm ("\n\ + .text\n\ + .align 2\n\ + .set mips16\n\ + .globl _dl_runtime_pltresolve\n\ + .type _dl_runtime_pltresolve,@function\n\ + .ent _dl_runtime_pltresolve\n\ +_dl_runtime_pltresolve:\n\ + .frame $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\ + # Save arguments and sp value in stack.\n\t" +# if _MIPS_ISA >= _MIPS_ISA_MIPS32 + "save " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $4-$7, $ra\n\t" +# else + "addiu $sp, -" STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\ + sw $7, 40($sp)\n\ + sw $6, 36($sp)\n\ + sw $5, 32($sp)\n\ + sw $4, 28($sp)\n\t" +# endif + "# Preserve MIPS16 stub function arguments.\n\ + sw $3, 20($sp)\n\ + sw $2, 16($sp)\n\ + # Preserve caller's $ra, for RESTORE instruction below.\n\ + move $3, $15\n\ + sw $3, 44($sp)\n\ + # Compute GP into $2.\n\ + li $2, %hi(_gp_disp)\n\ + addiu $3, $pc, %lo(_gp_disp)\n\ + sll $2, 16\n\ + addu $2, $3\n\ + # Save GP value in slot.\n\ + sw $2, 24($sp)\n\ + # Load _dl_fixup address.\n\ + lw $6, %call16(_dl_fixup)($2)\n\ + # Load link map address.\n\ + move $3, $28\n\ + lw $4, " STRINGXP (PTRSIZE) "($3)\n\ + move $5, $24\n\ + sll $5, " STRINGXP (PTRLOG) " + 1\n\ + # Call _dl_fixup.\n\ + move $25, $6\n\ + jalr $6\n\ + move $25, $2\n\ + # Reload GP value into $28.\n\ + lw $3, 24($sp)\n\ + move $28, $3\n\ + lw $3, 16($sp)\n\ + move $15, $3\n\ + lw $3, 20($sp)\n\t" +# if _MIPS_ISA >= _MIPS_ISA_MIPS32 + "restore " STRINGXP (ELF_DL_PLT_FRAME_SIZE) ", $4-$7, $ra\n\t" +# else + "# Restore $ra, move placed further down to hide latency.\n\ + lw $4, 44($sp)\n\ + lw $5, 32($sp)\n\ + lw $6, 36($sp)\n\ + lw $7, 40($sp)\n\ + move $ra, $4\n\ + lw $4, 28($sp)\n\ + addiu $sp, " STRINGXP (ELF_DL_PLT_FRAME_SIZE) "\n\t" +# endif + ".set noreorder\n\ + jr $2\n\ + move $2, $15\n\ + .set reorder\n\ + .end _dl_runtime_pltresolve\n\ + .previous\n\ +"); + +#else /* __mips16 && _MIPS_SIM != _ABIO32 */ +# error "MIPS16 support for N32/N64 not implemented" + +#endif /* __mips16 */ diff --git a/ports/sysdeps/mips/fpu/e_sqrt.c b/ports/sysdeps/mips/fpu/e_sqrt.c index cff9cec6ec..26314b0109 100644 --- a/ports/sysdeps/mips/fpu/e_sqrt.c +++ b/ports/sysdeps/mips/fpu/e_sqrt.c @@ -22,7 +22,7 @@ #if (_MIPS_ISA >= _MIPS_ISA_MIPS2) -double +double __attribute__ ((nomips16)) __ieee754_sqrt (double x) { double z; diff --git a/ports/sysdeps/mips/fpu/e_sqrtf.c b/ports/sysdeps/mips/fpu/e_sqrtf.c index 87d242d82c..0f7bfd94ba 100644 --- a/ports/sysdeps/mips/fpu/e_sqrtf.c +++ b/ports/sysdeps/mips/fpu/e_sqrtf.c @@ -22,7 +22,7 @@ #if (_MIPS_ISA >= _MIPS_ISA_MIPS2) -float +float __attribute__ ((nomips16)) __ieee754_sqrtf (float x) { float z; diff --git a/ports/sysdeps/mips/fpu_control.h b/ports/sysdeps/mips/fpu_control.h index 30e54f9c3a..6aecb3bc8b 100644 --- a/ports/sysdeps/mips/fpu_control.h +++ b/ports/sysdeps/mips/fpu_control.h @@ -99,8 +99,15 @@ extern fpu_control_t __fpu_control; typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); /* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw)) +extern fpu_control_t __mips_fpu_getcw (void) __THROW; +extern void __mips_fpu_setcw (fpu_control_t) __THROW; +#ifdef __mips16 +# define _FPU_GETCW(cw) do { (cw) = __mips_fpu_getcw (); } while (0) +# define _FPU_SETCW(cw) __mips_fpu_setcw (cw) +#else +# define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw)) +# define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw)) +#endif /* Default control word set at startup. */ extern fpu_control_t __fpu_control; diff --git a/ports/sysdeps/mips/include/sys/asm.h b/ports/sysdeps/mips/include/sys/asm.h new file mode 100644 index 0000000000..7b356e12e0 --- /dev/null +++ b/ports/sysdeps/mips/include/sys/asm.h @@ -0,0 +1,53 @@ +/* Copyright (C) 2013 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 _SYS_ASM_H + +# include_next <sys/asm.h> + +# undef __mips_cfi_startproc +# define __mips_cfi_startproc cfi_startproc +# undef __mips_cfi_endproc +# define __mips_cfi_endproc cfi_endproc + +# if _MIPS_SIM == _ABIO32 +# define SETUP_GP64_REG_CFI(a) +# define SETUP_GP64_REG(a, b) +# define SETUP_GP64_STACK_CFI(a) +# define SETUP_GP64_STACK(a, b) +# define RESTORE_GP64_REG +# define RESTORE_GP64_STACK +# else +# define SETUP_GP64_REG_CFI(gpsavereg) \ + cfi_register (gp, gpsavereg) +# define SETUP_GP64_REG(gpsavereg, proc) \ + SETUP_GP64 (gpsavereg, proc); \ + SETUP_GP64_REG_CFI (gpsavereg) +# define SETUP_GP64_STACK_CFI(gpoffset) \ + cfi_rel_offset (gp, gpoffset) +# define SETUP_GP64_STACK(gpoffset, proc) \ + SETUP_GP64 (gpoffset, proc); \ + SETUP_GP64_STACK_CFI (gpoffset) +# define RESTORE_GP64_REG \ + RESTORE_GP64; \ + cfi_restore (gp) +# define RESTORE_GP64_STACK \ + RESTORE_GP64; \ + cfi_restore (gp) +# endif + +#endif diff --git a/ports/sysdeps/mips/machine-gmon.h b/ports/sysdeps/mips/machine-gmon.h index 8c62d84a93..144c044026 100644 --- a/ports/sysdeps/mips/machine-gmon.h +++ b/ports/sysdeps/mips/machine-gmon.h @@ -37,6 +37,8 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) #define MCOUNT asm(\ ".globl _mcount;\n\t" \ ".align 2;\n\t" \ + ".set push;\n\t" \ + ".set nomips16;\n\t" \ ".type _mcount,@function;\n\t" \ ".ent _mcount\n\t" \ "_mcount:\n\t" \ @@ -67,9 +69,8 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) "addu $29,$29,56;\n\t" \ "j $31;\n\t" \ "move $31,$1;\n\t" \ - ".set reorder;\n\t" \ - ".set at\n\t" \ - ".end _mcount"); + ".end _mcount;\n\t" \ + ".set pop"); #else @@ -94,6 +95,8 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) #define MCOUNT asm(\ ".globl _mcount;\n\t" \ ".align 3;\n\t" \ + ".set push;\n\t" \ + ".set nomips16;\n\t" \ ".type _mcount,@function;\n\t" \ ".ent _mcount\n\t" \ "_mcount:\n\t" \ @@ -132,8 +135,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc) PTR_ADDU_STRING " $29,$29,96;\n\t" \ "j $31;\n\t" \ "move $31,$1;\n\t" \ - ".set reorder;\n\t" \ - ".set at\n\t" \ - ".end _mcount"); + ".end _mcount;\n\t" \ + ".set pop"); #endif diff --git a/ports/sysdeps/mips/memset.S b/ports/sysdeps/mips/memset.S index 8c8606c834..78dab481dd 100644 --- a/ports/sysdeps/mips/memset.S +++ b/ports/sysdeps/mips/memset.S @@ -18,6 +18,7 @@ #include <sysdep.h> + .set nomips16 /* void *memset(void *s, int c, size_t n). */ diff --git a/ports/sysdeps/mips/mips32/crti.S b/ports/sysdeps/mips/mips32/crti.S index 5b46279c1e..5f3e9ba43d 100644 --- a/ports/sysdeps/mips/mips32/crti.S +++ b/ports/sysdeps/mips/mips32/crti.S @@ -54,6 +54,8 @@ .hidden PREINIT_FUNCTION #endif + .set nomips16 + .section .init,"ax",@progbits .p2align 2 .globl _init diff --git a/ports/sysdeps/mips/mips32/crtn.S b/ports/sysdeps/mips/mips32/crtn.S index 44cdff0a1a..42381c5129 100644 --- a/ports/sysdeps/mips/mips32/crtn.S +++ b/ports/sysdeps/mips/mips32/crtn.S @@ -36,6 +36,8 @@ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ + .set nomips16 + .section .init,"ax",@progbits lw $31,28($sp) .set noreorder diff --git a/ports/sysdeps/mips/mips32/fpu/Versions b/ports/sysdeps/mips/mips32/fpu/Versions new file mode 100644 index 0000000000..91bbf564b3 --- /dev/null +++ b/ports/sysdeps/mips/mips32/fpu/Versions @@ -0,0 +1,5 @@ +libc { + GLIBC_2.18 { + __mips_fpu_getcw; __mips_fpu_setcw; + } +} diff --git a/sysdeps/generic/bp-sym.h b/ports/sysdeps/mips/mips32/fpu/fpu_control.c index 089912a687..cd107c533a 100644 --- a/sysdeps/generic/bp-sym.h +++ b/ports/sysdeps/mips/mips32/fpu/fpu_control.c @@ -1,7 +1,6 @@ -/* Bounded-pointer symbol modifier. - Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* FPU control word handling, MIPS version, needed by MIPS16 callers. + Copyright (C) 1996-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Greg McGary <greg@mcgary.org> The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,9 +16,19 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#define BP_SYM(name) _BP_SYM (name) -#if __BOUNDED_POINTERS__ -# define _BP_SYM(name) __BP_##name -#else -# define _BP_SYM(name) name -#endif +#include <math/fpu_control.c> + +fpu_control_t +__mips_fpu_getcw (void) +{ + fpu_control_t cw; + + _FPU_GETCW (cw); + return cw; +} + +void +__mips_fpu_setcw (fpu_control_t cw) +{ + _FPU_SETCW (cw); +} diff --git a/ports/sysdeps/mips/mips32/mips16/add_n.c b/ports/sysdeps/mips/mips32/mips16/add_n.c new file mode 100644 index 0000000000..fbb4120418 --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/add_n.c @@ -0,0 +1 @@ +#include <stdlib/add_n.c> diff --git a/ports/sysdeps/mips/mips32/mips16/addmul_1.c b/ports/sysdeps/mips/mips32/mips16/addmul_1.c new file mode 100644 index 0000000000..c0e4a0bd7e --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/addmul_1.c @@ -0,0 +1 @@ +#include <stdlib/addmul_1.c> diff --git a/ports/sysdeps/mips/mips32/mips16/fpu/Makefile b/ports/sysdeps/mips/mips32/mips16/fpu/Makefile new file mode 100644 index 0000000000..b58c4eeb0c --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/fpu/Makefile @@ -0,0 +1,5 @@ +# Building hard-float libm as MIPS16 actually produces larger code size, +# so avoid doing so. +ifeq ($(subdir),math) +sysdep-CFLAGS += -mno-mips16 +endif diff --git a/ports/sysdeps/mips/mips32/mips16/lshift.c b/ports/sysdeps/mips/mips32/mips16/lshift.c new file mode 100644 index 0000000000..2f945d2c59 --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/lshift.c @@ -0,0 +1 @@ +#include <stdlib/lshift.c> diff --git a/ports/sysdeps/mips/mips32/mips16/mul_1.c b/ports/sysdeps/mips/mips32/mips16/mul_1.c new file mode 100644 index 0000000000..8e758d6039 --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/mul_1.c @@ -0,0 +1 @@ +#include <stdlib/mul_1.c> diff --git a/ports/sysdeps/mips/mips32/mips16/rshift.c b/ports/sysdeps/mips/mips32/mips16/rshift.c new file mode 100644 index 0000000000..4e350a0dcb --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/rshift.c @@ -0,0 +1 @@ +#include <stdlib/rshift.c> diff --git a/ports/sysdeps/mips/mips32/mips16/sub_n.c b/ports/sysdeps/mips/mips32/mips16/sub_n.c new file mode 100644 index 0000000000..d8b54925b1 --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/sub_n.c @@ -0,0 +1 @@ +#include <stdlib/sub_n.c> diff --git a/ports/sysdeps/mips/mips32/mips16/submul_1.c b/ports/sysdeps/mips/mips32/mips16/submul_1.c new file mode 100644 index 0000000000..44cadf5cc0 --- /dev/null +++ b/ports/sysdeps/mips/mips32/mips16/submul_1.c @@ -0,0 +1 @@ +#include <stdlib/submul_1.c> diff --git a/ports/sysdeps/mips/mips64/add_n.S b/ports/sysdeps/mips/mips64/add_n.S index efb6cf4240..020d4af090 100644 --- a/ports/sysdeps/mips/mips64/add_n.S +++ b/ports/sysdeps/mips/mips64/add_n.S @@ -33,11 +33,7 @@ #ifdef __PIC__ .option pic2 #endif - .text - .align 2 - .globl __mpn_add_n - .ent __mpn_add_n -__mpn_add_n: +ENTRY (__mpn_add_n) #ifdef __PIC__ SETUP_GP /* ??? unused */ #endif @@ -126,4 +122,4 @@ L(Lend): daddu $11,$11,$2 j $31 or $2,$2,$8 - .end __mpn_add_n +END (__mpn_add_n) diff --git a/ports/sysdeps/mips/mips64/addmul_1.S b/ports/sysdeps/mips/mips64/addmul_1.S index 43838fd2f9..46729a65d9 100644 --- a/ports/sysdeps/mips/mips64/addmul_1.S +++ b/ports/sysdeps/mips/mips64/addmul_1.S @@ -32,11 +32,7 @@ #ifdef PIC .option pic2 #endif - .text - .align 4 - .globl __mpn_addmul_1 - .ent __mpn_addmul_1 -__mpn_addmul_1: +ENTRY (__mpn_addmul_1) #ifdef PIC SETUP_GP /* ??? unused */ #endif @@ -102,4 +98,4 @@ L(LC0): ld $10,0($4) j $31 daddu $2,$9,$2 # add high product limb and carry from addition - .end __mpn_addmul_1 +END (__mpn_addmul_1) diff --git a/ports/sysdeps/mips/mips64/bsd-_setjmp.S b/ports/sysdeps/mips/mips64/bsd-_setjmp.S index de36cf0e89..5d0f76c13c 100644 --- a/ports/sysdeps/mips/mips64/bsd-_setjmp.S +++ b/ports/sysdeps/mips/mips64/bsd-_setjmp.S @@ -31,17 +31,17 @@ ENTRY (_setjmp) #ifdef __PIC__ SETUP_GP #endif - SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp)) + SETUP_GP64_REG (v0, C_SYMBOL_NAME (_setjmp)) PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) #if _MIPS_SIM == _ABIO32 nop #endif - RESTORE_GP64 + RESTORE_GP64_REG move a1, zero /* Pass a second argument of zero. */ #ifdef __PIC__ jr t9 #else j C_SYMBOL_NAME (__sigsetjmp) #endif - .end _setjmp +END (_setjmp) libc_hidden_def (_setjmp) diff --git a/ports/sysdeps/mips/mips64/bsd-setjmp.S b/ports/sysdeps/mips/mips64/bsd-setjmp.S index c3e26bfc22..784e16e33f 100644 --- a/ports/sysdeps/mips/mips64/bsd-setjmp.S +++ b/ports/sysdeps/mips/mips64/bsd-setjmp.S @@ -31,16 +31,16 @@ ENTRY (setjmp) #ifdef __PIC__ SETUP_GP #endif - SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp)) + SETUP_GP64_REG (v0, C_SYMBOL_NAME (setjmp)) PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) #if _MIPS_SIM == _ABIO32 nop #endif - RESTORE_GP64 + RESTORE_GP64_REG dli a1, 1 /* Pass a second argument of one. */ #ifdef __PIC__ jr t9 #else j C_SYMBOL_NAME (__sigsetjmp) #endif - .end setjmp +END (setjmp) diff --git a/ports/sysdeps/mips/mips64/lshift.S b/ports/sysdeps/mips/mips64/lshift.S index e0b02bc25b..740408d75a 100644 --- a/ports/sysdeps/mips/mips64/lshift.S +++ b/ports/sysdeps/mips/mips64/lshift.S @@ -32,11 +32,7 @@ #ifdef __PIC__ .option pic2 #endif - .text - .align 2 - .globl __mpn_lshift - .ent __mpn_lshift -__mpn_lshift: +ENTRY (__mpn_lshift) #ifdef __PIC__ SETUP_GP /* ??? unused */ #endif @@ -101,4 +97,4 @@ L(Loop): ld $3,-16($5) L(Lend): dsll $8,$10,$7 j $31 sd $8,-8($4) - .end __mpn_lshift +END (__mpn_lshift) diff --git a/ports/sysdeps/mips/mips64/mul_1.S b/ports/sysdeps/mips/mips64/mul_1.S index 2fe28d369d..e1360658ae 100644 --- a/ports/sysdeps/mips/mips64/mul_1.S +++ b/ports/sysdeps/mips/mips64/mul_1.S @@ -33,11 +33,7 @@ #ifdef __PIC__ .option pic2 #endif - .text - .align 4 - .globl __mpn_mul_1 - .ent __mpn_mul_1 -__mpn_mul_1: +ENTRY (__mpn_mul_1) #ifdef __PIC__ SETUP_GP /* ??? unused */ #endif @@ -91,4 +87,4 @@ L(LC0): mflo $10 j $31 daddu $2,$9,$2 # add high product limb and carry from addition - .end __mpn_mul_1 +END (__mpn_mul_1) diff --git a/ports/sysdeps/mips/mips64/n32/crti.S b/ports/sysdeps/mips/mips64/n32/crti.S index d9066b2d64..ddcc9cc7f5 100644 --- a/ports/sysdeps/mips/mips64/n32/crti.S +++ b/ports/sysdeps/mips/mips64/n32/crti.S @@ -54,6 +54,8 @@ .hidden PREINIT_FUNCTION #endif + .set nomips16 + .section .init,"ax",@progbits .p2align 2 .globl _init diff --git a/ports/sysdeps/mips/mips64/n32/crtn.S b/ports/sysdeps/mips/mips64/n32/crtn.S index daf7d4256d..5eb2b4f489 100644 --- a/ports/sysdeps/mips/mips64/n32/crtn.S +++ b/ports/sysdeps/mips/mips64/n32/crtn.S @@ -36,6 +36,8 @@ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ + .set nomips16 + .section .init,"ax",@progbits ld $31,8($sp) ld $28,0($sp) diff --git a/ports/sysdeps/mips/mips64/n64/crti.S b/ports/sysdeps/mips/mips64/n64/crti.S index 2111ba5394..0c66d0de6f 100644 --- a/ports/sysdeps/mips/mips64/n64/crti.S +++ b/ports/sysdeps/mips/mips64/n64/crti.S @@ -54,6 +54,8 @@ .hidden PREINIT_FUNCTION #endif + .set nomips16 + .section .init,"ax",@progbits .p2align 2 .globl _init diff --git a/ports/sysdeps/mips/mips64/n64/crtn.S b/ports/sysdeps/mips/mips64/n64/crtn.S index c66a2e5550..4c014b711b 100644 --- a/ports/sysdeps/mips/mips64/n64/crtn.S +++ b/ports/sysdeps/mips/mips64/n64/crtn.S @@ -36,6 +36,8 @@ /* crtn.S puts function epilogues in the .init and .fini sections corresponding to the prologues in crti.S. */ + .set nomips16 + .section .init,"ax",@progbits ld $31,8($sp) ld $28,0($sp) diff --git a/ports/sysdeps/mips/mips64/rshift.S b/ports/sysdeps/mips/mips64/rshift.S index 75ac68bb2e..0d821f2b79 100644 --- a/ports/sysdeps/mips/mips64/rshift.S +++ b/ports/sysdeps/mips/mips64/rshift.S @@ -32,11 +32,7 @@ #ifdef __PIC__ .option pic2 #endif - .text - .align 2 - .globl __mpn_rshift - .ent __mpn_rshift -__mpn_rshift: +ENTRY (__mpn_rshift) #ifdef __PIC__ SETUP_GP /* ??? unused */ #endif @@ -98,4 +94,4 @@ L(Loop): ld $3,8($5) L(Lend): dsrl $8,$10,$7 j $31 sd $8,0($4) - .end __mpn_rshift +END (__mpn_rshift) diff --git a/ports/sysdeps/mips/mips64/setjmp.S b/ports/sysdeps/mips/mips64/setjmp.S index 53ed92ca49..5afbbe7562 100644 --- a/ports/sysdeps/mips/mips64/setjmp.S +++ b/ports/sysdeps/mips/mips64/setjmp.S @@ -29,16 +29,16 @@ ENTRY (__sigsetjmp) #ifdef __PIC__ SETUP_GP #endif - SETUP_GP64 (v0, C_SYMBOL_NAME (__sigsetjmp)) + SETUP_GP64_REG (v0, C_SYMBOL_NAME (__sigsetjmp)) move a2, sp move a3, fp PTR_LA t9, __sigsetjmp_aux #if _MIPS_SIM == _ABIO32 nop #endif - RESTORE_GP64 + RESTORE_GP64_REG #if _MIPS_SIM != _ABIO32 move a4, gp #endif jr t9 - .end __sigsetjmp +END (__sigsetjmp) diff --git a/ports/sysdeps/mips/mips64/sub_n.S b/ports/sysdeps/mips/mips64/sub_n.S index ea8f4bd4cb..dd6f691841 100644 --- a/ports/sysdeps/mips/mips64/sub_n.S +++ b/ports/sysdeps/mips/mips64/sub_n.S @@ -33,11 +33,7 @@ #ifdef __PIC__ .option pic2 #endif - .text - .align 2 - .globl __mpn_sub_n - .ent __mpn_sub_n -__mpn_sub_n: +ENTRY (__mpn_sub_n) #ifdef __PIC__ SETUP_GP /* ??? unused */ #endif @@ -126,4 +122,4 @@ L(Lend): daddu $11,$11,$2 j $31 or $2,$2,$8 - .end __mpn_sub_n +END (__mpn_sub_n) diff --git a/ports/sysdeps/mips/mips64/submul_1.S b/ports/sysdeps/mips/mips64/submul_1.S index 22239d52b3..bf5d6ffce0 100644 --- a/ports/sysdeps/mips/mips64/submul_1.S +++ b/ports/sysdeps/mips/mips64/submul_1.S @@ -33,11 +33,7 @@ #ifdef __PIC__ .option pic2 #endif - .text - .align 4 - .globl __mpn_submul_1 - .ent __mpn_submul_1 -__mpn_submul_1: +ENTRY (__mpn_submul_1) #ifdef __PIC__ SETUP_GP /* ??? unused */ #endif @@ -103,4 +99,4 @@ L(LC0): ld $10,0($4) j $31 daddu $2,$9,$2 # add high product limb and carry from addition - .end __mpn_submul_1 +END (__mpn_submul_1) diff --git a/ports/sysdeps/mips/nptl/tls.h b/ports/sysdeps/mips/nptl/tls.h index 0c91995342..2529408f2f 100644 --- a/ports/sysdeps/mips/nptl/tls.h +++ b/ports/sysdeps/mips/nptl/tls.h @@ -37,12 +37,17 @@ typedef union dtv } pointer; } dtv_t; +#ifdef __mips16 +/* MIPS16 uses GCC builtin to access the TP. */ +# define READ_THREAD_POINTER() (__builtin_thread_pointer ()) +#else /* Note: rd must be $v1 to be ABI-conformant. */ # define READ_THREAD_POINTER() \ ({ void *__result; \ asm volatile (".set\tpush\n\t.set\tmips32r2\n\t" \ "rdhwr\t%0, $29\n\t.set\tpop" : "=v" (__result)); \ __result; }) +#endif #else /* __ASSEMBLER__ */ # include <tcb-offsets.h> diff --git a/ports/sysdeps/mips/preconfigure b/ports/sysdeps/mips/preconfigure index 9190eee87a..b215eb2c17 100644 --- a/ports/sysdeps/mips/preconfigure +++ b/ports/sysdeps/mips/preconfigure @@ -25,5 +25,10 @@ mips64*) base_machine=mips64 CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi" fi ;; -mips*) base_machine=mips machine=mips/mips32/$machine ;; +mips*) base_machine=mips + case "$CC $CFLAGS $CPPFLAGS " in + *" -mips16 "*) machine=mips/mips32/mips16/$machine ;; + *) machine=mips/mips32/$machine ;; + esac + ;; esac diff --git a/ports/sysdeps/mips/setjmp.S b/ports/sysdeps/mips/setjmp.S index 7c53b97b2d..f014b73b3f 100644 --- a/ports/sysdeps/mips/setjmp.S +++ b/ports/sysdeps/mips/setjmp.S @@ -17,6 +17,8 @@ #include <sysdep.h> + .set nomips16 + /* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as extra arguments. */ @@ -41,4 +43,4 @@ ENTRY (__sigsetjmp) #else j __sigsetjmp_aux #endif - .end __sigsetjmp +END (__sigsetjmp) diff --git a/ports/sysdeps/mips/setjmp_aux.c b/ports/sysdeps/mips/setjmp_aux.c index a955a4ffa1..cb9ea245bb 100644 --- a/ports/sysdeps/mips/setjmp_aux.c +++ b/ports/sysdeps/mips/setjmp_aux.c @@ -23,7 +23,7 @@ pointer. We do things this way because it's difficult to reliably access them in C. */ -int +int __attribute__ ((nomips16)) __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { #ifdef __mips_hard_float diff --git a/ports/sysdeps/mips/start.S b/ports/sysdeps/mips/start.S index 82b7a229f3..83a68959a3 100644 --- a/ports/sysdeps/mips/start.S +++ b/ports/sysdeps/mips/start.S @@ -74,14 +74,15 @@ .text .globl ENTRY_POINT .type ENTRY_POINT,@function +#ifndef __mips16 ENTRY_POINT: -#ifdef __PIC__ +# ifdef __PIC__ SETUP_GPX($0) SETUP_GPX64($25,$0) -#else +# else PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */ move $31, $0 -#endif +# endif PTR_LA $4, main /* main */ PTR_L $5, 0($29) /* argc */ @@ -92,22 +93,85 @@ ENTRY_POINT: on o32 and quad words (16 bytes) on n32 and n64. */ and $29, -2 * SZREG -#if _MIPS_SIM == _ABIO32 +# if _MIPS_SIM == _ABIO32 PTR_SUBIU $29, 32 -#endif +# endif PTR_LA $7, __libc_csu_init /* init */ PTR_LA $8, __libc_csu_fini -#if _MIPS_SIM == _ABIO32 +# if _MIPS_SIM == _ABIO32 PTR_S $8, 16($29) /* fini */ PTR_S $2, 20($29) /* rtld_fini */ PTR_S $29, 24($29) /* stack_end */ -#else +# else move $9, $2 /* rtld_fini */ move $10, $29 /* stack_end */ -#endif +# endif jal __libc_start_main hlt: b hlt /* Crash if somehow it does return. */ +#elif _MIPS_SIM == _ABIO32 /* __mips16 */ + /* MIPS16 entry point. */ + .set mips16 +ENTRY_POINT: +# ifdef __PIC__ + li $3, %hi(_gp_disp) + addiu $4, $pc, %lo(_gp_disp) + sll $3, 16 + addu $3, $4 + move $gp, $3 +# else + li $3, %hi(_gp) + sll $3, 16 + addiu $3, %lo(_gp) + move $gp, $3 +# endif + /* Tie end of stack frames. */ + li $4, 0 + move $31, $4 + /* Create new SP value in $7, including alignment. */ + li $4, 2 * SZREG + neg $4, $4 + move $7, $sp + and $7, $4 + addiu $7, -32 + /* Load arguments with original SP. */ + lw $5, 0($sp) + addiu $6, $sp, PTRSIZE + /* Update SP. */ + move $sp, $7 + /* Lay out last arguments, and call __libc_start_main(). */ +# ifdef __PIC__ + sw $7, 24($sp) /* stack_end */ + lw $4, %got(__libc_csu_fini)($3) + lw $7, %got(__libc_csu_init)($3) /* init */ + sw $4, 16($sp) /* fini */ + lw $4, %got(main)($3) /* main */ + lw $3, %call16(__libc_start_main)($3) + sw $2, 20($sp) /* rtld_fini */ + move $25, $3 + jalr $3 +# else + lw $4, 1f + sw $7, 24($sp) /* stack_end */ + lw $7, 2f /* init */ + sw $4, 16($sp) /* fini */ + lw $4, 3f /* main */ + sw $2, 20($sp) /* rtld_fini */ + jal __libc_start_main +# endif +hlt: b hlt /* Crash if somehow it does return. */ +# ifndef __PIC__ + .align 2 +1: .word __libc_csu_fini +2: .word __libc_csu_init +3: .word main +# endif + +#else /* __mips16 && _MIPS_SIM != _ABIO32 */ +# error "MIPS16 support for N32/N64 not implemented" + +#endif /* __mips16 */ + /* Define a symbol for the first piece of initialized data. */ .data .globl __data_start diff --git a/ports/sysdeps/mips/sys/asm.h b/ports/sysdeps/mips/sys/asm.h index 605451a884..293cf364e0 100644 --- a/ports/sysdeps/mips/sys/asm.h +++ b/ports/sysdeps/mips/sys/asm.h @@ -26,6 +26,10 @@ # define CAT(str1,str2) __CAT(str1,str2) #endif +/* Redefined as nonempty in the internal header. */ +#define __mips_cfi_startproc /* Empty. */ +#define __mips_cfi_endproc /* Empty. */ + /* * Macros to handle different pointer/register sizes for 32/64-bit code * @@ -147,7 +151,8 @@ l: \ .align 2; \ .type symbol,@function; \ .ent symbol,0; \ -symbol: .frame sp,0,ra +symbol: .frame sp,0,ra; \ + __mips_cfi_startproc /* * NESTED - declare nested routine entry point @@ -157,13 +162,15 @@ symbol: .frame sp,0,ra .align 2; \ .type symbol,@function; \ .ent symbol,0; \ -symbol: .frame sp, framesize, rpc +symbol: .frame sp, framesize, rpc; \ + __mips_cfi_startproc /* * END - mark end of function */ #ifndef END # define END(function) \ + __mips_cfi_endproc; \ .end function; \ .size function,.-function #endif @@ -173,7 +180,7 @@ symbol: .frame sp, framesize, rpc */ #define EXPORT(symbol) \ .globl symbol; \ -symbol: +symbol: __mips_cfi_startproc /* * ABS - export absolute symbol diff --git a/ports/sysdeps/mips/sys/tas.h b/ports/sysdeps/mips/sys/tas.h index 603346ac3b..871818565e 100644 --- a/ports/sysdeps/mips/sys/tas.h +++ b/ports/sysdeps/mips/sys/tas.h @@ -24,7 +24,8 @@ __BEGIN_DECLS -extern int _test_and_set (int *__p, int __v) __THROW; +extern int _test_and_set (int *__p, int __v) + __THROW __attribute__ ((__nomips16__)); #ifdef __USE_EXTERN_INLINES @@ -32,7 +33,7 @@ extern int _test_and_set (int *__p, int __v) __THROW; # define _EXTERN_INLINE __extern_inline # endif -_EXTERN_INLINE int +_EXTERN_INLINE int __attribute__ ((__nomips16__)) __NTH (_test_and_set (int *__p, int __v)) { int __r, __t; diff --git a/ports/sysdeps/mips/tls-macros.h b/ports/sysdeps/mips/tls-macros.h index 8fe2e4a150..3e87e42ea1 100644 --- a/ports/sysdeps/mips/tls-macros.h +++ b/ports/sysdeps/mips/tls-macros.h @@ -12,16 +12,33 @@ (abicalls pic0) function. */ #ifndef __PIC__ # if _MIPS_SIM != _ABI64 -# define LOAD_GP "move %[tmp], $28\n\tla $28, __gnu_local_gp\n\t" +# ifndef __mips16 +# define LOAD_GP "move %[tmp], $28\n\tla $28, __gnu_local_gp\n\t" +# else +# define LOAD_GP \ + "li %[tmp], %%hi(__gnu_local_gp)\n\t" \ + "sll %[tmp], 16\n\t" \ + "addiu %[tmp], %%lo(__gnu_local_gp)\n\t" +# endif # else # define LOAD_GP "move %[tmp], $28\n\tdla $28, __gnu_local_gp\n\t" # endif # define UNLOAD_GP "\n\tmove $28, %[tmp]" #else -# define LOAD_GP +/* MIPS16 (re)creates the GP value using PC-relative instructions. */ +# ifdef __mips16 +# define LOAD_GP \ + "li %[tmp], %%hi(_gp_disp)\n\t" \ + "addiu %0, $pc, %%lo(_gp_disp)\n\t" \ + "sll %[tmp], 16\n\t" \ + "addu %[tmp], %0\n\t" +# else +# define LOAD_GP +# endif # define UNLOAD_GP #endif +#ifndef __mips16 # define TLS_GD(x) \ ({ void *__result, *__tmp; \ extern void *__tls_get_addr (void *); \ @@ -62,3 +79,45 @@ ADDU " %0,%0,$3" \ : "+r" (__result) : : "$3"); \ __result; }) + +#else /* __mips16 */ +/* MIPS16 version. */ +# define TLS_GD(x) \ + ({ void *__result, *__tmp; \ + extern void *__tls_get_addr (void *); \ + asm (LOAD_GP ADDIU " %1, %%tlsgd(" #x ")" \ + "\n\tmove %0, %1" \ + : "=d" (__result), [tmp] "=&d" (__tmp)); \ + (int *) __tls_get_addr (__result); }) +# define TLS_LD(x) \ + ({ void *__result, *__tmp; \ + extern void *__tls_get_addr (void *); \ + asm (LOAD_GP ADDIU " %1, %%tlsldm(" #x ")" \ + "\n\tmove %0, %1" \ + : "=d" (__result), [tmp] "=&d" (__tmp)); \ + __result = __tls_get_addr (__result); \ + asm ("li $3,%%dtprel_hi(" #x ")\n\t" \ + "sll $3,16\n\t" \ + "addiu $3,%%dtprel_lo(" #x ")\n\t" \ + ADDU " %0,%0,$3" \ + : "+d" (__result) : : "$3"); \ + __result; }) +# define TLS_IE(x) \ + ({ void *__result, *__tmp, *__tp; \ + __tp = __builtin_thread_pointer (); \ + asm (LOAD_GP LW " $3,%%gottprel(" #x ")(%1)\n\t" \ + ADDU " %0,%[tp],$3" \ + : "=&d" (__result), [tmp] "=&d" (__tmp) \ + : [tp] "d" (__tp) : "$3"); \ + __result; }) +# define TLS_LE(x) \ + ({ void *__result, *__tp; \ + __tp = __builtin_thread_pointer (); \ + asm ("li $3,%%tprel_hi(" #x ")\n\t" \ + "sll $3,16\n\t" \ + "addiu $3,%%tprel_lo(" #x ")\n\t" \ + ADDU " %0,%[tp],$3" \ + : "=d" (__result) : [tp] "d" (__tp) : "$3"); \ + __result; }) + +#endif /* __mips16 */ diff --git a/ports/sysdeps/powerpc/nofpu/fegetenv.c b/ports/sysdeps/powerpc/nofpu/fegetenv.c index 75e89408df..51bcef30a1 100644 --- a/ports/sysdeps/powerpc/nofpu/fegetenv.c +++ b/ports/sysdeps/powerpc/nofpu/fegetenv.c @@ -19,7 +19,6 @@ #include "soft-fp.h" #include "soft-supp.h" -#include <bp-sym.h> extern int __sim_exceptions; extern int __sim_disabled_exceptions; @@ -42,8 +41,8 @@ __fegetenv (fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2); +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/ports/sysdeps/powerpc/nofpu/fesetenv.c b/ports/sysdeps/powerpc/nofpu/fesetenv.c index 810e1da56e..3f35909b6d 100644 --- a/ports/sysdeps/powerpc/nofpu/fesetenv.c +++ b/ports/sysdeps/powerpc/nofpu/fesetenv.c @@ -19,7 +19,6 @@ #include "soft-fp.h" #include "soft-supp.h" -#include <bp-sym.h> int __fesetenv (const fenv_t *envp) @@ -36,8 +35,8 @@ __fesetenv (const fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, BP_SYM (__old_fesetenv), BP_SYM (fesetenv), GLIBC_2_1); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, BP_SYM (__fesetenv), BP_SYM (fesetenv), GLIBC_2_2); +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/ports/sysdeps/powerpc/nofpu/feupdateenv.c b/ports/sysdeps/powerpc/nofpu/feupdateenv.c index 94366a8d5e..163f673102 100644 --- a/ports/sysdeps/powerpc/nofpu/feupdateenv.c +++ b/ports/sysdeps/powerpc/nofpu/feupdateenv.c @@ -21,7 +21,6 @@ #include "soft-fp.h" #include "soft-supp.h" #include <signal.h> -#include <bp-sym.h> int __feupdateenv (const fenv_t *envp) @@ -45,8 +44,8 @@ __feupdateenv (const fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif libm_hidden_ver (__feupdateenv, feupdateenv) -versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2); +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c b/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c index e8b2a3a48c..2373fa4002 100644 --- a/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c +++ b/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c @@ -19,7 +19,6 @@ #include "soft-fp.h" #include "soft-supp.h" -#include <bp-sym.h> int __fegetexceptflag (fexcept_t *flagp, int excepts) @@ -32,7 +31,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -compat_symbol (libm, BP_SYM (__old_fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_1); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); #endif -versioned_symbol (libm, BP_SYM (__fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_2); +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c b/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c index a0861d4a2b..cd142b60be 100644 --- a/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c +++ b/ports/sysdeps/powerpc/nofpu/fraiseexcpt.c @@ -20,7 +20,6 @@ #include "soft-fp.h" #include "soft-supp.h" #include <signal.h> -#include <bp-sym.h> #undef feraiseexcept int @@ -35,8 +34,8 @@ __feraiseexcept (int x) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, BP_SYM (__old_feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_1); +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); #endif libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, BP_SYM (__feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_2); +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c b/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c index 108df304c9..3dc368fdda 100644 --- a/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c +++ b/ports/sysdeps/powerpc/nofpu/fsetexcptflg.c @@ -19,7 +19,6 @@ #include "soft-fp.h" #include "soft-supp.h" -#include <bp-sym.h> int __fesetexceptflag(const fexcept_t *flagp, int excepts) @@ -33,7 +32,7 @@ __fesetexceptflag(const fexcept_t *flagp, int excepts) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, BP_SYM (__old_fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_1); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); #endif -versioned_symbol (libm, BP_SYM (__fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_2); +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/ports/sysdeps/powerpc/powerpc32/405/memcmp.S b/ports/sysdeps/powerpc/powerpc32/405/memcmp.S index 6a6439f5c6..2849461cd7 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/memcmp.S +++ b/ports/sysdeps/powerpc/powerpc32/405/memcmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* memcmp @@ -32,7 +30,7 @@ return src1 > src2, src1 < src2 or src1 = src2. If src1 = src2 and no null, repeat. */ -EALIGN (BP_SYM (memcmp), 5, 0) +EALIGN (memcmp, 5, 0) srwi. r6,r5,5 beq L(preword2_count_loop) mtctr r6 @@ -125,6 +123,6 @@ L(st2): blt cr5,L(l_r) addi r3,r0,-1 blr -END (BP_SYM (memcmp)) +END (memcmp) libc_hidden_builtin_def (memcmp) weak_alias (memcmp,bcmp) diff --git a/ports/sysdeps/powerpc/powerpc32/405/memcpy.S b/ports/sysdeps/powerpc/powerpc32/405/memcpy.S index bca4f74bc4..761e9675af 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/memcpy.S +++ b/ports/sysdeps/powerpc/powerpc32/405/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* memcpy @@ -33,7 +31,7 @@ If 32 or more bytes to copy we use 32 byte copy loop. Finaly we copy 0-31 extra bytes. */ -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) /* Check if bytes to copy are greater than 256 and if source and destination are unaligned */ cmpwi r5,0x0100 @@ -128,5 +126,5 @@ L(word4_count_loop_no_dcbt): /* Copy 32 bytes at a time */ L(end_memcpy): mr r3,r0 blr -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/ports/sysdeps/powerpc/powerpc32/405/memset.S b/ports/sysdeps/powerpc/powerpc32/405/memset.S index d07a976da0..b73dba8873 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/memset.S +++ b/ports/sysdeps/powerpc/powerpc32/405/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* memset @@ -37,7 +35,7 @@ If 16 or more words to set we use 16 word copy loop. Finaly we set 0-15 extra bytes with string store. */ -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) rlwinm r11,r4,0,24,31 rlwimi r11,r4,8,16,23 rlwimi r11,r11,16,0,15 @@ -150,5 +148,5 @@ L(postword2_count_loop): mtxer r7 stswx r8,0,r3 b L(end_memset) -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/ports/sysdeps/powerpc/powerpc32/405/strcmp.S b/ports/sysdeps/powerpc/powerpc32/405/strcmp.S index faa7cf33bb..c0b21907be 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/strcmp.S +++ b/ports/sysdeps/powerpc/powerpc32/405/strcmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* strcmp @@ -34,7 +32,7 @@ return src1 > src2, src1 < src2 or src1 = src2. If src1 = src2 and no null, repeat. */ -EALIGN (BP_SYM(strcmp),5,0) +EALIGN (strcmp,5,0) neg r7,r3 clrlwi r7,r7,20 neg r8,r4 @@ -132,5 +130,5 @@ L(byte_loop): cmpwi r5,0 beq L(end_strcmp) b L(byte_loop) -END (BP_SYM (strcmp)) +END (strcmp) libc_hidden_builtin_def (strcmp) diff --git a/ports/sysdeps/powerpc/powerpc32/405/strcpy.S b/ports/sysdeps/powerpc/powerpc32/405/strcpy.S index 88f8c8ea71..d7c84569d9 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/strcpy.S +++ b/ports/sysdeps/powerpc/powerpc32/405/strcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* strcpy @@ -33,7 +31,7 @@ where in the last 8 bytes it is. Copy the appropriate bytes of the last 8 according to the null position. */ -EALIGN (BP_SYM (strcpy), 5, 0) +EALIGN (strcpy, 5, 0) neg r7,r4 subi r4,r4,1 clrlwi. r8,r7,29 @@ -105,5 +103,5 @@ L(last_bytes_copy_loop2): L(end_strcpy): blr -END (BP_SYM (strcpy)) +END (strcpy) libc_hidden_builtin_def (strcpy) diff --git a/ports/sysdeps/powerpc/powerpc32/405/strlen.S b/ports/sysdeps/powerpc/powerpc32/405/strlen.S index e267f4dfca..77d22ea673 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/strlen.S +++ b/ports/sysdeps/powerpc/powerpc32/405/strlen.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* strlen @@ -31,7 +29,7 @@ the count and return the count value. We need to subtract one because we don't count the null character as a byte. */ -EALIGN (BP_SYM (strlen),5,0) +EALIGN (strlen,5,0) neg r7,r3 clrlwi. r8,r7,29 addi r4,0,0 @@ -73,5 +71,5 @@ L(byte_count_loop): L(end_strlen): addi r3,r4,-1 blr -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/ports/sysdeps/powerpc/powerpc32/405/strncmp.S b/ports/sysdeps/powerpc/powerpc32/405/strncmp.S index a613869b78..3e2ba5f855 100644 --- a/ports/sysdeps/powerpc/powerpc32/405/strncmp.S +++ b/ports/sysdeps/powerpc/powerpc32/405/strncmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* strncmp @@ -39,7 +37,7 @@ return src1 > src2, src1 < src2 or src1 = src2. If src1 = src2 and no null, repeat. */ -EALIGN (BP_SYM(strncmp),5,0) +EALIGN (strncmp,5,0) neg r7,r3 clrlwi r7,r7,20 neg r8,r4 @@ -126,5 +124,5 @@ L(end_strncmp): L(st1): mfcr r3 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/ports/sysdeps/powerpc/powerpc32/476/memset.S b/ports/sysdeps/powerpc/powerpc32/476/memset.S index f681a898d9..48c21d6209 100644 --- a/ports/sysdeps/powerpc/powerpc32/476/memset.S +++ b/ports/sysdeps/powerpc/powerpc32/476/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* memset @@ -37,7 +35,7 @@ If 16 or more words to set we use 16 word copy loop. Finaly we set 0-15 extra bytes with string store. */ -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) rlwinm r11,r4,0,24,31 rlwimi r11,r4,8,16,23 rlwimi r11,r11,16,0,15 @@ -150,5 +148,5 @@ L(postword2_count_loop): mtxer r7 stswx r8,0,r3 b L(end_memset) -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/ports/sysdeps/unix/alpha/sysdep.h b/ports/sysdeps/unix/alpha/sysdep.h index 3b71a5ec6c..d20bcd6d31 100644 --- a/ports/sysdeps/unix/alpha/sysdep.h +++ b/ports/sysdeps/unix/alpha/sysdep.h @@ -161,6 +161,9 @@ __LABEL(name) \ #else /* !ASSEMBLER */ +/* In order to get __set_errno() definition in INLINE_SYSCALL. */ +#include <errno.h> + /* ??? Linux needs to be able to override INLINE_SYSCALL for one particular special case. Make this easy. */ diff --git a/ports/sysdeps/unix/arm/sysdep.S b/ports/sysdeps/unix/arm/sysdep.S index da07d85f18..d82ad258a0 100644 --- a/ports/sysdeps/unix/arm/sysdep.S +++ b/ports/sysdeps/unix/arm/sysdep.S @@ -31,33 +31,30 @@ __syscall_error: /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ - cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ - moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ + cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ + it eq + moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif #ifndef IS_IN_rtld - mov ip, lr - cfi_register (lr, ip) - mov r1, r0 - - mov r0, #0xffff0fff - mov lr, pc - sub pc, r0, #31 - - ldr r2, 1f -2: ldr r2, [pc, r2] - str r1, [r0, r2] - mvn r0, #0 - RETINSTR (, ip) + mov r1, r0 + GET_TLS (r2) + ldr r2, 1f +#ifdef __thumb__ +2: add r2, r2, pc + ldr r2, [r2] +#else +2: ldr r2, [pc, r2] +#endif + str r1, [r0, r2] + mvn r0, #0 + DO_RET(lr) -1: .word errno(gottpoff) + (. - 2b - 8) +1: .word errno(gottpoff) + (. - 2b - PC_OFS) #elif RTLD_PRIVATE_ERRNO - ldr r1, 1f -0: str r0, [pc, r1] - mvn r0, $0 + LDST_PCREL(str, r0, r1, C_SYMBOL_NAME(rtld_errno)) + mvn r0, #0 DO_RET(r14) - -1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8 #else #error "Unsupported non-TLS case" #endif diff --git a/ports/sysdeps/unix/mips/mips32/sysdep.h b/ports/sysdeps/unix/mips/mips32/sysdep.h index d7d389253d..5d96d05c65 100644 --- a/ports/sysdeps/unix/mips/mips32/sysdep.h +++ b/ports/sysdeps/unix/mips/mips32/sysdep.h @@ -24,8 +24,11 @@ #ifdef __PIC__ #define PSEUDO(name, syscall_name, args) \ .align 2; \ + .set nomips16; \ + cfi_startproc; \ 99: la t9,__syscall_error; \ jr t9; \ + cfi_endproc; \ ENTRY(name) \ .set noreorder; \ .cpload t9; \ @@ -37,9 +40,12 @@ L(syse1): #else #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ + .set nomips16; \ .align 2; \ + cfi_startproc; \ 99: j __syscall_error; \ nop; \ + cfi_endproc; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ diff --git a/ports/sysdeps/unix/mips/mips64/n32/sysdep.h b/ports/sysdeps/unix/mips/mips64/n32/sysdep.h index 37a67a2e69..c55b95cc2a 100644 --- a/ports/sysdeps/unix/mips/mips64/n32/sysdep.h +++ b/ports/sysdeps/unix/mips/mips64/n32/sysdep.h @@ -26,13 +26,18 @@ #ifdef __PIC__ #define PSEUDO(name, syscall_name, args) \ .align 2; \ + .set nomips16; \ + cfi_startproc; \ 99:; \ .set noat; \ .cpsetup t9, $1, name; \ + cfi_register (gp, $1); \ .set at; \ la t9,__syscall_error; \ .cpreturn; \ + cfi_restore (gp); \ jr t9; \ + cfi_endproc; \ ENTRY(name) \ li v0, SYS_ify(syscall_name); \ syscall; \ @@ -42,8 +47,11 @@ L(syse1): #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ .align 2; \ + .set nomips16; \ + cfi_startproc; \ 99: j __syscall_error; \ nop; \ + cfi_endproc; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ diff --git a/ports/sysdeps/unix/mips/mips64/n64/sysdep.h b/ports/sysdeps/unix/mips/mips64/n64/sysdep.h index 871184bd0f..445e6ff738 100644 --- a/ports/sysdeps/unix/mips/mips64/n64/sysdep.h +++ b/ports/sysdeps/unix/mips/mips64/n64/sysdep.h @@ -26,13 +26,18 @@ #ifdef __PIC__ #define PSEUDO(name, syscall_name, args) \ .align 2; \ + .set nomips16; \ + cfi_startproc; \ 99:; \ .set noat; \ .cpsetup t9, $1, name; \ + cfi_register (gp, $1); \ .set at; \ dla t9,__syscall_error; \ .cpreturn; \ + cfi_restore (gp); \ jr t9; \ + cfi_endproc; \ ENTRY(name) \ li v0, SYS_ify(syscall_name); \ syscall; \ @@ -42,8 +47,11 @@ L(syse1): #define PSEUDO(name, syscall_name, args) \ .set noreorder; \ .align 2; \ + .set nomips16; \ + cfi_startproc; \ 99: j __syscall_error; \ nop; \ + cfi_endproc; \ ENTRY(name) \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ diff --git a/ports/sysdeps/unix/mips/sysdep.S b/ports/sysdeps/unix/mips/sysdep.S index e778918573..e27aada1db 100644 --- a/ports/sysdeps/unix/mips/sysdep.S +++ b/ports/sysdeps/unix/mips/sysdep.S @@ -21,6 +21,8 @@ #include <bits/errno.h> #include <sys/asm.h> + .set nomips16 + #ifdef _LIBC_REENTRANT LOCALSZ= 3 diff --git a/ports/sysdeps/unix/mips/sysdep.h b/ports/sysdeps/unix/mips/sysdep.h index bab3bc04c9..4d7667ea9c 100644 --- a/ports/sysdeps/unix/mips/sysdep.h +++ b/ports/sysdeps/unix/mips/sysdep.h @@ -27,39 +27,43 @@ .globl name; \ .align 2; \ .ent name,0; \ - name##: + name##: \ + cfi_startproc; #undef END #define END(function) \ + cfi_endproc; \ .end function; \ .size function,.-function #define ret j ra ; nop #undef PSEUDO_END -#define PSEUDO_END(sym) .end sym; .size sym,.-sym +#define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym #define PSEUDO_NOERRNO(name, syscall_name, args) \ .align 2; \ ENTRY(name) \ + .set nomips16; \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ syscall #undef PSEUDO_END_NOERRNO -#define PSEUDO_END_NOERRNO(sym) .end sym; .size sym,.-sym +#define PSEUDO_END_NOERRNO(sym) cfi_endproc; .end sym; .size sym,.-sym #define ret_NOERRNO ret #define PSEUDO_ERRVAL(name, syscall_name, args) \ .align 2; \ ENTRY(name) \ + .set nomips16; \ .set noreorder; \ li v0, SYS_ify(syscall_name); \ syscall #undef PSEUDO_END_ERRVAL -#define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym +#define PSEUDO_END_ERRVAL(sym) cfi_endproc; .end sym; .size sym,.-sym #define ret_ERRVAL ret diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/bits/mman.h b/ports/sysdeps/unix/sysv/linux/aarch64/bits/mman.h index 67c563ce2b..770607b83e 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/aarch64/bits/mman.h @@ -25,38 +25,8 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -#ifdef __USE_MISC /* These are Linux-specific. */ +#ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ # define MAP_DENYWRITE 0x00800 /* ETXTBSY */ # define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ @@ -68,47 +38,7 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure b/ports/sysdeps/unix/sysv/linux/aarch64/configure index 5a22126fe8..6b2608acd7 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/configure +++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure @@ -1,3 +1,17 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/aarch64. arch_minimum_kernel=3.7.0 + +test -n "$libc_cv_slibdir" || +case "$prefix" in + /usr | /usr/) + libc_cv_slibdir="/lib64" + libc_cv_rtlddir="/lib" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; +esac diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in index d1995d486d..b090702134 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/configure.in +++ b/ports/sysdeps/unix/sysv/linux/aarch64/configure.in @@ -2,3 +2,16 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/aarch64. arch_minimum_kernel=3.7.0 + +test -n "$libc_cv_slibdir" || +case "$prefix" in + /usr | /usr/) + libc_cv_slibdir="/lib64" + libc_cv_rtlddir="/lib" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; +esac diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c b/ports/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c index 1da284dec8..4d1ec3b101 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c +++ b/ports/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c @@ -22,7 +22,6 @@ #undef __gettimeofday #include <bits/libc-vdso.h> -#include <bp-checks.h> /* Get the current time of day and timezone information, putting it into *tv and *tz. If tz is null, *tz is not filled. @@ -32,7 +31,7 @@ __gettimeofday (tv, tz) struct timeval *tv; struct timezone *tz; { - return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz)); + return INLINE_VSYSCALL (gettimeofday, 2, tv, tz); } libc_hidden_def (__gettimeofday) weak_alias (__gettimeofday, gettimeofday) diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist index f83e8806a7..b04a761fed 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist @@ -2077,3 +2077,6 @@ GLIBC_2.17 xencrypt F xprt_register F xprt_unregister F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist index 031c70e8ab..696158aef7 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist +++ b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist @@ -73,7 +73,6 @@ GLIBC_2.17 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/sigaction.c b/ports/sysdeps/unix/sysv/linux/aarch64/sigaction.c index 74b6675647..dbaa2246b7 100644 --- a/ports/sysdeps/unix/sysv/linux/aarch64/sigaction.c +++ b/ports/sysdeps/unix/sysv/linux/aarch64/sigaction.c @@ -51,8 +51,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) } result = INLINE_SYSCALL (rt_sigaction, 4, sig, - act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + act ? &kact : NULL, + oact ? &koact : NULL, _NSIG / 8); if (result >= 0 || errno != ENOSYS) { if (oact && result >= 0) diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h index 2238c2c72b..c51b05d37f 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -51,6 +51,9 @@ # define MAP_FILE 0 # define MAP_ANONYMOUS 0x10 /* Don't use a file. */ # define MAP_ANON MAP_ANONYMOUS +/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ +# define MAP_HUGE_SHIFT 26 +# define MAP_HUGE_MASK 0x3f #endif /* Not used by Linux, but here to make sure we don't clash with diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h index 1b07465d45..8bb057b4ee 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h @@ -25,6 +25,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c b/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c index 1906741721..fdcad0bfbb 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> diff --git a/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c b/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c index d6439505ec..48f3cec9d9 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/gethostname.c @@ -22,14 +22,13 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> int __gethostname (char *name, size_t len) { int result; - result = INLINE_SYSCALL (gethostname, 2, CHECK_N (name, len), len); + result = INLINE_SYSCALL (gethostname, 2, name, len); if (result == 0 /* See whether the string is terminated. If not we will return diff --git a/ports/sysdeps/unix/sysv/linux/alpha/msgctl.c b/ports/sysdeps/unix/sysv/linux/alpha/msgctl.c index b4633f4135..dbd03c1b2c 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/msgctl.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/msgctl.c @@ -21,13 +21,12 @@ #include <ipc_priv.h> #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> int __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) { - return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); } #include <shlib-compat.h> diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist index 1d0cc7ec31..980e08857a 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist @@ -1819,6 +1819,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index e50324cdd7..cf6b8bfd9b 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -38,6 +38,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -143,8 +145,31 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + }) +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) static inline int __attribute__((always_inline)) __lll_trylock(int *futex) diff --git a/ports/sysdeps/unix/sysv/linux/alpha/shmctl.c b/ports/sysdeps/unix/sysv/linux/alpha/shmctl.c index 5e52200442..f2217a2b5a 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/shmctl.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/shmctl.c @@ -22,13 +22,12 @@ #include <sysdep.h> #include <sys/syscall.h> #include <bits/wordsize.h> -#include <bp-checks.h> int __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) { - return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); + return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf); } #include <shlib-compat.h> diff --git a/ports/sysdeps/unix/sysv/linux/alpha/sigaction.c b/ports/sysdeps/unix/sysv/linux/alpha/sigaction.c index 77c0115c4b..ad3860dfc0 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/sigaction.c @@ -32,7 +32,7 @@ : INLINE_SYSCALL1(name, nr, args)) struct kernel_sigaction; -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, - struct kernel_sigaction *__unbounded, size_t); +extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *, + struct kernel_sigaction *, size_t); #include <sysdeps/unix/sysv/linux/sigaction.c> diff --git a/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h b/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h index 5dd8ae13fc..a6e85f99d0 100644 --- a/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h @@ -24,35 +24,6 @@ But the kernel header is not namespace clean. */ -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ @@ -62,35 +33,5 @@ # define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/ports/sysdeps/unix/sysv/linux/am33/brk.c b/ports/sysdeps/unix/sysv/linux/am33/brk.c index 51b59adc9d..8fd2ff01d9 100644 --- a/ports/sysdeps/unix/sysv/linux/am33/brk.c +++ b/ports/sysdeps/unix/sysv/linux/am33/brk.c @@ -30,7 +30,7 @@ __brk (void *addr) { void *newbrk; - newbrk = INLINE_SYSCALL (brk, 1, __ptrvalue (addr)); + newbrk = INLINE_SYSCALL (brk, 1, addr); __curbrk = newbrk; diff --git a/ports/sysdeps/unix/sysv/linux/am33/clone.S b/ports/sysdeps/unix/sysv/linux/am33/clone.S index 151950c5db..cece99bf34 100644 --- a/ports/sysdeps/unix/sysv/linux/am33/clone.S +++ b/ports/sysdeps/unix/sysv/linux/am33/clone.S @@ -24,12 +24,11 @@ #define _ERRNO_H 1 #include <bits/errno.h> #include <asm-syntax.h> -#include <bp-sym.h> /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ .text -ENTRY (BP_SYM (__clone)) +ENTRY (__clone) /* Sanity check arguments. */ cmp 0,d0 /* no NULL function pointers */ beq L(error_inval) @@ -75,6 +74,6 @@ L(here): #endif call JUMPTARGET (_exit),[],0 -PSEUDO_END (BP_SYM (__clone)) +PSEUDO_END (__clone) -weak_alias (BP_SYM (__clone), BP_SYM (clone)) +weak_alias (__clone, clone) diff --git a/ports/sysdeps/unix/sysv/linux/arm/Makefile b/ports/sysdeps/unix/sysv/linux/arm/Makefile index be7946e966..aa7526a258 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/Makefile +++ b/ports/sysdeps/unix/sysv/linux/arm/Makefile @@ -10,7 +10,7 @@ shared-only-routines += libc-aeabi_read_tp endif ifeq ($(subdir),elf) -sysdep-rtld-routines += aeabi_read_tp +sysdep-rtld-routines += aeabi_read_tp libc-do-syscall endif ifeq ($(subdir),misc) @@ -70,9 +70,6 @@ LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o endif -# Get value of default-abi. -include $(common-objpfx)default-abi.make - abi-variants := soft hard ifeq (,$(filter $(default-abi),$(abi-variants))) diff --git a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index bdcfa206ec..6ee7a1aebd 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S @@ -15,6 +15,8 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include <sysdep.h> .section .rodata.str1.1,"aMS",%progbits,1 @@ -51,7 +53,7 @@ longjmp_msg: cfi_remember_state; \ cmp sp, reg; \ bls .Lok; \ - str r7, [sp, #-4]!; \ + push { r7 }; \ cfi_adjust_cfa_offset (4); \ cfi_rel_offset (r7, 0); \ mov r5, r0; \ @@ -77,7 +79,7 @@ longjmp_msg: .Lfail: \ add sp, sp, #12; \ cfi_adjust_cfa_offset (-12); \ - ldr r7, [sp], #4; \ + pop { r7 }; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (r7); \ CALL_FAIL \ diff --git a/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S index c4ddbc69ff..21e322986a 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S +++ b/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S @@ -41,6 +41,15 @@ .hidden __aeabi_read_tp ENTRY (__aeabi_read_tp) +#ifdef ARCH_HAS_HARD_TP + mrc p15, 0, r0, c13, c0, 3 + bx lr +#elif defined(__thumb2__) + movw r0, #0x0fe0 + movt r0, #0xffff + bx r0 +#else mov r0, #0xffff0fff sub pc, r0, #31 +#endif END (__aeabi_read_tp) diff --git a/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h index f5ca3c9b6e..11ecbca03a 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -23,36 +23,6 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ @@ -66,47 +36,5 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S index de25db1609..ce9c2a5ba1 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/clone.S +++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S @@ -33,6 +33,7 @@ ENTRY(__clone) @ sanity check args cmp r0, #0 + ite ne cmpne r1, #0 moveq r0, #-EINVAL beq PLTJMP(syscall_error) @@ -48,7 +49,7 @@ ENTRY(__clone) mov ip, r2 #endif @ new sp is already in r1 - stmfd sp!, {r4, r7} + push {r4, r7} cfi_adjust_cfa_offset (8) cfi_rel_offset (r4, 0) cfi_rel_offset (r7, 4) @@ -60,7 +61,7 @@ ENTRY(__clone) cfi_endproc cmp r0, #0 beq 1f - ldmfd sp!, {r4, r7} + pop {r4, r7} blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) RETINSTR(, lr) @@ -73,16 +74,16 @@ PSEUDO_END (__clone) #ifdef RESET_PID tst ip, #CLONE_THREAD bne 3f - mov r0, #0xffff0fff - mov lr, pc - sub pc, r0, #31 + GET_TLS (lr) mov r1, r0 tst ip, #CLONE_VM - movne r0, #-1 ldr r7, =SYS_ify(getpid) + ite ne + movne r0, #-1 swieq 0x0 - str r0, [r1, #PID_OFFSET] - str r0, [r1, #TID_OFFSET] + NEGOFF_ADJ_BASE (r1, TID_OFFSET) + str r0, NEGOFF_OFF1 (r1, TID_OFFSET) + str r0, NEGOFF_OFF2 (r1, PID_OFFSET, TID_OFFSET) 3: #endif @ pick the function arg and call address off the stack and execute diff --git a/ports/sysdeps/unix/sysv/linux/arm/configure b/ports/sysdeps/unix/sysv/linux/arm/configure index cb94cc5eb4..f66b158289 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/configure +++ b/ports/sysdeps/unix/sysv/linux/arm/configure @@ -2,4 +2,5 @@ # Local configure fragment for sysdeps/unix/sysv/linux/arm. libc_cv_gcc_unwind_find_fde=no +# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in. CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/ports/sysdeps/unix/sysv/linux/arm/configure.in b/ports/sysdeps/unix/sysv/linux/arm/configure.in index 3e67dee425..8fffe94051 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/configure.in +++ b/ports/sysdeps/unix/sysv/linux/arm/configure.in @@ -2,4 +2,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/arm. libc_cv_gcc_unwind_find_fde=no +# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in. CFLAGS=${CFLAGS% -fno-unwind-tables} diff --git a/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h b/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h index acc4f28645..504fecab58 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h +++ b/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h @@ -18,12 +18,17 @@ #include <ldconfig.h> +/* In order to support the transition from unmarked objects + to marked objects we must treat unmarked objects as + compatible with either FLAG_ARM_LIBHF or FLAG_ARM_LIBSF. */ #ifdef __ARM_PCS_VFP # define _dl_cache_check_flags(flags) \ - ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6)) + ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6) \ + || (flags) == FLAG_ELF_LIBC6) #else # define _dl_cache_check_flags(flags) \ - ((flags) == FLAG_ELF_LIBC6) + ((flags) == (FLAG_ARM_LIBSF | FLAG_ELF_LIBC6) \ + || (flags) == FLAG_ELF_LIBC6) #endif #include_next <dl-cache.h> diff --git a/ports/sysdeps/unix/sysv/linux/arm/getcontext.S b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S index f7857c1996..fa00c0b789 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/getcontext.S +++ b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S @@ -103,7 +103,7 @@ ENTRY(__getcontext) END(__getcontext) #ifdef PIC -1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS .Lrtld_global_ro: .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) #else diff --git a/ports/sysdeps/unix/sysv/linux/arm/mmap.S b/ports/sysdeps/unix/sysv/linux/arm/mmap.S index fa8a2b86c8..06b737eebe 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/ports/sysdeps/unix/sysv/linux/arm/mmap.S @@ -23,11 +23,11 @@ ENTRY (__mmap) /* shuffle args */ - str r5, [sp, #-4]! + push { r5 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r5, 0) ldr r5, [sp, #8] - str r4, [sp, #-4]! + push { r4 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r4, 0) cfi_remember_state @@ -43,14 +43,15 @@ ENTRY (__mmap) /* restore registers */ 2: - ldr r4, [sp], #4 + pop { r4 } cfi_adjust_cfa_offset (-4) cfi_restore (r4) - ldr r5, [sp], #4 + pop { r5 } cfi_adjust_cfa_offset (-4) cfi_restore (r5) cmn r0, $4096 + it cc RETINSTR(cc, lr) b PLTJMP(syscall_error) diff --git a/ports/sysdeps/unix/sysv/linux/arm/mmap64.S b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S index 2eafd1b413..d039129b29 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -17,6 +17,8 @@ #include <sysdep.h> + .syntax unified + #define EINVAL 22 #ifdef __ARMEB__ @@ -32,33 +34,35 @@ .text ENTRY (__mmap64) ldr ip, [sp, $LOW_OFFSET] - str r5, [sp, #-4]! + push { r5 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r5, 0) ldr r5, [sp, $HIGH_OFFSET] - str r4, [sp, #-4]! + push { r4 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r4, 0) cfi_remember_state movs r4, ip, lsl $20 @ check that offset is page-aligned mov ip, ip, lsr $12 - moveqs r4, r5, lsr $12 @ check for overflow + it eq + movseq r4, r5, lsr $12 @ check for overflow bne .Linval ldr r4, [sp, $8] @ load fd orr r5, ip, r5, lsl $20 @ compose page offset DO_CALL (mmap2, 0) cmn r0, $4096 - ldmfd sp!, {r4, r5} + pop {r4, r5} cfi_adjust_cfa_offset (-8) cfi_restore (r4) cfi_restore (r5) + it cc RETINSTR(cc, lr) b PLTJMP(syscall_error) cfi_restore_state .Linval: mov r0, $-EINVAL - ldmfd sp!, {r4, r5} + pop {r4, r5} cfi_adjust_cfa_offset (-8) cfi_restore (r4) cfi_restore (r5) diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist index ceab6b2cd9..ce45208b5f 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist @@ -86,6 +86,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.4 GLIBC_2.4 A _Exit F diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist index 6c0bbde672..de8095a606 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/libpthread.abilist @@ -83,7 +83,6 @@ GLIBC_2.4 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index 0278812f7c..fe21cdaf29 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -36,6 +36,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -141,6 +143,32 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + }) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + #define lll_trylock(lock) \ atomic_compare_and_exchange_val_acq(&(lock), 1, 0) diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S b/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S index a38d56419c..ca50457070 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S @@ -19,23 +19,16 @@ /* Save the PID value. */ #define SAVE_PID \ - str lr, [sp, #-4]!; /* Save LR. */ \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (lr, 0); \ - mov r0, #0xffff0fff; /* Point to the high page. */ \ - mov lr, pc; /* Save our return address. */ \ - sub pc, r0, #31; /* Jump to the TLS entry. */ \ - ldr lr, [sp], #4; /* Restore LR. */ \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (lr); \ - mov r2, r0; /* Save the TLS addr in r2. */ \ - ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ - rsb r0, r3, #0; /* Negate it. */ \ - str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */ + GET_TLS (r2); \ + NEGOFF_ADJ_BASE2 (r2, r0, PID_OFFSET); /* Save the TLS addr in r2. */ \ + ldr r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* Load the saved PID. */ \ + rsb r0, r3, #0; /* Negate it. */ \ + str r0, NEGOFF_OFF1 (r2, PID_OFFSET); /* Store the temp PID. */ /* Restore the old PID value in the parent. */ #define RESTORE_PID \ cmp r0, #0; /* If we are the parent... */ \ - strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */ + it ne; \ + strne r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* restore the saved PID. */ #include "../vfork.S" diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h index 1b0a2447f2..59b826ded4 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h @@ -30,161 +30,156 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - PSEUDO_PROLOGUE; \ - .type __##syscall_name##_nocancel,%function; \ - .globl __##syscall_name##_nocancel; \ - __##syscall_name##_nocancel: \ - .cfi_sections .debug_frame; \ - cfi_startproc; \ - DO_CALL (syscall_name, args); \ - cmn r0, $4096; \ - PSEUDO_RET; \ - cfi_endproc; \ - .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + .text; \ + ENTRY (__##syscall_name##_nocancel); \ + CFI_SECTIONS; \ + DO_CALL (syscall_name, args); \ + cmn r0, $4096; \ + PSEUDO_RET; \ + END (__##syscall_name##_nocancel); \ ENTRY (name); \ - SINGLE_THREAD_P; \ - DOARGS_##args; \ - bne .Lpseudo_cancel; \ - cfi_remember_state; \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; \ - UNDOARGS_##args; \ - cmn r0, $4096; \ - PSEUDO_RET; \ - cfi_restore_state; \ + SINGLE_THREAD_P; \ + DOARGS_##args; \ + bne .Lpseudo_cancel; \ + cfi_remember_state; \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; \ + UNDOARGS_##args; \ + cmn r0, $4096; \ + PSEUDO_RET; \ + cfi_restore_state; \ .Lpseudo_cancel: \ - .fnstart; /* matched by the .fnend in UNDOARGS below. */ \ - DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ - CENABLE; \ - mov ip, r0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; /* do the call. */ \ - mov r7, r0; /* save syscall return value. */ \ - mov r0, ip; /* get mask back. */ \ - CDISABLE; \ - mov r0, r7; /* retrieve return value. */ \ - RESTORE_LR_##args; \ - UNDOARGS_##args; \ - cmn r0, $4096 + .fnstart; /* matched by the .fnend in UNDOARGS below. */ \ + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ + CENABLE; \ + mov ip, r0; /* put mask in safe place. */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; /* do the call. */ \ + mov r7, r0; /* save syscall return value. */ \ + mov r0, ip; /* get mask back. */ \ + CDISABLE; \ + mov r0, r7; /* retrieve return value. */ \ + RESTORE_LR_##args; \ + UNDOARGS_##args; \ + cmn r0, $4096 /* DOARGS pushes eight bytes on the stack for five arguments, twelve bytes for six arguments, and four bytes for fewer. In order to preserve doubleword alignment, sometimes we must save an extra register. */ -# define RESTART_UNWIND \ - .fnend; \ - .fnstart; \ - .save {r7}; \ - .save {lr} - -# define DOCARGS_0 \ - .save {r7}; \ - str lr, [sp, #-4]!; \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (lr, 0); \ - .save {lr} +# define RESTART_UNWIND \ + .fnend; \ + .fnstart; \ + .save {r7}; \ + .save {lr} + +# define DOCARGS_0 \ + .save {r7}; \ + push {lr}; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (lr, 0); \ + .save {lr} # define UNDOCARGS_0 -# define RESTORE_LR_0 \ - ldr lr, [sp], #4; \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (lr) - -# define DOCARGS_1 \ - .save {r7}; \ - stmfd sp!, {r0, r1, lr}; \ - cfi_adjust_cfa_offset (12); \ - cfi_rel_offset (lr, 8); \ - .save {lr}; \ - .pad #8 -# define UNDOCARGS_1 \ - ldr r0, [sp], #8; \ - cfi_adjust_cfa_offset (-8); \ - RESTART_UNWIND -# define RESTORE_LR_1 \ - RESTORE_LR_0 - -# define DOCARGS_2 \ - .save {r7}; \ - stmfd sp!, {r0, r1, lr}; \ - cfi_adjust_cfa_offset (12); \ - cfi_rel_offset (lr, 8); \ - .save {lr}; \ - .pad #8 -# define UNDOCARGS_2 \ - ldmfd sp!, {r0, r1}; \ - cfi_adjust_cfa_offset (-8); \ - RESTART_UNWIND -# define RESTORE_LR_2 \ - RESTORE_LR_0 - -# define DOCARGS_3 \ - .save {r7}; \ - stmfd sp!, {r0, r1, r2, r3, lr}; \ - cfi_adjust_cfa_offset (20); \ - cfi_rel_offset (lr, 16); \ - .save {lr}; \ - .pad #16 -# define UNDOCARGS_3 \ - ldmfd sp!, {r0, r1, r2, r3}; \ - cfi_adjust_cfa_offset (-16); \ - RESTART_UNWIND -# define RESTORE_LR_3 \ - RESTORE_LR_0 - -# define DOCARGS_4 \ - .save {r7}; \ - stmfd sp!, {r0, r1, r2, r3, lr}; \ - cfi_adjust_cfa_offset (20); \ - cfi_rel_offset (lr, 16); \ - .save {lr}; \ - .pad #16 -# define UNDOCARGS_4 \ - ldmfd sp!, {r0, r1, r2, r3}; \ - cfi_adjust_cfa_offset (-16); \ - RESTART_UNWIND -# define RESTORE_LR_4 \ - RESTORE_LR_0 +# define RESTORE_LR_0 \ + pop {lr}; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (lr) + +# define DOCARGS_1 \ + .save {r7}; \ + push {r0, r1, lr}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (lr, 8); \ + .save {lr}; \ + .pad #8 +# define UNDOCARGS_1 \ + ldr r0, [sp], #8; \ + cfi_adjust_cfa_offset (-8); \ + RESTART_UNWIND +# define RESTORE_LR_1 \ + RESTORE_LR_0 + +# define DOCARGS_2 \ + .save {r7}; \ + push {r0, r1, lr}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (lr, 8); \ + .save {lr}; \ + .pad #8 +# define UNDOCARGS_2 \ + pop {r0, r1}; \ + cfi_adjust_cfa_offset (-8); \ + RESTART_UNWIND +# define RESTORE_LR_2 \ + RESTORE_LR_0 + +# define DOCARGS_3 \ + .save {r7}; \ + push {r0, r1, r2, r3, lr}; \ + cfi_adjust_cfa_offset (20); \ + cfi_rel_offset (lr, 16); \ + .save {lr}; \ + .pad #16 +# define UNDOCARGS_3 \ + pop {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + RESTART_UNWIND +# define RESTORE_LR_3 \ + RESTORE_LR_0 + +# define DOCARGS_4 \ + .save {r7}; \ + push {r0, r1, r2, r3, lr}; \ + cfi_adjust_cfa_offset (20); \ + cfi_rel_offset (lr, 16); \ + .save {lr}; \ + .pad #16 +# define UNDOCARGS_4 \ + pop {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + RESTART_UNWIND +# define RESTORE_LR_4 \ + RESTORE_LR_0 /* r4 is only stmfd'ed for correct stack alignment. */ -# define DOCARGS_5 \ - .save {r4, r7}; \ - stmfd sp!, {r0, r1, r2, r3, r4, lr}; \ - cfi_adjust_cfa_offset (24); \ - cfi_rel_offset (lr, 20); \ - .save {lr}; \ - .pad #20 -# define UNDOCARGS_5 \ - ldmfd sp!, {r0, r1, r2, r3}; \ - cfi_adjust_cfa_offset (-16); \ - .fnend; \ - .fnstart; \ - .save {r4, r7}; \ - .save {lr}; \ - .pad #4 -# define RESTORE_LR_5 \ - ldmfd sp!, {r4, lr}; \ - cfi_adjust_cfa_offset (-8); \ - /* r4 will be marked as restored later. */ \ - cfi_restore (lr) - -# define DOCARGS_6 \ - .save {r4, r5, r7}; \ - stmfd sp!, {r0, r1, r2, r3, lr}; \ - cfi_adjust_cfa_offset (20); \ - cfi_rel_offset (lr, 16); \ - .save {lr}; \ - .pad #16 -# define UNDOCARGS_6 \ - ldmfd sp!, {r0, r1, r2, r3}; \ - cfi_adjust_cfa_offset (-16); \ - .fnend; \ - .fnstart; \ - .save {r4, r5, r7}; \ - .save {lr}; -# define RESTORE_LR_6 \ - RESTORE_LR_0 +# define DOCARGS_5 \ + .save {r4, r7}; \ + push {r0, r1, r2, r3, r4, lr}; \ + cfi_adjust_cfa_offset (24); \ + cfi_rel_offset (lr, 20); \ + .save {lr}; \ + .pad #20 +# define UNDOCARGS_5 \ + pop {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + .fnend; \ + .fnstart; \ + .save {r4, r7}; \ + .save {lr}; \ + .pad #4 +# define RESTORE_LR_5 \ + pop {r4, lr}; \ + cfi_adjust_cfa_offset (-8); \ + /* r4 will be marked as restored later. */ \ + cfi_restore (lr) + +# define DOCARGS_6 \ + .save {r4, r5, r7}; \ + push {r0, r1, r2, r3, lr}; \ + cfi_adjust_cfa_offset (20); \ + cfi_rel_offset (lr, 16); \ + .save {lr}; \ + .pad #16 +# define UNDOCARGS_6 \ + pop {r0, r1, r2, r3}; \ + cfi_adjust_cfa_offset (-16); \ + .fnend; \ + .fnstart; \ + .save {r4, r5, r7}; \ + .save {lr}; +# define RESTORE_LR_6 \ + RESTORE_LR_0 # ifdef IS_IN_libpthread # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) @@ -207,12 +202,8 @@ extern int __local_multiple_threads attribute_hidden; # define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) # else # define SINGLE_THREAD_P \ - ldr ip, 1b; \ -2: \ - ldr ip, [pc, ip]; \ - teq ip, #0; -# define PSEUDO_PROLOGUE \ - 1: .word __local_multiple_threads - 2f - 8; + LDST_PCREL(ldr, ip, ip, __local_multiple_threads); \ + teq ip, #0 # endif # else /* There is no __local_multiple_threads for librt, so use the TCB. */ @@ -221,17 +212,17 @@ extern int __local_multiple_threads attribute_hidden; __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ header.multiple_threads) == 0, 1) # else -# define PSEUDO_PROLOGUE # define SINGLE_THREAD_P \ - stmfd sp!, {r0, lr}; \ - cfi_adjust_cfa_offset (8); \ - cfi_rel_offset (lr, 4); \ - bl __aeabi_read_tp; \ - ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \ - ldmfd sp!, {r0, lr}; \ - cfi_adjust_cfa_offset (-8); \ - cfi_restore (lr); \ - teq ip, #0 + push {r0, lr}; \ + cfi_adjust_cfa_offset (8); \ + cfi_rel_offset (lr, 4); \ + GET_TLS (lr); \ + NEGOFF_ADJ_BASE (r0, MULTIPLE_THREADS_OFFSET); \ + ldr ip, NEGOFF_OFF1 (r0, MULTIPLE_THREADS_OFFSET); \ + pop {r0, lr}; \ + cfi_adjust_cfa_offset (-8); \ + cfi_restore (lr); \ + teq ip, #0 # define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P # endif # endif diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c index 58ca9acf64..108924d8b3 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -84,13 +84,16 @@ __unwind_freeres (void) ARM unwinder relies on register state at entrance. So we write this in assembly. */ +#define STR1(S) #S +#define STR(S) STR1(S) + asm ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" "_Unwind_Resume:\n" " .cfi_sections .debug_frame\n" " " CFI_STARTPROC "\n" -" stmfd sp!, {r4, r5, r6, lr}\n" +" push {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (16)" \n" " " CFI_REL_OFFSET (r4, 0) "\n" " " CFI_REL_OFFSET (r5, 4) "\n" @@ -105,7 +108,7 @@ asm ( " cmp r3, #0\n" " beq 4f\n" "5: mov r0, r6\n" -" ldmfd sp!, {r4, r5, r6, lr}\n" +" pop {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (-16) "\n" " " CFI_RESTORE (r4) "\n" " " CFI_RESTORE (r5) "\n" @@ -118,11 +121,7 @@ asm ( " b 5b\n" " " CFI_ENDPROC "\n" " .align 2\n" -#ifdef __thumb2__ -"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" -#else -"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" -#endif +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - " STR (PC_OFS) "\n" "2: .word libgcc_s_resume(GOTOFF)\n" " .size _Unwind_Resume, .-_Unwind_Resume\n" ); diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c index 0a3ad953b8..d155ea7dc4 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -47,13 +47,16 @@ init (void) ARM unwinder relies on register state at entrance. So we write this in assembly. */ +#define STR1(S) #S +#define STR(S) STR1(S) + asm ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" "_Unwind_Resume:\n" " .cfi_sections .debug_frame\n" " " CFI_STARTPROC "\n" -" stmfd sp!, {r4, r5, r6, lr}\n" +" push {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (16)" \n" " " CFI_REL_OFFSET (r4, 0) "\n" " " CFI_REL_OFFSET (r5, 4) "\n" @@ -68,7 +71,7 @@ asm ( " cmp r3, #0\n" " beq 4f\n" "5: mov r0, r6\n" -" ldmfd sp!, {r4, r5, r6, lr}\n" +" pop {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (-16) "\n" " " CFI_RESTORE (r4) "\n" " " CFI_RESTORE (r5) "\n" @@ -81,11 +84,7 @@ asm ( " b 5b\n" " " CFI_ENDPROC "\n" " .align 2\n" -#ifdef __thumb2__ -"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" -#else -"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" -#endif +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - " STR (PC_OFS) "\n" "2: .word libgcc_s_resume(GOTOFF)\n" " .size _Unwind_Resume, .-_Unwind_Resume\n" ); diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S index 3fce2d1afa..216fb2d2eb 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S @@ -19,24 +19,18 @@ /* Save the PID value. */ #define SAVE_PID \ - str lr, [sp, #-4]!; /* Save LR. */ \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (lr, 0); \ - mov r0, #0xffff0fff; /* Point to the high page. */ \ - mov lr, pc; /* Save our return address. */ \ - sub pc, r0, #31; /* Jump to the TLS entry. */ \ - ldr lr, [sp], #4; /* Restore LR. */ \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (lr); \ - mov r2, r0; /* Save the TLS addr in r2. */ \ - ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ - rsbs r0, r3, #0; /* Negate it. */ \ - moveq r0, #0x80000000; /* Use 0x80000000 if it was 0. */ \ - str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */ + GET_TLS (r2); \ + NEGOFF_ADJ_BASE2 (r2, r0, PID_OFFSET); /* Save the TLS addr in r2. */ \ + ldr r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* Load the saved PID. */ \ + rsbs r0, r3, #0; /* Negate it. */ \ + it eq; \ + moveq r0, #0x80000000; /* Use 0x80000000 if it was 0. */ \ + str r0, NEGOFF_OFF1 (r2, PID_OFFSET); /* Store the temp PID. */ /* Restore the old PID value in the parent. */ #define RESTORE_PID \ cmp r0, #0; /* If we are the parent... */ \ - strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */ + it ne; \ + strne r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* restore the saved PID. */ #include "../vfork.S" diff --git a/ports/sysdeps/unix/sysv/linux/arm/pread.c b/ports/sysdeps/unix/sysv/linux/arm/pread.c index dafee3d551..e178402a8c 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/pread.c +++ b/ports/sysdeps/unix/sysv/linux/arm/pread.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> ssize_t __libc_pread (fd, buf, count, offset) @@ -37,7 +36,7 @@ __libc_pread (fd, buf, count, offset) { /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); return result; @@ -47,7 +46,7 @@ __libc_pread (fd, buf, count, offset) /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); LIBC_CANCEL_RESET (oldtype); diff --git a/ports/sysdeps/unix/sysv/linux/arm/pread64.c b/ports/sysdeps/unix/sysv/linux/arm/pread64.c index 6d1d9148aa..c7863a35c6 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/pread64.c +++ b/ports/sysdeps/unix/sysv/linux/arm/pread64.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> ssize_t __libc_pread64 (fd, buf, count, offset) @@ -37,7 +36,7 @@ __libc_pread64 (fd, buf, count, offset) { /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); @@ -48,7 +47,7 @@ __libc_pread64 (fd, buf, count, offset) /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread64, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); diff --git a/ports/sysdeps/unix/sysv/linux/arm/pwrite.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c index f188950af3..4ae2e83304 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/pwrite.c +++ b/ports/sysdeps/unix/sysv/linux/arm/pwrite.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> ssize_t __libc_pwrite (fd, buf, count, offset) @@ -37,7 +36,7 @@ __libc_pwrite (fd, buf, count, offset) { /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); return result; @@ -47,7 +46,7 @@ __libc_pwrite (fd, buf, count, offset) /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); LIBC_CANCEL_RESET (oldtype); diff --git a/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c index 29c63ee33f..bd6fca5832 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c +++ b/ports/sysdeps/unix/sysv/linux/arm/pwrite64.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> ssize_t __libc_pwrite64 (fd, buf, count, offset) @@ -37,7 +36,7 @@ __libc_pwrite64 (fd, buf, count, offset) { /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); @@ -48,7 +47,7 @@ __libc_pwrite64 (fd, buf, count, offset) /* In the ARM EABI, 64-bit values are aligned to even/odd register pairs for syscalls. */ - result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite64, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); diff --git a/ports/sysdeps/unix/sysv/linux/arm/readelflib.c b/ports/sysdeps/unix/sysv/linux/arm/readelflib.c index 81e5ccb55f..3efb6134c3 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/readelflib.c +++ b/ports/sysdeps/unix/sysv/linux/arm/readelflib.c @@ -46,6 +46,12 @@ process_elf_file (const char *file_name, const char *lib, int *flag, if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_HARD) *flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6; else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT) + *flag = FLAG_ARM_LIBSF|FLAG_ELF_LIBC6; + else + /* We must assume the unmarked objects are compatible + with all ABI variants. Such objects may have been + generated in a transitional period when the ABI + tags were not added to all objects. */ *flag = FLAG_ELF_LIBC6; } } diff --git a/ports/sysdeps/unix/sysv/linux/arm/setcontext.S b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S index 8e71f5b4e4..b3148c8943 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/setcontext.S +++ b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include <sysdep.h> #include <rtld-global-offsets.h> @@ -93,7 +95,7 @@ ENTRY(__startcontext) END(__startcontext) #ifdef PIC -1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 +1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS .Lrtld_global_ro: .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) #else diff --git a/ports/sysdeps/unix/sysv/linux/arm/sigaction.c b/ports/sysdeps/unix/sysv/linux/arm/sigaction.c index c039b857f0..21bf506ef7 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/sigaction.c +++ b/ports/sysdeps/unix/sysv/linux/arm/sigaction.c @@ -83,8 +83,8 @@ __libc_sigaction (sig, act, oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ result = INLINE_SYSCALL (rt_sigaction, 4, sig, - act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + act ? &kact : NULL, + oact ? &koact : NULL, _NSIG / 8); if (oact && result >= 0) { diff --git a/ports/sysdeps/unix/sysv/linux/arm/syscall.S b/ports/sysdeps/unix/sysv/linux/arm/syscall.S index c6dd57d698..bdd5a52be8 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/syscall.S +++ b/ports/sysdeps/unix/sysv/linux/arm/syscall.S @@ -23,7 +23,7 @@ ENTRY (syscall) mov ip, sp - stmfd sp!, {r4, r5, r6, r7} + push {r4, r5, r6, r7} cfi_adjust_cfa_offset (16) cfi_rel_offset (r4, 0) cfi_rel_offset (r5, 4) @@ -35,13 +35,14 @@ ENTRY (syscall) mov r2, r3 ldmfd ip, {r3, r4, r5, r6} swi 0x0 - ldmfd sp!, {r4, r5, r6, r7} + pop {r4, r5, r6, r7} cfi_adjust_cfa_offset (-16) cfi_restore (r4) cfi_restore (r5) cfi_restore (r6) cfi_restore (r7) cmn r0, #4096 + it cc RETINSTR(cc, lr) b PLTJMP(syscall_error) PSEUDO_END (syscall) diff --git a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h index 6b5bb14c95..b195d8ea1d 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -45,6 +45,38 @@ #ifdef __ASSEMBLER__ +#ifndef ARCH_HAS_HARD_TP +/* Internal macro calling the linux kernel kuser_get_tls helper. + Note that in thumb mode, a constant pool break is often out of range, so + we always expand the constant inline. */ +# ifdef __thumb2__ +# define GET_TLS_BODY \ + movw r0, #0x0fe0; \ + movt r0, #0xffff; \ + blx r0 +# else +# define GET_TLS_BODY \ + mov r0, #0xffff0fff; /* Point to the high page. */ \ + mov lr, pc; /* Save our return address. */ \ + sub pc, r0, #31 /* Jump to the TLS entry. */ +# endif + +/* Helper to get the TLS base pointer. Save LR in TMP, return in R0, + and no other registers clobbered. TMP may be LR itself to indicate + that no save is necessary. */ +# undef GET_TLS +# define GET_TLS(TMP) \ + .ifnc TMP, lr; \ + mov TMP, lr; \ + cfi_register (lr, TMP); \ + GET_TLS_BODY; \ + mov lr, TMP; \ + cfi_restore (lr); \ + .else; \ + GET_TLS_BODY; \ + .endif +#endif /* ARCH_HAS_HARD_TP */ + /* Linux uses a negative return value to indicate syscall errors, unlike most Unices, which use the condition codes' carry flag. @@ -57,49 +89,50 @@ test with -4095. */ #undef PSEUDO -#define PSEUDO(name, syscall_name, args) \ - .text; \ - ENTRY (name); \ - DO_CALL (syscall_name, args); \ - cmn r0, $4096; - -#define PSEUDO_RET \ - RETINSTR(cc, lr); \ - b PLTJMP(SYSCALL_ERROR) +#define PSEUDO(name, syscall_name, args) \ + .text; \ + ENTRY (name); \ + DO_CALL (syscall_name, args); \ + cmn r0, $4096; + +#define PSEUDO_RET \ + it cc; \ + RETINSTR(cc, lr); \ + b PLTJMP(SYSCALL_ERROR) #undef ret #define ret PSEUDO_RET #undef PSEUDO_END -#define PSEUDO_END(name) \ - SYSCALL_ERROR_HANDLER; \ +#define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER; \ END (name) #undef PSEUDO_NOERRNO -#define PSEUDO_NOERRNO(name, syscall_name, args) \ - .text; \ - ENTRY (name); \ - DO_CALL (syscall_name, args); +#define PSEUDO_NOERRNO(name, syscall_name, args) \ + .text; \ + ENTRY (name); \ + DO_CALL (syscall_name, args); -#define PSEUDO_RET_NOERRNO \ - DO_RET (lr); +#define PSEUDO_RET_NOERRNO \ + DO_RET (lr); #undef ret_NOERRNO #define ret_NOERRNO PSEUDO_RET_NOERRNO #undef PSEUDO_END_NOERRNO -#define PSEUDO_END_NOERRNO(name) \ +#define PSEUDO_END_NOERRNO(name) \ END (name) /* The function has to return the error code. */ #undef PSEUDO_ERRVAL -#define PSEUDO_ERRVAL(name, syscall_name, args) \ - .text; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - rsb r0, r0, #0 +#define PSEUDO_ERRVAL(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (syscall_name, args); \ + rsb r0, r0, #0 #undef PSEUDO_END_ERRVAL -#define PSEUDO_END_ERRVAL(name) \ +#define PSEUDO_END_ERRVAL(name) \ END (name) #define ret_ERRVAL PSEUDO_RET_NOERRNO @@ -109,32 +142,29 @@ # if RTLD_PRIVATE_ERRNO # define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ - ldr r1, 1f; \ - rsb r0, r0, #0; \ -0: str r0, [pc, r1]; \ - mvn r0, #0; \ - DO_RET(lr); \ -1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8; + rsb r0, r0, #0; \ + LDST_PCREL(str, r0, r1, C_SYMBOL_NAME(rtld_errno)); \ + mvn r0, #0; \ + DO_RET(lr) # else # if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) # define POP_PC \ - ldr lr, [sp], #4; \ + pop { lr }; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (lr); \ bx lr # else -# define POP_PC \ - ldr pc, [sp], #4 +# define POP_PC pop { pc } # endif # define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ - str lr, [sp, #-4]!; \ + push { lr }; \ cfi_adjust_cfa_offset (4); \ cfi_rel_offset (lr, 0); \ - str r0, [sp, #-4]!; \ + push { r0 }; \ cfi_adjust_cfa_offset (4); \ bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \ - ldr r1, [sp], #4; \ + pop { r1 }; \ cfi_adjust_cfa_offset (-4); \ rsb r1, r1, #0; \ str r1, [r0]; \ @@ -192,19 +222,19 @@ __local_syscall_error: \ syscalls. */ #undef DO_CALL -#define DO_CALL(syscall_name, args) \ - DOARGS_##args; \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; \ - UNDOARGS_##args +#define DO_CALL(syscall_name, args) \ + DOARGS_##args; \ + ldr r7, =SYS_ify (syscall_name); \ + swi 0x0; \ + UNDOARGS_##args #undef DOARGS_0 -#define DOARGS_0 \ - .fnstart; \ - str r7, [sp, #-4]!; \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (r7, 0); \ - .save { r7 } +#define DOARGS_0 \ + .fnstart; \ + push { r7 }; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (r7, 0); \ + .save { r7 } #undef DOARGS_1 #define DOARGS_1 DOARGS_0 #undef DOARGS_2 @@ -214,44 +244,44 @@ __local_syscall_error: \ #undef DOARGS_4 #define DOARGS_4 DOARGS_0 #undef DOARGS_5 -#define DOARGS_5 \ - .fnstart; \ - stmfd sp!, {r4, r7}; \ - cfi_adjust_cfa_offset (8); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r7, 4); \ - .save { r4, r7 }; \ - ldr r4, [sp, #8] +#define DOARGS_5 \ + .fnstart; \ + push {r4, r7}; \ + cfi_adjust_cfa_offset (8); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r7, 4); \ + .save { r4, r7 }; \ + ldr r4, [sp, #8] #undef DOARGS_6 -#define DOARGS_6 \ - .fnstart; \ - mov ip, sp; \ - stmfd sp!, {r4, r5, r7}; \ - cfi_adjust_cfa_offset (12); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r5, 4); \ - cfi_rel_offset (r7, 8); \ - .save { r4, r5, r7 }; \ - ldmia ip, {r4, r5} +#define DOARGS_6 \ + .fnstart; \ + mov ip, sp; \ + push {r4, r5, r7}; \ + cfi_adjust_cfa_offset (12); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r5, 4); \ + cfi_rel_offset (r7, 8); \ + .save { r4, r5, r7 }; \ + ldmia ip, {r4, r5} #undef DOARGS_7 -#define DOARGS_7 \ - .fnstart; \ - mov ip, sp; \ - stmfd sp!, {r4, r5, r6, r7}; \ - cfi_adjust_cfa_offset (16); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r5, 4); \ - cfi_rel_offset (r6, 8); \ - cfi_rel_offset (r7, 12); \ - .save { r4, r5, r6, r7 }; \ - ldmia ip, {r4, r5, r6} +#define DOARGS_7 \ + .fnstart; \ + mov ip, sp; \ + push {r4, r5, r6, r7}; \ + cfi_adjust_cfa_offset (16); \ + cfi_rel_offset (r4, 0); \ + cfi_rel_offset (r5, 4); \ + cfi_rel_offset (r6, 8); \ + cfi_rel_offset (r7, 12); \ + .save { r4, r5, r6, r7 }; \ + ldmia ip, {r4, r5, r6} #undef UNDOARGS_0 -#define UNDOARGS_0 \ - ldr r7, [sp], #4; \ - cfi_adjust_cfa_offset (-4); \ - cfi_restore (r7); \ - .fnend +#define UNDOARGS_0 \ + pop {r7}; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (r7); \ + .fnend #undef UNDOARGS_1 #define UNDOARGS_1 UNDOARGS_0 #undef UNDOARGS_2 @@ -261,29 +291,29 @@ __local_syscall_error: \ #undef UNDOARGS_4 #define UNDOARGS_4 UNDOARGS_0 #undef UNDOARGS_5 -#define UNDOARGS_5 \ - ldmfd sp!, {r4, r7}; \ - cfi_adjust_cfa_offset (-8); \ - cfi_restore (r4); \ - cfi_restore (r7); \ - .fnend +#define UNDOARGS_5 \ + pop {r4, r7}; \ + cfi_adjust_cfa_offset (-8); \ + cfi_restore (r4); \ + cfi_restore (r7); \ + .fnend #undef UNDOARGS_6 -#define UNDOARGS_6 \ - ldmfd sp!, {r4, r5, r7}; \ - cfi_adjust_cfa_offset (-12); \ - cfi_restore (r4); \ - cfi_restore (r5); \ - cfi_restore (r7); \ - .fnend +#define UNDOARGS_6 \ + pop {r4, r5, r7}; \ + cfi_adjust_cfa_offset (-12); \ + cfi_restore (r4); \ + cfi_restore (r5); \ + cfi_restore (r7); \ + .fnend #undef UNDOARGS_7 -#define UNDOARGS_7 \ - ldmfd sp!, {r4, r5, r6, r7}; \ - cfi_adjust_cfa_offset (-16); \ - cfi_restore (r4); \ - cfi_restore (r5); \ - cfi_restore (r6); \ - cfi_restore (r7); \ - .fnend +#define UNDOARGS_7 \ + pop {r4, r5, r6, r7}; \ + cfi_adjust_cfa_offset (-16); \ + cfi_restore (r4); \ + cfi_restore (r5); \ + cfi_restore (r6); \ + cfi_restore (r7); \ + .fnend #else /* not __ASSEMBLER__ */ diff --git a/ports/sysdeps/unix/sysv/linux/arm/truncate64.c b/ports/sysdeps/unix/sysv/linux/arm/truncate64.c index 4367d1efee..6e52e32637 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/truncate64.c +++ b/ports/sysdeps/unix/sysv/linux/arm/truncate64.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Truncate the file FD refers to to LENGTH bytes. */ int @@ -30,7 +29,7 @@ truncate64 (const char *path, off64_t length) { unsigned int low = length & 0xffffffff; unsigned int high = length >> 32; - int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, + int result = INLINE_SYSCALL (truncate64, 4, path, 0, __LONG_LONG_PAIR (high, low)); return result; } diff --git a/ports/sysdeps/unix/sysv/linux/arm/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/vfork.S index 4f84c57f22..128a6402b9 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/arm/vfork.S @@ -37,7 +37,7 @@ ENTRY (__vfork) mov ip, r7 cfi_register (r7, ip) .fnstart - str r7, [sp, #-4]! + push { r7 } cfi_adjust_cfa_offset (4) .save { r7 } ldr r7, =SYS_ify (vfork) @@ -51,6 +51,7 @@ ENTRY (__vfork) RESTORE_PID #endif cmn a1, #4096 + it cc RETINSTR(cc, lr) b PLTJMP(SYSCALL_ERROR) diff --git a/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h b/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h index 87f37b4d65..49cbf0611d 100644 --- a/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h +++ b/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h @@ -27,6 +27,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h index c216ddb1fc..2835b0ff07 100644 --- a/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -44,6 +44,9 @@ # define MAP_ANONYMOUS 0x10 /* Don't use a file */ # define MAP_ANON MAP_ANONYMOUS # define MAP_VARIABLE 0 +/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ +# define MAP_HUGE_SHIFT 26 +# define MAP_HUGE_MASK 0x3f #endif /* These are Linux-specific. */ diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h index e56286b283..ac35f510b5 100644 --- a/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h +++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h @@ -26,6 +26,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c index 618edf7bc2..af63e1b9a8 100644 --- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c +++ b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c @@ -87,17 +87,6 @@ __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime, int pri /* These don't get included in libc.so */ #ifdef IS_IN_libpthread int -lll_unlock_wake_cb (lll_lock_t *futex) -{ - int val = atomic_exchange_rel (futex, 0); - - if (__builtin_expect (val > 1, 0)) - lll_private_futex_wake (futex, 1); - return 0; -} - - -int __lll_timedwait_tid (int *tidp, const struct timespec *abstime) { int tid; @@ -134,6 +123,5 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime) return 0; } - #endif diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index f37a7bbd74..b88703fbaf 100644 --- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -317,8 +317,6 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, #define THREAD_INIT_LOCK(PD, LOCK) \ (PD)->LOCK = LLL_LOCK_INITIALIZER -extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; - /* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h index fba16db471..c3b1caf9d2 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -23,36 +23,6 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ @@ -67,47 +37,5 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 0x1 /* Sync memory asynchronously. */ -#define MS_INVALIDATE 0x2 /* Invalidate the caches. */ -#define MS_SYNC 0x4 /* Synchronous memory sync. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 0x1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 0x2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h index 68d3ed7929..8519390c48 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h @@ -24,8 +24,10 @@ /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ -#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ - +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ +#endif /* Structure of record for one message inside the kernel. The type `struct __msg' is opaque. */ diff --git a/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c b/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c index 79fa05af62..c3bb5de197 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/makecontext.c @@ -22,14 +22,10 @@ #include <stdlib.h> #include <ucontext.h> #include <sys/rse.h> +#include <link.h> +#include <dl-fptr.h> -struct fdesc - { - unsigned long ip; - unsigned long gp; - }; - #define PUSH(val) \ do { \ if (ia64_rse_is_rnat_slot (rbs)) \ @@ -48,7 +44,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) extern void __start_context (ucontext_t *link, long gp, ...); unsigned long stack_start, stack_end; va_list ap; - long *rbs; + unsigned long *rbs; int i; stack_start = (long) sc->sc_stack.ss_sp; @@ -65,16 +61,16 @@ makecontext: does not know how to handle more than 8 arguments\n")); } /* set the entry point and global pointer: */ - sc->sc_br[0] = ((struct fdesc *) &__start_context)->ip; - sc->sc_br[1] = ((struct fdesc *) func)->ip; - sc->sc_gr[1] = ((struct fdesc *) func)->gp; + sc->sc_br[0] = ELF_PTR_TO_FDESC (&__start_context)->ip; + sc->sc_br[1] = ELF_PTR_TO_FDESC (func)->ip; + sc->sc_gr[1] = ELF_PTR_TO_FDESC (func)->gp; /* set up the call frame: */ sc->sc_ar_pfs = ((sc->sc_ar_pfs & ~0x3fffffffffUL) | (argc + 2) | ((argc + 2) << 7)); - rbs = (long *) stack_start; + rbs = (unsigned long *) stack_start; PUSH((long) ucp->uc_link); - PUSH(((struct fdesc *) &__start_context)->gp); + PUSH(ELF_PTR_TO_FDESC (&__start_context)->gp); va_start (ap, argc); for (i = 0; i < argc; ++i) PUSH(va_arg (ap, long)); diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h index e87b0fe692..886a4f0e50 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h @@ -16,22 +16,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 +#ifndef _LINUX_IA64_DL_SYSDEP_H +#define _LINUX_IA64_DL_SYSDEP_H 1 -/* This macro must be defined to either 0 or 1. - - If 1, then an errno global variable hidden in ld.so will work right with - all the errno-using libc code compiled for ld.so, and there is never a - need to share the errno location with libc. This is appropriate only if - all the libc functions that ld.so uses are called without PLT and always - get the versions linked into ld.so rather than the libc ones. */ - -#ifdef IS_IN_rtld -# define RTLD_PRIVATE_ERRNO 1 -#else -# define RTLD_PRIVATE_ERRNO 0 -#endif +#include_next <dl-sysdep.h> /* Traditionally system calls have been made using break 0x100000. A second method was introduced which, if possible, will use the EPC @@ -41,7 +29,7 @@ #define NEED_DL_SYSINFO 1 #define USE_DL_SYSINFO 1 -#if defined NEED_DL_SYSINFO && !defined __ASSEMBLER__ +#ifndef __ASSEMBLER__ /* Don't declare this as a function---we want it's entry-point, not it's function descriptor... */ extern int _dl_sysinfo_break attribute_hidden; @@ -64,11 +52,4 @@ extern int _dl_sysinfo_break attribute_hidden; might write into it after _dl_start returns. */ #define DL_ARGV_NOT_RELRO 1 - -#ifndef __ASSEMBLER__ -/* Get version of the OS. */ -extern int _dl_discover_osversion (void) attribute_hidden; -# define HAVE_DL_DISCOVER_OSVERSION 1 -#endif - #endif /* dl-sysdep.h */ diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist index b3510fe2a2..067552d175 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist @@ -86,6 +86,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _Exit F diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c b/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c index b41c6c3a7e..664d0e12b9 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/sigaction.c @@ -26,7 +26,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* The variable is shared between all wrappers around signal handling functions which have RT equivalents. This is the definition. */ @@ -42,8 +41,7 @@ __libc_sigaction (sig, act, oact) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigaction, 4, sig, - CHECK_1_NULL_OK (act), CHECK_1_NULL_OK (oact), _NSIG / 8); + return INLINE_SYSCALL (rt_sigaction, 4, sig, act, oact, _NSIG / 8); } libc_hidden_def (__libc_sigaction) diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h index c6fce1313e..96f6a4e8a5 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -252,7 +252,7 @@ _retval; }) #undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) long int err +#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) #undef INTERNAL_SYSCALL #define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ @@ -264,7 +264,10 @@ INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) #undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ({ (void) (val); \ + (err == -1); \ + }) #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) (val) diff --git a/ports/sysdeps/unix/sysv/linux/ia64/umount.c b/ports/sysdeps/unix/sysv/linux/ia64/umount.c index a15a716869..a3df7863fa 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/umount.c +++ b/ports/sysdeps/unix/sysv/linux/ia64/umount.c @@ -20,11 +20,10 @@ #include <errno.h> #include <sysdep.h> -#include <bp-checks.h> /* Unmount a filesystem. */ int umount (const char *special_file) { - return INLINE_SYSCALL (umount, 2, CHECK_STRING (special_file), 0); + return INLINE_SYSCALL (umount, 2, special_file, 0); } diff --git a/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h index d2fb69d832..b89011aee1 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h @@ -23,36 +23,6 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ @@ -66,47 +36,5 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist index 3c40379aac..f06cc8ef8b 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist @@ -87,6 +87,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.4 GLIBC_2.4 A _Exit F diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist index 6c0bbde672..de8095a606 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist +++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist @@ -83,7 +83,6 @@ GLIBC_2.4 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 743538e460..4203780276 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -20,6 +20,26 @@ /* Many syscalls were added in 2.6.10 for m68k. */ #define __ASSUME_UTIMES 1 +/* Support for various CLOEXEC and NONBLOCK flags was added 2.6.23. */ +#if __LINUX_KERNEL_VERSION >= 0x020617 +# define __ASSUME_O_CLOEXEC 1 +#endif + +/* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.27. */ +#if __LINUX_KERNEL_VERSION >= 0x02061b +# define __ASSUME_SOCK_CLOEXEC 1 +# define __ASSUME_IN_NONBLOCK 1 +# define __ASSUME_PIPE2 1 +# define __ASSUME_EVENTFD2 1 +# define __ASSUME_SIGNALFD4 1 +# define __ASSUME_DUP3 1 +#endif + +/* Support for the accept4 syscall was added in 2.6.28. */ +#if __LINUX_KERNEL_VERSION >= 0x02061c +# define __ASSUME_ACCEPT4 1 +#endif + #include_next <kernel-features.h> /* These syscalls were added only in 3.0 for m68k. */ diff --git a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist index f998b1b276..9010ea733b 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist @@ -1775,6 +1775,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/ports/sysdeps/unix/sysv/linux/mips/Makefile b/ports/sysdeps/unix/sysv/linux/mips/Makefile index 66ba621dae..1e54036bfe 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/Makefile +++ b/ports/sysdeps/unix/sysv/linux/mips/Makefile @@ -8,9 +8,6 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif -# Get value of default-abi. -include $(common-objpfx)default-abi.make - abi-variants := o32_soft o32_hard n32_soft n32_hard n64_soft n64_hard ifeq (,$(filter $(default-abi),$(abi-variants))) diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h index a13a900961..b327795f89 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -23,41 +23,9 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -# define MAP_RENAME MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_NORESERVE 0x0400 /* don't check for reservations */ -# define MAP_ANONYMOUS 0x0800 /* don't use a file */ # define MAP_GROWSDOWN 0x1000 /* stack-like segment */ # define MAP_DENYWRITE 0x2000 /* ETXTBSY */ # define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ @@ -68,47 +36,11 @@ # define MAP_HUGETLB 0x80000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif +#define __MAP_ANONYMOUS 0x0800 -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#ifdef __USE_MISC +# define MAP_RENAME MAP_ANONYMOUS #endif diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h b/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h index 8439069cd7..e814bc722f 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h +++ b/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h @@ -25,6 +25,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/brk.c b/ports/sysdeps/unix/sysv/linux/mips/brk.c index 9bd6d94bd1..07c8a9649f 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/brk.c +++ b/ports/sysdeps/unix/sysv/linux/mips/brk.c @@ -30,19 +30,10 @@ weak_alias (__curbrk, ___brk_addr) int __brk (void *addr) { + INTERNAL_SYSCALL_DECL (err); void *newbrk; - { - register long int res __asm__ ("$2"); - - asm ("move\t$4,%2\n\t" - "li\t%0,%1\n\t" - "syscall" /* Perform the system call. */ - : "=r" (res) - : "I" (SYS_ify (brk)), "r" (addr) - : "$4", "$7", __SYSCALL_CLOBBERS); - newbrk = (void *) res; - } + newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr); __curbrk = newbrk; if (newbrk < addr) diff --git a/ports/sysdeps/unix/sysv/linux/mips/clone.S b/ports/sysdeps/unix/sysv/linux/mips/clone.S index 72360f9621..f6f2f05659 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/clone.S +++ b/ports/sysdeps/unix/sysv/linux/mips/clone.S @@ -34,6 +34,7 @@ void *parent_tidptr, void *tls, void *child_tidptr) */ .text + .set nomips16 #if _MIPS_SIM == _ABIO32 # define EXTRA_LOCALS 1 #else @@ -47,7 +48,8 @@ NESTED(__clone,4*SZREG,sp) SETUP_GP #endif PTR_SUBU sp, FRAMESZ - SETUP_GP64 (GPOFF, __clone) + cfi_adjust_cfa_offset (FRAMESZ) + SETUP_GP64_STACK (GPOFF, __clone) #ifdef __PIC__ SAVE_GP (GPOFF) #endif @@ -88,26 +90,35 @@ NESTED(__clone,4*SZREG,sp) /* Do the system call */ li v0,__NR_clone + cfi_endproc syscall bnez a3,L(error) beqz v0,L(thread_start) /* Successful return from the parent */ - RESTORE_GP64 + cfi_startproc + cfi_adjust_cfa_offset (FRAMESZ) + SETUP_GP64_STACK_CFI (GPOFF) + cfi_remember_state + RESTORE_GP64_STACK PTR_ADDU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) ret /* Something bad happened -- no child created */ L(error): + cfi_restore_state #ifdef __PIC__ PTR_LA t9,__syscall_error - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) jr t9 #else - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) j __syscall_error #endif END(__clone) @@ -118,6 +129,7 @@ L(error): ENTRY(__thread_start) L(thread_start): + cfi_undefined ($31) /* cp is already loaded. */ SAVE_GP (GPOFF) /* The stackframe has been created on entry of clone(). */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/configure b/ports/sysdeps/unix/sysv/linux/mips/configure index cecfc9d84c..b4ee83e3ae 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/configure +++ b/ports/sysdeps/unix/sysv/linux/mips/configure @@ -105,7 +105,8 @@ if test -z "$libc_mips_float"; then as_fn_error $? "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5 fi -echo "default-abi := ${libc_mips_abi}_${libc_mips_float}" > default-abi.make +config_vars="$config_vars +default-abi = ${libc_mips_abi}_${libc_mips_float}" case "$prefix" in /usr | /usr/) diff --git a/ports/sysdeps/unix/sysv/linux/mips/configure.in b/ports/sysdeps/unix/sysv/linux/mips/configure.in index 167779eaf9..b8dde6ef7a 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/configure.in +++ b/ports/sysdeps/unix/sysv/linux/mips/configure.in @@ -44,7 +44,7 @@ if test -z "$libc_mips_float"; then AC_MSG_ERROR([could not determine if compiler is using hard or soft floating point ABI]) fi -echo "default-abi := ${libc_mips_abi}_${libc_mips_float}" > default-abi.make +LIBC_CONFIG_VAR([default-abi], [${libc_mips_abi}_${libc_mips_float}]) case "$prefix" in /usr | /usr/) diff --git a/ports/sysdeps/unix/sysv/linux/mips/getcontext.S b/ports/sysdeps/unix/sysv/linux/mips/getcontext.S index 0e3d35b54f..268098c0b1 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/getcontext.S +++ b/ports/sysdeps/unix/sysv/linux/mips/getcontext.S @@ -27,6 +27,7 @@ /* int getcontext (ucontext_t *ucp) */ .text + .set nomips16 LOCALSZ = 0 MASK = 0x00000000 #ifdef __PIC__ @@ -54,7 +55,8 @@ NESTED (__getcontext, FRAMESZ, ra) # endif PTR_ADDIU sp, -FRAMESZ - SETUP_GP64 (GPOFF, __getcontext) + cfi_adjust_cfa_offset (FRAMESZ) + SETUP_GP64_STACK (GPOFF, __getcontext) SAVE_GP (GPOFF) #else /* ! __PIC__ */ @@ -124,19 +126,23 @@ NESTED (__getcontext, FRAMESZ, ra) li v0, SYS_ify (rt_sigprocmask) syscall bnez a3, 99f + cfi_remember_state #ifdef __PIC__ - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDIU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) #endif move v0, zero jr ra 99: + cfi_restore_state #ifdef __PIC__ PTR_LA t9, JUMPTARGET (__syscall_error) - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDIU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) jr t9 #else /* ! __PIC__ */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/makecontext.S b/ports/sysdeps/unix/sysv/linux/mips/makecontext.S index 65f1a6aaa2..a8bbebbcc0 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/makecontext.S +++ b/ports/sysdeps/unix/sysv/linux/mips/makecontext.S @@ -27,6 +27,7 @@ /* int makecontext (ucontext_t *ucp, (void *func) (), int argc, ...) */ .text + .set nomips16 LOCALSZ = 0 ARGSZ = 0 MASK = 0x00000000 @@ -63,9 +64,10 @@ NESTED (__makecontext, FRAMESZ, ra) #endif PTR_ADDIU sp, -FRAMESZ + cfi_adjust_cfa_offset (FRAMESZ) #ifdef __PIC__ - SETUP_GP64 (GPOFF, __makecontext) + SETUP_GP64_STACK (GPOFF, __makecontext) SAVE_GP (GPOFF) #endif @@ -145,8 +147,9 @@ NESTED (__makecontext, FRAMESZ, ra) REG_S a1, MCONTEXT_PC(a0) #ifdef __PIC__ - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDIU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) #endif jr ra diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/Makefile new file mode 100644 index 0000000000..fa9fcb7e6f --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/Makefile @@ -0,0 +1,13 @@ +ifeq ($(subdir),misc) +sysdep_routines += mips16-syscall0 mips16-syscall1 mips16-syscall2 +sysdep_routines += mips16-syscall3 mips16-syscall4 mips16-syscall5 +sysdep_routines += mips16-syscall6 mips16-syscall7 +CFLAGS-mips16-syscall0.c += -fexceptions +CFLAGS-mips16-syscall1.c += -fexceptions +CFLAGS-mips16-syscall2.c += -fexceptions +CFLAGS-mips16-syscall3.c += -fexceptions +CFLAGS-mips16-syscall4.c += -fexceptions +CFLAGS-mips16-syscall5.c += -fexceptions +CFLAGS-mips16-syscall6.c += -fexceptions +CFLAGS-mips16-syscall7.c += -fexceptions +endif diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/Versions b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/Versions new file mode 100644 index 0000000000..73bcfb566c --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_PRIVATE { + __mips16_syscall0; __mips16_syscall1; __mips16_syscall2; __mips16_syscall3; + __mips16_syscall4; __mips16_syscall5; __mips16_syscall6; __mips16_syscall7; + } +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h new file mode 100644 index 0000000000..8449836d32 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h @@ -0,0 +1,89 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 MIPS16_SYSCALL_H +#define MIPS16_SYSCALL_H 1 + +#define __nomips16 __attribute__ ((nomips16)) + +union __mips16_syscall_return + { + long long val; + struct + { + long v0; + long v1; + } + reg; + }; + +long long __nomips16 __mips16_syscall0 (long number); +#define __mips16_syscall0(dummy, number) \ + __mips16_syscall0 ((long) (number)) + +long long __nomips16 __mips16_syscall1 (long a0, + long number); +#define __mips16_syscall1(a0, number) \ + __mips16_syscall1 ((long) (a0), \ + (long) (number)) + +long long __nomips16 __mips16_syscall2 (long a0, long a1, + long number); +#define __mips16_syscall2(a0, a1, number) \ + __mips16_syscall2 ((long) (a0), (long) (a1), \ + (long) (number)) + +long long __nomips16 __mips16_syscall3 (long a0, long a1, long a2, + long number); +#define __mips16_syscall3(a0, a1, a2, number) \ + __mips16_syscall3 ((long) (a0), (long) (a1), (long) (a2), \ + (long) (number)) + +long long __nomips16 __mips16_syscall4 (long a0, long a1, long a2, long a3, + long number); +#define __mips16_syscall4(a0, a1, a2, a3, number) \ + __mips16_syscall4 ((long) (a0), (long) (a1), (long) (a2), \ + (long) (a3), \ + (long) (number)) + +long long __nomips16 __mips16_syscall5 (long a0, long a1, long a2, long a3, + long a4, + long number); +#define __mips16_syscall5(a0, a1, a2, a3, a4, number) \ + __mips16_syscall5 ((long) (a0), (long) (a1), (long) (a2), \ + (long) (a3), (long) (a4), \ + (long) (number)) + +long long __nomips16 __mips16_syscall6 (long a0, long a1, long a2, long a3, + long a4, long a5, + long number); +#define __mips16_syscall6(a0, a1, a2, a3, a4, a5, number) \ + __mips16_syscall6 ((long) (a0), (long) (a1), (long) (a2), \ + (long) (a3), (long) (a4), (long) (a5), \ + (long) (number)) + +long long __nomips16 __mips16_syscall7 (long a0, long a1, long a2, long a3, + long a4, long a5, long a6, + long number); +#define __mips16_syscall7(a0, a1, a2, a3, a4, a5, a6, number) \ + __mips16_syscall7 ((long) (a0), (long) (a1), (long) (a2), \ + (long) (a3), (long) (a4), (long) (a5), \ + (long) (a6), \ + (long) (number)) + +#endif diff --git a/sysdeps/x86_64/multiarch/bzero.S b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c index 88e96ea8ee..0cdf94c22c 100644 --- a/sysdeps/x86_64/multiarch/bzero.S +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c @@ -1,5 +1,5 @@ -/* bzero. x86-64 version. - Copyright (C) 2010-2013 Free Software Foundation, Inc. +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 @@ -17,12 +17,14 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <init-arch.h> +#include <mips16-syscall.h> - .text -ENTRY(__bzero) - mov %rsi,%rdx /* Adjust parameter. */ - xorl %esi,%esi /* Fill with 0s. */ - jmp __libc_memset /* Branch to IFUNC memset. */ -END(__bzero) -weak_alias (__bzero, bzero) +#undef __mips16_syscall0 + +long long __nomips16 +__mips16_syscall0 (long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 0); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c new file mode 100644 index 0000000000..5e60a59d56 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c @@ -0,0 +1,32 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall1 + +long long __nomips16 +__mips16_syscall1 (long a0, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 1, + a0); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c new file mode 100644 index 0000000000..7750c519ce --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c @@ -0,0 +1,32 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall2 + +long long __nomips16 +__mips16_syscall2 (long a0, long a1, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 2, + a0, a1); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c new file mode 100644 index 0000000000..7fc1c4e435 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c @@ -0,0 +1,32 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall3 + +long long __nomips16 +__mips16_syscall3 (long a0, long a1, long a2, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 3, + a0, a1, a2); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c new file mode 100644 index 0000000000..b8b4198c78 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c @@ -0,0 +1,32 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall4 + +long long __nomips16 +__mips16_syscall4 (long a0, long a1, long a2, long a3, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 4, + a0, a1, a2, a3); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall5.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall5.c new file mode 100644 index 0000000000..e1322d107f --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall5.c @@ -0,0 +1,33 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall5 + +long long __nomips16 +__mips16_syscall5 (long a0, long a1, long a2, long a3, + long a4, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 5, + a0, a1, a2, a3, a4); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall6.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall6.c new file mode 100644 index 0000000000..a9e5cd9dfe --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall6.c @@ -0,0 +1,33 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall6 + +long long __nomips16 +__mips16_syscall6 (long a0, long a1, long a2, long a3, + long a4, long a5, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 6, + a0, a1, a2, a3, a4, a5); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall7.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall7.c new file mode 100644 index 0000000000..d87b5ba5a8 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall7.c @@ -0,0 +1,33 @@ +/* MIPS16 syscall wrappers. + Copyright (C) 2013 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 <mips16-syscall.h> + +#undef __mips16_syscall7 + +long long __nomips16 +__mips16_syscall7 (long a0, long a1, long a2, long a3, + long a4, long a5, long a6, + long number) +{ + union __mips16_syscall_return ret; + ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 7, + a0, a1, a2, a3, a4, a5, a6); + return ret.val; +} diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist index 7378869236..f01278e4a4 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist @@ -1390,6 +1390,19 @@ GLIBC_2.16 mbrtoc16 F mbrtoc32 F timespec_get F +GLIBC_2.17 + GLIBC_2.17 A + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F + __mips_fpu_getcw F + __mips_fpu_setcw F GLIBC_2.2 GLIBC_2.2 A _Exit F @@ -2242,11 +2255,3 @@ GLIBC_2.9 pipe2 F _gp_disp _gp_disp A -GLIBC_2.17 - GLIBC_2.17 A - clock_getcpuclockid F - clock_getres F - clock_gettime F - clock_nanosleep F - clock_settime F - secure_getenv F diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index e79fda9372..0faf68c4fc 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -67,25 +67,86 @@ #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val) -#undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ - internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \ - "i" (SYS_ify (name)), err, args) +/* Note that the original Linux syscall restart convention required the + instruction immediately preceding SYSCALL to initialize $v0 with the + syscall number. Then if a restart triggered, $v0 would have been + clobbered by the syscall interrupted, and needed to be reinititalized. + The kernel would decrement the PC by 4 before switching back to the + user mode so that $v0 had been reloaded before SYSCALL was executed + again. This implied the place $v0 was loaded from must have been + preserved across a syscall, e.g. an immediate, static register, stack + slot, etc. + + The convention was relaxed in Linux with a change applied to the kernel + GIT repository as commit 96187fb0bc30cd7919759d371d810e928048249d, that + first appeared in the 2.6.36 release. Since then the kernel has had + code that reloads $v0 upon syscall restart and resumes right at the + SYSCALL instruction, so no special arrangement is needed anymore. + + For backwards compatibility with existing kernel binaries we support + the old convention by choosing the instruction preceding SYSCALL + carefully. This also means we have to force a 32-bit encoding of the + microMIPS MOVE instruction if one is used. */ + +#ifdef __mips_micromips +# define MOVE32 "move32" +#else +# define MOVE32 "move" +#endif +#undef INTERNAL_SYSCALL #undef INTERNAL_SYSCALL_NCS -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - internal_syscall##nr (= number, , "r" (__v0), err, args) -#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \ +#ifdef __mips16 +/* There's no MIPS16 syscall instruction, so we go through out-of-line + standard MIPS wrappers. These do use inline snippets below though, + through INTERNAL_SYSCALL_MIPS16. Spilling the syscall number to + memory gives the best code in that case, avoiding the need to save + and restore a static register. */ + +# include <mips16-syscall.h> + +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (SYS_ify (name), err, nr, args) + +# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ +({ \ + union __mips16_syscall_return ret; \ + ret.val = __mips16_syscall##nr (args, number); \ + err = ret.reg.v1; \ + ret.reg.v0; \ +}) + +# define INTERNAL_SYSCALL_MIPS16(number, err, nr, args...) \ + internal_syscall##nr ("lw\t%0, %2\n\t", \ + "R" (number), \ + 0, err, args) + +#else /* !__mips16 */ +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t", \ + "IK" (SYS_ify (name)), \ + 0, err, args) + +# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (MOVE32 "\t%0, %2\n\t", \ + "r" (__s0), \ + number, err, args) + +#endif /* !__mips16 */ + +#define internal_syscall0(v0_init, input, number, err, dummy...) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -97,17 +158,19 @@ _sys_result; \ }) -#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \ +#define internal_syscall1(v0_init, input, number, err, arg1) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -119,20 +182,22 @@ _sys_result; \ }) -#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \ +#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ - ".set\treorder" \ + ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ : input, "r" (__a0), "r" (__a1) \ : __SYSCALL_CLOBBERS); \ @@ -142,21 +207,24 @@ _sys_result; \ }) -#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3)\ +#define internal_syscall3(v0_init, input, number, err, \ + arg1, arg2, arg3) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ - ".set\treorder" \ + ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ : input, "r" (__a0), "r" (__a1), "r" (__a2) \ : __SYSCALL_CLOBBERS); \ @@ -166,21 +234,24 @@ _sys_result; \ }) -#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4)\ +#define internal_syscall4(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ - ".set\treorder" \ + ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : input, "r" (__a0), "r" (__a1), "r" (__a2) \ : __SYSCALL_CLOBBERS); \ @@ -197,25 +268,28 @@ #define FORCE_FRAME_POINTER \ void *volatile __fp_force __attribute__ ((unused)) = alloca (4) -#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\ +#define internal_syscall5(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5) \ ({ \ long _sys_result; \ \ FORCE_FRAME_POINTER; \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ "subu\t$29, 32\n\t" \ "sw\t%6, 16($29)\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ "addiu\t$29, 32\n\t" \ - ".set\treorder" \ + ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : input, "r" (__a0), "r" (__a1), "r" (__a2), \ "r" ((long) (arg5)) \ @@ -226,26 +300,29 @@ _sys_result; \ }) -#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6)\ +#define internal_syscall6(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5, arg6) \ ({ \ long _sys_result; \ \ FORCE_FRAME_POINTER; \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ "subu\t$29, 32\n\t" \ "sw\t%6, 16($29)\n\t" \ "sw\t%7, 20($29)\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ "addiu\t$29, 32\n\t" \ - ".set\treorder" \ + ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : input, "r" (__a0), "r" (__a1), "r" (__a2), \ "r" ((long) (arg5)), "r" ((long) (arg6)) \ @@ -256,27 +333,30 @@ _sys_result; \ }) -#define internal_syscall7(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ +#define internal_syscall7(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ ({ \ long _sys_result; \ \ FORCE_FRAME_POINTER; \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ "subu\t$29, 32\n\t" \ "sw\t%6, 16($29)\n\t" \ "sw\t%7, 20($29)\n\t" \ "sw\t%8, 24($29)\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ "addiu\t$29, 32\n\t" \ - ".set\treorder" \ + ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ : input, "r" (__a0), "r" (__a1), "r" (__a2), \ "r" ((long) (arg5)), "r" ((long) (arg6)), "r" ((long) (arg7)) \ diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c index 4367d1efee..6e52e32637 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Truncate the file FD refers to to LENGTH bytes. */ int @@ -30,7 +29,7 @@ truncate64 (const char *path, off64_t length) { unsigned int low = length & 0xffffffff; unsigned int high = length >> 32; - int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, + int result = INLINE_SYSCALL (truncate64, 4, path, 0, __LONG_LONG_PAIR (high, low)); return result; } diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c index 017b39d608..624994022f 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <xstatconv.h> @@ -35,7 +34,7 @@ __fxstat64 (int vers, int fd, struct stat64 *buf) int result; struct kernel_stat kbuf; - result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf)); + result = INLINE_SYSCALL (fstat, 2, fd, &kbuf); if (result == 0) result = __xstat64_conv (vers, &kbuf, buf); diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c index 32571e717d..ca2f2f6153 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c @@ -25,7 +25,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -96,11 +95,9 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag) } if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file), - __ptrvalue (&kst)); + result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); else - result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file), - __ptrvalue (&kst)); + result = INTERNAL_SYSCALL (stat, err, 2, file, &kst); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return __xstat64_conv (vers, &kst, st); diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c index 106271f759..b01204deb7 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <xstatconv.h> @@ -34,7 +33,7 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf) int result; struct kernel_stat kbuf; - result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); + result = INLINE_SYSCALL (lstat, 2, name, &kbuf); if (result == 0) result = __xstat64_conv (vers, &kbuf, buf); diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c index b8905edd7d..3b94b1befe 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c @@ -20,14 +20,12 @@ #include <ipc_priv.h> #include <sysdep.h> -#include <bp-checks.h> - int __msgctl (int msqid, int cmd, struct msqid_ds *buf); int __msgctl (int msqid, int cmd, struct msqid_ds *buf) { - return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf)); + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf); } #include <shlib-compat.h> diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist index df2e63728a..9dbbd97c8e 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist @@ -1398,6 +1398,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _Exit F diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index 3ebbf892f7..452c2c70eb 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -71,25 +71,57 @@ #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val) +/* Note that the original Linux syscall restart convention required the + instruction immediately preceding SYSCALL to initialize $v0 with the + syscall number. Then if a restart triggered, $v0 would have been + clobbered by the syscall interrupted, and needed to be reinititalized. + The kernel would decrement the PC by 4 before switching back to the + user mode so that $v0 had been reloaded before SYSCALL was executed + again. This implied the place $v0 was loaded from must have been + preserved across a syscall, e.g. an immediate, static register, stack + slot, etc. + + The convention was relaxed in Linux with a change applied to the kernel + GIT repository as commit 96187fb0bc30cd7919759d371d810e928048249d, that + first appeared in the 2.6.36 release. Since then the kernel has had + code that reloads $v0 upon syscall restart and resumes right at the + SYSCALL instruction, so no special arrangement is needed anymore. + + For backwards compatibility with existing kernel binaries we support + the old convention by choosing the instruction preceding SYSCALL + carefully. This also means we have to force a 32-bit encoding of the + microMIPS MOVE instruction if one is used. */ + +#ifdef __mips_micromips +# define MOVE32 "move32" +#else +# define MOVE32 "move" +#endif + #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ - internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \ - "i" (SYS_ify (name)), err, args) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t", \ + "IK" (SYS_ify (name)), \ + 0, err, args) #undef INTERNAL_SYSCALL_NCS -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - internal_syscall##nr (= number, , "r" (__v0), err, args) +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (MOVE32 "\t%0, %2\n\t", \ + "r" (__s0), \ + number, err, args) -#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \ +#define internal_syscall0(v0_init, input, number, err, dummy...) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a3 asm("$7"); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -101,17 +133,19 @@ _sys_result; \ }) -#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \ +#define internal_syscall1(v0_init, input, number, err, arg1) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = ARGIFY (arg1); \ - register long long __a3 asm("$7"); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a0 asm ("$4") = ARGIFY (arg1); \ + register long long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -123,18 +157,20 @@ _sys_result; \ }) -#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \ +#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = ARGIFY (arg1); \ - register long long __a1 asm("$5") = ARGIFY (arg2); \ - register long long __a3 asm("$7"); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a0 asm ("$4") = ARGIFY (arg1); \ + register long long __a1 asm ("$5") = ARGIFY (arg2); \ + register long long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -146,19 +182,22 @@ _sys_result; \ }) -#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3) \ +#define internal_syscall3(v0_init, input, number, err, \ + arg1, arg2, arg3) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = ARGIFY (arg1); \ - register long long __a1 asm("$5") = ARGIFY (arg2); \ - register long long __a2 asm("$6") = ARGIFY (arg3); \ - register long long __a3 asm("$7"); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a0 asm ("$4") = ARGIFY (arg1); \ + register long long __a1 asm ("$5") = ARGIFY (arg2); \ + register long long __a2 asm ("$6") = ARGIFY (arg3); \ + register long long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -170,19 +209,22 @@ _sys_result; \ }) -#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4) \ +#define internal_syscall4(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = ARGIFY (arg1); \ - register long long __a1 asm("$5") = ARGIFY (arg2); \ - register long long __a2 asm("$6") = ARGIFY (arg3); \ - register long long __a3 asm("$7") = ARGIFY (arg4); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a0 asm ("$4") = ARGIFY (arg1); \ + register long long __a1 asm ("$5") = ARGIFY (arg2); \ + register long long __a2 asm ("$6") = ARGIFY (arg3); \ + register long long __a3 asm ("$7") = ARGIFY (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ @@ -194,20 +236,23 @@ _sys_result; \ }) -#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5) \ +#define internal_syscall5(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = ARGIFY (arg1); \ - register long long __a1 asm("$5") = ARGIFY (arg2); \ - register long long __a2 asm("$6") = ARGIFY (arg3); \ - register long long __a3 asm("$7") = ARGIFY (arg4); \ - register long long __a4 asm("$8") = ARGIFY (arg5); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a0 asm ("$4") = ARGIFY (arg1); \ + register long long __a1 asm ("$5") = ARGIFY (arg2); \ + register long long __a2 asm ("$6") = ARGIFY (arg3); \ + register long long __a3 asm ("$7") = ARGIFY (arg4); \ + register long long __a4 asm ("$8") = ARGIFY (arg5); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ @@ -219,21 +264,24 @@ _sys_result; \ }) -#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6) \ +#define internal_syscall6(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5, arg6) \ ({ \ long _sys_result; \ \ { \ - register long long __v0 asm("$2") ncs_init; \ - register long long __a0 asm("$4") = ARGIFY (arg1); \ - register long long __a1 asm("$5") = ARGIFY (arg2); \ - register long long __a2 asm("$6") = ARGIFY (arg3); \ - register long long __a3 asm("$7") = ARGIFY (arg4); \ - register long long __a4 asm("$8") = ARGIFY (arg5); \ - register long long __a5 asm("$9") = ARGIFY (arg6); \ + register long long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long long __v0 asm ("$2"); \ + register long long __a0 asm ("$4") = ARGIFY (arg1); \ + register long long __a1 asm ("$5") = ARGIFY (arg2); \ + register long long __a2 asm ("$6") = ARGIFY (arg3); \ + register long long __a3 asm ("$7") = ARGIFY (arg4); \ + register long long __a4 asm ("$8") = ARGIFY (arg5); \ + register long long __a5 asm ("$9") = ARGIFY (arg6); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S index b3bed4663c..c5f1c350ed 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S @@ -31,9 +31,9 @@ ENTRY (__ioctl) ret L(error): - SETUP_GP64 (a0, __ioctl) + SETUP_GP64_REG (a0, __ioctl) PTR_LA t9, __syscall_error - RESTORE_GP64 + RESTORE_GP64_REG jr t9 PSEUDO_END (__ioctl) diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist index 22b3068d8f..c7e46aa869 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist @@ -1396,6 +1396,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _Exit F diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 9d949955be..d16ed6941c 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -67,25 +67,57 @@ #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val) +/* Note that the original Linux syscall restart convention required the + instruction immediately preceding SYSCALL to initialize $v0 with the + syscall number. Then if a restart triggered, $v0 would have been + clobbered by the syscall interrupted, and needed to be reinititalized. + The kernel would decrement the PC by 4 before switching back to the + user mode so that $v0 had been reloaded before SYSCALL was executed + again. This implied the place $v0 was loaded from must have been + preserved across a syscall, e.g. an immediate, static register, stack + slot, etc. + + The convention was relaxed in Linux with a change applied to the kernel + GIT repository as commit 96187fb0bc30cd7919759d371d810e928048249d, that + first appeared in the 2.6.36 release. Since then the kernel has had + code that reloads $v0 upon syscall restart and resumes right at the + SYSCALL instruction, so no special arrangement is needed anymore. + + For backwards compatibility with existing kernel binaries we support + the old convention by choosing the instruction preceding SYSCALL + carefully. This also means we have to force a 32-bit encoding of the + microMIPS MOVE instruction if one is used. */ + +#ifdef __mips_micromips +# define MOVE32 "move32" +#else +# define MOVE32 "move" +#endif + #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err, nr, args...) \ - internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \ - "i" (SYS_ify (name)), err, args) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t", \ + "IK" (SYS_ify (name)), \ + 0, err, args) #undef INTERNAL_SYSCALL_NCS -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - internal_syscall##nr (= number, , "r" (__v0), err, args) +#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ + internal_syscall##nr (MOVE32 "\t%0, %2\n\t", \ + "r" (__s0), \ + number, err, args) -#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \ +#define internal_syscall0(v0_init, input, number, err, dummy...) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -97,17 +129,19 @@ _sys_result; \ }) -#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \ +#define internal_syscall1(v0_init, input, number, err, arg1) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set reorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -119,18 +153,20 @@ _sys_result; \ }) -#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \ +#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -142,19 +178,22 @@ _sys_result; \ }) -#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3) \ +#define internal_syscall3(v0_init, input, number, err, \ + arg1, arg2, arg3) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7"); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7"); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "=r" (__a3) \ @@ -166,19 +205,22 @@ _sys_result; \ }) -#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4) \ +#define internal_syscall4(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ @@ -190,20 +232,23 @@ _sys_result; \ }) -#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5) \ +#define internal_syscall5(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ - register long __a4 asm("$8") = (long) (arg5); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ + register long __a4 asm ("$8") = (long) (arg5); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ @@ -215,21 +260,24 @@ _sys_result; \ }) -#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6) \ +#define internal_syscall6(v0_init, input, number, err, \ + arg1, arg2, arg3, arg4, arg5, arg6) \ ({ \ long _sys_result; \ \ { \ - register long __v0 asm("$2") ncs_init; \ - register long __a0 asm("$4") = (long) (arg1); \ - register long __a1 asm("$5") = (long) (arg2); \ - register long __a2 asm("$6") = (long) (arg3); \ - register long __a3 asm("$7") = (long) (arg4); \ - register long __a4 asm("$8") = (long) (arg5); \ - register long __a5 asm("$9") = (long) (arg6); \ + register long __s0 asm ("$16") __attribute__ ((unused)) \ + = (number); \ + register long __v0 asm ("$2"); \ + register long __a0 asm ("$4") = (long) (arg1); \ + register long __a1 asm ("$5") = (long) (arg2); \ + register long __a2 asm ("$6") = (long) (arg3); \ + register long __a3 asm ("$7") = (long) (arg4); \ + register long __a4 asm ("$8") = (long) (arg5); \ + register long __a5 asm ("$9") = (long) (arg6); \ __asm__ volatile ( \ ".set\tnoreorder\n\t" \ - cs_init \ + v0_init \ "syscall\n\t" \ ".set\treorder" \ : "=r" (__v0), "+r" (__a3) \ diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h index 354eba2f3d..6565225662 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h @@ -57,6 +57,7 @@ cfi_same_value (gp); \ RESTORESTK; \ ret; \ + cfi_endproc; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ ENTRY (name) \ SAVESTK; \ diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c index 9b183f335c..197f7eb809 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c @@ -20,14 +20,12 @@ #include <ipc_priv.h> #include <sysdep.h> -#include <bp-checks.h> - int __shmctl (int shmid, int cmd, struct shmid_ds *buf); int __shmctl (int shmid, int cmd, struct shmid_ds *buf) { - return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf)); + return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf); } #include <shlib-compat.h> diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S index 839276d7ad..850025c635 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscall.S @@ -30,7 +30,9 @@ NESTED (syscall, SZREG, ra) .mask 0x00010000, -SZREG .fmask 0x00000000, 0 PTR_ADDIU sp, -SZREG + cfi_adjust_cfa_offset (SZREG) REG_S s0, (sp) + cfi_rel_offset (s0, 0) move s0, a0 move a0, a1 /* shift arg1 - arg7. */ @@ -45,15 +47,17 @@ NESTED (syscall, SZREG, ra) syscall /* Do the system call. */ REG_L s0, (sp) + cfi_restore (s0) PTR_ADDIU sp, SZREG + cfi_adjust_cfa_offset (-SZREG) bne a3, zero, L(error) ret L(error): - SETUP_GP64 (a0, syscall) + SETUP_GP64_REG (a0, syscall) PTR_LA t9, __syscall_error - RESTORE_GP64 + RESTORE_GP64_REG jr t9 END (syscall) diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c index 2408e5e374..89cde2b33a 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <xstatconv.h> @@ -35,7 +34,7 @@ __xstat64 (int vers, const char *name, struct stat64 *buf) int result; struct kernel_stat kbuf; - result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); + result = INLINE_SYSCALL (stat, 2, name, &kbuf); if (result == 0) result = __xstat64_conv (vers, &kbuf, buf); diff --git a/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index fe7c747cde..4f27b8b827 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -36,6 +36,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -141,6 +143,34 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \ + }) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + static inline int __attribute__((always_inline)) __lll_trylock(int *futex) { diff --git a/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h index e1dd672528..3b0eccc77f 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h +++ b/ports/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h @@ -39,6 +39,7 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ .align 2; \ + .set nomips16; \ L(pseudo_start): \ cfi_startproc; \ 99: PSEUDO_ERRJMP \ @@ -52,6 +53,7 @@ .set reorder; \ bne a3, zero, 99b; \ ret; \ + cfi_endproc; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ ENTRY (name) \ .set noreorder; \ diff --git a/ports/sysdeps/unix/sysv/linux/mips/pread.c b/ports/sysdeps/unix/sysv/linux/mips/pread.c index b269e1c25a..db18265e3d 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/pread.c +++ b/ports/sysdeps/unix/sysv/linux/mips/pread.c @@ -26,7 +26,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -54,10 +53,9 @@ __libc_pread (fd, buf, count, offset) if (SINGLE_THREAD_P) { #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif return result; @@ -66,9 +64,9 @@ __libc_pread (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif diff --git a/ports/sysdeps/unix/sysv/linux/mips/pread64.c b/ports/sysdeps/unix/sysv/linux/mips/pread64.c index 8c2c403a9d..3b8c8aa720 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/pread64.c @@ -25,7 +25,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -50,10 +49,9 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif @@ -63,9 +61,9 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif diff --git a/ports/sysdeps/unix/sysv/linux/mips/pwrite.c b/ports/sysdeps/unix/sysv/linux/mips/pwrite.c index aa3501414b..94213bc8ba 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/pwrite.c +++ b/ports/sysdeps/unix/sysv/linux/mips/pwrite.c @@ -26,7 +26,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -54,10 +53,9 @@ __libc_pwrite (fd, buf, count, offset) if (SINGLE_THREAD_P) { #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif return result; @@ -66,9 +64,9 @@ __libc_pwrite (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); #endif diff --git a/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c b/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c index 1d14e0761a..aa8a4dec35 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c +++ b/ports/sysdeps/unix/sysv/linux/mips/pwrite64.c @@ -25,7 +25,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -49,10 +48,9 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif @@ -63,9 +61,9 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); #else - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); #endif diff --git a/ports/sysdeps/unix/sysv/linux/mips/setcontext.S b/ports/sysdeps/unix/sysv/linux/mips/setcontext.S index 42f709d846..2d5aee013b 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/setcontext.S +++ b/ports/sysdeps/unix/sysv/linux/mips/setcontext.S @@ -27,6 +27,7 @@ /* int setcontext (const ucontext_t *ucp) */ .text + .set nomips16 LOCALSZ = 0 ARGSZ = 0 MASK = 0x00000000 @@ -56,9 +57,10 @@ NESTED (__setcontext, FRAMESZ, ra) #endif PTR_ADDIU sp, -FRAMESZ + cfi_adjust_cfa_offset (FRAMESZ) #ifdef __PIC__ - SETUP_GP64 (GPOFF, __setcontext) + SETUP_GP64_STACK (GPOFF, __setcontext) SAVE_GP (GPOFF) #endif @@ -152,6 +154,7 @@ NESTED (__setcontext, FRAMESZ, ra) and call the signal return syscall as if a signal handler exited normally. */ PTR_ADDIU sp, -((RT_SIGFRAME_SIZE + ALSZ) & ALMASK) + cfi_adjust_cfa_offset ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK) /* Only ucontext is referred to from rt_sigreturn, copy it. */ @@ -175,11 +178,13 @@ NESTED (__setcontext, FRAMESZ, ra) path. Successful rt_sigreturn never returns to its calling place. */ PTR_ADDIU sp, ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK) + cfi_adjust_cfa_offset (-((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)) 99: #ifdef __PIC__ PTR_LA t9, JUMPTARGET (__syscall_error) - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDIU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) jr t9 #else /* ! __PIC__ */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/sigaction.c b/ports/sysdeps/unix/sysv/linux/mips/sigaction.c index c490dd144e..9d8ee76d02 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/sigaction.c +++ b/ports/sysdeps/unix/sysv/linux/mips/sigaction.c @@ -71,8 +71,8 @@ __libc_sigaction (sig, act, oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ result = INLINE_SYSCALL (rt_sigaction, 4, sig, - act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, + act ? &kact : NULL, + oact ? &koact : NULL, sizeof (kernel_sigset_t)); if (oact && result >= 0) diff --git a/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S b/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S index d965f3919b..ec271b0584 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S +++ b/ports/sysdeps/unix/sysv/linux/mips/swapcontext.S @@ -27,6 +27,7 @@ /* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */ .text + .set nomips16 LOCALSZ = 0 ARGSZ = 0 MASK = 0x00000000 @@ -63,7 +64,8 @@ NESTED (__swapcontext, FRAMESZ, ra) # endif PTR_ADDIU sp, -FRAMESZ - SETUP_GP64 (GPOFF, __swapcontext) + cfi_adjust_cfa_offset (FRAMESZ) + SETUP_GP64_STACK (GPOFF, __swapcontext) SAVE_GP (GPOFF) #else /* ! __PIC__ */ @@ -198,8 +200,9 @@ NESTED (__swapcontext, FRAMESZ, ra) 99: #ifdef __PIC__ PTR_LA t9, JUMPTARGET (__syscall_error) - RESTORE_GP64 + RESTORE_GP64_STACK PTR_ADDIU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) jr t9 #else /* ! __PIC__ */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/ustat.c b/ports/sysdeps/unix/sysv/linux/mips/ustat.c index f05bba6294..6db482e96b 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/ustat.c +++ b/ports/sysdeps/unix/sysv/linux/mips/ustat.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> int ustat (dev_t dev, struct ustat *ubuf) @@ -32,5 +31,5 @@ ustat (dev_t dev, struct ustat *ubuf) /* We must convert the value to dev_t type used by the kernel. */ k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff); - return INLINE_SYSCALL (ustat, 2, k_dev, CHECK_1 (ubuf)); + return INLINE_SYSCALL (ustat, 2, k_dev, ubuf); } diff --git a/ports/sysdeps/unix/sysv/linux/mips/vfork.S b/ports/sysdeps/unix/sysv/linux/mips/vfork.S index b9503c3943..ae76a91d38 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/mips/vfork.S @@ -34,6 +34,7 @@ /* int vfork() */ .text + .set nomips16 LOCALSZ= 1 FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK GPOFF= FRAMESZ-(1*SZREG) @@ -42,7 +43,8 @@ NESTED(__vfork,FRAMESZ,sp) SETUP_GP #endif PTR_SUBU sp, FRAMESZ - SETUP_GP64 (a5, __vfork) + cfi_adjust_cfa_offset (FRAMESZ) + SETUP_GP64_REG (a5, __vfork) #ifdef __PIC__ SAVE_GP (GPOFF) #endif @@ -63,6 +65,7 @@ NESTED(__vfork,FRAMESZ,sp) #endif PTR_ADDU sp, FRAMESZ + cfi_adjust_cfa_offset (-FRAMESZ) SAVE_PID @@ -75,20 +78,22 @@ NESTED(__vfork,FRAMESZ,sp) RESTORE_PID + cfi_remember_state bnez a3,L(error) /* Successful return from the parent or child. */ - RESTORE_GP64 + RESTORE_GP64_REG ret /* Something bad happened -- no child created. */ L(error): + cfi_restore_state #ifdef __PIC__ PTR_LA t9, __syscall_error - RESTORE_GP64 + RESTORE_GP64_REG jr t9 #else - RESTORE_GP64 + RESTORE_GP64_REG j __syscall_error #endif END(__vfork) diff --git a/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist index 0efc6b55c4..9b6d663748 100644 --- a/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist @@ -1781,6 +1781,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h b/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h index 7494ee5e5f..02fddecc15 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h +++ b/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h @@ -23,36 +23,6 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - #ifdef __USE_MISC /* These are Linux-specific. */ # define MAP_NONBLOCK 0x00080 /* Do not block on IO. */ @@ -66,47 +36,5 @@ # define MAP_HUGETLB 0x04000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h index e6f5d1905e..a9822ec960 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h @@ -38,6 +38,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -139,7 +141,33 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) static inline int __attribute__ ((always_inline)) diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist index d79b2df55d..caf74b89e1 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist @@ -2088,3 +2088,6 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist index 3ab004605a..658c4bf999 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist +++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libpthread.abilist @@ -73,7 +73,6 @@ GLIBC_2.12 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist index f617405675..68d975be55 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist @@ -2088,3 +2088,6 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist index 3ab004605a..658c4bf999 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist +++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libpthread.abilist @@ -73,7 +73,6 @@ GLIBC_2.12 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist index d79b2df55d..caf74b89e1 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist +++ b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist @@ -2088,3 +2088,6 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist index 3ab004605a..658c4bf999 100644 --- a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist +++ b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libpthread.abilist @@ -73,7 +73,6 @@ GLIBC_2.12 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/posix/Makefile b/posix/Makefile index 57672d8837..a728630203 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -86,7 +86,8 @@ tests := tstgetopt testfnm runtests runptests \ tst-rfc3484-3 \ tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \ bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \ - bug-getopt5 tst-getopt_long1 + bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \ + tst-pathconf xtests := bug-ga2 ifeq (yes,$(build-shared)) test-srcs := globtest @@ -199,6 +200,8 @@ bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata bug-regex32-ENV = LOCPATH=$(common-objpfx)localedata bug-regex33-ENV = LOCPATH=$(common-objpfx)localedata +bug-regex34-ENV = LOCPATH=$(common-objpfx)localedata +bug-regex35-ENV = LOCPATH=$(common-objpfx)localedata tst-rxspencer-ARGS = --utf8 rxspencer/tests tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata tst-pcre-ARGS = PCRE.tests @@ -207,11 +210,11 @@ bug-glob1-ARGS = "$(objpfx)" tst-execvp3-ARGS = --test-dir=$(objpfx) testcases.h: TESTS TESTS2C.sed - sed -f TESTS2C.sed < $< > $@T + LC_ALL=C sed -f TESTS2C.sed < $< > $@T mv -f $@T $@ ptestcases.h: PTESTS PTESTS2C.sed - sed -f PTESTS2C.sed < $< > $@T + LC_ALL=C sed -f PTESTS2C.sed < $< > $@T mv -f $@T $@ # Run a test on the header files we use. diff --git a/posix/Versions b/posix/Versions index 686c446bcd..1bc235acd2 100644 --- a/posix/Versions +++ b/posix/Versions @@ -1,7 +1,7 @@ libc { GLIBC_2.0 { # functions with special/multiple interfaces - __bsd_getpgrp; __setpgid; __getpgid; + __bsd_getpgrp; __getpgid; __setpgid; # functions with required interface outside normal name space _exit; @@ -114,7 +114,7 @@ libc { # under GLIBC_2.0; the first instance in the script is taken as the # default, so linux configurations put them in GLIBC_2.0 while other # configuration put them in GLIBC_2.3.2. - getresuid; getresgid; setresuid; setresgid; + getresgid; getresuid; setresgid; setresuid; } GLIBC_2.3.3 { sched_getaffinity; sched_setaffinity; diff --git a/posix/bug-regex34.c b/posix/bug-regex34.c new file mode 100644 index 0000000000..bb3b6138f8 --- /dev/null +++ b/posix/bug-regex34.c @@ -0,0 +1,46 @@ +/* Test re_search with multi-byte characters in UTF-8. + Copyright (C) 2013 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 _GNU_SOURCE 1 +#include <stdio.h> +#include <string.h> +#include <locale.h> +#include <regex.h> + +static int +do_test (void) +{ + struct re_pattern_buffer r; + /* ကျွန်ုပ်x */ + const char *s = "\xe1\x80\x80\xe1\x80\xbb\xe1\x80\xbd\xe1\x80\x94\xe1\x80\xba\xe1\x80\xaf\xe1\x80\x95\xe1\x80\xbax"; + + if (setlocale (LC_ALL, "en_US.UTF-8") == NULL) + { + puts ("setlocale failed"); + return 1; + } + memset (&r, 0, sizeof (r)); + + re_compile_pattern ("[^x]x", 5, &r); + /* This was triggering a buffer overflow. */ + re_search (&r, s, strlen (s), 0, strlen (s), 0); + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/posix/bug-regex35.c b/posix/bug-regex35.c new file mode 100644 index 0000000000..7957e7f860 --- /dev/null +++ b/posix/bug-regex35.c @@ -0,0 +1,52 @@ +/* Test regcomp with collating symbols in bracket expressions + Copyright (C) 2013 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 <stdio.h> +#include <string.h> +#include <locale.h> +#include <regex.h> + +static int +do_test (void) +{ + regex_t r; + + if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL) + { + puts ("setlocale failed"); + return 1; + } + + if (regcomp (&r, "[[.ch.]]", REG_NOSUB) != 0) + { + puts ("regcomp failed"); + return 1; + } + + if (regexec (&r, "ch", 0, 0, 0) != 0) + { + puts ("regexec failed"); + return 1; + } + + regfree (&r); + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/posix/regcomp.c b/posix/regcomp.c index 88bd581d96..578044155b 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -2776,40 +2776,29 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. - Return the index of the symbol in the SYMB_TABLE. */ + Return the index of the symbol in the SYMB_TABLE, + or -1 if not found. */ auto inline int32_t __attribute ((always_inline)) - seek_collating_symbol_entry (name, name_len) - const unsigned char *name; - size_t name_len; + seek_collating_symbol_entry (const unsigned char *name, size_t name_len) { - int32_t hash = elem_hash ((const char *) name, name_len); - int32_t elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - int32_t second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - /* Compare the length of the name. */ - && name_len == extra[symb_table[2 * elem + 1]] - /* Compare the name. */ - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], - name_len) == 0) - { - /* Yep, this is the entry. */ - break; - } + int32_t elem; - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - return elem; + for (elem = 0; elem < table_size; elem++) + if (symb_table[2 * elem] != 0) + { + int32_t idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + if (/* Compare the length of the name. */ + name_len == extra[idx] + /* Compare the name. */ + && memcmp (name, &extra[idx + 1], name_len) == 0) + /* Yep, this is the entry. */ + return elem; + } + return -1; } /* Local function for parse_bracket_exp used in _LIBC environment. @@ -2818,8 +2807,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline unsigned int __attribute ((always_inline)) - lookup_collation_sequence_value (br_elem) - bracket_elem_t *br_elem; + lookup_collation_sequence_value (bracket_elem_t *br_elem) { if (br_elem->type == SB_CHAR) { @@ -2847,7 +2835,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); - if (symb_table[2 * elem] != 0) + if (elem != -1) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; @@ -2865,7 +2853,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } - else if (symb_table[2 * elem] == 0 && sym_name_len == 1) + else if (sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ @@ -2887,11 +2875,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline reg_errcode_t __attribute ((always_inline)) - build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) - re_charset_t *mbcset; - int *range_alloc; - bitset_t sbcset; - bracket_elem_t *start_elem, *end_elem; + build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, + bracket_elem_t *start_elem, bracket_elem_t *end_elem) { unsigned int ch; uint32_t start_collseq; @@ -2970,25 +2955,22 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, auto inline reg_errcode_t __attribute ((always_inline)) - build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) - re_charset_t *mbcset; - int *coll_sym_alloc; - bitset_t sbcset; - const unsigned char *name; + build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, + int *coll_sym_alloc, const unsigned char *name) { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); - if (symb_table[2 * elem] != 0) + if (elem != -1) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } - else if (symb_table[2 * elem] == 0 && name_len == 1) + else if (name_len == 1) { /* No valid character, treat it as a normal character. */ diff --git a/posix/regex_internal.h b/posix/regex_internal.h index 21cada87d3..3c94fbed7d 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -98,7 +98,6 @@ # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) -# define inline #endif /* Number of single byte character. */ @@ -122,10 +121,8 @@ # define attribute_hidden #endif /* not _LIBC */ -#ifdef __GNUC__ -# define __attribute(arg) __attribute__ (arg) -#else -# define __attribute(arg) +#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1) +# define __attribute__(arg) #endif extern const char __re_error_msgid[] attribute_hidden; @@ -379,7 +376,7 @@ typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # ifdef __i386__ -# define internal_function __attribute ((regparm (3), stdcall)) +# define internal_function __attribute__ ((regparm (3), stdcall)) # else # define internal_function # endif @@ -398,7 +395,7 @@ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) - internal_function __attribute ((pure)); + internal_function __attribute__ ((pure)); #endif #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) @@ -687,7 +684,7 @@ typedef struct /* Inline functions for bitset operation. */ -static inline void +static void __attribute__ ((unused)) bitset_not (bitset_t set) { int bitset_i; @@ -695,7 +692,7 @@ bitset_not (bitset_t set) set[bitset_i] = ~set[bitset_i]; } -static inline void +static void __attribute__ ((unused)) bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; @@ -703,7 +700,7 @@ bitset_merge (bitset_t dest, const bitset_t src) dest[bitset_i] |= src[bitset_i]; } -static inline void +static void __attribute__ ((unused)) bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; @@ -713,8 +710,8 @@ bitset_mask (bitset_t dest, const bitset_t src) #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ -static inline int -internal_function __attribute ((pure)) +static int +internal_function __attribute__ ((pure, unused)) re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; @@ -726,8 +723,8 @@ re_string_char_size_at (const re_string_t *pstr, int idx) return byte_idx; } -static inline wint_t -internal_function __attribute ((pure)) +static wint_t +internal_function __attribute__ ((pure, unused)) re_string_wchar_at (const re_string_t *pstr, int idx) { if (pstr->mb_cur_max == 1) @@ -737,7 +734,7 @@ re_string_wchar_at (const re_string_t *pstr, int idx) # ifndef NOT_IN_libc static int -internal_function __attribute ((pure)) +internal_function __attribute__ ((pure, unused)) re_string_elem_size_at (const re_string_t *pstr, int idx) { # ifdef _LIBC diff --git a/posix/regexec.c b/posix/regexec.c index 7f2de857a7..5ca2bf67a0 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -197,7 +197,7 @@ static int group_nodes_into_DFAstates (const re_dfa_t *dfa, static int check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) internal_function; -static reg_errcode_t extend_buffers (re_match_context_t *mctx) +static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len) internal_function; /* Entry point for POSIX code. */ @@ -1160,7 +1160,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match, || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { - err = extend_buffers (mctx); + err = extend_buffers (mctx, next_char_idx + 1); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); @@ -1738,7 +1738,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx) && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; - err = extend_buffers (mctx); + err = extend_buffers (mctx, next_state_log_idx + 1); if (BE (err != REG_NOERROR, 0)) return err; } @@ -2792,7 +2792,7 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) if (bkref_str_off >= mctx->input.len) break; - err = extend_buffers (mctx); + err = extend_buffers (mctx, bkref_str_off + 1); if (BE (err != REG_NOERROR, 0)) return err; @@ -4102,7 +4102,7 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node, static reg_errcode_t internal_function __attribute_warn_unused_result__ -extend_buffers (re_match_context_t *mctx) +extend_buffers (re_match_context_t *mctx, int min_len) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; @@ -4111,8 +4111,10 @@ extend_buffers (re_match_context_t *mctx) if (BE (INT_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) return REG_ESPACE; - /* Double the lengthes of the buffers. */ - ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2)); + /* Double the lengthes of the buffers, but allocate at least MIN_LEN. */ + ret = re_string_realloc_buffers (pstr, + MAX (min_len, + MIN (pstr->len, pstr->bufs_len * 2))); if (BE (ret != REG_NOERROR, 0)) return ret; diff --git a/posix/tst-pathconf.c b/posix/tst-pathconf.c new file mode 100644 index 0000000000..7627a24d8d --- /dev/null +++ b/posix/tst-pathconf.c @@ -0,0 +1,176 @@ +/* Test that values of pathconf and fpathconf are consistent for a file. + Copyright (C) 2013 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 <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + + +static void prepare (void); +#define PREPARE(argc, argv) prepare () + +static int do_test (void); +#define TEST_FUNCTION do_test () + +#include "../test-skeleton.c" + +static int dir_fd; +static char *dirbuf; + +static void +prepare (void) +{ + size_t test_dir_len = strlen (test_dir); + static const char dir_name[] = "/tst-pathconf.XXXXXX"; + + size_t dirbuflen = test_dir_len + sizeof (dir_name); + dirbuf = malloc (dirbuflen); + if (dirbuf == NULL) + { + puts ("Out of memory"); + exit (1); + } + + snprintf (dirbuf, dirbuflen, "%s%s", test_dir, dir_name); + if (mkdtemp (dirbuf) == NULL) + { + printf ("Cannot create temporary directory: %s\n", strerror (errno)); + exit (1); + } + + add_temp_file (dirbuf); + + dir_fd = open (dirbuf, O_RDONLY); + if (dir_fd == -1) + { + printf ("Cannot open directory: %s\n", strerror (errno)); + exit (1); + } +} + + +static int +do_test (void) +{ + int ret = 0; + static const char *fifo_name = "some-fifo"; + + size_t filenamelen = strlen (dirbuf) + strlen (fifo_name) + 2; + char *filename = malloc (filenamelen); + + snprintf (filename, filenamelen, "%s/%s", dirbuf, fifo_name); + + /* Create a fifo in the directory. */ + int e = mkfifo (filename, 0777); + if (e == -1) + { + printf ("fifo creation failed (%s)\n", strerror (errno)); + ret = 1; + goto out_nofifo; + } + + long dir_pathconf = pathconf (dirbuf, _PC_PIPE_BUF); + + if (dir_pathconf < 0) + { + printf ("pathconf on directory failed: %s\n", strerror (errno)); + ret = 1; + goto out_nofifo; + } + + long fifo_pathconf = pathconf (filename, _PC_PIPE_BUF); + + if (fifo_pathconf < 0) + { + printf ("pathconf on file failed: %s\n", strerror (errno)); + ret = 1; + goto out_nofifo; + } + + int fifo = open (filename, O_RDONLY | O_NONBLOCK); + + if (fifo < 0) + { + printf ("fifo open failed (%s)\n", strerror (errno)); + ret = 1; + goto out_nofifo; + } + + long dir_fpathconf = fpathconf (dir_fd, _PC_PIPE_BUF); + + if (dir_fpathconf < 0) + { + printf ("fpathconf on directory failed: %s\n", strerror (errno)); + ret = 1; + goto out; + } + + long fifo_fpathconf = fpathconf (fifo, _PC_PIPE_BUF); + + if (fifo_fpathconf < 0) + { + printf ("fpathconf on file failed: %s\n", strerror (errno)); + ret = 1; + goto out; + } + + if (fifo_pathconf != fifo_fpathconf) + { + printf ("fifo pathconf (%ld) != fifo fpathconf (%ld)\n", fifo_pathconf, + fifo_fpathconf); + ret = 1; + goto out; + } + + if (dir_pathconf != fifo_pathconf) + { + printf ("directory pathconf (%ld) != fifo pathconf (%ld)\n", + dir_pathconf, fifo_pathconf); + ret = 1; + goto out; + } + + if (dir_fpathconf != fifo_fpathconf) + { + printf ("directory fpathconf (%ld) != fifo fpathconf (%ld)\n", + dir_fpathconf, fifo_fpathconf); + ret = 1; + goto out; + } + +out: + close (fifo); +out_nofifo: + close (dir_fd); + + if (unlink (filename) != 0) + { + printf ("Could not remove fifo (%s)\n", strerror (errno)); + ret = 1; + } + + if (rmdir (dirbuf) != 0) + { + printf ("Could not remove directory (%s)\n", strerror (errno)); + ret = 1; + } + + return ret; +} diff --git a/resolv/Versions b/resolv/Versions index 93faf1e2f5..6f02597372 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -97,6 +97,6 @@ libnss_dns { libanl { GLIBC_2.2.3 { - getaddrinfo_a; gai_cancel; gai_error; gai_suspend; + gai_cancel; gai_error; gai_suspend; getaddrinfo_a; } } diff --git a/resolv/res_send.c b/resolv/res_send.c index c790031b45..60da5c901b 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -155,7 +155,7 @@ evSubTime(struct timespec *res, const struct timespec *minuend, } } -static inline int +static int evCmpTime(struct timespec a, struct timespec b) { long x = a.tv_sec - b.tv_sec; @@ -164,7 +164,7 @@ evCmpTime(struct timespec a, struct timespec b) { return (x < 0L ? (-1) : x > 0L ? (1) : (0)); } -static inline void +static void evNowTime(struct timespec *res) { struct timeval now; diff --git a/rt/Makefile b/rt/Makefile index 6a98c81514..ef356d0aa8 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -76,8 +76,5 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)librt.so $(shared-thread-library) else $(addprefix $(objpfx),$(tests)): $(objpfx)librt.a $(static-thread-library) endif -ifeq (yes,$(build-bounded)) -$(tests:%=$(objpfx)%-bp): $(objpfx)librt_b.a $(bounded-thread-library) -endif tst-mqueue7-ARGS = -- $(host-test-program-cmd) diff --git a/scripts/bench.pl b/scripts/bench.pl new file mode 100755 index 0000000000..bb7f64897e --- /dev/null +++ b/scripts/bench.pl @@ -0,0 +1,93 @@ +#! /usr/bin/perl -w +# Copyright (C) 2013 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/>. + + +use strict; +use warnings; +# Generate a benchmark source file for a given input. + +if (@ARGV < 2) { + die "Usage: bench.pl <function> <iterations> [parameter types] [return type]" +} + +my $arg; +my $func = $ARGV[0]; +my $iters = $ARGV[1]; +my @args; +my $ret = "void"; +my $getret = ""; +my $retval = ""; + +if (@ARGV >= 3) { + @args = split(':', $ARGV[2]); +} + +if (@ARGV == 4) { + $ret = $ARGV[3]; +} + +my $decl = "extern $ret $func ("; + +if (@args == 0 || $args[0] eq "void") { + print "$decl void);\n"; + print "#define CALL_BENCH_FUNC(j) $func();\n"; + print "#define NUM_SAMPLES (1)\n"; +} +else { + my $num = 0; + my $bench_func = "#define CALL_BENCH_FUNC(j) $func ("; + my $struct = "struct args {"; + + foreach $arg (@args) { + if ($num > 0) { + $bench_func = "$bench_func,"; + $decl = "$decl,"; + } + + $struct = "$struct $arg arg$num;"; + $bench_func = "$bench_func in[j].arg$num"; + $decl = "$decl $arg"; + $num = $num + 1; + } + + print "$decl);\n"; + print "$bench_func);\n"; + print "$struct } in[] = {"; + + open INPUTS, "<$func-inputs" or die $!; + + while (<INPUTS>) { + chomp; + print "{$_},\n"; + } + print "};\n"; + print "#define NUM_SAMPLES (sizeof (in) / sizeof (struct args))\n" +} + +# In some cases not storing a return value seems to result in the function call +# being optimized out. +if ($ret ne "void") { + print "static volatile $ret ret = 0.0;\n"; + $getret = "ret = "; +} + +print "#define BENCH_FUNC(j) ({$getret CALL_BENCH_FUNC (j);})\n"; + +print "#define ITER $iters\n"; +print "#define FUNCNAME \"$func\"\n"; +print "#include \"bench-skeleton.c\"\n"; diff --git a/scripts/config.guess b/scripts/config.guess index 872b96a161..f475ceb413 100755 --- a/scripts/config.guess +++ b/scripts/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-09-25' +timestamp='2013-02-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-09-25' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -959,6 +953,9 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; diff --git a/scripts/config.sub b/scripts/config.sub index bdda9e4a32..872199acf7 100755 --- a/scripts/config.sub +++ b/scripts/config.sub @@ -1,24 +1,18 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-08-18' +timestamp='2013-02-12' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program 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 General Public License for more details. +# This program 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 +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. @@ -26,11 +20,12 @@ timestamp='2012-08-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -156,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,8 +252,10 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -273,7 +268,7 @@ case $basic_machine in | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -291,16 +286,17 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -389,7 +385,8 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -407,12 +404,13 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -788,7 +786,7 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; mingw64) @@ -1023,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1350,7 +1352,7 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1496,9 +1498,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1590,6 +1589,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/scripts/rellns-sh b/scripts/rellns-sh index 0e861b5fa5..9a1496a9fd 100755 --- a/scripts/rellns-sh +++ b/scripts/rellns-sh @@ -16,8 +16,17 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. +# With -p, instead of creating the link print the computed relative link +# name. +do_print=false +case $1 in + -p) + do_print=true + shift + ;; +esac if test $# -ne 2; then - echo "Usage: rellns SOURCE DEST" >&2 + echo "Usage: rellns [-p] SOURCE DEST" >&2 exit 1 fi @@ -70,4 +79,8 @@ while test -n "$from"; do from=`echo $from | sed 's%^[^/]*/*%%'` done -ln -s $rfrom$to $2 +if $do_print; then + echo "$rfrom$to" +else + ln -s $rfrom$to $2 +fi diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index a72744d59e..ad60f43eac 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -133,9 +133,6 @@ #define MPN_GE(u,v) \ (u##size > v##size || (u##size == v##size && __mpn_cmp (u, v, u##size) >= 0)) -extern int __isinfl_internal (long double) attribute_hidden; -extern int __isnanl_internal (long double) attribute_hidden; - extern mp_size_t __mpn_extract_double (mp_ptr res_ptr, mp_size_t size, int *expt, int *is_neg, double value); diff --git a/stdio-common/tstdiomisc.c b/stdio-common/tstdiomisc.c index c1c68955bd..d24c55f53c 100644 --- a/stdio-common/tstdiomisc.c +++ b/stdio-common/tstdiomisc.c @@ -46,9 +46,9 @@ t2 (void) return result; } -volatile double nanval; +volatile double qnanval; volatile double infval; -volatile long double lnanval; +volatile long double lqnanval; volatile long double linfval; @@ -59,16 +59,17 @@ F (void) wchar_t wbuf[40]; int result; - nanval = NAN; + qnanval = NAN; snprintf (buf, sizeof buf, "%a %A %e %E %f %F %g %G", - nanval, nanval, nanval, nanval, nanval, nanval, nanval, nanval); + qnanval, qnanval, qnanval, qnanval, + qnanval, qnanval, qnanval, qnanval); result = strcmp (buf, "nan NAN nan NAN nan NAN nan NAN") != 0; printf ("expected \"nan NAN nan NAN nan NAN nan NAN\", got \"%s\"\n", buf); snprintf (buf, sizeof buf, "%a %A %e %E %f %F %g %G", - -nanval, -nanval, -nanval, -nanval, - -nanval, -nanval, -nanval, -nanval); + -qnanval, -qnanval, -qnanval, -qnanval, + -qnanval, -qnanval, -qnanval, -qnanval); result = strcmp (buf, "-nan -NAN -nan -NAN -nan -NAN -nan -NAN") != 0; printf ("expected \"-nan -NAN -nan -NAN -nan -NAN -nan -NAN\", got \"%s\"\n", buf); @@ -88,13 +89,14 @@ F (void) buf); swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G", - nanval, nanval, nanval, nanval, nanval, nanval, nanval, nanval); + qnanval, qnanval, qnanval, qnanval, + qnanval, qnanval, qnanval, qnanval); result |= wcscmp (wbuf, L"nan NAN nan NAN nan NAN nan NAN") != 0; printf ("expected L\"nan NAN nan NAN nan NAN nan NAN\", got L\"%S\"\n", wbuf); swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G", - -nanval, -nanval, -nanval, -nanval, - -nanval, -nanval, -nanval, -nanval); + -qnanval, -qnanval, -qnanval, -qnanval, + -qnanval, -qnanval, -qnanval, -qnanval); result |= wcscmp (wbuf, L"-nan -NAN -nan -NAN -nan -NAN -nan -NAN") != 0; printf ("expected L\"-nan -NAN -nan -NAN -nan -NAN -nan -NAN\", got L\"%S\"\n", wbuf); @@ -111,17 +113,17 @@ F (void) printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", wbuf); - lnanval = NAN; + lqnanval = NAN; snprintf (buf, sizeof buf, "%La %LA %Le %LE %Lf %LF %Lg %LG", - lnanval, lnanval, lnanval, lnanval, - lnanval, lnanval, lnanval, lnanval); + lqnanval, lqnanval, lqnanval, lqnanval, + lqnanval, lqnanval, lqnanval, lqnanval); result = strcmp (buf, "nan NAN nan NAN nan NAN nan NAN") != 0; printf ("expected \"nan NAN nan NAN nan NAN nan NAN\", got \"%s\"\n", buf); snprintf (buf, sizeof buf, "%La %LA %Le %LE %Lf %LF %Lg %LG", - -lnanval, -lnanval, -lnanval, -lnanval, - -lnanval, -lnanval, -lnanval, -lnanval); + -lqnanval, -lqnanval, -lqnanval, -lqnanval, + -lqnanval, -lqnanval, -lqnanval, -lqnanval); result = strcmp (buf, "-nan -NAN -nan -NAN -nan -NAN -nan -NAN") != 0; printf ("expected \"-nan -NAN -nan -NAN -nan -NAN -nan -NAN\", got \"%s\"\n", buf); @@ -143,15 +145,15 @@ F (void) swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%La %LA %Le %LE %Lf %LF %Lg %LG", - lnanval, lnanval, lnanval, lnanval, - lnanval, lnanval, lnanval, lnanval); + lqnanval, lqnanval, lqnanval, lqnanval, + lqnanval, lqnanval, lqnanval, lqnanval); result |= wcscmp (wbuf, L"nan NAN nan NAN nan NAN nan NAN") != 0; printf ("expected L\"nan NAN nan NAN nan NAN nan NAN\", got L\"%S\"\n", wbuf); swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%La %LA %Le %LE %Lf %LF %Lg %LG", - -lnanval, -lnanval, -lnanval, -lnanval, - -lnanval, -lnanval, -lnanval, -lnanval); + -lqnanval, -lqnanval, -lqnanval, -lqnanval, + -lqnanval, -lqnanval, -lqnanval, -lqnanval); result |= wcscmp (wbuf, L"-nan -NAN -nan -NAN -nan -NAN -nan -NAN") != 0; printf ("expected L\"-nan -NAN -nan -NAN -nan -NAN -nan -NAN\", got L\"%S\"\n", wbuf); diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index df4bc47f98..c8bcf5a976 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -67,7 +67,7 @@ do { \ unsigned int _val = val; \ assert ((unsigned int) done < (unsigned int) INT_MAX); \ - if (__builtin_expect (INT_MAX - done < _val, 0)) \ + if (__glibc_unlikely (INT_MAX - done < _val)) \ { \ done = -1; \ __set_errno (EOVERFLOW); \ @@ -91,7 +91,7 @@ if (width > 0) \ { \ unsigned int d = _IO_padn (s, (Padchar), width); \ - if (__builtin_expect (d == EOF, 0)) \ + if (__glibc_unlikely (d == EOF)) \ { \ done = -1; \ goto all_done; \ @@ -120,7 +120,7 @@ if (width > 0) \ { \ unsigned int d = _IO_wpadn (s, (Padchar), width); \ - if (__builtin_expect (d == EOF, 0)) \ + if (__glibc_unlikely (d == EOF)) \ { \ done = -1; \ goto all_done; \ @@ -166,7 +166,7 @@ done = -1; \ goto all_done; \ } \ - if (__builtin_expect (INT_MAX - done < (Len), 0)) \ + if (__glibc_unlikely (INT_MAX - done < (Len))) \ { \ done = -1; \ __set_errno (EOVERFLOW); \ @@ -302,7 +302,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) do \ { \ int offset; \ - void *__unbounded ptr; \ + void *ptr; \ spec = (ChExpr); \ offset = NOT_IN_JUMP_RANGE (spec) ? REF (form_unknown) \ : table[CHAR_CLASS (spec)]; \ @@ -315,7 +315,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) # define JUMP(ChExpr, table) \ do \ { \ - const void *__unbounded ptr; \ + const void *ptr; \ spec = (ChExpr); \ ptr = NOT_IN_JUMP_RANGE (spec) ? REF (form_unknown) \ : table[CHAR_CLASS (spec)]; \ @@ -1108,7 +1108,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) outstring (string, len); \ if (left) \ PAD (L' '); \ - if (__builtin_expect (string_malloced, 0)) \ + if (__glibc_unlikely (string_malloced)) \ free (string); \ } \ break; @@ -1254,7 +1254,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) outstring (string, len); \ if (left) \ PAD (' '); \ - if (__builtin_expect (string_malloced, 0)) \ + if (__glibc_unlikely (string_malloced)) \ free (string); \ } \ break; @@ -1315,9 +1315,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) goto all_done; /* Use the slow path in case any printf handler is registered. */ - if (__builtin_expect (__printf_function_table != NULL + if (__glibc_unlikely (__printf_function_table != NULL || __printf_modifier_table != NULL - || __printf_va_arg_table != NULL, 0)) + || __printf_va_arg_table != NULL)) goto do_positional; /* Process whole format string. */ @@ -1452,7 +1452,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) left = 1; } - if (__builtin_expect (width >= INT_MAX / sizeof (CHAR_T) - 32, 0)) + if (__glibc_unlikely (width >= INT_MAX / sizeof (CHAR_T) - 32)) { __set_errno (EOVERFLOW); done = -1; @@ -1484,8 +1484,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) LABEL (width): width = read_int (&f); - if (__builtin_expect (width == -1 - || width >= INT_MAX / sizeof (CHAR_T) - 32, 0)) + if (__glibc_unlikely (width == -1 + || width >= INT_MAX / sizeof (CHAR_T) - 32)) { __set_errno (EOVERFLOW); done = -1; @@ -1561,7 +1561,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) if (prec > width && prec > sizeof (work_buffer) / sizeof (work_buffer[0]) - 32) { - if (__builtin_expect (prec >= INT_MAX / sizeof (CHAR_T) - 32, 0)) + if (__glibc_unlikely (prec >= INT_MAX / sizeof (CHAR_T) - 32)) { __set_errno (EOVERFLOW); done = -1; @@ -1645,7 +1645,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* The format is correctly handled. */ ++nspecs_done; - if (__builtin_expect (workstart != NULL, 0)) + if (__glibc_unlikely (workstart != NULL)) free (workstart); workstart = NULL; @@ -1691,7 +1691,8 @@ do_positional: /* Just a counter. */ size_t cnt; - free (workstart); + if (__glibc_unlikely (workstart != NULL)) + free (workstart); workstart = NULL; if (grouping == (const char *) -1) @@ -1736,7 +1737,7 @@ do_positional: + sizeof (*args_type)); /* Check for potential integer overflow. */ - if (__builtin_expect (nargs > INT_MAX / bytes_per_arg, 0)) + if (__glibc_unlikely (nargs > INT_MAX / bytes_per_arg)) { __set_errno (EOVERFLOW); done = -1; @@ -1841,7 +1842,7 @@ do_positional: default: if ((args_type[cnt] & PA_FLAG_PTR) != 0) args_value[cnt].pa_pointer = va_arg (ap_save, void *); - else if (__builtin_expect (__printf_va_arg_table != NULL, 0) + else if (__glibc_unlikely (__printf_va_arg_table != NULL) && __printf_va_arg_table[args_type[cnt] - PA_LAST] != NULL) { args_value[cnt].pa_user = alloca (args_size[cnt]); @@ -1944,6 +1945,11 @@ do_positional: { workstart = (CHAR_T *) malloc ((MAX (prec, width) + 32) * sizeof (CHAR_T)); + if (workstart == NULL) + { + done = -1; + goto all_done; + } workend = workstart + (MAX (prec, width) + 32); } } @@ -2021,7 +2027,8 @@ do_positional: break; } - free (workstart); + if (__glibc_unlikely (workstart != NULL)) + free (workstart); workstart = NULL; /* Write the following constant string. */ @@ -2032,8 +2039,10 @@ do_positional: } all_done: - free (args_malloced); - free (workstart); + if (__glibc_unlikely (args_malloced != NULL)) + free (args_malloced); + if (__glibc_unlikely (workstart != NULL)) + free (workstart); /* Unlock the stream. */ _IO_funlockfile (s); _IO_cleanup_region_end (0); diff --git a/stdlib/Makefile b/stdlib/Makefile index 4bfd4b9bca..6f98c71c64 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -25,7 +25,8 @@ headers := stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h \ inttypes.h stdint.h bits/wordsize.h \ errno.h sys/errno.h bits/errno.h \ ucontext.h sys/ucontext.h \ - alloca.h fmtmsg.h + alloca.h fmtmsg.h \ + bits/stdlib-bsearch.h routines := \ atof atoi atol atoll \ @@ -33,7 +34,7 @@ routines := \ bsearch qsort msort \ getenv putenv setenv secure-getenv \ exit on_exit atexit cxa_atexit cxa_finalize old_atexit \ - quick_exit at_quick_exit cxa_at_quick_exit \ + quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl \ abs labs llabs \ div ldiv lldiv \ mblen mbstowcs mbtowc wcstombs wctomb \ @@ -70,9 +71,11 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ tst-makecontext2 tst-strtod6 tst-unsetenv1 \ tst-makecontext3 bug-getcontext bug-fmtmsg1 \ tst-secure-getenv tst-strtod-overflow tst-strtod-round \ - tst-tininess tst-strtod-underflow + tst-tininess tst-strtod-underflow tst-tls-atexit tests-static := tst-secure-getenv +modules-names = tst-tls-atexit-lib + include ../Makeconfig ifeq ($(build-shared),yes) @@ -154,3 +157,9 @@ $(objpfx)bug-getcontext: $(link-libm) $(objpfx)tst-strtod-round: $(link-libm) $(objpfx)tst-tininess: $(link-libm) $(objpfx)tst-strtod-underflow: $(link-libm) + +tst-tls-atexit-lib.so-no-z-defs = yes + +LDFLAGS-tst-tls-atexit = $(common-objpfx)nptl/libpthread.so \ + $(common-objpfx)dlfcn/libdl.so +$(objpfx)tst-tls-atexit.out: $(objpfx)tst-tls-atexit-lib.so diff --git a/stdlib/Versions b/stdlib/Versions index 250bd5fad7..f1777dfcf4 100644 --- a/stdlib/Versions +++ b/stdlib/Versions @@ -106,6 +106,9 @@ libc { GLIBC_2.17 { secure_getenv; } + GLIBC_2.18 { + __cxa_thread_atexit_impl; + } GLIBC_PRIVATE { # functions which have an additional interface since they are # are cancelable. @@ -114,5 +117,6 @@ libc { __abort_msg; # Used from other libraries __libc_secure_getenv; + __call_tls_dtors; } } diff --git a/stdlib/bsearch.c b/stdlib/bsearch.c index 55b4f37527..4a357efeef 100644 --- a/stdlib/bsearch.c +++ b/stdlib/bsearch.c @@ -17,32 +17,7 @@ #include <stdlib.h> - -/* Perform a binary search for KEY in BASE which has NMEMB elements - of SIZE bytes each. The comparisons are done by (*COMPAR)(). */ -void * -bsearch (const void *key, const void *base, size_t nmemb, size_t size, - int (*compar) (const void *, const void *)) -{ - size_t l, u, idx; - const void *p; - int comparison; - - l = 0; - u = nmemb; - while (l < u) - { - idx = (l + u) / 2; - p = (void *) (((const char *) base) + (idx * size)); - comparison = (*compar) (key, p); - if (comparison < 0) - u = idx; - else if (comparison > 0) - l = idx + 1; - else - return (void *) p; - } - - return NULL; -} +#undef __extern_inline +#define __extern_inline /* Empty, so we get a normal definition. */ +#include <bits/stdlib-bsearch.h> libc_hidden_def (bsearch) diff --git a/stdlib/cxa_thread_atexit_impl.c b/stdlib/cxa_thread_atexit_impl.c new file mode 100644 index 0000000000..ebf3c4ab05 --- /dev/null +++ b/stdlib/cxa_thread_atexit_impl.c @@ -0,0 +1,102 @@ +/* Register destructors for C++ TLS variables declared with thread_local. + Copyright (C) 2013 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 <stdlib.h> +#include <ldsodefs.h> + +typedef void (*dtor_func) (void *); + +struct dtor_list +{ + dtor_func func; + void *obj; + struct link_map *map; + struct dtor_list *next; +}; + +static __thread struct dtor_list *tls_dtor_list; +static __thread void *dso_symbol_cache; +static __thread struct link_map *lm_cache; + +/* Register a destructor for TLS variables declared with the 'thread_local' + keyword. This function is only called from code generated by the C++ + compiler. FUNC is the destructor function and OBJ is the object to be + passed to the destructor. DSO_SYMBOL is the __dso_handle symbol that each + DSO has at a unique address in its map, added from crtbegin.o during the + linking phase. */ +int +__cxa_thread_atexit_impl (dtor_func func, void *obj, void *dso_symbol) +{ + /* Prepend. */ + struct dtor_list *new = calloc (1, sizeof (struct dtor_list)); + new->func = func; + new->obj = obj; + new->next = tls_dtor_list; + tls_dtor_list = new; + + /* See if we already encountered the DSO. */ + __rtld_lock_lock_recursive (GL(dl_load_lock)); + + if (__builtin_expect (dso_symbol_cache != dso_symbol, 0)) + { + ElfW(Addr) caller = (ElfW(Addr)) dso_symbol; + + struct link_map *l = _dl_find_dso_for_object (caller); + + /* If the address is not recognized the call comes from the main + program (we hope). */ + lm_cache = l ? l : GL(dl_ns)[LM_ID_BASE]._ns_loaded; + } + /* A destructor could result in a thread_local construction and the former + could have cleared the flag. */ + if (lm_cache->l_type == lt_loaded && lm_cache->l_tls_dtor_count == 0) + lm_cache->l_flags_1 |= DF_1_NODELETE; + + new->map = lm_cache; + new->map->l_tls_dtor_count++; + + __rtld_lock_unlock_recursive (GL(dl_load_lock)); + + return 0; +} + +/* Call the destructors. This is called either when a thread returns from the + initial function or when the process exits via the exit(3) function. */ +void +__call_tls_dtors (void) +{ + while (tls_dtor_list) + { + struct dtor_list *cur = tls_dtor_list; + tls_dtor_list = tls_dtor_list->next; + + cur->func (cur->obj); + + __rtld_lock_lock_recursive (GL(dl_load_lock)); + + /* Allow DSO unload if count drops to zero. */ + cur->map->l_tls_dtor_count--; + if (cur->map->l_tls_dtor_count == 0 && cur->map->l_type == lt_loaded) + cur->map->l_flags_1 &= ~DF_1_NODELETE; + + __rtld_lock_unlock_recursive (GL(dl_load_lock)); + + free (cur); + } +} +libc_hidden_def (__call_tls_dtors) diff --git a/stdlib/exit.c b/stdlib/exit.c index e9a2139f4e..2e86caa2d4 100644 --- a/stdlib/exit.c +++ b/stdlib/exit.c @@ -33,6 +33,9 @@ attribute_hidden __run_exit_handlers (int status, struct exit_function_list **listp, bool run_list_atexit) { + /* First, call the TLS destructors. */ + __call_tls_dtors (); + /* We do it this way to handle recursive calls to exit () made by the functions registered with `atexit' and `on_exit'. We call everyone on the list and use the status value in the last diff --git a/stdlib/getenv.c b/stdlib/getenv.c index ee9d2b39d9..f33c22f440 100644 --- a/stdlib/getenv.c +++ b/stdlib/getenv.c @@ -48,11 +48,7 @@ getenv (name) #if __BYTE_ORDER == __LITTLE_ENDIAN || !_STRING_ARCH_unaligned name_start = ('=' << 8) | *(const unsigned char *) name; #else -# if __BYTE_ORDER == __BIG_ENDIAN name_start = '=' | ((*(const unsigned char *) name) << 8); -# else - #error "Funny byte order." -# endif #endif for (ep = __environ; *ep != NULL; ++ep) { diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index b49a41cc5d..4b839441c3 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -507,7 +507,7 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ extern void *aligned_alloc (size_t __alignment, size_t __size) - __THROW __wur __attribute__ ((__malloc__, __alloc_size__ (2))); + __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur; #endif __BEGIN_NAMESPACE_STD @@ -756,6 +756,10 @@ extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 2, 5)) __wur; +#ifdef __USE_EXTERN_INLINES +# include <bits/stdlib-bsearch.h> +#endif + /* Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void qsort (void *__base, size_t __nmemb, size_t __size, @@ -857,14 +861,14 @@ extern int qfcvt_r (long double __value, int __ndigit, __BEGIN_NAMESPACE_STD /* Return the length of the multibyte character in S, which is no longer than N. */ -extern int mblen (const char *__s, size_t __n) __THROW __wur; +extern int mblen (const char *__s, size_t __n) __THROW; /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ extern int mbtowc (wchar_t *__restrict __pwc, - const char *__restrict __s, size_t __n) __THROW __wur; + const char *__restrict __s, size_t __n) __THROW; /* Put the multibyte character represented by WCHAR in S, returning its length. */ -extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur; +extern int wctomb (char *__s, wchar_t __wchar) __THROW; /* Convert a multibyte string to a wide char string. */ diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c index 5959354ecc..47247b548c 100644 --- a/stdlib/strtod_l.c +++ b/stdlib/strtod_l.c @@ -444,28 +444,30 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize, /* Shift {PTR, SIZE} COUNT bits to the left, and fill the vacated bits with the COUNT most significant bits of LIMB. - Tege doesn't like this function so I have to write it here myself. :) + Implemented as a macro, so that __builtin_constant_p works even at -O0. + + Tege doesn't like this macro so I have to write it here myself. :) --drepper */ -static inline void -__attribute ((always_inline)) -__mpn_lshift_1 (mp_limb_t *ptr, mp_size_t size, unsigned int count, - mp_limb_t limb) -{ - if (__builtin_constant_p (count) && count == BITS_PER_MP_LIMB) - { - /* Optimize the case of shifting by exactly a word: - just copy words, with no actual bit-shifting. */ - mp_size_t i; - for (i = size - 1; i > 0; --i) - ptr[i] = ptr[i - 1]; - ptr[0] = limb; - } - else - { - (void) __mpn_lshift (ptr, ptr, size, count); - ptr[0] |= limb >> (BITS_PER_MP_LIMB - count); - } -} +#define __mpn_lshift_1(ptr, size, count, limb) \ + do \ + { \ + mp_limb_t *__ptr = (ptr); \ + if (__builtin_constant_p (count) && count == BITS_PER_MP_LIMB) \ + { \ + mp_size_t i; \ + for (i = (size) - 1; i > 0; --i) \ + __ptr[i] = __ptr[i - 1]; \ + __ptr[0] = (limb); \ + } \ + else \ + { \ + /* We assume count > 0 && count < BITS_PER_MP_LIMB here. */ \ + unsigned int __count = (count); \ + (void) __mpn_lshift (__ptr, __ptr, size, __count); \ + __ptr[0] |= (limb) >> (BITS_PER_MP_LIMB - __count); \ + } \ + } \ + while (0) #define INTERNAL(x) INTERNAL1(x) diff --git a/stdlib/tst-tls-atexit-lib.c b/stdlib/tst-tls-atexit-lib.c new file mode 100644 index 0000000000..9c7021aeaf --- /dev/null +++ b/stdlib/tst-tls-atexit-lib.c @@ -0,0 +1,36 @@ +/* Verify that DSO is unloaded only if its TLS objects are destroyed - the DSO. + Copyright (C) 2013 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/>. */ + +extern void *__dso_handle; + +typedef struct +{ + void *val; +} A; + +/* We only care about the destructor. */ +void A_dtor (void *obj) +{ + ((A *)obj)->val = obj; +} + +void do_foo (void) +{ + static __thread A b; + __cxa_thread_atexit_impl (A_dtor, &b, __dso_handle); +} diff --git a/stdlib/tst-tls-atexit.c b/stdlib/tst-tls-atexit.c new file mode 100644 index 0000000000..3d3777c31b --- /dev/null +++ b/stdlib/tst-tls-atexit.c @@ -0,0 +1,111 @@ +/* Verify that DSO is unloaded only if its TLS objects are destroyed. + Copyright (C) 2013 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/>. */ + +/* There are two tests in this test case. The first is implicit where it is + assumed that the destructor call on exit of the LOAD function does not + segfault. The other is a verification that after the thread has exited, a + dlclose will unload the DSO. */ + +#include <dlfcn.h> +#include <pthread.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <errno.h> + +void *handle; +pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; + +void * +load (void *u) +{ + pthread_mutex_lock (&m); + handle = dlopen ("$ORIGIN/tst-tls-atexit-lib.so", RTLD_LAZY); + if (!handle) + { + printf ("Unable to load DSO: %s\n", dlerror ()); + return (void *) (uintptr_t) 1; + } + + void (*foo) (void) = (void (*) (void)) dlsym(handle, "do_foo"); + + if (!foo) + { + printf ("Unable to find symbol: %s\n", dlerror ()); + exit (1); + } + + foo (); + + /* This should not unload the DSO. If it does, then the thread exit will + result in a segfault. */ + dlclose (handle); + pthread_mutex_unlock (&m); + + return NULL; +} + +int +main (void) +{ + pthread_t t; + int ret; + void *thr_ret; + + if ((ret = pthread_create (&t, NULL, load, NULL)) != 0) + { + printf ("pthread_create failed: %s\n", strerror (ret)); + return 1; + } + + if ((ret = pthread_join (t, &thr_ret)) != 0) + { + printf ("pthread_create failed: %s\n", strerror (ret)); + return 1; + } + + if (thr_ret != NULL) + return 1; + + /* Now this should unload the DSO. */ + dlclose (handle); + + /* Run through our maps and ensure that the DSO is unloaded. */ + FILE *f = fopen ("/proc/self/maps", "r"); + + if (f == NULL) + { + perror ("Failed to open /proc/self/maps"); + fprintf (stderr, "Skipping verification of DSO unload\n"); + return 0; + } + + char *line = NULL; + size_t s = 0; + while (getline (&line, &s, f) > 0) + { + if (strstr (line, "tst-tls-atexit-lib.so")) + { + printf ("DSO not unloaded yet:\n%s", line); + return 1; + } + } + free (line); + + return 0; +} diff --git a/string/Makefile b/string/Makefile index 44bbd0c843..0237edd735 100644 --- a/string/Makefile +++ b/string/Makefile @@ -41,10 +41,6 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ strcoll_l strxfrm_l string-inlines memrchr \ xpg-strerror strerror_l -# Gcc internally generates calls to unbounded memcpy and memset -# for -fbounded-pointer compiles. Glibc uses memchr for explicit checks. -o-objects.ob := memcpy.o memset.o memchr.o - strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \ stpcpy stpncpy strcat strchr strcmp strcpy strcspn \ strlen strncmp strncpy strpbrk strrchr strspn memmem \ @@ -75,8 +71,6 @@ CFLAGS-tst-strlen.c = -fno-builtin CFLAGS-stratcliff.c = -fno-builtin CFLAGS-test-ffs.c = -fno-builtin CFLAGS-tst-inlcall.c = -fno-builtin -CFLAGS-bug-strstr1.c = -fno-builtin -CFLAGS-bug-strcasestr1.c = -fno-builtin ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-svc.out diff --git a/string/Versions b/string/Versions index f145fd34a4..59bf35a3bd 100644 --- a/string/Versions +++ b/string/Versions @@ -7,8 +7,8 @@ libc { __bzero; __strtok_r; # functions used in other libraries - __stpncpy; __stpcpy; __strdup; __mempcpy; __strcasecmp; __strerror_r; - __ffs; + __ffs; __mempcpy; __stpncpy; __stpcpy; __strcasecmp; __strdup; + __strerror_r; # a* argz_add; argz_add_sep; argz_append; argz_count; argz_create; diff --git a/string/bits/string2.h b/string/bits/string2.h index 8b6a36fab5..94f5ee917f 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -21,7 +21,7 @@ # error "Never use <bits/string2.h> directly; include <string.h> instead." #endif -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ +#ifndef __NO_STRING_INLINES /* Unlike the definitions in the header <bits/string.h> the definitions contained here are not optimized down to assembler diff --git a/string/memchr.c b/string/memchr.c index d4c8457795..2427c4b4b6 100644 --- a/string/memchr.c +++ b/string/memchr.c @@ -47,11 +47,6 @@ #endif #include <sys/types.h> -#if HAVE_BP_SYM_H || defined _LIBC -#include <bp-sym.h> -#else -# define BP_SYM(sym) sym -#endif #undef memchr #undef __memchr @@ -203,6 +198,6 @@ __memchr (s, c_in, n) return 0; } #ifdef weak_alias -weak_alias (__memchr, BP_SYM (memchr)) +weak_alias (__memchr, memchr) #endif libc_hidden_builtin_def (memchr) diff --git a/string/memcmp.c b/string/memcmp.c index 2a73b1c31b..dd76145f03 100644 --- a/string/memcmp.c +++ b/string/memcmp.c @@ -88,9 +88,6 @@ typedef unsigned char byte; static int memcmp_bytes (op_t, op_t) __THROW; -# ifdef __GNUC__ -__inline -# endif static int memcmp_bytes (a, b) op_t a, b; diff --git a/string/mempcpy.c b/string/mempcpy.c index ba4d1c6bcd..c0d2448205 100644 --- a/string/mempcpy.c +++ b/string/mempcpy.c @@ -20,48 +20,14 @@ <http://www.gnu.org/licenses/>. */ #include <string.h> -#include <memcopy.h> -#include <pagecopy.h> #undef mempcpy #undef __mempcpy void * -__mempcpy (dstpp, srcpp, len) - void *dstpp; - const void *srcpp; - size_t len; +__mempcpy (void *dest, const void *src, size_t len) { - unsigned long int dstp = (long int) dstpp; - unsigned long int srcp = (long int) srcpp; - - /* Copy from the beginning to the end. */ - - /* If there not too few bytes to copy, use word copy. */ - if (len >= OP_T_THRES) - { - /* Copy just a few bytes to make DSTP aligned. */ - len -= (-dstp) % OPSIZ; - BYTE_COPY_FWD (dstp, srcp, (-dstp) % OPSIZ); - - /* Copy whole pages from SRCP to DSTP by virtual address manipulation, - as much as possible. */ - - PAGE_COPY_FWD_MAYBE (dstp, srcp, len, len); - - /* Copy from SRCP to DSTP taking advantage of the known alignment of - DSTP. Number of bytes remaining is put in the third argument, - i.e. in LEN. This number may vary from machine to machine. */ - - WORD_COPY_FWD (dstp, srcp, len, len); - - /* Fall out and copy the tail. */ - } - - /* There are just a few bytes to copy. Use byte memory operations. */ - BYTE_COPY_FWD (dstp, srcp, len); - - return (void *) dstp; + return memcpy (dest, src, len) + len; } libc_hidden_def (__mempcpy) weak_alias (__mempcpy, mempcpy) diff --git a/string/str-two-way.h b/string/str-two-way.h index 8912f24e57..1cc20ee47e 100644 --- a/string/str-two-way.h +++ b/string/str-two-way.h @@ -19,7 +19,7 @@ /* Before including this file, you need to include <string.h> (and <config.h> before that, if not part of libc), and define: - RESULT_TYPE A macro that expands to the return type. + RETURN_TYPE A macro that expands to the return type. AVAILABLE(h, h_l, j, n_l) A macro that returns nonzero if there are at least N_L bytes left starting at H[J]. @@ -37,7 +37,11 @@ The argument is an 'unsigned char'; the result must be an 'unsigned char' as well. - This file undefines the macros documented above, and defines + Other macros you may optionally define: + RET0_IF_0(a) Documented below at default definition. + CHECK_EOL Same. + + This file undefines the macros listed above, and defines LONG_NEEDLE_THRESHOLD. */ @@ -516,10 +520,8 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len, } #undef AVAILABLE -#undef AVAILABLE1 -#undef AVAILABLE2 -#undef AVAILABLE1_USES_J #undef CANON_ELEMENT #undef CMP_FUNC #undef RET0_IF_0 #undef RETURN_TYPE +#undef CHECK_EOL diff --git a/string/strcpy.c b/string/strcpy.c index a2bb8efcb3..b71f7536bc 100644 --- a/string/strcpy.c +++ b/string/strcpy.c @@ -18,7 +18,6 @@ #include <stddef.h> #include <string.h> #include <memcopy.h> -#include <bp-checks.h> #undef strcpy @@ -29,9 +28,8 @@ strcpy (dest, src) const char *src; { char c; - char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src); - const ptrdiff_t off = CHECK_BOUNDS_LOW (dest) - s - 1; - size_t n; + char *s = (char *) src; + const ptrdiff_t off = dest - s - 1; do { @@ -40,10 +38,6 @@ strcpy (dest, src) } while (c != '\0'); - n = s - src; - (void) CHECK_BOUNDS_HIGH (src + n); - (void) CHECK_BOUNDS_HIGH (dest + n); - return dest; } libc_hidden_builtin_def (strcpy) diff --git a/sysdeps/generic/bp-checks.h b/sysdeps/generic/bp-checks.h deleted file mode 100644 index cfff9155ec..0000000000 --- a/sysdeps/generic/bp-checks.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Bounded-pointer checking macros for C. - Copyright (C) 2000-2013 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Greg McGary <greg@mcgary.org> - - 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 _bp_checks_h_ -#define _bp_checks_h_ 1 - -#if __BOUNDED_POINTERS__ - -# define BOUNDS_VIOLATED (__builtin_trap (), 0) - -/* Verify that pointer's value >= low. Return pointer value. */ -# define CHECK_BOUNDS_LOW(ARG) \ - (((__ptrvalue (ARG) < __ptrlow (ARG)) && BOUNDS_VIOLATED), \ - __ptrvalue (ARG)) - -/* Verify that pointer's value < high. Return pointer value. */ -# define CHECK_BOUNDS_HIGH(ARG) \ - (((__ptrvalue (ARG) > __ptrhigh (ARG)) && BOUNDS_VIOLATED), \ - __ptrvalue (ARG)) - -# define _CHECK_N(ARG, N, COND) \ - (((COND) \ - && (__ptrvalue (ARG) < __ptrlow (ARG) \ - || __ptrvalue (ARG) + (N) > __ptrhigh (ARG)) \ - && BOUNDS_VIOLATED), \ - __ptrvalue (ARG)) - -extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned); - -# define _CHECK_STRING(ARG, COND) \ - (((COND) \ - && (__ptrvalue (ARG) < __ptrlow (ARG) \ - || !__ubp_memchr (__ptrvalue (ARG), '\0', \ - (__ptrhigh (ARG) - __ptrvalue (ARG)))) \ - && BOUNDS_VIOLATED), \ - __ptrvalue (ARG)) - -/* Check bounds of a pointer seated to an array of N objects. */ -# define CHECK_N(ARG, N) _CHECK_N ((ARG), (N), 1) -/* Same as CHECK_N, but tolerate ARG == NULL. */ -# define CHECK_N_NULL_OK(ARG, N) _CHECK_N ((ARG), (N), __ptrvalue (ARG)) - -/* Check bounds of a pointer seated to a single object. */ -# define CHECK_1(ARG) CHECK_N ((ARG), 1) -/* Same as CHECK_1, but tolerate ARG == NULL. */ -# define CHECK_1_NULL_OK(ARG) CHECK_N_NULL_OK ((ARG), 1) - -/* Check for NUL-terminator within string's bounds. */ -# define CHECK_STRING(ARG) _CHECK_STRING ((ARG), 1) -/* Same as CHECK_STRING, but tolerate ARG == NULL. */ -# define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG)) - -#else /* !__BOUNDED_POINTERS__ */ - -/* Do nothing if not compiling with -fbounded-pointers. */ - -# define BOUNDS_VIOLATED -# define CHECK_BOUNDS_LOW(ARG) (ARG) -# define CHECK_BOUNDS_HIGH(ARG) (ARG) -# define CHECK_1(ARG) (ARG) -# define CHECK_1_NULL_OK(ARG) (ARG) -# define CHECK_N(ARG, N) (ARG) -# define CHECK_N_NULL_OK(ARG, N) (ARG) -# define CHECK_STRING(ARG) (ARG) - -#endif /* !__BOUNDED_POINTERS__ */ - -#endif /* _bp_checks_h_ */ diff --git a/sysdeps/generic/frame.h b/sysdeps/generic/frame.h index e6dfc72f31..cae84ef3e2 100644 --- a/sysdeps/generic/frame.h +++ b/sysdeps/generic/frame.h @@ -18,6 +18,6 @@ struct layout { - void *__unbounded next; - void *__unbounded return_address; + void *next; + void *return_address; }; diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h index 57a9a468ad..ca3f0e430f 100644 --- a/sysdeps/generic/ldconfig.h +++ b/sysdeps/generic/ldconfig.h @@ -36,6 +36,7 @@ #define FLAG_X8664_LIBX32 0x0800 #define FLAG_ARM_LIBHF 0x0900 #define FLAG_AARCH64_LIB64 0x0a00 +#define FLAG_ARM_LIBSF 0x0b00 /* Name of auxiliary cache. */ #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache" @@ -83,12 +84,6 @@ extern int opt_verbose; extern int opt_format; /* Prototypes for a few program-wide used functions. */ -extern void *xmalloc (size_t n) - __attribute_malloc__ __attribute_alloc_size (1); -extern void *xcalloc (size_t n, size_t s) - __attribute_malloc__ __attribute_alloc_size (1, 2); -extern void *xrealloc (void *o, size_t n) - __attribute_malloc__ __attribute_alloc_size (2); -extern char *xstrdup (const char *) __attribute_malloc__; +#include <programs/xmalloc.h> #endif /* ! _LDCONFIG_H */ diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index d6350facd6..9944555dd3 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -538,7 +538,7 @@ struct rtld_global_ro EXTERN uintptr_t _dl_sysinfo; #endif -#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO +#ifdef NEED_DL_SYSINFO_DSO /* The vsyscall page is a virtual DSO pre-mapped by the kernel. This points to its ELF header. */ EXTERN const ElfW(Ehdr) *_dl_sysinfo_dso; @@ -1006,6 +1006,17 @@ extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) /* Show show of an object. */ extern void _dl_show_scope (struct link_map *new, int from); +extern struct link_map *_dl_find_dso_for_object (const ElfW(Addr) addr) + internal_function; +rtld_hidden_proto (_dl_find_dso_for_object) + +/* Initialization which is normally done by the dynamic linker. */ +extern void _dl_non_dynamic_init (void) internal_function; + +/* Used by static binaries to check the auxiliary vector. */ +extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function; + + __END_DECLS #endif /* ldsodefs.h */ diff --git a/sysdeps/generic/malloc-sysdep.h b/sysdeps/generic/malloc-sysdep.h index 3f7892b150..18980bc826 100644 --- a/sysdeps/generic/malloc-sysdep.h +++ b/sysdeps/generic/malloc-sysdep.h @@ -16,6 +16,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <stdbool.h> +#include <unistd.h> + /* Force an unmap when the heap shrinks in a secure exec. This ensures that the old data pages immediately cease to be accessible. */ static inline bool diff --git a/sysdeps/generic/math-tests.h b/sysdeps/generic/math-tests.h new file mode 100644 index 0000000000..76f738ee99 --- /dev/null +++ b/sysdeps/generic/math-tests.h @@ -0,0 +1,36 @@ +/* Configuration for math tests. Generic version. + Copyright (C) 2013 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/>. */ + +/* Indicate whether to run tests involving sNaN values for the float, double, + and long double C data types, respectively. All are run unless + overridden. */ +#ifndef SNAN_TESTS_float +# define SNAN_TESTS_float 1 +#endif +#ifndef SNAN_TESTS_double +# define SNAN_TESTS_double 1 +#endif +#ifndef SNAN_TESTS_long_double +# define SNAN_TESTS_long_double 1 +#endif + +/* Return nonzero value if to run tests involving sNaN values for X. */ +#define SNAN_TESTS(x) \ + (sizeof (x) == sizeof (float) ? SNAN_TESTS_float \ + : sizeof (x) == sizeof (double) ? SNAN_TESTS_double \ + : SNAN_TESTS_long_double) diff --git a/sysdeps/gnu/bits/msq.h b/sysdeps/gnu/bits/msq.h index 33f16a54e0..ca70acd52e 100644 --- a/sysdeps/gnu/bits/msq.h +++ b/sysdeps/gnu/bits/msq.h @@ -38,13 +38,13 @@ typedef unsigned short int msglen_t; struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__unbounded __msg_first; /* pointer to first message on queue */ - struct msg *__unbounded __msg_last; /* pointer to last message on queue */ + struct msg *__msg_first; /* pointer to first message on queue */ + struct msg *__msg_last; /* pointer to last message on queue */ __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgrcv command */ __time_t msg_ctime; /* time of last change */ - struct wait_queue *__unbounded __wwait; /* ??? */ - struct wait_queue *__unbounded __rwait; /* ??? */ + struct wait_queue *__wwait; /* ??? */ + struct wait_queue *__rwait; /* ??? */ unsigned short int __msg_cbytes;/* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ msglen_t msg_qbytes; /* max number of bytes allowed on queue */ diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure index 26327ca3b4..70aaa90191 100644 --- a/sysdeps/gnu/configure +++ b/sysdeps/gnu/configure @@ -9,12 +9,17 @@ case "$prefix" in /usr | /usr/) # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. - # Allow earlier configure scripts to handle libc_cv_slibdir, libdir, - # and libc_cv_localedir. + # Allow earlier configure scripts to handle libc_cv_slibdir, + # libc_cv_rtlddir, libdir, and libc_cv_localedir. test -n "$libc_cv_slibdir" || \ case $machine in sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64) libc_cv_slibdir=/lib64 + case $machine in + s390/s390-64) + libc_cv_rtlddir=/lib + ;; + esac if test "$libdir" = '${exec_prefix}/lib'; then libdir='${exec_prefix}/lib64'; # Locale data can be shared between 32bit and 64bit libraries diff --git a/sysdeps/gnu/configure.in b/sysdeps/gnu/configure.in index b8fd74cffc..ce251df0c5 100644 --- a/sysdeps/gnu/configure.in +++ b/sysdeps/gnu/configure.in @@ -9,12 +9,17 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. case "$prefix" in /usr | /usr/) # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. - # Allow earlier configure scripts to handle libc_cv_slibdir, libdir, - # and libc_cv_localedir. + # Allow earlier configure scripts to handle libc_cv_slibdir, + # libc_cv_rtlddir, libdir, and libc_cv_localedir. test -n "$libc_cv_slibdir" || \ case $machine in sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64) libc_cv_slibdir=/lib64 + case $machine in + s390/s390-64) + libc_cv_rtlddir=/lib + ;; + esac if test "$libdir" = '${exec_prefix}/lib'; then libdir='${exec_prefix}/lib64'; # Locale data can be shared between 32bit and 64bit libraries diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S index f5ac4e9a76..dddbe7dd1e 100644 --- a/sysdeps/i386/add_n.S +++ b/sysdeps/i386/add_n.S @@ -19,18 +19,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+8 /* space for 2 saved regs */ +#define PARMS 4+8 /* space for 2 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define S2 S1+PTR_SIZE -#define SIZE S2+PTR_SIZE +#define S1 RES+4 +#define S2 S1+4 +#define SIZE S2+4 .text -ENTRY (BP_SYM (__mpn_add_n)) - ENTER +ENTRY (__mpn_add_n) pushl %edi cfi_adjust_cfa_offset (4) @@ -43,13 +40,6 @@ ENTRY (BP_SYM (__mpn_add_n)) cfi_rel_offset (esi, 0) movl S2(%esp),%edx movl SIZE(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ecx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%edx, S2(%esp), %ecx) - shrl $2, %ecx -#endif movl %ecx,%eax shrl $3,%ecx /* compute count for unrolled loop */ negl %eax @@ -117,6 +107,5 @@ L(oop): movl (%esi),%eax cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_add_n)) +END (__mpn_add_n) diff --git a/sysdeps/i386/addmul_1.S b/sysdeps/i386/addmul_1.S index c18666fbef..ee2a78b470 100644 --- a/sysdeps/i386/addmul_1.S +++ b/sysdeps/i386/addmul_1.S @@ -19,13 +19,11 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define SIZE S1+PTR_SIZE +#define S1 RES+4 +#define SIZE S1+4 #define S2LIMB SIZE+4 #define res_ptr edi @@ -34,8 +32,7 @@ #define s2_limb ebx .text -ENTRY (BP_SYM (__mpn_addmul_1)) - ENTER +ENTRY (__mpn_addmul_1) pushl %res_ptr cfi_adjust_cfa_offset (4) @@ -53,12 +50,6 @@ ENTRY (BP_SYM (__mpn_addmul_1)) movl SIZE(%esp), %sizeP movl S2LIMB(%esp), %s2_limb cfi_rel_offset (s2_limb, 0) -#if __BOUNDED_POINTERS__ - shll $2, %sizeP /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP) - CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP) - shrl $2, %sizeP -#endif leal (%res_ptr,%sizeP,4), %res_ptr leal (%s1_ptr,%sizeP,4), %s1_ptr negl %sizeP @@ -91,6 +82,5 @@ L(oop): cfi_adjust_cfa_offset (-4) cfi_restore (res_ptr) - LEAVE ret -END (BP_SYM (__mpn_addmul_1)) +END (__mpn_addmul_1) diff --git a/sysdeps/i386/bp-asm.h b/sysdeps/i386/bp-asm.h deleted file mode 100644 index 2026b24f8b..0000000000 --- a/sysdeps/i386/bp-asm.h +++ /dev/null @@ -1,143 +0,0 @@ -/* Bounded-pointer definitions for x86 assembler. - Copyright (C) 2000-2013 Free Software Foundation, Inc. - Contributed by Greg McGary <greg@mcgary.org> - 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. - - 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 _bp_asm_h_ -# define _bp_asm_h_ 1 - -# if __ASSEMBLER__ - -# if __BOUNDED_POINTERS__ - -/* Bounded pointers occupy three words. */ -# define PTR_SIZE 12 -/* Bounded pointer return values are passed back through a hidden - argument that points to caller-allocate space. The hidden arg - occupies one word on the stack. */ -# define RTN_SIZE 4 -/* Although the caller pushes the hidden arg, the callee is - responsible for popping it. */ -# define RET_PTR ret $RTN_SIZE -/* Maintain frame pointer chain in leaf assembler functions for the benefit - of debugging stack traces when bounds violations occur. */ -# define ENTER pushl %ebp; movl %esp, %ebp -# define LEAVE movl %ebp, %esp; popl %ebp -/* Stack space overhead of procedure-call linkage: return address and - frame pointer. */ -# define LINKAGE 8 -/* Stack offset of return address after calling ENTER. */ -# define PCOFF 4 - -/* Int 5 is the "bound range" exception also raised by the "bound" - instruction. */ -# define BOUNDS_VIOLATED int $5 - -# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) \ - cmpl 4+BP_MEM, VAL_REG; \ - jae 0f; /* continue if value >= low */ \ - BOUNDS_VIOLATED; \ - 0: - -# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) \ - cmpl 8+BP_MEM, VAL_REG; \ - Jcc 0f; /* continue if value < high */ \ - BOUNDS_VIOLATED; \ - 0: - -# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) \ - cmpl 4+BP_MEM, VAL_REG; \ - jb 1f; /* die if value < low */ \ - cmpl 8+BP_MEM, VAL_REG; \ - jb 0f; /* continue if value < high */ \ - 1: BOUNDS_VIOLATED; \ - 0: - -# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) \ - CHECK_BOUNDS_LOW(VAL_REG, BP_MEM); \ - addl LENGTH, VAL_REG; \ - cmpl 8+BP_MEM, VAL_REG; \ - jbe 0f; /* continue if value <= high */ \ - BOUNDS_VIOLATED; \ - 0: subl LENGTH, VAL_REG /* restore value */ - -/* Take bounds from BP_MEM and affix them to the pointer - value in %eax, stuffing all into memory at RTN(%esp). - Use %edx as a scratch register. */ - -# define RETURN_BOUNDED_POINTER(BP_MEM) \ - movl RTN(%esp), %edx; \ - movl %eax, 0(%edx); \ - movl 4+BP_MEM, %eax; \ - movl %eax, 4(%edx); \ - movl 8+BP_MEM, %eax; \ - movl %eax, 8(%edx) - -# define RETURN_NULL_BOUNDED_POINTER \ - movl RTN(%esp), %edx; \ - movl %eax, 0(%edx); \ - movl %eax, 4(%edx); \ - movl %eax, 8(%edx) - -/* The caller of __errno_location is responsible for allocating space - for the three-word BP return-value and passing pushing its address - as an implicit first argument. */ -# define PUSH_ERRNO_LOCATION_RETURN \ - subl $8, %esp; \ - subl $4, %esp; \ - pushl %esp - -/* __errno_location is responsible for popping the implicit first - argument, but we must pop the space for the BP itself. We also - dereference the return value in order to dig out the pointer value. */ -# define POP_ERRNO_LOCATION_RETURN \ - popl %eax; \ - addl $8, %esp - -# else /* !__BOUNDED_POINTERS__ */ - -/* Unbounded pointers occupy one word. */ -# define PTR_SIZE 4 -/* Unbounded pointer return values are passed back in the register %eax. */ -# define RTN_SIZE 0 -/* Use simple return instruction for unbounded pointer values. */ -# define RET_PTR ret -/* Don't maintain frame pointer chain for leaf assembler functions. */ -# define ENTER -# define LEAVE -/* Stack space overhead of procedure-call linkage: return address only. */ -# define LINKAGE 4 -/* Stack offset of return address after calling ENTER. */ -# define PCOFF 0 - -# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) -# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) -# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) -# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) -# define RETURN_BOUNDED_POINTER(BP_MEM) - -# define RETURN_NULL_BOUNDED_POINTER - -# define PUSH_ERRNO_LOCATION_RETURN -# define POP_ERRNO_LOCATION_RETURN - -# endif /* !__BOUNDED_POINTERS__ */ - -# endif /* __ASSEMBLER__ */ - -#endif /* _bp_asm_h_ */ diff --git a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S index ae52283b86..54483fea56 100644 --- a/sysdeps/i386/bsd-_setjmp.S +++ b/sysdeps/i386/bsd-_setjmp.S @@ -22,20 +22,16 @@ #include <sysdep.h> #include <jmpbuf-offsets.h> -#include "bp-sym.h" -#include "bp-asm.h" #include <stap-probe.h> -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define JMPBUF PARMS -#define SIGMSK JMPBUF+PTR_SIZE +#define SIGMSK JMPBUF+4 -ENTRY (BP_SYM (_setjmp)) - ENTER +ENTRY (_setjmp) xorl %eax, %eax movl JMPBUF(%esp), %edx - CHECK_BOUNDS_BOTH_WIDE (%edx, JMPBUF(%esp), $(JB_SIZE+4)) /* Save registers. */ movl %ebx, (JB_BX*4)(%edx) @@ -46,16 +42,15 @@ ENTRY (BP_SYM (_setjmp)) PTR_MANGLE (%ecx) #endif movl %ecx, (JB_SP*4)(%edx) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ + movl 0(%esp), %ecx /* Save PC we are returning to now. */ LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx) #ifdef PTR_MANGLE PTR_MANGLE (%ecx) #endif movl %ecx, (JB_PC*4)(%edx) - LEAVE movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */ movl %eax, JB_SIZE(%edx) /* No signal mask set. */ ret -END (BP_SYM (_setjmp)) +END (_setjmp) libc_hidden_def (_setjmp) diff --git a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S index a845821233..b6daa8c036 100644 --- a/sysdeps/i386/bsd-setjmp.S +++ b/sysdeps/i386/bsd-setjmp.S @@ -22,22 +22,18 @@ #include <sysdep.h> #include <jmpbuf-offsets.h> -#include "bp-sym.h" -#include "bp-asm.h" #include <stap-probe.h> -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define JMPBUF PARMS -#define SIGMSK JMPBUF+PTR_SIZE +#define SIGMSK JMPBUF+4 -ENTRY (BP_SYM (setjmp)) +ENTRY (setjmp) /* Note that we have to use a non-exported symbol in the next jump since otherwise gas will emit it as a jump through the PLT which is what we cannot use here. */ - ENTER movl JMPBUF(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, JMPBUF(%esp), $JB_SIZE) /* Save registers. */ movl %ebx, (JB_BX*4)(%eax) @@ -48,13 +44,12 @@ ENTRY (BP_SYM (setjmp)) PTR_MANGLE (%ecx) #endif movl %ecx, (JB_SP*4)(%eax) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ + movl 0(%esp), %ecx /* Save PC we are returning to now. */ LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx) #ifdef PTR_MANGLE PTR_MANGLE (%ecx) #endif movl %ecx, (JB_PC*4)(%eax) - LEAVE /* pop frame pointer to prepare for tail-call. */ movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ /* Call __sigjmp_save. */ @@ -62,10 +57,10 @@ ENTRY (BP_SYM (setjmp)) cfi_adjust_cfa_offset (4) pushl 8(%esp) cfi_adjust_cfa_offset (4) - call BP_SYM (__sigjmp_save) + call __sigjmp_save popl %ecx cfi_adjust_cfa_offset (-4) popl %edx cfi_adjust_cfa_offset (-4) ret -END (BP_SYM (setjmp)) +END (setjmp) diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index 7b3683f600..d81b613a81 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -66,6 +66,8 @@ 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; } @@ -86,6 +88,8 @@ 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; } @@ -110,6 +114,8 @@ 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; } @@ -134,6 +140,8 @@ 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; } @@ -158,6 +166,8 @@ 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; } @@ -178,6 +188,8 @@ 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 "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in index 36cb3e46e0..9967a160ba 100644 --- a/sysdeps/i386/configure.in +++ b/sysdeps/i386/configure.in @@ -12,6 +12,7 @@ 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 @@ -19,6 +20,7 @@ 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 @@ -27,6 +29,7 @@ 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 @@ -37,6 +40,7 @@ LIBC_TRY_CC_OPTION([-msse2avx], 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 @@ -45,6 +49,7 @@ 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 @@ -52,6 +57,7 @@ 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 It is always possible to access static and hidden symbols in an dnl position independent way. diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index a1e40d8eb0..0b4c46736d 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -144,18 +144,16 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) #ifdef IN_DL_RUNTIME -# if !defined PROF && !__BOUNDED_POINTERS__ +# ifndef PROF /* We add a declaration of this function here so that in dl-runtime.c the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters in registers. We cannot use this scheme for profiling because the _mcount call destroys the passed register information. */ -/* GKM FIXME: Fix trampoline to pass bounds so we can do - without the `__unbounded' qualifier. */ #define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), stdcall, unused)) -extern ElfW(Addr) _dl_fixup (struct link_map *__unbounded l, +extern ElfW(Addr) _dl_fixup (struct link_map *l, ElfW(Word) reloc_offset) ARCH_FIXUP_ATTRIBUTE; extern ElfW(Addr) _dl_profile_fixup (struct link_map *l, diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c index df7fced10e..c650f9fe05 100644 --- a/sysdeps/i386/fpu/fegetenv.c +++ b/sysdeps/i386/fpu/fegetenv.c @@ -18,7 +18,6 @@ <http://www.gnu.org/licenses/>. */ #include <fenv.h> -#include <bp-sym.h> int __fegetenv (fenv_t *envp) @@ -36,8 +35,8 @@ __fegetenv (fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2); +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c index aee1ee0b3f..94178e13c9 100644 --- a/sysdeps/i386/fpu/fesetenv.c +++ b/sysdeps/i386/fpu/fesetenv.c @@ -19,7 +19,6 @@ #include <fenv.h> #include <assert.h> -#include <bp-sym.h> int @@ -80,8 +79,8 @@ __fesetenv (const fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, BP_SYM (__old_fesetenv), BP_SYM (fesetenv), GLIBC_2_1); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, BP_SYM (__fesetenv), BP_SYM (fesetenv), GLIBC_2_2); +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c index e3659798e7..b2a810add3 100644 --- a/sysdeps/i386/fpu/feupdateenv.c +++ b/sysdeps/i386/fpu/feupdateenv.c @@ -18,7 +18,6 @@ <http://www.gnu.org/licenses/>. */ #include <fenv.h> -#include <bp-sym.h> #include <unistd.h> #include <dl-procinfo.h> #include <ldsodefs.h> @@ -53,8 +52,8 @@ __feupdateenv (const fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif libm_hidden_ver (__feupdateenv, feupdateenv) -versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2); +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/i386/fpu/fsetexcptflg.c b/sysdeps/i386/fpu/fsetexcptflg.c index d197aaabb5..0c328272d7 100644 --- a/sysdeps/i386/fpu/fsetexcptflg.c +++ b/sysdeps/i386/fpu/fsetexcptflg.c @@ -19,7 +19,6 @@ #include <fenv.h> #include <math.h> -#include <bp-sym.h> #include <unistd.h> #include <ldsodefs.h> #include <dl-procinfo.h> @@ -64,7 +63,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, BP_SYM (__old_fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_1); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); #endif -versioned_symbol (libm, BP_SYM (__fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_2); +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index fd0180ffd6..5bf58273c9 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -275,18 +275,158 @@ ifloat: 1 Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0.0 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0.0 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.25 + 1.0 i) == 1.747098759571863549650000258275841544745 - 8.924633639033482359562124741744951972772e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0.25 + 1.0 i) == 1.747098759571863549650000258275841544745 - 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.25 - 1.0 i) == 1.747098759571863549650000258275841544745 + 8.924633639033482359562124741744951972772e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0.25 - 1.0 i) == 1.747098759571863549650000258275841544745 + 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0.5 + 1.0 i) == 1.920235389652109912858733517715121394831 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0.5 - 1.0 i) == 1.920235389652109912858733517715121394831 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000000002p0 + 0x1p-63 i) == 3.141592653377875508152537040020250564229 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (-0x1.0000000000000002p0 - 0x1p-63 i) == 3.141592653377875508152537040020250564229 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 + 0.0 i) == 3.141592653589793238462643383279502884197 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 + 0x1.fp-1025 i) == 3.141592653589793238462643383279502884197 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 + 0x1p-52 i) == 3.141592643999491532482601997450598791535 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 - 0.0 i) == 3.141592653589793238462643383279502884197 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 - 0x1.fp-1025 i) == 3.141592653589793238462643383279502884197 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 - 0x1p-52 i) == 3.141592643999491532482601997450598791535 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i) == 1.572134236154454360143880041170803681211 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i) == 1.572134236154454360143880041170803681211 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691640832196834 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691640832196834 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442101 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442101 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442101 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442101 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i) == 1.570796328070826603447840231892468927106 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i) == 1.570796328070826603447840231892468927106 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-1.0 + 0.5 i) == 2.466703808003786858297978415967328452322 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 + 0.5 i) == 2.466703808003786858297978415967328452322 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-30 i) == 3.141550174918818561961484385371624132331 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-1.0 - 0.5 i) == 2.466703808003786858297978415967328452322 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 - 0.5 i) == 2.466703808003786858297978415967328452322 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-30 i) == 3.141550174918818561961484385371624132331 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -315,16 +455,42 @@ ldouble: 1 Test "Imaginary part of: cacos (-1.5 - 0x1.fp-16385 i) == 3.141592653589793238462643383279502884197 + 9.624236501192068949955178268487368462704e-1 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0.0 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.0 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.25 + 1.0 i) == 1.394493894017929688812643125003661339452 - 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.25 - 1.0 i) == 1.394493894017929688812643125003661339452 + 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0.5 + 1.0 i) == 1.221357263937683325603909865564381489366 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0.5 - 1.0 i) == 1.221357263937683325603909865564381489366 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": float: 1 ifloat: 1 @@ -333,24 +499,164 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: cacos (0x1.0000000000000002p0 + 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000000002p0 + 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: cacos (0x1.0000000000000002p0 - 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000000002p0 - 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (0x1.0000000000001p0 + 0.0 i) == 0.0 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 + 0x1.fp-1025 i) == 2.557178503953494342609835913586108008322e-301 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0x1.0000000000001p0 + 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 + 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 - 0.0 i) == 0.0 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 - 0x1.fp-1025 i) == 2.557178503953494342609835913586108008322e-301 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0x1.0000000000001p0 - 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 - 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i) == 1.569458417435338878318763342108699202986 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i) == 1.569458417435338878318763342108699202986 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691638670687364 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691638670687364 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442097 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442097 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442097 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442097 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442097 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442097 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i) == 1.570796325518966635014803151387033957091 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i) == 1.570796325518966635014803151387033957091 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i": double: 1 idouble: 1 Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i": double: 1 idouble: 1 +Test "Real part of: cacos (1.0 + 0.5 i) == 6.748888455860063801646649673121744318756e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 + 0.5 i) == 6.748888455860063801646649673121744318756e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 + 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 - 4.350501469856803800217957402220976497152e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 + 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 - 4.247867098745151888768727039216644758847e-5 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (1.0 + 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 - 0.5 i) == 6.748888455860063801646649673121744318756e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 - 0.5 i) == 6.748888455860063801646649673121744318756e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 - 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 + 4.350501469856803800217957402220976497152e-2 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 - 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 + 4.247867098745151888768727039216644758847e-5 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (1.0 - 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -562,18 +868,196 @@ ifloat: 1 Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: casin (-0.0 + 0x1.000002p0 i) == -0.0 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.0 - 0x1.000002p0 i) == -0.0 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.25 + 1.0 i) == -1.763024327769669304186785666360901026468e-1 + 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.25 - 1.0 i) == -1.763024327769669304186785666360901026468e-1 - 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0.5 + 1.0 i) == -3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.5 + 1.0 i) == -3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0.5 - 1.0 i) == -3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.5 - 1.0 i) == -3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000000002p0 + 0x1p-63 i) == -1.570796326582978888921215348380499122131 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0x1.0000000000000002p0 - 0x1p-63 i) == -1.570796326582978888921215348380499122131 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0x1.0000000000001p0 + 0.0 i) == -1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 + 0x1.fp-1025 i) == -1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 + 0x1p-52 i) == -1.570796317204594913251280305810847349436 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 - 0.0 i) == -1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 - 0x1.fp-1025 i) == -1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 - 0x1p-52 i) == -1.570796317204594913251280305810847349436 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-10 + 1.0 i) == -1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-10 - 1.0 i) == -1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-100 + 1.0 i) == -1.080754735021050612990719608916167354321e-30 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.fp-100 - 1.0 i) == -1.080754735021050612990719608916167354321e-30 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.fp-1000 + 1.0 i) == -1.278589251976747242280879285935084814093e-301 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1000 - 1.0 i) == -1.278589251976747242280879285935084814093e-301 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.0 i) == -3.810492908885321743133304375216617626230e-309 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i) == -2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.0 i) == -3.810492908885321743133304375216617626230e-309 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i) == -2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (-0x1.fp-129 + 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 1.0 i) == -2.013062564695348242280482517399205554874e-39 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i) == -1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (-0x1.fp-129 - 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 1.0 i) == -2.013062564695348242280482517399205554874e-39 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i) == -1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (-0x1.fp-30 + 1.0 i) == -1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-30 + 1.0 i) == -1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1.fp-30 - 1.0 i) == -1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-30 - 1.0 i) == -1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1p-23 + 0x1.000002p0 i) == -8.429369199749229560964789467980644296420e-8 + 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (-0x1p-23 - 0x1.000002p0 i) == -8.429369199749229560964789467980644296420e-8 - 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (-0x1p-52 + 0x1.0000000000001p0 i) == -1.570092458683774885078102529858632363236e-16 + 8.813735870195431822418551933572982483664e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (-0x1p-52 - 0x1.0000000000001p0 i) == -1.570092458683774885078102529858632363236e-16 - 8.813735870195431822418551933572982483664e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (-0x1p-63 + 0x1.0000000000000002p0 i) == -7.666467083416870406778649849746878368519e-20 + 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1p-63 - 0x1.0000000000000002p0 i) == -7.666467083416870406778649849746878368519e-20 - 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 + 0.5 i) == -8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0.5 i) == -8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0x1.fp-30 i) == -1.570753848123921942730162693731872690232 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 - 0.5 i) == -8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0.5 i) == -8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0x1.fp-30 i) == -1.570753848123921942730162693731872690232 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -602,6 +1086,38 @@ ldouble: 1 Test "Imaginary part of: casin (-1.5 - 0x1.fp-16385 i) == -1.570796326794896619231321691639751442099 - 9.624236501192068949955178268487368462704e-1 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: casin (0.0 + 0x1.000002p0 i) == 0.0 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.0 - 0x1.000002p0 i) == 0.0 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.25 + 1.0 i) == 1.763024327769669304186785666360901026468e-1 + 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.25 - 1.0 i) == 1.763024327769669304186785666360901026468e-1 - 8.924633639033482359562124741744951972772e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.5 + 1.0 i) == 3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.5 + 1.0 i) == 3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.5 - 1.0 i) == 3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.5 - 1.0 i) == 3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 1 @@ -614,24 +1130,170 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Imaginary part of: casin (0x1.0000000000000002p0 + 0x1p-63 i) == 1.570796326582978888921215348380499122131 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (0x1.0000000000000002p0 - 0x1p-63 i) == 1.570796326582978888921215348380499122131 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (0x1.0000000000001p0 + 0.0 i) == 1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 + 0x1.fp-1025 i) == 1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 + 0x1p-52 i) == 1.570796317204594913251280305810847349436 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 - 0.0 i) == 1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 - 0x1.fp-1025 i) == 1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 - 0x1p-52 i) == 1.570796317204594913251280305810847349436 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-10 + 1.0 i) == 1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-10 - 1.0 i) == 1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-100 + 1.0 i) == 1.080754735021050612990719608916167354321e-30 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.fp-100 - 1.0 i) == 1.080754735021050612990719608916167354321e-30 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.fp-1000 + 1.0 i) == 1.278589251976747242280879285935084814093e-301 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp-1000 - 1.0 i) == 1.278589251976747242280879285935084814093e-301 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 + 1.0 i) == 3.810492908885321743133304375216617626230e-309 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i) == 2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 - 1.0 i) == 3.810492908885321743133304375216617626230e-309 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i) == 2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1.fp-129 + 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 1.0 i) == 2.013062564695348242280482517399205554874e-39 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i) == 1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1.fp-129 - 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 1.0 i) == 2.013062564695348242280482517399205554874e-39 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i) == 1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1.fp-30 + 1.0 i) == 1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-30 + 1.0 i) == 1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1.fp-30 - 1.0 i) == 1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-30 - 1.0 i) == 1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 + 7.107906849659093345062145442726115449315e2 i": double: 1 idouble: 1 Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 + 8.973081118419833726837456344608533993585e1 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1p-23 + 0x1.000002p0 i) == 8.429369199749229560964789467980644296420e-8 + 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (0x1p-23 - 0x1.000002p0 i) == 8.429369199749229560964789467980644296420e-8 - 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (0x1p-52 + 0x1.0000000000001p0 i) == 1.570092458683774885078102529858632363236e-16 + 8.813735870195431822418551933572982483664e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (0x1p-52 - 0x1.0000000000001p0 i) == 1.570092458683774885078102529858632363236e-16 - 8.813735870195431822418551933572982483664e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (0x1p-63 + 0x1.0000000000000002p0 i) == 7.666467083416870406778649849746878368519e-20 + 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1p-63 - 0x1.0000000000000002p0 i) == 7.666467083416870406778649849746878368519e-20 - 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 + 0.5 i) == 8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0.5 i) == 8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0x1.fp-30 i) == 1.570753848123921942730162693731872690232 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 - 0.5 i) == 8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0.5 i) == 8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0x1.fp-30 i) == 1.570753848123921942730162693731872690232 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -682,6 +1344,12 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.0 + 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0.0 - 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": double: 2 float: 1 @@ -689,6 +1357,16 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.5 + 1.0 i) == -7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0.5 + 1.0 i) == -7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": double: 2 float: 1 @@ -696,9 +1374,65 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.5 - 1.0 i) == -7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0.5 - 1.0 i) == -7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.0000000000000002p0 + 0x1p-63 i) == -8.813735870195430253092739958139610131001e-1 + 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.0000000000000002p0 - 0x1p-63 i) == -8.813735870195430253092739958139610131001e-1 - 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.0000000000001p0 + 0x1p-52 i) == -8.813735870195431822418551933572982483664e-1 + 1.570092458683774885078102529858632363236e-16 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (-0x1.0000000000001p0 - 0x1p-52 i) == -8.813735870195431822418551933572982483664e-1 - 1.570092458683774885078102529858632363236e-16 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-0x1.000002p0 + 0.0 i) == -8.813736713132375348727889167749389235161e-1 + 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.000002p0 + 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1p-23 i) == -8.813736713132400470205730751186547909968e-1 + 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.000002p0 - 0.0 i) == -8.813736713132375348727889167749389235161e-1 - 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.000002p0 - 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1p-23 i) == -8.813736713132400470205730751186547909968e-1 - 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.fp-1025 + 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0x1.fp-1025 + 1.5 i) == -9.624236501192068949955178268487368462704e-1 + 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0x1.fp-1025 - 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0x1.fp-1025 - 1.5 i) == -9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -714,6 +1448,24 @@ ldouble: 1 Test "Real part of: casinh (-0x1.fp-16385 - 1.5 i) == -9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0x1.fp-30 + 1.0 i) == -4.247867098745151888768727039216644758847e-5 + 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.fp-30 - 1.0 i) == -4.247867098745151888768727039216644758847e-5 - 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p-52 + 0x1.0000000000001p0 i) == -2.315303644582684770975188768022139415020e-8 + 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p-52 - 0x1.0000000000001p0 i) == -2.315303644582684770975188768022139415020e-8 - 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p-63 + 0x1.0000000000000002p0 i) == -5.116146586219826555037807251857670783420e-10 + 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-0x1p-63 - 0x1.0000000000000002p0 i) == -5.116146586219826555037807251857670783420e-10 - 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": double: 2 float: 1 @@ -721,6 +1473,50 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.0 + 0.25 i) == -8.924633639033482359562124741744951972772e-1 + 1.763024327769669304186785666360901026468e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0.5 i) == -9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0.5 i) == -9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-100 i) == -8.813735870195430252326093249797923090282e-1 + 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-1000 i) == -8.813735870195430252326093249797923090282e-1 + 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-1025 i) == -8.813735870195430252326093249797923090282e-1 + 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-129 i) == -8.813735870195430252326093249797923090282e-1 + 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": double: 2 float: 1 @@ -728,6 +1524,50 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.0 - 0.25 i) == -8.924633639033482359562124741744951972772e-1 - 1.763024327769669304186785666360901026468e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0.5 i) == -9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0.5 i) == -9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-100 i) == -8.813735870195430252326093249797923090282e-1 - 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-1000 i) == -8.813735870195430252326093249797923090282e-1 - 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-1025 i) == -8.813735870195430252326093249797923090282e-1 - 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-129 i) == -8.813735870195430252326093249797923090282e-1 - 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": double: 2 float: 1 @@ -764,6 +1604,12 @@ idouble: 3 ifloat: 6 ildouble: 5 ldouble: 5 +Test "Real part of: casinh (0.0 + 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.0 - 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": double: 1 float: 1 @@ -771,6 +1617,16 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0.5 + 1.0 i) == 7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.5 + 1.0 i) == 7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": double: 1 float: 1 @@ -778,6 +1634,16 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0.5 - 1.0 i) == 7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.5 - 1.0 i) == 7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -788,9 +1654,55 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: casinh (0x1.0000000000000002p0 + 0x1p-63 i) == 8.813735870195430253092739958139610131001e-1 + 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.0000000000000002p0 - 0x1p-63 i) == 8.813735870195430253092739958139610131001e-1 - 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.0000000000001p0 + 0x1p-52 i) == 8.813735870195431822418551933572982483664e-1 + 1.570092458683774885078102529858632363236e-16 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0x1.0000000000001p0 - 0x1p-52 i) == 8.813735870195431822418551933572982483664e-1 - 1.570092458683774885078102529858632363236e-16 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (0x1.000002p0 + 0.0 i) == 8.813736713132375348727889167749389235161e-1 + 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.000002p0 + 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1p-23 i) == 8.813736713132400470205730751186547909968e-1 + 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (0x1.000002p0 - 0.0 i) == 8.813736713132375348727889167749389235161e-1 - 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.000002p0 - 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1p-23 i) == 8.813736713132400470205730751186547909968e-1 - 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (0x1.fp-1025 + 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp-1025 + 1.5 i) == 9.624236501192068949955178268487368462704e-1 + 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0x1.fp-1025 - 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp-1025 - 1.5 i) == 9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -806,22 +1718,128 @@ ldouble: 1 Test "Real part of: casinh (0x1.fp-16385 - 1.5 i) == 9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0x1.fp-30 + 1.0 i) == 4.247867098745151888768727039216644758847e-5 + 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.fp-30 - 1.0 i) == 4.247867098745151888768727039216644758847e-5 - 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i) == 7.107906849659093345062145442726115449315e2 + 7.853981633974483096156608458198757210493e-1 i": double: 1 idouble: 1 Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i) == 8.973081118419833726837456344608533993585e1 + 7.853981633974483096156608458198757210493e-1 i": double: 1 idouble: 1 +Test "Real part of: casinh (0x1p-52 + 0x1.0000000000001p0 i) == 2.315303644582684770975188768022139415020e-8 + 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p-52 - 0x1.0000000000001p0 i) == 2.315303644582684770975188768022139415020e-8 - 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p-63 + 0x1.0000000000000002p0 i) == 5.116146586219826555037807251857670783420e-10 + 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (0x1p-63 - 0x1.0000000000000002p0 i) == 5.116146586219826555037807251857670783420e-10 - 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.0 + 0.25 i) == 8.924633639033482359562124741744951972772e-1 + 1.763024327769669304186785666360901026468e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0.5 i) == 9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0.5 i) == 9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-100 i) == 8.813735870195430252326093249797923090282e-1 + 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-1000 i) == 8.813735870195430252326093249797923090282e-1 + 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-1025 i) == 8.813735870195430252326093249797923090282e-1 + 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-129 i) == 8.813735870195430252326093249797923090282e-1 + 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.0 - 0.25 i) == 8.924633639033482359562124741744951972772e-1 - 1.763024327769669304186785666360901026468e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0.5 i) == 9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0.5 i) == 9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-100 i) == 8.813735870195430252326093249797923090282e-1 - 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-1000 i) == 8.813735870195430252326093249797923090282e-1 - 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-1025 i) == 8.813735870195430252326093249797923090282e-1 - 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-129 i) == 8.813735870195430252326093249797923090282e-1 - 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": double: 1 idouble: 1 @@ -2475,6 +3493,12 @@ ldouble: 2 Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": float: 1 ifloat: 1 +Test "j0 (0x1p1023) == -1.5665258060609012834424478437196679802783e-155": +double: 1 +idouble: 1 +Test "j0 (0x1p16382) == -1.2193782500509000574176799046642541129387e-2466": +ildouble: 1 +ldouble: 1 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 3 float: 1 @@ -2508,6 +3532,9 @@ ldouble: 1 Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": double: 1 idouble: 1 +Test "j1 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467": +ildouble: 1 +ldouble: 1 Test "j1 (10.0) == 0.0434727461688614366697487680258592883": double: 2 float: 1 @@ -3285,6 +4312,9 @@ idouble: 1 Test "y0 (0x1p-80) == -3.5375500319532942168707373066828113573541e+1": double: 1 idouble: 1 +Test "y0 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467": +ildouble: 1 +ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 @@ -3329,6 +4359,12 @@ ldouble: 1 Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02": float: 1 ifloat: 1 +Test "y1 (0x1p1023) == 1.5665258060609012834424478437196679802783e-155": +double: 1 +idouble: 1 +Test "y1 (0x1p16382) == 1.2193782500509000574176799046642541129387e-2466": +ildouble: 1 +ldouble: 1 Test "y1 (1.0) == -0.781212821300288716547150000047964821": double: 1 idouble: 1 diff --git a/sysdeps/i386/fpu/math-tests.h b/sysdeps/i386/fpu/math-tests.h new file mode 100644 index 0000000000..00c5f6c4d1 --- /dev/null +++ b/sysdeps/i386/fpu/math-tests.h @@ -0,0 +1,26 @@ +/* Configuration for math tests. 32-bit x86 version. + Copyright (C) 2013 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/>. */ + +/* On 32-bit x86, versions of GCC up to at least 4.8 are happy to use FPU load + instructions for sNaN values, and loading a float or double sNaN value will + already raise an INVALID exception as well as turn the sNaN into a qNaN, + rendering certain tests infeasible in this scenario. */ +#define SNAN_TESTS_float 0 +#define SNAN_TESTS_double 0 + +#include_next <math-tests.h> diff --git a/sysdeps/i386/fpu/s_frexp.S b/sysdeps/i386/fpu/s_frexp.S index 15dc70d489..037019e91c 100644 --- a/sysdeps/i386/fpu/s_frexp.S +++ b/sysdeps/i386/fpu/s_frexp.S @@ -18,8 +18,6 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> -#include "bp-sym.h" -#include "bp-asm.h" .section .rodata @@ -34,14 +32,13 @@ two54: .byte 0, 0, 0, 0, 0, 0, 0x50, 0x43 #define MO(op) op #endif -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define VAL0 PARMS #define VAL1 VAL0+4 #define EXPP VAL1+4 .text -ENTRY (BP_SYM (__frexp)) - ENTER +ENTRY (__frexp) movl VAL0(%esp), %ecx movl VAL1(%esp), %eax @@ -78,11 +75,9 @@ ENTRY (BP_SYM (__frexp)) /* Store %ecx in the variable pointed to by the second argument, get the factor from the stack and return. */ 1: movl EXPP(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, EXPP(%esp), $4) fldl VAL0(%esp) movl %ecx, (%eax) - LEAVE ret -END (BP_SYM (__frexp)) -weak_alias (BP_SYM (__frexp), BP_SYM (frexp)) +END (__frexp) +weak_alias (__frexp, frexp) diff --git a/sysdeps/i386/fpu/s_frexpf.S b/sysdeps/i386/fpu/s_frexpf.S index 53dcacff8a..f8d903d778 100644 --- a/sysdeps/i386/fpu/s_frexpf.S +++ b/sysdeps/i386/fpu/s_frexpf.S @@ -18,8 +18,6 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> -#include "bp-sym.h" -#include "bp-asm.h" .section .rodata @@ -34,13 +32,12 @@ two25: .byte 0, 0, 0, 0x4c #define MO(op) op #endif -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define VAL PARMS #define EXPP VAL+4 .text -ENTRY (BP_SYM (__frexpf)) - ENTER +ENTRY (__frexpf) movl VAL(%esp), %eax xorl %ecx, %ecx @@ -75,11 +72,9 @@ ENTRY (BP_SYM (__frexpf)) /* Store %ecx in the variable pointed to by the second argument, get the factor from the stack and return. */ 1: movl EXPP(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, EXPP(%esp), $4) flds VAL(%esp) movl %ecx, (%eax) - LEAVE ret -END (BP_SYM (__frexpf)) -weak_alias (BP_SYM (__frexpf), BP_SYM (frexpf)) +END (__frexpf) +weak_alias (__frexpf, frexpf) diff --git a/sysdeps/i386/fpu/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S index 21338a72bd..e32b4d5a10 100644 --- a/sysdeps/i386/fpu/s_frexpl.S +++ b/sysdeps/i386/fpu/s_frexpl.S @@ -18,8 +18,6 @@ <http://www.gnu.org/licenses/>. */ #include <machine/asm.h> -#include "bp-sym.h" -#include "bp-asm.h" .section .rodata @@ -34,15 +32,14 @@ two64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43 #define MO(op) op #endif -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define VAL0 PARMS #define VAL1 VAL0+4 #define VAL2 VAL1+4 #define EXPP VAL2+4 .text -ENTRY (BP_SYM (__frexpl)) - ENTER +ENTRY (__frexpl) movl VAL0(%esp), %ecx movl VAL2(%esp), %eax @@ -80,11 +77,9 @@ ENTRY (BP_SYM (__frexpl)) /* Store %ecx in the variable pointed to by the second argument, get the factor from the stack and return. */ 1: movl EXPP(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, EXPP(%esp), $4) fldt VAL0(%esp) movl %ecx, (%eax) - LEAVE ret -END (BP_SYM (__frexpl)) -weak_alias (BP_SYM (__frexpl), BP_SYM (frexpl)) +END (__frexpl) +weak_alias (__frexpl, frexpl) diff --git a/sysdeps/i386/fpu/s_remquo.S b/sysdeps/i386/fpu/s_remquo.S index 5056593214..341285db30 100644 --- a/sysdeps/i386/fpu/s_remquo.S +++ b/sysdeps/i386/fpu/s_remquo.S @@ -5,17 +5,14 @@ */ #include <machine/asm.h> -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define DVDND PARMS #define DVSOR DVDND+8 #define QUOP DVSOR+8 .text -ENTRY (BP_SYM (__remquo)) - ENTER +ENTRY (__remquo) fldl DVSOR(%esp) fldl DVDND(%esp) @@ -36,7 +33,6 @@ ENTRY (BP_SYM (__remquo)) shrl %cl, %eax andl $7, %eax movl QUOP(%esp), %ecx - CHECK_BOUNDS_BOTH_WIDE (%ecx, QUOP(%esp), $4) movl DVDND+4(%esp), %edx xorl DVSOR+4(%esp), %edx testl $0x80000000, %edx @@ -44,7 +40,6 @@ ENTRY (BP_SYM (__remquo)) negl %eax 1: movl %eax, (%ecx) - LEAVE ret -END (BP_SYM (__remquo)) -weak_alias (BP_SYM (__remquo), BP_SYM (remquo)) +END (__remquo) +weak_alias (__remquo, remquo) diff --git a/sysdeps/i386/fpu/s_remquof.S b/sysdeps/i386/fpu/s_remquof.S index d3c5965be4..62063f068f 100644 --- a/sysdeps/i386/fpu/s_remquof.S +++ b/sysdeps/i386/fpu/s_remquof.S @@ -5,17 +5,14 @@ */ #include <machine/asm.h> -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define DVDND PARMS #define DVSOR DVDND+4 #define QUOP DVSOR+4 .text -ENTRY (BP_SYM (__remquof)) - ENTER +ENTRY (__remquof) flds DVSOR(%esp) flds DVDND(%esp) @@ -36,7 +33,6 @@ ENTRY (BP_SYM (__remquof)) shrl %cl, %eax andl $7, %eax movl QUOP(%esp), %ecx - CHECK_BOUNDS_BOTH_WIDE (%ecx, QUOP(%esp), $4) movl DVDND(%esp), %edx xorl DVSOR(%esp), %edx testl $0x80000000, %edx @@ -44,7 +40,6 @@ ENTRY (BP_SYM (__remquof)) negl %eax 1: movl %eax, (%ecx) - LEAVE ret -END (BP_SYM (__remquof)) -weak_alias (BP_SYM (__remquof), BP_SYM (remquof)) +END (__remquof) +weak_alias (__remquof, remquof) diff --git a/sysdeps/i386/fpu/s_remquol.S b/sysdeps/i386/fpu/s_remquol.S index 65240adbe4..f3d84fc7c2 100644 --- a/sysdeps/i386/fpu/s_remquol.S +++ b/sysdeps/i386/fpu/s_remquol.S @@ -5,17 +5,14 @@ */ #include <machine/asm.h> -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define DVDND PARMS #define DVSOR DVDND+12 #define QUOP DVSOR+12 .text -ENTRY (BP_SYM (__remquol)) - ENTER +ENTRY (__remquol) fldt DVSOR(%esp) fldt DVDND(%esp) @@ -36,7 +33,6 @@ ENTRY (BP_SYM (__remquol)) shrl %cl, %eax andl $7, %eax movl QUOP(%esp), %ecx - CHECK_BOUNDS_BOTH_WIDE (%ecx, QUOP(%esp), $4) movl DVDND+8(%esp), %edx xorl DVSOR+8(%esp), %edx testl $0x8000, %edx @@ -44,7 +40,6 @@ ENTRY (BP_SYM (__remquol)) negl %eax 1: movl %eax, (%ecx) - LEAVE ret -END (BP_SYM (__remquol)) -weak_alias (BP_SYM (__remquol), BP_SYM (remquol)) +END (__remquol) +weak_alias (__remquol, remquol) diff --git a/sysdeps/i386/i486/strcat.S b/sysdeps/i386/i486/strcat.S index 6549b5c162..7d45862a2a 100644 --- a/sysdeps/i386/i486/strcat.S +++ b/sysdeps/i386/i486/strcat.S @@ -21,25 +21,20 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 .text -ENTRY (BP_SYM (strcat)) - ENTER +ENTRY (strcat) pushl %edi /* Save callee-safe register. */ cfi_adjust_cfa_offset (4) movl DEST(%esp), %edx movl SRC(%esp), %ecx - CHECK_BOUNDS_LOW (%edx, DEST(%esp)) - CHECK_BOUNDS_LOW (%ecx, SRC(%esp)) testb $0xff, (%ecx) /* Is source string empty? */ jz L(8) /* yes => return */ @@ -260,14 +255,11 @@ L(9): movb %al, (%ecx,%edx) /* store first byte of last word */ movb %ah, 3(%ecx,%edx) /* store fourth byte of last word */ -L(8): /* GKM FIXME: check high bounds */ - movl DEST(%esp), %eax /* start address of destination is result */ - RETURN_BOUNDED_POINTER (DEST(%esp)) +L(8): movl DEST(%esp), %eax /* start address of destination is result */ popl %edi /* restore saved register */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (strcat)) + ret +END (strcat) libc_hidden_builtin_def (strcat) diff --git a/sysdeps/i386/i486/strlen.S b/sysdeps/i386/i486/strlen.S index 743918044e..67bee4eb2b 100644 --- a/sysdeps/i386/i486/strlen.S +++ b/sysdeps/i386/i486/strlen.S @@ -20,18 +20,14 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define STR PARMS .text -ENTRY (BP_SYM (strlen)) - ENTER +ENTRY (strlen) movl STR(%esp), %ecx - CHECK_BOUNDS_LOW (%ecx, STR(%esp)) movl %ecx, %eax /* duplicate it */ andl $3, %ecx /* mask alignment bits */ @@ -129,10 +125,8 @@ L(3): testb %cl, %cl /* is first byte NUL? */ jz L(2) /* yes => return pointer */ incl %eax /* increment pointer */ -L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - subl STR(%esp), %eax /* compute difference to string start */ +L(2): subl STR(%esp), %eax /* compute difference to string start */ - LEAVE ret -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/i386/i586/add_n.S b/sysdeps/i386/i586/add_n.S index 395c4b78f4..2d6161fa92 100644 --- a/sysdeps/i386/i586/add_n.S +++ b/sysdeps/i386/i586/add_n.S @@ -19,18 +19,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define S2 S1+PTR_SIZE -#define SIZE S2+PTR_SIZE +#define S1 RES+4 +#define S2 S1+4 +#define SIZE S2+4 .text -ENTRY (BP_SYM (__mpn_add_n)) - ENTER +ENTRY (__mpn_add_n) pushl %edi cfi_adjust_cfa_offset (4) @@ -48,13 +45,6 @@ ENTRY (BP_SYM (__mpn_add_n)) movl S2(%esp),%ebx cfi_rel_offset (ebx, 0) movl SIZE(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ecx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%ebx, S2(%esp), %ecx) - shrl $2, %ecx -#endif movl (%ebx),%ebp cfi_rel_offset (ebp, 4) @@ -149,6 +139,5 @@ L(end2): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_add_n)) +END (__mpn_add_n) diff --git a/sysdeps/i386/i586/addmul_1.S b/sysdeps/i386/i586/addmul_1.S index faf862502a..e18e405306 100644 --- a/sysdeps/i386/i586/addmul_1.S +++ b/sysdeps/i386/i586/addmul_1.S @@ -19,13 +19,11 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define SIZE S1+PTR_SIZE +#define S1 RES+4 +#define SIZE S1+4 #define S2LIMB SIZE+4 #define res_ptr edi @@ -34,8 +32,7 @@ #define s2_limb ebx .text -ENTRY (BP_SYM (__mpn_addmul_1)) - ENTER +ENTRY (__mpn_addmul_1) pushl %res_ptr cfi_adjust_cfa_offset (4) @@ -53,12 +50,6 @@ ENTRY (BP_SYM (__mpn_addmul_1)) movl SIZE(%esp), %size movl S2LIMB(%esp), %s2_limb cfi_rel_offset (s2_limb, 0) -#if __BOUNDED_POINTERS__ - shll $2, %size /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size) - CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size) - shrl $2, %size -#endif leal (%res_ptr,%size,4), %res_ptr leal (%s1_ptr,%size,4), %s1_ptr negl %size @@ -98,7 +89,6 @@ L(oop): adcl $0, %ebp cfi_adjust_cfa_offset (-4) cfi_restore (res_ptr) - LEAVE ret #undef size -END (BP_SYM (__mpn_addmul_1)) +END (__mpn_addmul_1) diff --git a/sysdeps/i386/i586/bzero.S b/sysdeps/i386/i586/bzero.S index 220aa47c3f..84d2f709c1 100644 --- a/sysdeps/i386/i586/bzero.S +++ b/sysdeps/i386/i586/bzero.S @@ -1,3 +1,3 @@ #define memset __bzero #include <sysdeps/i386/i586/memset.S> -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) +weak_alias (__bzero, bzero) diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S index 461e32dbe7..cda3aecef4 100644 --- a/sysdeps/i386/i586/lshift.S +++ b/sysdeps/i386/i586/lshift.S @@ -18,18 +18,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S RES+PTR_SIZE -#define SIZE S+PTR_SIZE +#define S RES+4 +#define SIZE S+4 #define CNT SIZE+4 .text -ENTRY (BP_SYM (__mpn_lshift)) - ENTER +ENTRY (__mpn_lshift) pushl %edi cfi_adjust_cfa_offset (4) @@ -48,12 +45,6 @@ ENTRY (BP_SYM (__mpn_lshift)) movl SIZE(%esp),%ebx cfi_rel_offset (ebx, 0) movl CNT(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ebx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ebx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S(%esp), %ebx) - shrl $2, %ebx -#endif /* We can use faster code for shift-by-1 under certain conditions. */ cmp $1,%ecx @@ -155,7 +146,6 @@ L(end2): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret /* We loop from least significant end of the arrays, which is only @@ -261,6 +251,5 @@ L(L1): movl %edx,(%edi) /* store last limb */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_lshift)) +END (__mpn_lshift) diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S index 206715482d..49f165241c 100644 --- a/sysdeps/i386/i586/memcpy.S +++ b/sysdeps/i386/i586/memcpy.S @@ -19,19 +19,17 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.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 LINKAGE+8 /* space for 2 saved regs */ +#define PARMS 4+8 /* space for 2 saved regs */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE -#define LEN SRC+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 +#define LEN SRC+4 .text #if defined PIC && !defined NOT_IN_libc @@ -41,8 +39,7 @@ ENTRY (__memcpy_chk) jb HIDDEN_JUMPTARGET (__chk_fail) END (__memcpy_chk) #endif -ENTRY (BP_SYM (memcpy)) - ENTER +ENTRY (memcpy) pushl %edi cfi_adjust_cfa_offset (4) @@ -54,8 +51,6 @@ ENTRY (BP_SYM (memcpy)) movl SRC(%esp), %esi cfi_rel_offset (esi, 0) movl LEN(%esp), %ecx - CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, SRC(%esp), %ecx) movl %edi, %eax /* We need this in any case. */ @@ -127,9 +122,8 @@ L(1): rep; movsb cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (memcpy)) + ret +END (memcpy) #if !MEMPCPY_P libc_hidden_builtin_def (memcpy) #endif diff --git a/sysdeps/i386/i586/mempcpy.S b/sysdeps/i386/i586/mempcpy.S index f492be7ca0..afc112d9d7 100644 --- a/sysdeps/i386/i586/mempcpy.S +++ b/sysdeps/i386/i586/mempcpy.S @@ -2,6 +2,6 @@ #define __memcpy_chk __mempcpy_chk #include <sysdeps/i386/i586/memcpy.S> -libc_hidden_def (BP_SYM (__mempcpy)) -weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy)) +libc_hidden_def (__mempcpy) +weak_alias (__mempcpy, mempcpy) libc_hidden_builtin_def (mempcpy) diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S index 07cd27fbcb..c194b102d7 100644 --- a/sysdeps/i386/i586/memset.S +++ b/sysdeps/i386/i586/memset.S @@ -20,19 +20,17 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */ #define BZERO_P (defined memset) -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS -#define DEST RTN+RTN_SIZE +#define DEST RTN #if BZERO_P -# define LEN DEST+PTR_SIZE +# define LEN DEST+4 #else -# define CHR DEST+PTR_SIZE +# define CHR DEST+4 # define LEN CHR+4 #endif @@ -44,8 +42,7 @@ ENTRY (__memset_chk) jb HIDDEN_JUMPTARGET (__chk_fail) END (__memset_chk) #endif -ENTRY (BP_SYM (memset)) - ENTER +ENTRY (memset) pushl %edi cfi_adjust_cfa_offset (4) @@ -53,7 +50,6 @@ ENTRY (BP_SYM (memset)) movl DEST(%esp), %edi cfi_rel_offset (edi, 0) movl LEN(%esp), %edx - CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %edx) #if BZERO_P xorl %eax, %eax /* we fill with 0 */ #else @@ -111,17 +107,15 @@ L(2): shrl $2, %ecx /* convert byte count to longword count */ #if !BZERO_P /* Load result (only if used as memset). */ movl DEST(%esp), %eax /* start address of destination is result */ - RETURN_BOUNDED_POINTER (DEST(%esp)) #endif popl %edi cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE #if BZERO_P ret #else - RET_PTR + ret #endif -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S index 0026293188..f5bbea2b58 100644 --- a/sysdeps/i386/i586/mul_1.S +++ b/sysdeps/i386/i586/mul_1.S @@ -19,13 +19,11 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define SIZE S1+PTR_SIZE +#define S1 RES+4 +#define SIZE S1+4 #define S2LIMB SIZE+4 #define res_ptr edi @@ -34,8 +32,7 @@ #define s2_limb ebx .text -ENTRY (BP_SYM (__mpn_mul_1)) - ENTER +ENTRY (__mpn_mul_1) pushl %res_ptr cfi_adjust_cfa_offset (4) @@ -53,12 +50,6 @@ ENTRY (BP_SYM (__mpn_mul_1)) movl SIZE(%esp), %size movl S2LIMB(%esp), %s2_limb cfi_rel_offset (s2_limb, 0) -#if __BOUNDED_POINTERS__ - shll $2, %size /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size) - CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size) - shrl $2, %size -#endif leal (%res_ptr,%size,4), %res_ptr leal (%s1_ptr,%size,4), %s1_ptr negl %size @@ -94,7 +85,6 @@ L(oop): adcl $0, %ebp cfi_adjust_cfa_offset (-4) cfi_restore (res_ptr) - LEAVE ret #undef size -END (BP_SYM (__mpn_mul_1)) +END (__mpn_mul_1) diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S index c5438ffc9e..37eff12f3c 100644 --- a/sysdeps/i386/i586/rshift.S +++ b/sysdeps/i386/i586/rshift.S @@ -18,18 +18,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S RES+PTR_SIZE -#define SIZE S+PTR_SIZE +#define S RES+4 +#define SIZE S+4 #define CNT SIZE+4 .text -ENTRY (BP_SYM (__mpn_rshift)) - ENTER +ENTRY (__mpn_rshift) pushl %edi cfi_adjust_cfa_offset (4) @@ -48,12 +45,6 @@ ENTRY (BP_SYM (__mpn_rshift)) movl SIZE(%esp),%ebx cfi_rel_offset (ebx, 0) movl CNT(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ebx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ebx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S(%esp), %ebx) - shrl $2, %ebx -#endif /* We can use faster code for shift-by-1 under certain conditions. */ cmp $1,%ecx @@ -152,7 +143,6 @@ L(end2): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret /* We loop from least significant end of the arrays, which is only @@ -261,6 +251,5 @@ L(L1): movl %edx,(%edi) /* store last limb */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_rshift)) +END (__mpn_rshift) diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S index d005b164f3..648d52830d 100644 --- a/sysdeps/i386/i586/strchr.S +++ b/sysdeps/i386/i586/strchr.S @@ -20,8 +20,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* This version is especially optimized for the i586 (and following?) processors. This is mainly done by using the two pipelines. The @@ -36,14 +34,13 @@ /* The magic value which is used throughout in the whole code. */ #define magic 0xfefefeff -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define CHR STR+PTR_SIZE +#define STR RTN +#define CHR STR+4 .text -ENTRY (BP_SYM (strchr)) - ENTER +ENTRY (strchr) pushl %edi /* Save callee-safe registers. */ cfi_adjust_cfa_offset (-4) @@ -57,7 +54,6 @@ ENTRY (BP_SYM (strchr)) movl STR(%esp), %eax movl CHR(%esp), %edx - CHECK_BOUNDS_LOW (%eax, STR(%esp)) movl %eax, %edi /* duplicate string pointer for later */ cfi_rel_offset (edi, 12) @@ -82,7 +78,7 @@ ENTRY (BP_SYM (strchr)) jp L(0) /* exactly two bits set */ xorb (%eax), %cl /* is byte the one we are looking for? */ - jz L(2) /* yes => return pointer */ + jz L(out) /* yes => return pointer */ xorb %dl, %cl /* load single byte and test for NUL */ je L(3) /* yes => return NULL */ @@ -91,7 +87,7 @@ ENTRY (BP_SYM (strchr)) incl %eax cmpb %cl, %dl /* is byte == C? */ - je L(2) /* aligned => return pointer */ + je L(out) /* aligned => return pointer */ cmpb $0, %cl /* is byte NUL? */ je L(3) /* yes => return NULL */ @@ -104,7 +100,7 @@ ENTRY (BP_SYM (strchr)) L(0): movb (%eax), %cl /* load single byte */ cmpb %cl, %dl /* is byte == C? */ - je L(2) /* aligned => return pointer */ + je L(out) /* aligned => return pointer */ cmpb $0, %cl /* is byte NUL? */ je L(3) /* yes => return NULL */ @@ -274,23 +270,21 @@ L(1): xorl %ecx, %ebp /* (word^magic) */ L(5): subl $4, %eax /* adjust pointer */ testb %bl, %bl /* first byte == C? */ - jz L(2) /* yes => return pointer */ + jz L(out) /* yes => return pointer */ incl %eax /* increment pointer */ testb %bh, %bh /* second byte == C? */ - jz L(2) /* yes => return pointer */ + jz L(out) /* yes => return pointer */ shrl $16, %ebx /* make upper bytes accessible */ incl %eax /* increment pointer */ cmp $0, %bl /* third byte == C */ - je L(2) /* yes => return pointer */ + je L(out) /* yes => return pointer */ incl %eax /* increment pointer */ -L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - RETURN_BOUNDED_POINTER (STR(%esp)) L(out): popl %ebp /* restore saved registers */ cfi_adjust_cfa_offset (-4) cfi_restore (ebp) @@ -305,8 +299,7 @@ L(out): popl %ebp /* restore saved registers */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR + ret cfi_adjust_cfa_offset (16) cfi_rel_offset (edi, 12) @@ -318,7 +311,7 @@ L(out): popl %ebp /* restore saved registers */ L(4): subl $4, %eax /* adjust pointer */ cmpb %dl, %cl /* first byte == C? */ - je L(2) /* yes => return pointer */ + je L(out) /* yes => return pointer */ cmpb $0, %cl /* first byte == NUL? */ je L(3) /* yes => return NULL */ @@ -326,7 +319,7 @@ L(4): subl $4, %eax /* adjust pointer */ incl %eax /* increment pointer */ cmpb %dl, %ch /* second byte == C? */ - je L(2) /* yes => return pointer */ + je L(out) /* yes => return pointer */ cmpb $0, %ch /* second byte == NUL? */ je L(3) /* yes => return NULL */ @@ -335,7 +328,7 @@ L(4): subl $4, %eax /* adjust pointer */ incl %eax /* increment pointer */ cmpb %dl, %cl /* third byte == C? */ - je L(2) /* yes => return pointer */ + je L(out) /* yes => return pointer */ cmpb $0, %cl /* third byte == NUL? */ je L(3) /* yes => return NULL */ @@ -344,13 +337,12 @@ L(4): subl $4, %eax /* adjust pointer */ /* The test four the fourth byte is necessary! */ cmpb %dl, %ch /* fourth byte == C? */ - je L(2) /* yes => return pointer */ + je L(out) /* yes => return pointer */ L(3): xorl %eax, %eax - RETURN_NULL_BOUNDED_POINTER jmp L(out) -END (BP_SYM (strchr)) +END (strchr) #undef index -weak_alias (BP_SYM (strchr), BP_SYM (index)) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/i386/i586/strcpy.S b/sysdeps/i386/i586/strcpy.S index af23bf5a26..c940369342 100644 --- a/sysdeps/i386/i586/strcpy.S +++ b/sysdeps/i386/i586/strcpy.S @@ -19,13 +19,11 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+12 /* space for 3 saved regs */ +#define PARMS 4+12 /* space for 3 saved regs */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 #ifndef USE_AS_STPCPY # define STRCPY strcpy @@ -34,8 +32,7 @@ #define magic 0xfefefeff .text -ENTRY (BP_SYM (STRCPY)) - ENTER +ENTRY (STRCPY) pushl %edi cfi_adjust_cfa_offset (4) @@ -48,8 +45,6 @@ ENTRY (BP_SYM (STRCPY)) cfi_rel_offset (edi, 8) movl SRC(%esp), %esi cfi_rel_offset (esi, 4) - CHECK_BOUNDS_LOW (%edi, DEST(%esp)) - CHECK_BOUNDS_LOW (%esi, SRC(%esp)) xorl %eax, %eax leal -1(%esi), %ecx @@ -152,13 +147,11 @@ L(4): movb %dl, (%edi) L(end): movb %ah, (%edi) L(end2): - /* GKM FIXME: check high bounds */ #ifdef USE_AS_STPCPY movl %edi, %eax #else movl DEST(%esp), %eax #endif - RETURN_BOUNDED_POINTER (DEST(%esp)) popl %ebx cfi_adjust_cfa_offset (-4) cfi_restore (ebx) @@ -169,9 +162,8 @@ L(end2): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (STRCPY)) + ret +END (STRCPY) #ifndef USE_AS_STPCPY libc_hidden_builtin_def (strcpy) #endif diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S index a145cb5684..b50fffa1fb 100644 --- a/sysdeps/i386/i586/strlen.S +++ b/sysdeps/i386/i586/strlen.S @@ -20,8 +20,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* This version is especially optimized for the i586 (and following?) processors. This is mainly done by using the two pipelines. The @@ -36,15 +34,13 @@ /* The magic value which is used throughout in the whole code. */ #define magic 0xfefefeff -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define STR PARMS .text -ENTRY (BP_SYM (strlen)) - ENTER +ENTRY (strlen) movl STR(%esp), %eax - CHECK_BOUNDS_LOW (%eax, STR(%esp)) movl $3, %edx /* load mask (= 3) */ andl %eax, %edx /* separate last two bits of address */ @@ -178,11 +174,9 @@ L(3): subl $4, %eax /* correct too early pointer increment */ incl %eax /* increment pointer */ -L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - subl STR(%esp), %eax /* now compute the length as difference +L(2): subl STR(%esp), %eax /* now compute the length as difference between start and terminating NUL character */ - LEAVE ret -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/i386/i586/sub_n.S b/sysdeps/i386/i586/sub_n.S index 5d3c70235e..3b40ff3e42 100644 --- a/sysdeps/i386/i586/sub_n.S +++ b/sysdeps/i386/i586/sub_n.S @@ -19,18 +19,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define S2 S1+PTR_SIZE -#define SIZE S2+PTR_SIZE +#define S1 RES+4 +#define S2 S1+4 +#define SIZE S2+4 .text -ENTRY (BP_SYM (__mpn_sub_n)) - ENTER +ENTRY (__mpn_sub_n) pushl %edi cfi_adjust_cfa_offset (4) @@ -48,13 +45,6 @@ ENTRY (BP_SYM (__mpn_sub_n)) movl S2(%esp),%ebx cfi_rel_offset (ebx, 0) movl SIZE(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ecx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%ebx, S2(%esp), %ecx) - shrl $2, %ecx -#endif movl (%ebx),%ebp cfi_rel_offset (ebp, 4) @@ -149,6 +139,5 @@ L(end2): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_sub_n)) +END (__mpn_sub_n) diff --git a/sysdeps/i386/i586/submul_1.S b/sysdeps/i386/i586/submul_1.S index 8e2b41a35e..97a9048d9f 100644 --- a/sysdeps/i386/i586/submul_1.S +++ b/sysdeps/i386/i586/submul_1.S @@ -19,13 +19,11 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define SIZE S1+PTR_SIZE +#define S1 RES+4 +#define SIZE S1+4 #define S2LIMB SIZE+4 #define res_ptr edi @@ -34,8 +32,7 @@ #define s2_limb ebx .text -ENTRY (BP_SYM (__mpn_submul_1)) - ENTER +ENTRY (__mpn_submul_1) pushl %res_ptr cfi_adjust_cfa_offset (4) @@ -53,12 +50,6 @@ ENTRY (BP_SYM (__mpn_submul_1)) movl SIZE(%esp), %size movl S2LIMB(%esp), %s2_limb cfi_rel_offset (s2_limb, 0) -#if __BOUNDED_POINTERS__ - shll $2, %sizeP /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP) - CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP) - shrl $2, %sizeP -#endif leal (%res_ptr,%size,4), %res_ptr leal (%s1_ptr,%size,4), %s1_ptr negl %size @@ -98,7 +89,6 @@ L(oop): adcl $0, %ebp cfi_adjust_cfa_offset (-4) cfi_restore (res_ptr) - LEAVE ret #undef size -END (BP_SYM (__mpn_submul_1)) +END (__mpn_submul_1) diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile index e6b2924584..01c2917892 100644 --- a/sysdeps/i386/i686/Makefile +++ b/sysdeps/i386/i686/Makefile @@ -15,13 +15,11 @@ CFLAGS-.o += -Wa,-mtune=i686 CFLAGS-.os += -Wa,-mtune=i686 CFLAGS-.op += -Wa,-mtune=i686 CFLAGS-.og += -Wa,-mtune=i686 -CFLAGS-.ob += -Wa,-mtune=i686 CFLAGS-.oS += -Wa,-mtune=i686 ASFLAGS-.o += -Wa,-mtune=i686 ASFLAGS-.os += -Wa,-mtune=i686 ASFLAGS-.op += -Wa,-mtune=i686 ASFLAGS-.og += -Wa,-mtune=i686 -ASFLAGS-.ob += -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 5e91aad741..1e2cdc550c 100644 --- a/sysdeps/i386/i686/add_n.S +++ b/sysdeps/i386/i686/add_n.S @@ -19,22 +19,19 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+8 /* space for 2 saved regs */ +#define PARMS 4+8 /* space for 2 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define S2 S1+PTR_SIZE -#define SIZE S2+PTR_SIZE +#define S1 RES+4 +#define S2 S1+4 +#define SIZE S2+4 .text #ifdef PIC L(1): addl (%esp), %eax ret #endif -ENTRY (BP_SYM (__mpn_add_n)) - ENTER +ENTRY (__mpn_add_n) pushl %edi cfi_adjust_cfa_offset (4) @@ -47,13 +44,6 @@ ENTRY (BP_SYM (__mpn_add_n)) cfi_rel_offset (esi, 0) movl S2(%esp),%edx movl SIZE(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ecx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%edx, S2(%esp), %ecx) - shrl $2, %ecx -#endif movl %ecx,%eax shrl $3,%ecx /* compute count for unrolled loop */ negl %eax @@ -116,6 +106,5 @@ L(oop): movl (%esi),%eax cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_add_n)) +END (__mpn_add_n) diff --git a/sysdeps/i386/i686/bzero.S b/sysdeps/i386/i686/bzero.S index c1e4a6d50e..34b0faa91b 100644 --- a/sysdeps/i386/i686/bzero.S +++ b/sysdeps/i386/i686/bzero.S @@ -1,3 +1,3 @@ #define memset __bzero #include <sysdeps/i386/i686/memset.S> -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) +weak_alias (__bzero, bzero) diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S index eacac8ee18..b8091a60ec 100644 --- a/sysdeps/i386/i686/memcmp.S +++ b/sysdeps/i386/i686/memcmp.S @@ -18,17 +18,15 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* Preserve EBX. */ +#define PARMS 4+4 /* Preserve EBX. */ #define BLK1 PARMS -#define BLK2 BLK1+PTR_SIZE -#define LEN BLK2+PTR_SIZE +#define BLK2 BLK1+4 +#define LEN BLK2+4 #define ENTRANCE pushl %ebx; cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (ebx, 0); ENTER + cfi_rel_offset (ebx, 0) #define RETURN popl %ebx; cfi_adjust_cfa_offset (-4); \ - cfi_restore (ebx); LEAVE; ret + cfi_restore (ebx); ret /* Load an entry in a jump table into EBX. TABLE is a jump table with relative offsets. INDEX is a register contains the index @@ -44,7 +42,7 @@ .text ALIGN (4) -ENTRY (BP_SYM (memcmp)) +ENTRY (memcmp) ENTRANCE movl BLK1(%esp), %eax @@ -366,7 +364,7 @@ L(set): cfi_adjust_cfa_offset (-4) cfi_restore (esi) RETURN -END (BP_SYM (memcmp)) +END (memcmp) .section .rodata ALIGN (2) @@ -406,5 +404,5 @@ L(table_32bytes) : #undef bcmp -weak_alias (BP_SYM (memcmp), BP_SYM (bcmp)) -libc_hidden_builtin_def (BP_SYM (memcmp)) +weak_alias (memcmp, bcmp) +libc_hidden_builtin_def (memcmp) diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S index e6dc87d77d..bb05c3d0b4 100644 --- a/sysdeps/i386/i686/memcpy.S +++ b/sysdeps/i386/i686/memcpy.S @@ -20,14 +20,12 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE -#define LEN SRC+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 +#define LEN SRC+4 .text #if defined PIC && !defined NOT_IN_libc @@ -37,8 +35,7 @@ ENTRY_CHK (__memcpy_chk) jb HIDDEN_JUMPTARGET (__chk_fail) END_CHK (__memcpy_chk) #endif -ENTRY (BP_SYM (memcpy)) - ENTER +ENTRY (memcpy) movl %edi, %eax movl DEST(%esp), %edi @@ -81,10 +78,8 @@ ENTRY (BP_SYM (memcpy)) .Lend: movl %eax, %edi movl %edx, %esi movl DEST(%esp), %eax - RETURN_BOUNDED_POINTER (DEST(%esp)) - LEAVE - RET_PTR + ret /* When we come here the pointers do not have the same alignment or the length is too short. No need to optimize for @@ -99,5 +94,5 @@ ENTRY (BP_SYM (memcpy)) 2: rep movsl jmp .Lend -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S index 6079851477..8c53d4a9a9 100644 --- a/sysdeps/i386/i686/memmove.S +++ b/sysdeps/i386/i686/memmove.S @@ -20,22 +20,20 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* one spilled register */ +#define PARMS 4+4 /* one spilled register */ #define RTN PARMS .text #ifdef USE_AS_BCOPY -# define SRC RTN+RTN_SIZE -# define DEST SRC+PTR_SIZE -# define LEN DEST+PTR_SIZE +# define SRC RTN +# define DEST SRC+4 +# define LEN DEST+4 #else -# define DEST RTN+RTN_SIZE -# define SRC DEST+PTR_SIZE -# define LEN SRC+PTR_SIZE +# define DEST RTN +# define SRC DEST+4 +# define LEN SRC+4 # if defined PIC && !defined NOT_IN_libc ENTRY_CHK (__memmove_chk) @@ -46,8 +44,7 @@ END_CHK (__memmove_chk) # endif #endif -ENTRY (BP_SYM (memmove)) - ENTER +ENTRY (memmove) pushl %edi cfi_adjust_cfa_offset (4) @@ -58,8 +55,6 @@ ENTRY (BP_SYM (memmove)) movl %esi, %edx movl SRC(%esp), %esi cfi_register (esi, edx) - CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, SRC(%esp), %ecx) movl %edi, %eax subl %esi, %eax @@ -79,15 +74,13 @@ ENTRY (BP_SYM (memmove)) cfi_restore (esi) #ifndef USE_AS_BCOPY movl DEST(%esp), %eax - RETURN_BOUNDED_POINTER (DEST(%esp)) #endif popl %edi cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR + ret cfi_adjust_cfa_offset (4) cfi_rel_offset (edi, 0) @@ -113,7 +106,6 @@ ENTRY (BP_SYM (memmove)) cfi_restore (esi) #ifndef USE_AS_BCOPY movl DEST(%esp), %eax - RETURN_BOUNDED_POINTER (DEST(%esp)) #endif cld @@ -121,9 +113,8 @@ ENTRY (BP_SYM (memmove)) cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (memmove)) + ret +END (memmove) #ifndef USE_AS_BCOPY libc_hidden_builtin_def (memmove) #endif diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S index 8022b7b959..97fd4966a9 100644 --- a/sysdeps/i386/i686/mempcpy.S +++ b/sysdeps/i386/i686/mempcpy.S @@ -20,14 +20,12 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE -#define LEN SRC+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 +#define LEN SRC+4 .text #if defined PIC && !defined NOT_IN_libc @@ -37,18 +35,15 @@ ENTRY_CHK (__mempcpy_chk) jb HIDDEN_JUMPTARGET (__chk_fail) END_CHK (__mempcpy_chk) #endif -ENTRY (BP_SYM (__mempcpy)) - ENTER +ENTRY (__mempcpy) movl LEN(%esp), %ecx movl %edi, %eax cfi_register (edi, eax) movl DEST(%esp), %edi - CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %ecx) movl %esi, %edx cfi_register (esi, edx) movl SRC(%esp), %esi - CHECK_BOUNDS_BOTH_WIDE (%esi, SRC(%esp), %ecx) cld shrl $1, %ecx jnc 1f @@ -62,11 +57,9 @@ ENTRY (BP_SYM (__mempcpy)) cfi_restore (edi) movl %edx, %esi cfi_restore (esi) - RETURN_BOUNDED_POINTER (DEST(%esp)) - LEAVE - RET_PTR -END (BP_SYM (__mempcpy)) -libc_hidden_def (BP_SYM (__mempcpy)) -weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy)) + ret +END (__mempcpy) +libc_hidden_def (__mempcpy) +weak_alias (__mempcpy, mempcpy) libc_hidden_builtin_def (mempcpy) diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S index ad0c9677fe..aed79a8aa9 100644 --- a/sysdeps/i386/i686/memset.S +++ b/sysdeps/i386/i686/memset.S @@ -20,20 +20,18 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */ #define BZERO_P (defined memset) -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #if BZERO_P # define DEST PARMS -# define LEN DEST+PTR_SIZE +# define LEN DEST+4 #else # define RTN PARMS -# define DEST RTN+RTN_SIZE -# define CHR DEST+PTR_SIZE +# define DEST RTN +# define CHR DEST+4 # define LEN CHR+4 #endif @@ -45,15 +43,13 @@ ENTRY_CHK (__memset_chk) jb HIDDEN_JUMPTARGET (__chk_fail) END_CHK (__memset_chk) #endif -ENTRY (BP_SYM (memset)) - ENTER +ENTRY (memset) cld pushl %edi cfi_adjust_cfa_offset (4) movl DEST(%esp), %edx movl LEN(%esp), %ecx - CHECK_BOUNDS_BOTH_WIDE (%edx, DEST(%esp), %ecx) #if BZERO_P xorl %eax, %eax /* fill with 0 */ #else @@ -90,19 +86,17 @@ ENTRY (BP_SYM (memset)) 1: #if !BZERO_P movl DEST(%esp), %eax /* start address of destination is result */ - RETURN_BOUNDED_POINTER (DEST(%esp)) #endif popl %edi cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE #if BZERO_P ret #else - RET_PTR + ret #endif -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) #if defined PIC && !defined NOT_IN_libc && !BZERO_P diff --git a/sysdeps/i386/i686/strcmp.S b/sysdeps/i386/i686/strcmp.S index b53260ffd6..6ca6220a02 100644 --- a/sysdeps/i386/i686/strcmp.S +++ b/sysdeps/i386/i686/strcmp.S @@ -19,21 +19,16 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define STR1 PARMS -#define STR2 STR1+PTR_SIZE +#define STR2 STR1+4 .text -ENTRY (BP_SYM (strcmp)) - ENTER +ENTRY (strcmp) movl STR1(%esp), %ecx movl STR2(%esp), %edx - CHECK_BOUNDS_LOW (%ecx, STR1(%esp)) - CHECK_BOUNDS_LOW (%edx, STR2(%esp)) L(oop): movb (%ecx), %al cmpb (%edx), %al @@ -46,26 +41,12 @@ L(oop): movb (%ecx), %al xorl %eax, %eax /* when strings are equal, pointers rest one beyond the end of the NUL terminators. */ - CHECK_BOUNDS_HIGH (%ecx, STR1(%esp), jbe) - CHECK_BOUNDS_HIGH (%edx, STR2(%esp), jbe) - LEAVE ret -#ifndef __BOUNDED_POINTERS__ L(neq): movl $1, %eax movl $-1, %ecx cmovbl %ecx, %eax -#else -L(neq): movl $1, %eax - ja L(chk) - negl %eax - /* When strings differ, pointers rest on - the unequal characters. */ -L(chk): CHECK_BOUNDS_HIGH (%ecx, STR1(%esp), jb) - CHECK_BOUNDS_HIGH (%edx, STR2(%esp), jb) -#endif - LEAVE ret -END (BP_SYM (strcmp)) +END (strcmp) libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/i386/i686/strtok.S b/sysdeps/i386/i686/strtok.S index 794efbaed0..8848faf4d9 100644 --- a/sysdeps/i386/i686/strtok.S +++ b/sysdeps/i386/i686/strtok.S @@ -20,8 +20,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* This file can be used for three variants of the strtok function: @@ -46,11 +44,7 @@ .type save_ptr, @object .size save_ptr, 4 save_ptr: -# if __BOUNDED_POINTERS__ - .space 12 -# else .space 4 -# endif # ifdef PIC # define SAVE_PTR save_ptr@GOTOFF(%ebx) @@ -62,15 +56,15 @@ save_ptr: #endif #if !defined USE_AS_STRTOK_R && defined PIC -# define PARMS LINKAGE+256+4 /* space for table and saved PIC register */ +# define PARMS 4+256+4 /* space for table and saved PIC register */ #else -# define PARMS LINKAGE+256 /* space for table */ +# define PARMS 4+256 /* space for table */ #endif #define RTN PARMS -#define STR RTN+RTN_SIZE -#define DELIM STR+PTR_SIZE +#define STR RTN +#define DELIM STR+4 #ifdef USE_AS_STRTOK_R -# define SAVE DELIM+PTR_SIZE +# define SAVE DELIM+4 #endif .text @@ -80,8 +74,7 @@ save_ptr: ret #endif -ENTRY (BP_SYM (FUNCTION)) - ENTER +ENTRY (FUNCTION) #if !defined USE_AS_STRTOK_R && defined PIC pushl %ebx /* Save PIC register. */ @@ -127,23 +120,7 @@ ENTRY (BP_SYM (FUNCTION)) cmove %eax, %edx testl %edx, %edx jz L(returnNULL) -#if __BOUNDED_POINTERS__ -# ifdef USE_AS_STRTOK_R - movl SAVE(%esp), %ecx /* borrow %ecx for a moment */ -# endif - je L(0) - /* Save bounds of incoming non-NULL STR into save area. */ - movl 4+STR(%esp), %eax - movl %eax, 4+SAVE_PTR - movl 8+STR(%esp), %eax - movl %eax, 8+SAVE_PTR -L(0): CHECK_BOUNDS_LOW (%edx, SAVE_PTR) -# ifdef USE_AS_STRTOK_R - xorl %ecx, %ecx /* restore %ecx to zero */ -# endif -#endif movl DELIM(%esp), %eax /* Get start of delimiter set. */ - CHECK_BOUNDS_LOW (%eax, DELIM(%esp)) /* For understanding the following code remember that %ecx == 0 now. Although all the following instruction only modify %cl we always @@ -151,17 +128,17 @@ L(0): CHECK_BOUNDS_LOW (%edx, SAVE_PTR) L(2): movb (%eax), %cl /* get byte from stopset */ testb %cl, %cl /* is NUL char? */ - jz L(1_1) /* yes => start compare loop */ + jz L(1) /* yes => start compare loop */ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */ movb 1(%eax), %cl /* get byte from stopset */ testb $0xff, %cl /* is NUL char? */ - jz L(1_2) /* yes => start compare loop */ + jz L(1) /* yes => start compare loop */ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */ movb 2(%eax), %cl /* get byte from stopset */ testb $0xff, %cl /* is NUL char? */ - jz L(1_3) /* yes => start compare loop */ + jz L(1) /* yes => start compare loop */ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */ movb 3(%eax), %cl /* get byte from stopset */ @@ -170,16 +147,7 @@ L(2): movb (%eax), %cl /* get byte from stopset */ testb $0xff, %cl /* is NUL char? */ jnz L(2) /* no => process next dword from stopset */ -#if __BOUNDED_POINTERS__ - jmp L(1_0) /* pointer is correct for bounds check */ -L(1_3): incl %eax /* adjust pointer for bounds check */ -L(1_2): incl %eax /* ditto */ -L(1_1): incl %eax /* ditto */ -L(1_0): CHECK_BOUNDS_HIGH (%eax, DELIM(%esp), jbe) -#else -L(1_3):; L(1_2):; L(1_1): /* fall through */ -#endif - leal -4(%edx), %eax /* prepare loop */ +L(1): leal -4(%edx), %eax /* prepare loop */ /* We use a neat trick for the following loop. Normally we would have to test for two termination conditions @@ -253,8 +221,6 @@ L(8): cmpl %eax, %edx movl SAVE(%esp), %ecx #endif movl %edx, SAVE_PTR - CHECK_BOUNDS_HIGH (%edx, SAVE_PTR, jb) - RETURN_BOUNDED_POINTER (SAVE_PTR) L(epilogue): /* Remove the stopset table. */ @@ -265,8 +231,7 @@ L(epilogue): cfi_adjust_cfa_offset (-4) cfi_restore (ebx) #endif - LEAVE - RET_PTR + ret L(returnNULL): xorl %eax, %eax @@ -274,7 +239,6 @@ L(returnNULL): movl SAVE(%esp), %ecx #endif movl %edx, SAVE_PTR - RETURN_NULL_BOUNDED_POINTER jmp L(epilogue) -END (BP_SYM (FUNCTION)) +END (FUNCTION) diff --git a/sysdeps/i386/i686/strtok_r.S b/sysdeps/i386/i686/strtok_r.S index 1c24ca85f5..353e076ba7 100644 --- a/sysdeps/i386/i686/strtok_r.S +++ b/sysdeps/i386/i686/strtok_r.S @@ -1,5 +1,5 @@ #define FUNCTION __strtok_r #define USE_AS_STRTOK_R 1 #include <sysdeps/i386/i686/strtok.S> -weak_alias (BP_SYM (__strtok_r), BP_SYM (strtok_r)) -strong_alias (BP_SYM (__strtok_r), BP_SYM (__GI___strtok_r)) +weak_alias (__strtok_r, strtok_r) +strong_alias (__strtok_r, __GI___strtok_r) diff --git a/sysdeps/i386/lshift.S b/sysdeps/i386/lshift.S index 170d4e7727..771891e574 100644 --- a/sysdeps/i386/lshift.S +++ b/sysdeps/i386/lshift.S @@ -18,18 +18,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+12 /* space for 3 saved regs */ +#define PARMS 4+12 /* space for 3 saved regs */ #define RES PARMS -#define S RES+PTR_SIZE -#define SIZE S+PTR_SIZE +#define S RES+4 +#define SIZE S+4 #define CNT SIZE+4 .text -ENTRY (BP_SYM (__mpn_lshift)) - ENTER +ENTRY (__mpn_lshift) pushl %edi cfi_adjust_cfa_offset (4) @@ -44,12 +41,6 @@ ENTRY (BP_SYM (__mpn_lshift)) cfi_rel_offset (esi, 4) movl SIZE(%esp),%edx movl CNT(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %edx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %edx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S(%esp), %edx) - shrl $2, %edx -#endif subl $4,%esi /* adjust s_ptr */ movl (%esi,%edx,4),%ebx /* read most significant limb */ @@ -92,7 +83,6 @@ L(1): movl (%esi,%edx,4),%eax cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret cfi_restore_state @@ -109,6 +99,5 @@ L(end): shll %cl,%ebx /* compute least significant limb */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_lshift)) +END (__mpn_lshift) diff --git a/sysdeps/i386/memchr.S b/sysdeps/i386/memchr.S index 53cba10097..67995002ed 100644 --- a/sysdeps/i386/memchr.S +++ b/sysdeps/i386/memchr.S @@ -28,18 +28,15 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+8 /* space for 2 saved regs */ +#define PARMS 4+8 /* space for 2 saved regs */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define CHR STR+PTR_SIZE +#define STR RTN +#define CHR STR+4 #define LEN CHR+4 .text -ENTRY (BP_SYM (__memchr)) - ENTER +ENTRY (__memchr) /* Save callee-safe registers used in this function. */ pushl %esi @@ -53,7 +50,6 @@ ENTRY (BP_SYM (__memchr)) movl CHR(%esp), %edx /* c: byte we are looking for. */ movl LEN(%esp), %esi /* len: length of memory block. */ cfi_rel_offset (esi, 4) - CHECK_BOUNDS_LOW (%eax, STR(%esp)) /* If my must not test more than three characters test them one by one. This is especially true for 0. */ @@ -312,28 +308,15 @@ L(8): testb %cl, %cl /* test first byte in dword */ incl %eax /* increment source pointer */ /* No further test needed we we know it is one of the four bytes. */ -L(9): -#if __BOUNDED_POINTERS__ - CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - /* If RTN pointer is phony, don't copy return value into it. */ - movl RTN(%esp), %ecx - testl %ecx, %ecx - jz L(pop) - RETURN_BOUNDED_POINTER (STR(%esp)) -#endif -L(pop): popl %edi /* pop saved registers */ +L(9): popl %edi /* pop saved registers */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) popl %esi cfi_adjust_cfa_offset (-4) cfi_restore (esi) - LEAVE - RET_PTR -END (BP_SYM (__memchr)) + ret +END (__memchr) -weak_alias (BP_SYM (__memchr), BP_SYM (memchr)) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif +weak_alias (__memchr, memchr) libc_hidden_builtin_def (memchr) diff --git a/sysdeps/i386/memcmp.S b/sysdeps/i386/memcmp.S index f24ec9383f..21e0bfcd1c 100644 --- a/sysdeps/i386/memcmp.S +++ b/sysdeps/i386/memcmp.S @@ -18,17 +18,14 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define BLK1 PARMS -#define BLK2 BLK1+PTR_SIZE -#define LEN BLK2+PTR_SIZE +#define BLK2 BLK1+4 +#define LEN BLK2+4 .text -ENTRY (BP_SYM (memcmp)) - ENTER +ENTRY (memcmp) pushl %esi /* Save callee-safe registers. */ cfi_adjust_cfa_offset (4) @@ -40,8 +37,6 @@ ENTRY (BP_SYM (memcmp)) cfi_rel_offset (esi, 0) movl BLK2(%esp), %edi movl LEN(%esp), %ecx - CHECK_BOUNDS_LOW (%esi, BLK1(%esp)) - CHECK_BOUNDS_LOW (%edi, BLK2(%esp)) cld /* Set direction of comparison. */ @@ -64,18 +59,15 @@ ENTRY (BP_SYM (memcmp)) Note that the following operation does not change 0xffffffff. */ orb $1, %al /* Change 0 to 1. */ -L(1): CHECK_BOUNDS_HIGH (%esi, BLK1(%esp), jbe) - CHECK_BOUNDS_HIGH (%edi, BLK2(%esp), jbe) - popl %esi /* Restore registers. */ +L(1): popl %esi /* Restore registers. */ cfi_adjust_cfa_offset (-4) cfi_restore (esi) movl %edx, %edi cfi_restore (edi) - LEAVE ret -END (BP_SYM (memcmp)) +END (memcmp) #undef bcmp -weak_alias (BP_SYM (memcmp), BP_SYM (bcmp)) -libc_hidden_builtin_def (BP_SYM (memcmp)) +weak_alias (memcmp, bcmp) +libc_hidden_builtin_def (memcmp) diff --git a/sysdeps/i386/mul_1.S b/sysdeps/i386/mul_1.S index 4ecd33e98b..896ba12309 100644 --- a/sysdeps/i386/mul_1.S +++ b/sysdeps/i386/mul_1.S @@ -19,13 +19,11 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define SIZE S1+PTR_SIZE +#define S1 RES+4 +#define SIZE S1+4 #define S2LIMB SIZE+4 #define res_ptr edi @@ -34,8 +32,7 @@ #define s2_limb ebx .text -ENTRY (BP_SYM (__mpn_mul_1)) - ENTER +ENTRY (__mpn_mul_1) pushl %res_ptr cfi_adjust_cfa_offset (4) @@ -53,12 +50,6 @@ ENTRY (BP_SYM (__mpn_mul_1)) movl SIZE(%esp), %size movl S2LIMB(%esp), %s2_limb cfi_rel_offset (s2_limb, 0) -#if __BOUNDED_POINTERS__ - shll $2, %size /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size) - CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size) - shrl $2, %size -#endif leal (%res_ptr,%size,4), %res_ptr leal (%s1_ptr,%size,4), %s1_ptr negl %size @@ -90,7 +81,6 @@ L(oop): cfi_adjust_cfa_offset (-4) cfi_restore (res_ptr) - LEAVE ret #undef size -END (BP_SYM (__mpn_mul_1)) +END (__mpn_mul_1) diff --git a/sysdeps/i386/rawmemchr.S b/sysdeps/i386/rawmemchr.S index 1a8e33c44b..2bd20e0459 100644 --- a/sysdeps/i386/rawmemchr.S +++ b/sysdeps/i386/rawmemchr.S @@ -28,17 +28,14 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define CHR STR+PTR_SIZE +#define STR RTN +#define CHR STR+4 .text -ENTRY (BP_SYM (__rawmemchr)) - ENTER +ENTRY (__rawmemchr) /* Save callee-safe register used in this function. */ pushl %edi @@ -48,7 +45,6 @@ ENTRY (BP_SYM (__rawmemchr)) /* Load parameters into registers. */ movl STR(%esp), %eax movl CHR(%esp), %edx - CHECK_BOUNDS_LOW (%eax, STR(%esp)) /* At the moment %edx contains C. What we need for the algorithm is C in all bytes of the dword. Avoid @@ -215,15 +211,12 @@ L(8): testb %cl, %cl /* test first byte in dword */ /* No further test needed we we know it is one of the four bytes. */ L(9): - CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - RETURN_BOUNDED_POINTER (STR(%esp)) popl %edi /* pop saved register */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (__rawmemchr)) + ret +END (__rawmemchr) -libc_hidden_def (BP_SYM (__rawmemchr)) -weak_alias (BP_SYM (__rawmemchr), BP_SYM (rawmemchr)) +libc_hidden_def (__rawmemchr) +weak_alias (__rawmemchr, rawmemchr) diff --git a/sysdeps/i386/rshift.S b/sysdeps/i386/rshift.S index 81af68dd7e..5f41227125 100644 --- a/sysdeps/i386/rshift.S +++ b/sysdeps/i386/rshift.S @@ -18,18 +18,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+12 /* space for 3 saved regs */ +#define PARMS 4+12 /* space for 3 saved regs */ #define RES PARMS -#define S RES+PTR_SIZE -#define SIZE S+PTR_SIZE +#define S RES+4 +#define SIZE S+4 #define CNT SIZE+4 .text -ENTRY (BP_SYM (__mpn_rshift)) - ENTER +ENTRY (__mpn_rshift) pushl %edi cfi_adjust_cfa_offset (4) @@ -44,12 +41,6 @@ ENTRY (BP_SYM (__mpn_rshift)) cfi_rel_offset (esi, 4) movl SIZE(%esp),%edx movl CNT(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %edx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %edx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S(%esp), %edx) - shrl $2, %edx -#endif leal -4(%edi,%edx,4),%edi leal (%esi,%edx,4),%esi negl %edx @@ -94,7 +85,6 @@ L(1): movl (%esi,%edx,4),%eax cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret cfi_restore_state @@ -111,6 +101,5 @@ L(end): shrl %cl,%ebx /* compute most significant limb */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_rshift)) +END (__mpn_rshift) diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S index 9c872f17a4..039f6c4fa3 100644 --- a/sysdeps/i386/setjmp.S +++ b/sysdeps/i386/setjmp.S @@ -19,19 +19,15 @@ #include <sysdep.h> #include <jmpbuf-offsets.h> #include <asm-syntax.h> -#include "bp-sym.h" -#include "bp-asm.h" #include <stap-probe.h> -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define JMPBUF PARMS -#define SIGMSK JMPBUF+PTR_SIZE +#define SIGMSK JMPBUF+4 -ENTRY (BP_SYM (__sigsetjmp)) - ENTER +ENTRY (__sigsetjmp) movl JMPBUF(%esp), %eax - CHECK_BOUNDS_BOTH_WIDE (%eax, JMPBUF(%esp), $JB_SIZE) /* Save registers. */ movl %ebx, (JB_BX*4)(%eax) @@ -42,13 +38,12 @@ ENTRY (BP_SYM (__sigsetjmp)) PTR_MANGLE (%ecx) #endif movl %ecx, (JB_SP*4)(%eax) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ + movl 0(%esp), %ecx /* Save PC we are returning to now. */ LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx) #ifdef PTR_MANGLE PTR_MANGLE (%ecx) #endif movl %ecx, (JB_PC*4)(%eax) - LEAVE /* pop frame pointer to prepare for tail-call. */ movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ #if defined NOT_IN_libc && defined IS_IN_rtld @@ -59,4 +54,4 @@ ENTRY (BP_SYM (__sigsetjmp)) /* Make a tail call to __sigjmp_save; it takes the same args. */ jmp __sigjmp_save #endif -END (BP_SYM (__sigsetjmp)) +END (__sigsetjmp) diff --git a/sysdeps/i386/start.S b/sysdeps/i386/start.S index afaf2cd020..51187652dc 100644 --- a/sysdeps/i386/start.S +++ b/sysdeps/i386/start.S @@ -52,8 +52,6 @@ NULL */ -#include "bp-sym.h" - .text .globl _start .type _start,@function @@ -97,11 +95,11 @@ _start: pushl %ecx /* Push second argument: argv. */ pushl %esi /* Push first argument: argc. */ - pushl BP_SYM (main)@GOT(%ebx) + pushl main@GOT(%ebx) /* Call the user's main function, and exit with its value. But let the libc call main. */ - call BP_SYM (__libc_start_main)@PLT + call __libc_start_main@PLT #else /* Push address of our own entry points to .fini and .init. */ pushl $__libc_csu_fini @@ -110,11 +108,11 @@ _start: pushl %ecx /* Push second argument: argv. */ pushl %esi /* Push first argument: argc. */ - pushl $BP_SYM (main) + pushl $main /* Call the user's main function, and exit with its value. But let the libc call main. */ - call BP_SYM (__libc_start_main) + call __libc_start_main #endif hlt /* Crash if somehow `exit' does return. */ diff --git a/sysdeps/i386/stpcpy.S b/sysdeps/i386/stpcpy.S index 5c80c8ca22..3c7562ed4e 100644 --- a/sysdeps/i386/stpcpy.S +++ b/sysdeps/i386/stpcpy.S @@ -23,22 +23,17 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 .text -ENTRY (BP_SYM (__stpcpy)) - ENTER +ENTRY (__stpcpy) movl DEST(%esp), %eax movl SRC(%esp), %ecx - CHECK_BOUNDS_LOW (%eax, DEST(%esp)) - CHECK_BOUNDS_LOW (%ecx, SRC(%esp)) subl %eax, %ecx /* magic: reduce number of loop variants to one using addressing mode */ @@ -84,13 +79,10 @@ L(1): addl $4, %eax /* increment loop counter */ L(4): incl %eax L(3): incl %eax L(2): - CHECK_BOUNDS_HIGH (%eax, DEST(%esp), jb) - RETURN_BOUNDED_POINTER (DEST(%esp)) - LEAVE - RET_PTR -END (BP_SYM (__stpcpy)) + ret +END (__stpcpy) -weak_alias (BP_SYM (__stpcpy), BP_SYM (stpcpy)) +weak_alias (__stpcpy, stpcpy) libc_hidden_def (__stpcpy) libc_hidden_builtin_def (stpcpy) diff --git a/sysdeps/i386/stpncpy.S b/sysdeps/i386/stpncpy.S index 05fd12abc9..11882738d9 100644 --- a/sysdeps/i386/stpncpy.S +++ b/sysdeps/i386/stpncpy.S @@ -25,18 +25,15 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE -#define LEN SRC+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 +#define LEN SRC+4 .text -ENTRY (BP_SYM (__stpncpy)) - ENTER +ENTRY (__stpncpy) pushl %esi cfi_adjust_cfa_offset (4) @@ -45,8 +42,6 @@ ENTRY (BP_SYM (__stpncpy)) movl SRC(%esp), %esi cfi_rel_offset (esi, 0) movl LEN(%esp), %ecx - CHECK_BOUNDS_LOW (%eax, DEST(%esp)) - CHECK_BOUNDS_LOW (%esi, SRC(%esp)) subl %eax, %esi /* magic: reduce number of loop variants to one using addressing mode */ @@ -141,20 +136,12 @@ L(8): L(3): decl %ecx /* all bytes written? */ jnz L(8) /* no, then again */ -L(9): -#if __BOUNDED_POINTERS__ - addl %eax, %esi /* undo magic: %esi now points beyond end of SRC */ - CHECK_BOUNDS_HIGH (%esi, SRC(%esp), jbe) - CHECK_BOUNDS_HIGH (%eax, DEST(%esp), jbe) - RETURN_BOUNDED_POINTER (DEST(%esp)) -#endif - popl %esi /* restore saved register content */ +L(9): popl %esi /* restore saved register content */ cfi_adjust_cfa_offset (-4) cfi_restore (esi) - LEAVE - RET_PTR -END (BP_SYM (__stpncpy)) + ret +END (__stpncpy) -libc_hidden_def (BP_SYM (__stpncpy)) -weak_alias (BP_SYM (__stpncpy), BP_SYM (stpncpy)) +libc_hidden_def (__stpncpy) +weak_alias (__stpncpy, stpncpy) diff --git a/sysdeps/i386/strchr.S b/sysdeps/i386/strchr.S index b0ba99b42b..666c7498fe 100644 --- a/sysdeps/i386/strchr.S +++ b/sysdeps/i386/strchr.S @@ -21,24 +21,20 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define CHR STR+PTR_SIZE +#define STR RTN +#define CHR STR+4 .text -ENTRY (BP_SYM (strchr)) - ENTER +ENTRY (strchr) pushl %edi /* Save callee-safe registers used here. */ cfi_adjust_cfa_offset (4) cfi_rel_offset (edi, 0) movl STR(%esp), %eax movl CHR(%esp), %edx - CHECK_BOUNDS_LOW (%eax, STR(%esp)) /* At the moment %edx contains C. What we need for the algorithm is C in all bytes of the dword. Avoid @@ -243,13 +239,11 @@ L(11): movl (%eax), %ecx /* get word (= 4 bytes) in question */ L(2): /* Return NULL. */ xorl %eax, %eax - RETURN_NULL_BOUNDED_POINTER popl %edi /* restore saved register content */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR + ret cfi_adjust_cfa_offset (4) cfi_rel_offset (edi, 0) @@ -285,15 +279,12 @@ L(7): testb %cl, %cl /* is first byte C? */ incl %eax L(6): - CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - RETURN_BOUNDED_POINTER (STR(%esp)) popl %edi /* restore saved register content */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (strchr)) + ret +END (strchr) -weak_alias (BP_SYM (strchr), BP_SYM (index)) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/i386/strchrnul.S b/sysdeps/i386/strchrnul.S index d2879cf9c5..7ceb88ed8b 100644 --- a/sysdeps/i386/strchrnul.S +++ b/sysdeps/i386/strchrnul.S @@ -22,17 +22,14 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+4 /* space for 1 saved reg */ +#define PARMS 4+4 /* space for 1 saved reg */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define CHR STR+PTR_SIZE +#define STR RTN +#define CHR STR+4 .text -ENTRY (BP_SYM (__strchrnul)) - ENTER +ENTRY (__strchrnul) pushl %edi /* Save callee-safe registers used here. */ cfi_adjust_cfa_offset (4) @@ -40,7 +37,6 @@ ENTRY (BP_SYM (__strchrnul)) movl STR(%esp), %eax movl CHR(%esp), %edx - CHECK_BOUNDS_LOW (%eax, STR(%esp)) /* At the moment %edx contains CHR. What we need for the algorithm is CHR in all bytes of the dword. Avoid @@ -272,14 +268,11 @@ L(7): testb %cl, %cl /* is first byte CHR? */ /* It must be in the fourth byte and it cannot be NUL. */ incl %eax -L(6): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - RETURN_BOUNDED_POINTER (STR(%esp)) - popl %edi /* restore saved register content */ +L(6): popl %edi /* restore saved register content */ cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (__strchrnul)) + ret +END (__strchrnul) -weak_alias (BP_SYM (__strchrnul), BP_SYM (strchrnul)) +weak_alias (__strchrnul, strchrnul) diff --git a/sysdeps/i386/strcspn.S b/sysdeps/i386/strcspn.S index 5f6633fea9..0c262d6001 100644 --- a/sysdeps/i386/strcspn.S +++ b/sysdeps/i386/strcspn.S @@ -22,20 +22,16 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define STR PARMS -#define STOP STR+PTR_SIZE +#define STOP STR+4 .text -ENTRY (BP_SYM (strcspn)) - ENTER +ENTRY (strcspn) movl STR(%esp), %edx movl STOP(%esp), %eax - CHECK_BOUNDS_LOW (%edx, STR(%esp)) /* First we create a table with flags for all possible characters. For the ASCII (7bit/8bit) or ISO-8859-X character sets which are @@ -236,11 +232,9 @@ L(5): incl %eax L(4): addl $256, %esp /* remove stopset */ cfi_adjust_cfa_offset (-256) - CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) subl %edx, %eax /* we have to return the number of valid characters, so compute distance to first non-valid character */ - LEAVE ret -END (BP_SYM (strcspn)) +END (strcspn) libc_hidden_builtin_def (strcspn) diff --git a/sysdeps/i386/strpbrk.S b/sysdeps/i386/strpbrk.S index 617a119916..bbc0cbeb6f 100644 --- a/sysdeps/i386/strpbrk.S +++ b/sysdeps/i386/strpbrk.S @@ -22,21 +22,17 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define STOP STR+PTR_SIZE +#define STR RTN +#define STOP STR+4 .text -ENTRY (BP_SYM (strpbrk)) - ENTER +ENTRY (strpbrk) movl STR(%esp), %edx movl STOP(%esp), %eax - CHECK_BOUNDS_LOW (%edx, STR(%esp)) /* First we create a table with flags for all possible characters. For the ASCII (7bit/8bit) or ISO-8859-X character sets which are @@ -238,18 +234,10 @@ L(5): incl %eax L(4): addl $256, %esp /* remove stopset */ cfi_adjust_cfa_offset (-256) - CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) orb %cl, %cl /* was last character NUL? */ jnz L(7) /* no => return pointer */ xorl %eax, %eax - RETURN_NULL_BOUNDED_POINTER - LEAVE - RET_PTR - -L(7): RETURN_BOUNDED_POINTER (STR(%esp)) - - LEAVE - RET_PTR -END (BP_SYM (strpbrk)) +L(7): ret +END (strpbrk) libc_hidden_builtin_def (strpbrk) diff --git a/sysdeps/i386/strrchr.S b/sysdeps/i386/strrchr.S index 623cf4e348..31b8a4562c 100644 --- a/sysdeps/i386/strrchr.S +++ b/sysdeps/i386/strrchr.S @@ -21,17 +21,14 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+8 /* space for 2 saved regs */ +#define PARMS 4+8 /* space for 2 saved regs */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define CHR STR+PTR_SIZE +#define STR RTN +#define CHR STR+4 .text -ENTRY (BP_SYM (strrchr)) - ENTER +ENTRY (strrchr) pushl %edi /* Save callee-safe registers used here. */ cfi_adjust_cfa_offset (4) @@ -43,7 +40,6 @@ ENTRY (BP_SYM (strrchr)) movl STR(%esp), %esi cfi_rel_offset (esi, 0) movl CHR(%esp), %ecx - CHECK_BOUNDS_LOW (%esi, STR(%esp)) /* At the moment %ecx contains C. What we need for the algorithm is C in all bytes of the dword. Avoid @@ -324,18 +320,15 @@ L(26): testb %dl, %dl /* is third byte == NUL */ jne L(2) /* no => skip */ leal 3(%esi), %eax /* store address as result */ -L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) - RETURN_BOUNDED_POINTER (STR(%esp)) - popl %esi /* restore saved register content */ +L(2): popl %esi /* restore saved register content */ cfi_adjust_cfa_offset (-4) cfi_restore (esi) popl %edi cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (strrchr)) + ret +END (strrchr) -weak_alias (BP_SYM (strrchr), BP_SYM (rindex)) +weak_alias (strrchr, rindex) libc_hidden_builtin_def (strrchr) diff --git a/sysdeps/i386/strspn.S b/sysdeps/i386/strspn.S index decb9afdbc..1865e49202 100644 --- a/sysdeps/i386/strspn.S +++ b/sysdeps/i386/strspn.S @@ -22,20 +22,16 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define STR PARMS -#define SKIP STR+PTR_SIZE +#define SKIP STR+4 .text -ENTRY (BP_SYM (strspn)) - ENTER +ENTRY (strspn) movl STR(%esp), %edx movl SKIP(%esp), %eax - CHECK_BOUNDS_LOW (%edx, STR(%esp)) /* First we create a table with flags for all possible characters. For the ASCII (7bit/8bit) or ISO-8859-X character sets which are @@ -236,11 +232,9 @@ L(5): incl %eax L(4): addl $256, %esp /* remove stopset */ cfi_adjust_cfa_offset (-256) - CHECK_BOUNDS_HIGH (%eax, STR(%esp), jb) subl %edx, %eax /* we have to return the number of valid characters, so compute distance to first non-valid character */ - LEAVE ret -END (BP_SYM (strspn)) +END (strspn) libc_hidden_builtin_def (strspn) diff --git a/sysdeps/i386/strtok.S b/sysdeps/i386/strtok.S index 4dde8c70f9..79d540b603 100644 --- a/sysdeps/i386/strtok.S +++ b/sysdeps/i386/strtok.S @@ -20,8 +20,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* This file can be used for three variants of the strtok function: @@ -46,11 +44,7 @@ .type save_ptr, @object .size save_ptr, 4 save_ptr: -# if __BOUNDED_POINTERS__ - .space 12 -# else .space 4 -# endif # ifdef PIC # define SAVE_PTR save_ptr@GOTOFF(%ebx) @@ -61,19 +55,17 @@ save_ptr: # define FUNCTION strtok #endif -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define RTN PARMS -#define STR RTN+RTN_SIZE -#define DELIM STR+PTR_SIZE -#define SAVE DELIM+PTR_SIZE +#define STR RTN +#define DELIM STR+4 +#define SAVE DELIM+4 .text -ENTRY (BP_SYM (FUNCTION)) - ENTER +ENTRY (FUNCTION) movl STR(%esp), %edx movl DELIM(%esp), %eax - CHECK_BOUNDS_LOW (%eax, DELIM(%esp)) #if !defined USE_AS_STRTOK_R && defined PIC pushl %ebx /* Save PIC register. */ @@ -90,22 +82,7 @@ L(here): /* If the pointer is NULL we have to use the stored value of the last run. */ cmpl $0, %edx -#if __BOUNDED_POINTERS__ - movl SAVE(%esp), %ecx - je L(0) - /* Save bounds of incoming non-NULL STR into save area. */ - movl 4+STR(%esp), %eax - movl %eax, 4+SAVE_PTR - movl 8+STR(%esp), %eax - movl %eax, 8+SAVE_PTR - CHECK_BOUNDS_LOW (%edx, SAVE_PTR) - jmp L(1) -L(0): movl SAVE_PTR, %edx - CHECK_BOUNDS_LOW (%edx, SAVE_PTR) - jmp L(1) -#else jne L(1) -#endif #ifdef USE_AS_STRTOK_R /* The value is stored in the third argument. */ @@ -267,12 +244,12 @@ L(2): movb (%eax), %cl /* get byte from stopset */ movb 1(%eax), %cl /* get byte from stopset */ testb $0xff, %cl /* is NUL char? */ - jz L(1_2) /* yes => start compare loop */ + jz L(1_1) /* yes => start compare loop */ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */ movb 2(%eax), %cl /* get byte from stopset */ testb $0xff, %cl /* is NUL char? */ - jz L(1_3) /* yes => start compare loop */ + jz L(1_1) /* yes => start compare loop */ movb %cl, (%esp,%ecx) /* set corresponding byte in stopset table */ movb 3(%eax), %cl /* get byte from stopset */ @@ -281,16 +258,7 @@ L(2): movb (%eax), %cl /* get byte from stopset */ testb $0xff, %cl /* is NUL char? */ jnz L(2) /* no => process next dword from stopset */ -#if __BOUNDED_POINTERS__ - jmp L(1_0) /* pointer is correct for bounds check */ -L(1_3): incl %eax /* adjust pointer for bounds check */ -L(1_2): incl %eax /* ditto */ -L(1_1): incl %eax /* ditto */ -L(1_0): CHECK_BOUNDS_HIGH (%eax, DELIM(%esp), jbe) -#else -L(1_3):; L(1_2):; L(1_1): /* fall through */ -#endif - leal -4(%edx), %eax /* prepare loop */ +L(1_1): leal -4(%edx), %eax /* prepare loop */ /* We use a neat trick for the following loop. Normally we would have to test for two termination conditions @@ -370,8 +338,6 @@ L(11): movl SAVE(%esp), %ecx #endif movl %edx, SAVE_PTR - CHECK_BOUNDS_HIGH (%edx, SAVE_PTR, jb) - RETURN_BOUNDED_POINTER (SAVE_PTR) L(epilogue): #if !defined USE_AS_STRTOK_R && defined PIC @@ -379,8 +345,7 @@ L(epilogue): cfi_adjust_cfa_offset (-4) cfi_restore (ebx) #endif - LEAVE - RET_PTR + ret L(returnNULL): xorl %eax, %eax @@ -388,7 +353,6 @@ L(returnNULL): movl SAVE(%esp), %ecx #endif movl %edx, SAVE_PTR - RETURN_NULL_BOUNDED_POINTER jmp L(epilogue) -END (BP_SYM (FUNCTION)) +END (FUNCTION) diff --git a/sysdeps/i386/strtok_r.S b/sysdeps/i386/strtok_r.S index f4a6a2c409..508729370a 100644 --- a/sysdeps/i386/strtok_r.S +++ b/sysdeps/i386/strtok_r.S @@ -1,5 +1,5 @@ #define FUNCTION __strtok_r #define USE_AS_STRTOK_R 1 #include <sysdeps/i386/strtok.S> -weak_alias (BP_SYM (__strtok_r), BP_SYM (strtok_r)) -strong_alias (BP_SYM (__strtok_r), BP_SYM (__GI___strtok_r)) +weak_alias (__strtok_r, strtok_r) +strong_alias (__strtok_r, __GI___strtok_r) diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S index 341e84988b..40d430d6ea 100644 --- a/sysdeps/i386/sub_n.S +++ b/sysdeps/i386/sub_n.S @@ -19,18 +19,15 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+8 /* space for 2 saved regs */ +#define PARMS 4+8 /* space for 2 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define S2 S1+PTR_SIZE -#define SIZE S2+PTR_SIZE +#define S1 RES+4 +#define S2 S1+4 +#define SIZE S2+4 .text -ENTRY (BP_SYM (__mpn_sub_n)) - ENTER +ENTRY (__mpn_sub_n) pushl %edi cfi_adjust_cfa_offset (4) @@ -43,13 +40,6 @@ ENTRY (BP_SYM (__mpn_sub_n)) cfi_rel_offset (esi, 0) movl S2(%esp),%edx movl SIZE(%esp),%ecx -#if __BOUNDED_POINTERS__ - shll $2, %ecx /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx) - CHECK_BOUNDS_BOTH_WIDE (%edx, S2(%esp), %ecx) - shrl $2, %ecx -#endif movl %ecx,%eax shrl $3,%ecx /* compute count for unrolled loop */ negl %eax @@ -117,6 +107,5 @@ L(oop): movl (%esi),%eax cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_sub_n)) +END (__mpn_sub_n) diff --git a/sysdeps/i386/submul_1.S b/sysdeps/i386/submul_1.S index d4588f9101..a0ecfb5ed6 100644 --- a/sysdeps/i386/submul_1.S +++ b/sysdeps/i386/submul_1.S @@ -19,13 +19,11 @@ #include "sysdep.h" #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+16 /* space for 4 saved regs */ +#define PARMS 4+16 /* space for 4 saved regs */ #define RES PARMS -#define S1 RES+PTR_SIZE -#define SIZE S1+PTR_SIZE +#define S1 RES+4 +#define SIZE S1+4 #define S2LIMB SIZE+4 #define res_ptr edi @@ -34,8 +32,7 @@ #define s2_limb ebx .text -ENTRY (BP_SYM (__mpn_submul_1)) - ENTER +ENTRY (__mpn_submul_1) pushl %edi cfi_adjust_cfa_offset (4) @@ -54,12 +51,6 @@ ENTRY (BP_SYM (__mpn_submul_1)) movl S1(%esp), %s1_ptr movl SIZE(%esp), %sizeP movl S2LIMB(%esp), %s2_limb -#if __BOUNDED_POINTERS__ - shll $2, %sizeP /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP) - CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP) - shrl $2, %sizeP -#endif leal (%res_ptr,%sizeP,4), %res_ptr leal (%s1_ptr,%sizeP,4), %s1_ptr negl %sizeP @@ -91,6 +82,5 @@ L(oop): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE ret -END (BP_SYM (__mpn_submul_1)) +END (__mpn_submul_1) diff --git a/sysdeps/ieee754/bits/nan.h b/sysdeps/ieee754/bits/nan.h index d3ab38ba72..41f47ba097 100644 --- a/sysdeps/ieee754/bits/nan.h +++ b/sysdeps/ieee754/bits/nan.h @@ -39,14 +39,14 @@ # include <endian.h> # if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } +# define __qnan_bytes { 0x7f, 0xc0, 0, 0 } # endif # if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } +# define __qnan_bytes { 0, 0, 0xc0, 0x7f } # endif -static union { unsigned char __c[4]; float __d; } __nan_union - __attribute_used__ = { __nan_bytes }; -# define NAN (__nan_union.__d) +static union { unsigned char __c[4]; float __d; } __qnan_union + __attribute__ ((__unused__)) = { __qnan_bytes }; +# define NAN (__qnan_union.__d) #endif /* GCC. */ diff --git a/sysdeps/ieee754/dbl-64/branred.c b/sysdeps/ieee754/dbl-64/branred.c index ecceeca634..524d091dc3 100644 --- a/sysdeps/ieee754/dbl-64/branred.c +++ b/sysdeps/ieee754/dbl-64/branred.c @@ -53,13 +53,7 @@ SECTION __branred(double x, double *a, double *aa) { int i,k; -#if 0 - int n; -#endif mynumber u,gor; -#if 0 - mynumber v; -#endif double r[6],s,t,sum,b,bb,sum1,sum2,b1,bb1,b2,bb2,x1,x2,t1,t2; x*=tm600.x; diff --git a/sysdeps/ieee754/dbl-64/dosincos.c b/sysdeps/ieee754/dbl-64/dosincos.c index bbef186ad1..00726285a9 100644 --- a/sysdeps/ieee754/dbl-64/dosincos.c +++ b/sysdeps/ieee754/dbl-64/dosincos.c @@ -63,9 +63,6 @@ __dubsin(double x, double dx, double v[]) { #ifndef DLA_FMS double p,hx,tx,hy,ty,q; #endif -#if 0 - double xx,y,yy,z,zz; -#endif mynumber u; int4 k; @@ -119,9 +116,6 @@ __dubcos(double x, double dx, double v[]) { #ifndef DLA_FMS double p,hx,tx,hy,ty,q; #endif -#if 0 - double xx,y,yy,z,zz; -#endif mynumber u; int4 k; u.x=x+big.x; diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c index 5585ad1d0d..27cd2a10d3 100644 --- a/sysdeps/ieee754/dbl-64/e_asin.c +++ b/sysdeps/ieee754/dbl-64/e_asin.c @@ -62,9 +62,6 @@ __ieee754_asin(double x){ double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2]; mynumber u,v; int4 k,m,n; -#if 0 - int4 nn; -#endif u.x = x; m = u.i[HIGH_HALF]; @@ -344,14 +341,8 @@ SECTION __ieee754_acos(double x) { double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2],eps; -#if 0 - double fc; -#endif mynumber u,v; int4 k,m,n; -#if 0 - int4 nn; -#endif u.x = x; m = u.i[HIGH_HALF]; k = 0x7fffffff&m; diff --git a/sysdeps/ieee754/dbl-64/e_atan2.c b/sysdeps/ieee754/dbl-64/e_atan2.c index ee3215ed3f..bfe0b3b632 100644 --- a/sysdeps/ieee754/dbl-64/e_atan2.c +++ b/sysdeps/ieee754/dbl-64/e_atan2.c @@ -53,105 +53,171 @@ /* Assumption: Machine arithmetic operations are performed in */ /* round to nearest mode of IEEE 754 standard. */ /************************************************************************/ -static double atan2Mp(double ,double ,const int[]); +static double atan2Mp (double, double, const int[]); /* Fix the sign and return after stage 1 or stage 2 */ -static double signArctan2(double y,double z) +static double +signArctan2 (double y, double z) { - return __copysign(z, y); + return __copysign (z, y); } -static double normalized(double ,double,double ,double); -void __mpatan2(mp_no *,mp_no *,mp_no *,int); + +static double normalized (double, double, double, double); +void __mpatan2 (mp_no *, mp_no *, mp_no *, int); double SECTION -__ieee754_atan2(double y,double x) { - - int i,de,ux,dx,uy,dy; -#if 0 - int p; -#endif - static const int pr[MM]={6,8,10,20,32}; - double ax,ay,u,du,u9,ua,v,vv,dv,t1,t2,t3,t7,t8, - z,zz,cor,s1,ss1,s2,ss2; +__ieee754_atan2 (double y, double x) +{ + int i, de, ux, dx, uy, dy; + static const int pr[MM] = { 6, 8, 10, 20, 32 }; + double ax, ay, u, du, u9, ua, v, vv, dv, t1, t2, t3, t7, t8, + z, zz, cor, s1, ss1, s2, ss2; #ifndef DLA_FMS - double t4,t5,t6; -#endif -#if 0 - double z1,z2; + double t4, t5, t6; #endif number num; -#if 0 - mp_no mperr,mpt1,mpx,mpy,mpz,mpz1,mpz2; -#endif - static const int ep= 59768832, /* 57*16**5 */ - em=-59768832; /* -57*16**5 */ + static const int ep = 59768832, /* 57*16**5 */ + em = -59768832; /* -57*16**5 */ /* x=NaN or y=NaN */ - num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF]; - if ((ux&0x7ff00000) ==0x7ff00000) { - if (((ux&0x000fffff)|dx)!=0x00000000) return x+x; } - num.d = y; uy = num.i[HIGH_HALF]; dy = num.i[LOW_HALF]; - if ((uy&0x7ff00000) ==0x7ff00000) { - if (((uy&0x000fffff)|dy)!=0x00000000) return y+y; } + num.d = x; + ux = num.i[HIGH_HALF]; + dx = num.i[LOW_HALF]; + if ((ux & 0x7ff00000) == 0x7ff00000) + { + if (((ux & 0x000fffff) | dx) != 0x00000000) + return x + x; + } + num.d = y; + uy = num.i[HIGH_HALF]; + dy = num.i[LOW_HALF]; + if ((uy & 0x7ff00000) == 0x7ff00000) + { + if (((uy & 0x000fffff) | dy) != 0x00000000) + return y + y; + } /* y=+-0 */ - if (uy==0x00000000) { - if (dy==0x00000000) { - if ((ux&0x80000000)==0x00000000) return ZERO; - else return opi.d; } } - else if (uy==0x80000000) { - if (dy==0x00000000) { - if ((ux&0x80000000)==0x00000000) return MZERO; - else return mopi.d;} } + if (uy == 0x00000000) + { + if (dy == 0x00000000) + { + if ((ux & 0x80000000) == 0x00000000) + return ZERO; + else + return opi.d; + } + } + else if (uy == 0x80000000) + { + if (dy == 0x00000000) + { + if ((ux & 0x80000000) == 0x00000000) + return MZERO; + else + return mopi.d; + } + } /* x=+-0 */ - if (x==ZERO) { - if ((uy&0x80000000)==0x00000000) return hpi.d; - else return mhpi.d; } + if (x == ZERO) + { + if ((uy & 0x80000000) == 0x00000000) + return hpi.d; + else + return mhpi.d; + } /* x=+-INF */ - if (ux==0x7ff00000) { - if (dx==0x00000000) { - if (uy==0x7ff00000) { - if (dy==0x00000000) return qpi.d; } - else if (uy==0xfff00000) { - if (dy==0x00000000) return mqpi.d; } - else { - if ((uy&0x80000000)==0x00000000) return ZERO; - else return MZERO; } + if (ux == 0x7ff00000) + { + if (dx == 0x00000000) + { + if (uy == 0x7ff00000) + { + if (dy == 0x00000000) + return qpi.d; + } + else if (uy == 0xfff00000) + { + if (dy == 0x00000000) + return mqpi.d; + } + else + { + if ((uy & 0x80000000) == 0x00000000) + return ZERO; + else + return MZERO; + } + } } - } - else if (ux==0xfff00000) { - if (dx==0x00000000) { - if (uy==0x7ff00000) { - if (dy==0x00000000) return tqpi.d; } - else if (uy==0xfff00000) { - if (dy==0x00000000) return mtqpi.d; } - else { - if ((uy&0x80000000)==0x00000000) return opi.d; - else return mopi.d; } + else if (ux == 0xfff00000) + { + if (dx == 0x00000000) + { + if (uy == 0x7ff00000) + { + if (dy == 0x00000000) + return tqpi.d; + } + else if (uy == 0xfff00000) + { + if (dy == 0x00000000) + return mtqpi.d; + } + else + { + if ((uy & 0x80000000) == 0x00000000) + return opi.d; + else + return mopi.d; + } + } } - } /* y=+-INF */ - if (uy==0x7ff00000) { - if (dy==0x00000000) return hpi.d; } - else if (uy==0xfff00000) { - if (dy==0x00000000) return mhpi.d; } + if (uy == 0x7ff00000) + { + if (dy == 0x00000000) + return hpi.d; + } + else if (uy == 0xfff00000) + { + if (dy == 0x00000000) + return mhpi.d; + } /* either x/y or y/x is very close to zero */ - ax = (x<ZERO) ? -x : x; ay = (y<ZERO) ? -y : y; + ax = (x < ZERO) ? -x : x; + ay = (y < ZERO) ? -y : y; de = (uy & 0x7ff00000) - (ux & 0x7ff00000); - if (de>=ep) { return ((y>ZERO) ? hpi.d : mhpi.d); } - else if (de<=em) { - if (x>ZERO) { - if ((z=ay/ax)<TWOM1022) return normalized(ax,ay,y,z); - else return signArctan2(y,z); } - else { return ((y>ZERO) ? opi.d : mopi.d); } } + if (de >= ep) + { + return ((y > ZERO) ? hpi.d : mhpi.d); + } + else if (de <= em) + { + if (x > ZERO) + { + if ((z = ay / ax) < TWOM1022) + return normalized (ax, ay, y, z); + else + return signArctan2 (y, z); + } + else + { + return ((y > ZERO) ? opi.d : mopi.d); + } + } /* if either x or y is extremely close to zero, scale abs(x), abs(y). */ - if (ax<twom500.d || ay<twom500.d) { ax*=two500.d; ay*=two500.d; } + if (ax < twom500.d || ay < twom500.d) + { + ax *= two500.d; + ay *= two500.d; + } /* Likewise for large x and y. */ if (ax > two500.d || ay > two500.d) @@ -161,268 +227,377 @@ __ieee754_atan2(double y,double x) { } /* x,y which are neither special nor extreme */ - if (ay<ax) { - u=ay/ax; - EMULV(ax,u,v,vv,t1,t2,t3,t4,t5) - du=((ay-v)-vv)/ax; } - else { - u=ax/ay; - EMULV(ay,u,v,vv,t1,t2,t3,t4,t5) - du=((ax-v)-vv)/ay; } - - if (x>ZERO) { - - /* (i) x>0, abs(y)< abs(x): atan(ay/ax) */ - if (ay<ax) { - if (u<inv16.d) { - v=u*u; zz=du+u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d))))); - if ((z=u+(zz-u1.d*u)) == u+(zz+u1.d*u)) return signArctan2(y,z); - - MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8) - s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d)))); - ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(u,du,s2,ss2,s1,ss1,t1,t2) - if ((z=s1+(ss1-u5.d*s1)) == s1+(ss1+u5.d*s1)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } - else { - i=(TWO52+TWO8*u)-TWO52; i-=16; - t3=u-cij[i][0].d; - EADD(t3,du,v,dv) - t1=cij[i][1].d; t2=cij[i][2].d; - zz=v*t2+(dv*t2+v*v*(cij[i][3].d+v*(cij[i][4].d+ - v*(cij[i][5].d+v* cij[i][6].d)))); - if (i<112) { - if (i<48) u9=u91.d; /* u < 1/4 */ - else u9=u92.d; } /* 1/4 <= u < 1/2 */ - else { - if (i<176) u9=u93.d; /* 1/2 <= u < 3/4 */ - else u9=u94.d; } /* 3/4 <= u <= 1 */ - if ((z=t1+(zz-u9*t1)) == t1+(zz+u9*t1)) return signArctan2(y,z); - - t1=u-hij[i][0].d; - EADD(t1,du,v,vv) - s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+ - v*(hij[i][14].d+v* hij[i][15].d)))); - ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2) - if ((z=s2+(ss2-ub.d*s2)) == s2+(ss2+ub.d*s2)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } + if (ay < ax) + { + u = ay / ax; + EMULV (ax, u, v, vv, t1, t2, t3, t4, t5); + du = ((ay - v) - vv) / ax; + } + else + { + u = ax / ay; + EMULV (ay, u, v, vv, t1, t2, t3, t4, t5); + du = ((ax - v) - vv) / ay; } - /* (ii) x>0, abs(x)<=abs(y): pi/2-atan(ax/ay) */ - else { - if (u<inv16.d) { - v=u*u; - zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d))))); - ESUB(hpi.d,u,t2,cor) - t3=((hpi1.d+cor)-du)-zz; - if ((z=t2+(t3-u2.d)) == t2+(t3+u2.d)) return signArctan2(y,z); - - MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8) - s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d)))); - ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(u,du,s2,ss2,s1,ss1,t1,t2) - SUB2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2) - if ((z=s2+(ss2-u6.d)) == s2+(ss2+u6.d)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } - else { - i=(TWO52+TWO8*u)-TWO52; i-=16; - v=(u-cij[i][0].d)+du; - zz=hpi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+ - v*(cij[i][5].d+v* cij[i][6].d)))); - t1=hpi.d-cij[i][1].d; - if (i<112) ua=ua1.d; /* w < 1/2 */ - else ua=ua2.d; /* w >= 1/2 */ - if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z); - - t1=u-hij[i][0].d; - EADD(t1,du,v,vv) - s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+ - v*(hij[i][14].d+v* hij[i][15].d)))); - ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2) - SUB2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2) - if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } + if (x > ZERO) + { + /* (i) x>0, abs(y)< abs(x): atan(ay/ax) */ + if (ay < ax) + { + if (u < inv16.d) + { + v = u * u; + + zz = du + u * v * (d3.d + + v * (d5.d + + v * (d7.d + + v * (d9.d + + v * (d11.d + + v * d13.d))))); + + if ((z = u + (zz - u1.d * u)) == u + (zz + u1.d * u)) + return signArctan2 (y, z); + + MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8); + s1 = v * (f11.d + v * (f13.d + + v * (f15.d + v * (f17.d + v * f19.d)))); + ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (u, du, s2, ss2, s1, ss1, t1, t2); + + if ((z = s1 + (ss1 - u5.d * s1)) == s1 + (ss1 + u5.d * s1)) + return signArctan2 (y, z); + + return atan2Mp (x, y, pr); + } + + i = (TWO52 + TWO8 * u) - TWO52; + i -= 16; + t3 = u - cij[i][0].d; + EADD (t3, du, v, dv); + t1 = cij[i][1].d; + t2 = cij[i][2].d; + zz = v * t2 + (dv * t2 + + v * v * (cij[i][3].d + + v * (cij[i][4].d + + v * (cij[i][5].d + + v * cij[i][6].d)))); + if (i < 112) + { + if (i < 48) + u9 = u91.d; /* u < 1/4 */ + else + u9 = u92.d; + } /* 1/4 <= u < 1/2 */ + else + { + if (i < 176) + u9 = u93.d; /* 1/2 <= u < 3/4 */ + else + u9 = u94.d; + } /* 3/4 <= u <= 1 */ + if ((z = t1 + (zz - u9 * t1)) == t1 + (zz + u9 * t1)) + return signArctan2 (y, z); + + t1 = u - hij[i][0].d; + EADD (t1, du, v, vv); + s1 = v * (hij[i][11].d + + v * (hij[i][12].d + + v * (hij[i][13].d + + v * (hij[i][14].d + + v * hij[i][15].d)))); + ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2); + + if ((z = s2 + (ss2 - ub.d * s2)) == s2 + (ss2 + ub.d * s2)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); + } + + /* (ii) x>0, abs(x)<=abs(y): pi/2-atan(ax/ay) */ + if (u < inv16.d) + { + v = u * u; + zz = u * v * (d3.d + + v * (d5.d + + v * (d7.d + + v * (d9.d + + v * (d11.d + + v * d13.d))))); + ESUB (hpi.d, u, t2, cor); + t3 = ((hpi1.d + cor) - du) - zz; + if ((z = t2 + (t3 - u2.d)) == t2 + (t3 + u2.d)) + return signArctan2 (y, z); + + MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8); + s1 = v * (f11.d + + v * (f13.d + + v * (f15.d + v * (f17.d + v * f19.d)))); + ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (u, du, s2, ss2, s1, ss1, t1, t2); + SUB2 (hpi.d, hpi1.d, s1, ss1, s2, ss2, t1, t2); + + if ((z = s2 + (ss2 - u6.d)) == s2 + (ss2 + u6.d)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); + } + + i = (TWO52 + TWO8 * u) - TWO52; + i -= 16; + v = (u - cij[i][0].d) + du; + + zz = hpi1.d - v * (cij[i][2].d + + v * (cij[i][3].d + + v * (cij[i][4].d + + v * (cij[i][5].d + + v * cij[i][6].d)))); + t1 = hpi.d - cij[i][1].d; + if (i < 112) + ua = ua1.d; /* w < 1/2 */ + else + ua = ua2.d; /* w >= 1/2 */ + if ((z = t1 + (zz - ua)) == t1 + (zz + ua)) + return signArctan2 (y, z); + + t1 = u - hij[i][0].d; + EADD (t1, du, v, vv); + + s1 = v * (hij[i][11].d + + v * (hij[i][12].d + + v * (hij[i][13].d + + v * (hij[i][14].d + + v * hij[i][15].d)))); + + ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2); + SUB2 (hpi.d, hpi1.d, s2, ss2, s1, ss1, t1, t2); + + if ((z = s1 + (ss1 - uc.d)) == s1 + (ss1 + uc.d)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); } - } - else { - - /* (iii) x<0, abs(x)< abs(y): pi/2+atan(ax/ay) */ - if (ax<ay) { - if (u<inv16.d) { - v=u*u; - zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d))))); - EADD(hpi.d,u,t2,cor) - t3=((hpi1.d+cor)+du)+zz; - if ((z=t2+(t3-u3.d)) == t2+(t3+u3.d)) return signArctan2(y,z); - - MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8) - s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d)))); - ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(u,du,s2,ss2,s1,ss1,t1,t2) - ADD2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2) - if ((z=s2+(ss2-u7.d)) == s2+(ss2+u7.d)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } - else { - i=(TWO52+TWO8*u)-TWO52; i-=16; - v=(u-cij[i][0].d)+du; - zz=hpi1.d+v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+ - v*(cij[i][5].d+v* cij[i][6].d)))); - t1=hpi.d+cij[i][1].d; - if (i<112) ua=ua1.d; /* w < 1/2 */ - else ua=ua2.d; /* w >= 1/2 */ - if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z); - - t1=u-hij[i][0].d; - EADD(t1,du,v,vv) - s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+ - v*(hij[i][14].d+v* hij[i][15].d)))); - ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2) - ADD2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2) - if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } + + /* (iii) x<0, abs(x)< abs(y): pi/2+atan(ax/ay) */ + if (ax < ay) + { + if (u < inv16.d) + { + v = u * u; + zz = u * v * (d3.d + + v * (d5.d + + v * (d7.d + + v * (d9.d + + v * (d11.d + v * d13.d))))); + EADD (hpi.d, u, t2, cor); + t3 = ((hpi1.d + cor) + du) + zz; + if ((z = t2 + (t3 - u3.d)) == t2 + (t3 + u3.d)) + return signArctan2 (y, z); + + MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8); + s1 = v * (f11.d + + v * (f13.d + v * (f15.d + v * (f17.d + v * f19.d)))); + ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (u, du, s2, ss2, s1, ss1, t1, t2); + ADD2 (hpi.d, hpi1.d, s1, ss1, s2, ss2, t1, t2); + + if ((z = s2 + (ss2 - u7.d)) == s2 + (ss2 + u7.d)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); + } + + i = (TWO52 + TWO8 * u) - TWO52; + i -= 16; + v = (u - cij[i][0].d) + du; + zz = hpi1.d + v * (cij[i][2].d + + v * (cij[i][3].d + + v * (cij[i][4].d + + v * (cij[i][5].d + + v * cij[i][6].d)))); + t1 = hpi.d + cij[i][1].d; + if (i < 112) + ua = ua1.d; /* w < 1/2 */ + else + ua = ua2.d; /* w >= 1/2 */ + if ((z = t1 + (zz - ua)) == t1 + (zz + ua)) + return signArctan2 (y, z); + + t1 = u - hij[i][0].d; + EADD (t1, du, v, vv); + s1 = v * (hij[i][11].d + + v * (hij[i][12].d + + v * (hij[i][13].d + + v * (hij[i][14].d + + v * hij[i][15].d)))); + ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2); + ADD2 (hpi.d, hpi1.d, s2, ss2, s1, ss1, t1, t2); + + if ((z = s1 + (ss1 - uc.d)) == s1 + (ss1 + uc.d)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); } - /* (iv) x<0, abs(y)<=abs(x): pi-atan(ax/ay) */ - else { - if (u<inv16.d) { - v=u*u; - zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d))))); - ESUB(opi.d,u,t2,cor) - t3=((opi1.d+cor)-du)-zz; - if ((z=t2+(t3-u4.d)) == t2+(t3+u4.d)) return signArctan2(y,z); - - MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8) - s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d)))); - ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(u,du,s2,ss2,s1,ss1,t1,t2) - SUB2(opi.d,opi1.d,s1,ss1,s2,ss2,t1,t2) - if ((z=s2+(ss2-u8.d)) == s2+(ss2+u8.d)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } - else { - i=(TWO52+TWO8*u)-TWO52; i-=16; - v=(u-cij[i][0].d)+du; - zz=opi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+ - v*(cij[i][5].d+v* cij[i][6].d)))); - t1=opi.d-cij[i][1].d; - if (i<112) ua=ua1.d; /* w < 1/2 */ - else ua=ua2.d; /* w >= 1/2 */ - if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z); - - t1=u-hij[i][0].d; - EADD(t1,du,v,vv) - s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+ - v*(hij[i][14].d+v* hij[i][15].d)))); - ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2) - MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8) - ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2) - SUB2(opi.d,opi1.d,s2,ss2,s1,ss1,t1,t2) - if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z); - return atan2Mp(x,y,pr); - } + /* (iv) x<0, abs(y)<=abs(x): pi-atan(ax/ay) */ + if (u < inv16.d) + { + v = u * u; + zz = u * v * (d3.d + + v * (d5.d + + v * (d7.d + + v * (d9.d + v * (d11.d + v * d13.d))))); + ESUB (opi.d, u, t2, cor); + t3 = ((opi1.d + cor) - du) - zz; + if ((z = t2 + (t3 - u4.d)) == t2 + (t3 + u4.d)) + return signArctan2 (y, z); + + MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8); + s1 = v * (f11.d + v * (f13.d + v * (f15.d + v * (f17.d + v * f19.d)))); + ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (u, du, s2, ss2, s1, ss1, t1, t2); + SUB2 (opi.d, opi1.d, s1, ss1, s2, ss2, t1, t2); + + if ((z = s2 + (ss2 - u8.d)) == s2 + (ss2 + u8.d)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); } - } + + i = (TWO52 + TWO8 * u) - TWO52; + i -= 16; + v = (u - cij[i][0].d) + du; + zz = opi1.d - v * (cij[i][2].d + + v * (cij[i][3].d + + v * (cij[i][4].d + + v * (cij[i][5].d + v * cij[i][6].d)))); + t1 = opi.d - cij[i][1].d; + if (i < 112) + ua = ua1.d; /* w < 1/2 */ + else + ua = ua2.d; /* w >= 1/2 */ + if ((z = t1 + (zz - ua)) == t1 + (zz + ua)) + return signArctan2 (y, z); + + t1 = u - hij[i][0].d; + + EADD (t1, du, v, vv); + + s1 = v * (hij[i][11].d + + v * (hij[i][12].d + + v * (hij[i][13].d + + v * (hij[i][14].d + v * hij[i][15].d)))); + + ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2); + MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8); + ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2); + SUB2 (opi.d, opi1.d, s2, ss2, s1, ss1, t1, t2); + + if ((z = s1 + (ss1 - uc.d)) == s1 + (ss1 + uc.d)) + return signArctan2 (y, z); + return atan2Mp (x, y, pr); } + #ifndef __ieee754_atan2 strong_alias (__ieee754_atan2, __atan2_finite) #endif - /* Treat the Denormalized case */ +/* Treat the Denormalized case */ static double SECTION -normalized(double ax,double ay,double y, double z) - { int p; - mp_no mpx,mpy,mpz,mperr,mpz2,mpt1; - p=6; - __dbl_mp(ax,&mpx,p); __dbl_mp(ay,&mpy,p); __dvd(&mpy,&mpx,&mpz,p); - __dbl_mp(ue.d,&mpt1,p); __mul(&mpz,&mpt1,&mperr,p); - __sub(&mpz,&mperr,&mpz2,p); __mp_dbl(&mpz2,&z,p); - return signArctan2(y,z); +normalized (double ax, double ay, double y, double z) +{ + int p; + mp_no mpx, mpy, mpz, mperr, mpz2, mpt1; + p = 6; + __dbl_mp (ax, &mpx, p); + __dbl_mp (ay, &mpy, p); + __dvd (&mpy, &mpx, &mpz, p); + __dbl_mp (ue.d, &mpt1, p); + __mul (&mpz, &mpt1, &mperr, p); + __sub (&mpz, &mperr, &mpz2, p); + __mp_dbl (&mpz2, &z, p); + return signArctan2 (y, z); } - /* Stage 3: Perform a multi-Precision computation */ + +/* Stage 3: Perform a multi-Precision computation */ static double SECTION -atan2Mp(double x,double y,const int pr[]) +atan2Mp (double x, double y, const int pr[]) { - double z1,z2; - int i,p; - mp_no mpx,mpy,mpz,mpz1,mpz2,mperr,mpt1; - for (i=0; i<MM; i++) { - p = pr[i]; - __dbl_mp(x,&mpx,p); __dbl_mp(y,&mpy,p); - __mpatan2(&mpy,&mpx,&mpz,p); - __dbl_mp(ud[i].d,&mpt1,p); __mul(&mpz,&mpt1,&mperr,p); - __add(&mpz,&mperr,&mpz1,p); __sub(&mpz,&mperr,&mpz2,p); - __mp_dbl(&mpz1,&z1,p); __mp_dbl(&mpz2,&z2,p); - if (z1==z2) return z1; - } - return z1; /*if unpossible to do exact computing */ + double z1, z2; + int i, p; + mp_no mpx, mpy, mpz, mpz1, mpz2, mperr, mpt1; + for (i = 0; i < MM; i++) + { + p = pr[i]; + __dbl_mp (x, &mpx, p); + __dbl_mp (y, &mpy, p); + __mpatan2 (&mpy, &mpx, &mpz, p); + __dbl_mp (ud[i].d, &mpt1, p); + __mul (&mpz, &mpt1, &mperr, p); + __add (&mpz, &mperr, &mpz1, p); + __sub (&mpz, &mperr, &mpz2, p); + __mp_dbl (&mpz1, &z1, p); + __mp_dbl (&mpz2, &z2, p); + if (z1 == z2) + return z1; + } + return z1; /*if impossible to do exact computing */ } diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c index 0f9d87ba59..07cc4a91b6 100644 --- a/sysdeps/ieee754/dbl-64/e_exp.c +++ b/sysdeps/ieee754/dbl-64/e_exp.c @@ -55,9 +55,6 @@ SECTION __ieee754_exp(double x) { double bexp, t, eps, del, base, y, al, bet, res, rem, cor; mynumber junk1, junk2, binexp = {{0,0}}; -#if 0 - int4 k; -#endif int4 i,j,m,n,ex; double retval; @@ -174,9 +171,6 @@ SECTION __exp1(double x, double xx, double error) { double bexp, t, eps, del, base, y, al, bet, res, rem, cor; mynumber junk1, junk2, binexp = {{0,0}}; -#if 0 - int4 k; -#endif int4 i,j,m,n,ex; junk1.x = x; diff --git a/sysdeps/ieee754/dbl-64/e_j0.c b/sysdeps/ieee754/dbl-64/e_j0.c index f393a762b2..d641a09149 100644 --- a/sysdeps/ieee754/dbl-64/e_j0.c +++ b/sysdeps/ieee754/dbl-64/e_j0.c @@ -293,7 +293,8 @@ pzero(double x) int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = pR8; q= pS8;} + if (ix>=0x41b00000) {return one;} + else if(ix>=0x40200000){p = pR8; q= pS8;} else if(ix>=0x40122E8B){p = pR5; q= pS5;} else if(ix>=0x4006DB6D){p = pR3; q= pS3;} else if(ix>=0x40000000){p = pR2; q= pS2;} @@ -400,7 +401,8 @@ qzero(double x) int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = qR8; q= qS8;} + if (ix>=0x41b00000) {return -.125/x;} + else if(ix>=0x40200000){p = qR8; q= qS8;} else if(ix>=0x40122E8B){p = qR5; q= qS5;} else if(ix>=0x4006DB6D){p = qR3; q= qS3;} else if(ix>=0x40000000){p = qR2; q= qS2;} diff --git a/sysdeps/ieee754/dbl-64/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c index cba4d46b18..cca5f20b4f 100644 --- a/sysdeps/ieee754/dbl-64/e_j1.c +++ b/sysdeps/ieee754/dbl-64/e_j1.c @@ -291,7 +291,8 @@ pone(double x) int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = pr8; q= ps8;} + if (ix>=0x41b00000) {return one;} + else if(ix>=0x40200000){p = pr8; q= ps8;} else if(ix>=0x40122E8B){p = pr5; q= ps5;} else if(ix>=0x4006DB6D){p = pr3; q= ps3;} else if(ix>=0x40000000){p = pr2; q= ps2;} @@ -399,7 +400,8 @@ qone(double x) int32_t ix; GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - if(ix>=0x40200000) {p = qr8; q= qs8;} + if (ix>=0x41b00000) {return .375/x;} + else if(ix>=0x40200000){p = qr8; q= qs8;} else if(ix>=0x40122E8B){p = qr5; q= qs5;} else if(ix>=0x4006DB6D){p = qr3; q= qs3;} else if(ix>=0x40000000){p = qr2; q= qs2;} diff --git a/sysdeps/ieee754/dbl-64/e_log.c b/sysdeps/ieee754/dbl-64/e_log.c index 762639bcdf..58c9a8e76b 100644 --- a/sysdeps/ieee754/dbl-64/e_log.c +++ b/sysdeps/ieee754/dbl-64/e_log.c @@ -56,9 +56,6 @@ __ieee754_log(double x) { #define M 4 static const int pr[M]={8,10,18,32}; int i,j,n,ux,dx,p; -#if 0 - int k; -#endif double dbl_n,u,p0,q,r0,w,nln2a,luai,lubi,lvaj,lvbj, sij,ssij,ttij,A,B,B0,y,y1,y2,polI,polII,sa,sb, t1,t2,t7,t8,t,ra,rb,ww, diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c index ee2711322f..f8962a7dce 100644 --- a/sysdeps/ieee754/dbl-64/e_pow.c +++ b/sysdeps/ieee754/dbl-64/e_pow.c @@ -64,9 +64,6 @@ double SECTION __ieee754_pow(double x, double y) { double z,a,aa,error, t,a1,a2,y1,y2; -#if 0 - double gor=1.0; -#endif mynumber u,v; int k; int4 qx,qy; @@ -206,13 +203,7 @@ static double SECTION log1(double x, double *delta, double *error) { int i,j,m; -#if 0 - int n; -#endif double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,add=0; -#if 0 - double cor; -#endif mynumber u,v; #ifdef BIG_ENDI mynumber @@ -300,13 +291,7 @@ static double SECTION my_log2(double x, double *delta, double *error) { int i,j,m; -#if 0 - int n; -#endif double uu,vv,eps,nx,e,e1,e2,t,t1,t2,res,add=0; -#if 0 - double cor; -#endif double ou1,ou2,lu1,lu2,ov,lv1,lv2,a,a1,a2; double y,yy,z,zz,j1,j2,j7,j8; #ifndef DLA_FMS @@ -397,9 +382,6 @@ SECTION checkint(double x) { union {int4 i[2]; double x;} u; int k,m,n; -#if 0 - int l; -#endif u.x = x; m = u.i[HIGH_HALF]&0x7fffffff; /* no sign */ if (m >= 0x7ff00000) return 0; /* x is +/-inf or NaN */ diff --git a/sysdeps/ieee754/dbl-64/e_remainder.c b/sysdeps/ieee754/dbl-64/e_remainder.c index ac4b55f9d4..c4db9316c7 100644 --- a/sysdeps/ieee754/dbl-64/e_remainder.c +++ b/sysdeps/ieee754/dbl-64/e_remainder.c @@ -42,13 +42,7 @@ double __ieee754_remainder(double x, double y) { double z,d,xx; -#if 0 - double yy; -#endif int4 kx,ky,n,nn,n1,m1,l; -#if 0 - int4 m; -#endif mynumber u,t,w={{0,0}},v={{0,0}},ww={{0,0}},r; u.x=x; t.x=y; diff --git a/sysdeps/ieee754/dbl-64/mpa-arch.h b/sysdeps/ieee754/dbl-64/mpa-arch.h new file mode 100644 index 0000000000..7de9d51ae2 --- /dev/null +++ b/sysdeps/ieee754/dbl-64/mpa-arch.h @@ -0,0 +1,47 @@ +/* Overridable constants and operations. + Copyright (C) 2013 Free Software Foundation, Inc. + + This program 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. + + This program 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 this program; if not, see <http://www.gnu.org/licenses/>. */ + +#include <stdint.h> + +typedef long mantissa_t; +typedef int64_t mantissa_store_t; + +#define TWOPOW(i) (1L << i) + +#define RADIX_EXP 24 +#define RADIX TWOPOW (RADIX_EXP) /* 2^24 */ + +/* Divide D by RADIX and put the remainder in R. D must be a non-negative + integral value. */ +#define DIV_RADIX(d, r) \ + ({ \ + r = d & (RADIX - 1); \ + d >>= RADIX_EXP; \ + }) + +/* Put the integer component of a double X in R and retain the fraction in + X. This is used in extracting mantissa digits for MP_NO by using the + integer portion of the current value of the number as the current mantissa + digit and then scaling by RADIX to get the next mantissa digit in the same + manner. */ +#define INTEGER_OF(x, i) \ + ({ \ + i = (mantissa_t) x; \ + x -= i; \ + }) + +/* Align IN down to F. The code assumes that F is a power of two. */ +#define ALIGN_DOWN_TO(in, f) ((in) & -(f)) diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c index ede8ed1986..a3feb175ed 100644 --- a/sysdeps/ieee754/dbl-64/mpa.c +++ b/sysdeps/ieee754/dbl-64/mpa.c @@ -43,6 +43,7 @@ #include "endian.h" #include "mpa.h" #include <sys/param.h> +#include <alloca.h> #ifndef SECTION # define SECTION @@ -59,8 +60,9 @@ const mp_no mptwo = {1, {1.0, 2.0}}; static int mcr (const mp_no *x, const mp_no *y, int p) { - int i; - for (i = 1; i <= p; i++) + long i; + long p2 = p; + for (i = 1; i <= p2; i++) { if (X[i] == Y[i]) continue; @@ -76,16 +78,16 @@ mcr (const mp_no *x, const mp_no *y, int p) int __acr (const mp_no *x, const mp_no *y, int p) { - int i; + long i; - if (X[0] == ZERO) + if (X[0] == 0) { - if (Y[0] == ZERO) + if (Y[0] == 0) i = 0; else i = -1; } - else if (Y[0] == ZERO) + else if (Y[0] == 0) i = 1; else { @@ -107,8 +109,10 @@ __acr (const mp_no *x, const mp_no *y, int p) void __cpy (const mp_no *x, mp_no *y, int p) { + long i; + EY = EX; - for (int i = 0; i <= p; i++) + for (i = 0; i <= p; i++) Y[i] = X[i]; } #endif @@ -119,9 +123,10 @@ __cpy (const mp_no *x, mp_no *y, int p) static void norm (const mp_no *x, double *y, int p) { -#define R RADIXI - int i; - double a, c, u, v, z[5]; +#define R RADIXI + long i; + double c; + mantissa_t a, u, v, z[5]; if (p < 5) { if (p == 1) @@ -135,44 +140,41 @@ norm (const mp_no *x, double *y, int p) } else { - for (a = ONE, z[1] = X[1]; z[1] < TWO23;) + for (a = 1, z[1] = X[1]; z[1] < TWO23;) { - a *= TWO; - z[1] *= TWO; + a *= 2; + z[1] *= 2; } for (i = 2; i < 5; i++) { - z[i] = X[i] * a; - u = (z[i] + CUTTER) - CUTTER; - if (u > z[i]) - u -= RADIX; - z[i] -= u; - z[i - 1] += u * RADIXI; + mantissa_store_t d, r; + d = X[i] * (mantissa_store_t) a; + DIV_RADIX (d, r); + z[i] = r; + z[i - 1] += d; } - u = (z[3] + TWO71) - TWO71; - if (u > z[3]) - u -= TWO19; + u = ALIGN_DOWN_TO (z[3], TWO19); v = z[3] - u; if (v == TWO18) { - if (z[4] == ZERO) + if (z[4] == 0) { for (i = 5; i <= p; i++) { - if (X[i] == ZERO) + if (X[i] == 0) continue; else { - z[3] += ONE; + z[3] += 1; break; } } } else - z[3] += ONE; + z[3] += 1; } c = (z[1] + R * (z[2] + R * z[3])) / a; @@ -194,47 +196,49 @@ norm (const mp_no *x, double *y, int p) static void denorm (const mp_no *x, double *y, int p) { - int i, k; - double c, u, z[5]; + long i, k; + long p2 = p; + double c; + mantissa_t u, z[5]; -#define R RADIXI +#define R RADIXI if (EX < -44 || (EX == -44 && X[1] < TWO5)) { - *y = ZERO; + *y = 0; return; } - if (p == 1) + if (p2 == 1) { if (EX == -42) { z[1] = X[1] + TWO10; - z[2] = ZERO; - z[3] = ZERO; + z[2] = 0; + z[3] = 0; k = 3; } else if (EX == -43) { z[1] = TWO10; z[2] = X[1]; - z[3] = ZERO; + z[3] = 0; k = 2; } else { z[1] = TWO10; - z[2] = ZERO; + z[2] = 0; z[3] = X[1]; k = 1; } } - else if (p == 2) + else if (p2 == 2) { if (EX == -42) { z[1] = X[1] + TWO10; z[2] = X[2]; - z[3] = ZERO; + z[3] = 0; k = 3; } else if (EX == -43) @@ -247,7 +251,7 @@ denorm (const mp_no *x, double *y, int p) else { z[1] = TWO10; - z[2] = ZERO; + z[2] = 0; z[3] = X[1]; k = 1; } @@ -269,25 +273,23 @@ denorm (const mp_no *x, double *y, int p) else { z[1] = TWO10; - z[2] = ZERO; + z[2] = 0; k = 1; } z[3] = X[k]; } - u = (z[3] + TWO57) - TWO57; - if (u > z[3]) - u -= TWO5; + u = ALIGN_DOWN_TO (z[3], TWO5); if (u == z[3]) { - for (i = k + 1; i <= p; i++) + for (i = k + 1; i <= p2; i++) { - if (X[i] == ZERO) + if (X[i] == 0) continue; else { - z[3] += ONE; + z[3] += 1; break; } } @@ -304,9 +306,9 @@ denorm (const mp_no *x, double *y, int p) void __mp_dbl (const mp_no *x, double *y, int p) { - if (X[0] == ZERO) + if (X[0] == 0) { - *y = ZERO; + *y = 0; return; } @@ -323,42 +325,38 @@ void SECTION __dbl_mp (double x, mp_no *y, int p) { - int i, n; - double u; + long i, n; + long p2 = p; /* Sign. */ - if (x == ZERO) + if (x == 0) { - Y[0] = ZERO; + Y[0] = 0; return; } - else if (x > ZERO) - Y[0] = ONE; + else if (x > 0) + Y[0] = 1; else { - Y[0] = MONE; + Y[0] = -1; x = -x; } /* Exponent. */ - for (EY = ONE; x >= RADIX; EY += ONE) + for (EY = 1; x >= RADIX; EY += 1) x *= RADIXI; - for (; x < ONE; EY -= ONE) + for (; x < 1; EY -= 1) x *= RADIX; /* Digits. */ - n = MIN (p, 4); + n = MIN (p2, 4); for (i = 1; i <= n; i++) { - u = (x + TWO52) - TWO52; - if (u > x) - u -= ONE; - Y[i] = u; - x -= u; + INTEGER_OF (x, Y[i]); x *= RADIX; } - for (; i <= p; i++) - Y[i] = ZERO; + for (; i <= p2; i++) + Y[i] = 0; } /* Add magnitudes of *X and *Y assuming that abs (*X) >= abs (*Y) > 0. The @@ -369,53 +367,64 @@ static void SECTION add_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p) { - int i, j, k; + long i, j, k; + long p2 = p; + mantissa_t zk; EZ = EX; - i = p; - j = p + EY - EX; - k = p + 1; + i = p2; + j = p2 + EY - EX; + k = p2 + 1; - if (j < 1) + if (__glibc_unlikely (j < 1)) { __cpy (x, z, p); return; } - else - Z[k] = ZERO; + + zk = 0; for (; j > 0; i--, j--) { - Z[k] += X[i] + Y[j]; - if (Z[k] >= RADIX) + zk += X[i] + Y[j]; + if (zk >= RADIX) { - Z[k] -= RADIX; - Z[--k] = ONE; + Z[k--] = zk - RADIX; + zk = 1; } else - Z[--k] = ZERO; + { + Z[k--] = zk; + zk = 0; + } } for (; i > 0; i--) { - Z[k] += X[i]; - if (Z[k] >= RADIX) + zk += X[i]; + if (zk >= RADIX) { - Z[k] -= RADIX; - Z[--k] = ONE; + Z[k--] = zk - RADIX; + zk = 1; } else - Z[--k] = ZERO; + { + Z[k--] = zk; + zk = 0; + } } - if (Z[1] == ZERO) + if (zk == 0) { - for (i = 1; i <= p; i++) + for (i = 1; i <= p2; i++) Z[i] = Z[i + 1]; } else - EZ += ONE; + { + Z[1] = zk; + EZ += 1; + } } /* Subtract the magnitudes of *X and *Y assuming that abs (*x) > abs (*y) > 0. @@ -426,72 +435,71 @@ static void SECTION sub_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p) { - int i, j, k; + long i, j, k; + long p2 = p; + mantissa_t zk; EZ = EX; + i = p2; + j = p2 + EY - EX; + k = p2; - if (EX == EY) + /* Y is too small compared to X, copy X over to the result. */ + if (__glibc_unlikely (j < 1)) { - i = j = k = p; - Z[k] = Z[k + 1] = ZERO; + __cpy (x, z, p); + return; } - else + + /* The relevant least significant digit in Y is non-zero, so we factor it in + to enhance accuracy. */ + if (j < p2 && Y[j + 1] > 0) { - j = EX - EY; - if (j > p) - { - __cpy (x, z, p); - return; - } - else - { - i = p; - j = p + 1 - j; - k = p; - if (Y[j] > ZERO) - { - Z[k + 1] = RADIX - Y[j--]; - Z[k] = MONE; - } - else - { - Z[k + 1] = ZERO; - Z[k] = ZERO; - j--; - } - } + Z[k + 1] = RADIX - Y[j + 1]; + zk = -1; } + else + zk = Z[k + 1] = 0; + /* Subtract and borrow. */ for (; j > 0; i--, j--) { - Z[k] += (X[i] - Y[j]); - if (Z[k] < ZERO) + zk += (X[i] - Y[j]); + if (zk < 0) { - Z[k] += RADIX; - Z[--k] = MONE; + Z[k--] = zk + RADIX; + zk = -1; } else - Z[--k] = ZERO; + { + Z[k--] = zk; + zk = 0; + } } + /* We're done with digits from Y, so it's just digits in X. */ for (; i > 0; i--) { - Z[k] += X[i]; - if (Z[k] < ZERO) + zk += X[i]; + if (zk < 0) { - Z[k] += RADIX; - Z[--k] = MONE; + Z[k--] = zk + RADIX; + zk = -1; } else - Z[--k] = ZERO; + { + Z[k--] = zk; + zk = 0; + } } - for (i = 1; Z[i] == ZERO; i++); + /* Normalize. */ + for (i = 1; Z[i] == 0; i++); EZ = EZ - i + 1; - for (k = 1; i <= p + 1;) + for (k = 1; i <= p2 + 1;) Z[k++] = Z[i++]; - for (; k <= p;) - Z[k++] = ZERO; + for (; k <= p2;) + Z[k++] = 0; } /* Add *X and *Y and store the result in *Z. X and Y may overlap, but not X @@ -503,12 +511,12 @@ __add (const mp_no *x, const mp_no *y, mp_no *z, int p) { int n; - if (X[0] == ZERO) + if (X[0] == 0) { __cpy (y, z, p); return; } - else if (Y[0] == ZERO) + else if (Y[0] == 0) { __cpy (x, z, p); return; @@ -540,7 +548,7 @@ __add (const mp_no *x, const mp_no *y, mp_no *z, int p) Z[0] = Y[0]; } else - Z[0] = ZERO; + Z[0] = 0; } } @@ -553,13 +561,13 @@ __sub (const mp_no *x, const mp_no *y, mp_no *z, int p) { int n; - if (X[0] == ZERO) + if (X[0] == 0) { __cpy (y, z, p); Z[0] = -Z[0]; return; } - else if (Y[0] == ZERO) + else if (Y[0] == 0) { __cpy (x, z, p); return; @@ -591,10 +599,11 @@ __sub (const mp_no *x, const mp_no *y, mp_no *z, int p) Z[0] = -Y[0]; } else - Z[0] = ZERO; + Z[0] = 0; } } +#ifndef NO__MUL /* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X and Z or Y and Z. For P in [1, 2, 3], the exact result is truncated to P digits. In case P > 3 the error is bounded by 1.001 ULP. */ @@ -602,57 +611,241 @@ void SECTION __mul (const mp_no *x, const mp_no *y, mp_no *z, int p) { - int i, j, k, k2; - double u, zk; + long i, j, k, ip, ip2; + long p2 = p; + mantissa_store_t zk; + const mp_no *a; + mantissa_store_t *diag; /* Is z=0? */ - if (__glibc_unlikely (X[0] * Y[0] == ZERO)) + if (__glibc_unlikely (X[0] * Y[0] == 0)) { - Z[0] = ZERO; + Z[0] = 0; return; } - /* Multiply, add and carry. */ - k2 = (__glibc_unlikely (p < 3)) ? p + p : p + 3; - zk = Z[k2] = ZERO; + /* We need not iterate through all X's and Y's since it's pointless to + multiply zeroes. Here, both are zero... */ + for (ip2 = p2; ip2 > 0; ip2--) + if (X[ip2] != 0 || Y[ip2] != 0) + break; + + a = X[ip2] != 0 ? y : x; + + /* ... and here, at least one of them is still zero. */ + for (ip = ip2; ip > 0; ip--) + if (a->d[ip] != 0) + break; + + /* The product looks like this for p = 3 (as an example): + + + a1 a2 a3 + x b1 b2 b3 + ----------------------------- + a1*b3 a2*b3 a3*b3 + a1*b2 a2*b2 a3*b2 + a1*b1 a2*b1 a3*b1 + + So our K needs to ideally be P*2, but we're limiting ourselves to P + 3 + for P >= 3. We compute the above digits in two parts; the last P-1 + digits and then the first P digits. The last P-1 digits are a sum of + products of the input digits from P to P-k where K is 0 for the least + significant digit and increases as we go towards the left. The product + term is of the form X[k]*X[P-k] as can be seen in the above example. + + The first P digits are also a sum of products with the same product term, + except that the sum is from 1 to k. This is also evident from the above + example. + + Another thing that becomes evident is that only the most significant + ip+ip2 digits of the result are non-zero, where ip and ip2 are the + 'internal precision' of the input numbers, i.e. digits after ip and ip2 + are all 0. */ + + k = (__glibc_unlikely (p2 < 3)) ? p2 + p2 : p2 + 3; + + while (k > ip + ip2 + 1) + Z[k--] = 0; + + zk = 0; - for (k = k2; k > p; k--) + /* Precompute sums of diagonal elements so that we can directly use them + later. See the next comment to know we why need them. */ + diag = alloca (k * sizeof (mantissa_store_t)); + mantissa_store_t d = 0; + for (i = 1; i <= ip; i++) { - for (i = k - p, j = p; i < p + 1; i++, j--) - zk += X[i] * Y[j]; + d += X[i] * (mantissa_store_t) Y[i]; + diag[i] = d; + } + while (i < k) + diag[i++] = d; + + while (k > p2) + { + long lim = k / 2; + + if (k % 2 == 0) + /* We want to add this only once, but since we subtract it in the sum + of products above, we add twice. */ + zk += 2 * X[lim] * (mantissa_store_t) Y[lim]; + + for (i = k - p2, j = p2; i < j; i++, j--) + zk += (X[i] + X[j]) * (mantissa_store_t) (Y[i] + Y[j]); + + zk -= diag[k - 1]; - u = (zk + CUTTER) - CUTTER; - if (u > zk) - u -= RADIX; - Z[k] = zk - u; - zk = u * RADIXI; + DIV_RADIX (zk, Z[k]); + k--; } + /* The real deal. Mantissa digit Z[k] is the sum of all X[i] * Y[j] where i + goes from 1 -> k - 1 and j goes the same range in reverse. To reduce the + number of multiplications, we halve the range and if k is an even number, + add the diagonal element X[k/2]Y[k/2]. Through the half range, we compute + X[i] * Y[j] as (X[i] + X[j]) * (Y[i] + Y[j]) - X[i] * Y[i] - X[j] * Y[j]. + + This reduction tells us that we're summing two things, the first term + through the half range and the negative of the sum of the product of all + terms of X and Y in the full range. i.e. + + SUM(X[i] * Y[i]) for k terms. This is precalculated above for each k in + a single loop so that it completes in O(n) time and can hence be directly + used in the loop below. */ while (k > 1) { - for (i = 1, j = k - 1; i < k; i++, j--) - zk += X[i] * Y[j]; + long lim = k / 2; + + if (k % 2 == 0) + /* We want to add this only once, but since we subtract it in the sum + of products above, we add twice. */ + zk += 2 * X[lim] * (mantissa_store_t) Y[lim]; + + for (i = 1, j = k - 1; i < j; i++, j--) + zk += (X[i] + X[j]) * (mantissa_store_t) (Y[i] + Y[j]); - u = (zk + CUTTER) - CUTTER; - if (u > zk) - u -= RADIX; - Z[k] = zk - u; - zk = u * RADIXI; + zk -= diag[k - 1]; + + DIV_RADIX (zk, Z[k]); k--; } Z[k] = zk; - EZ = EX + EY; + /* Get the exponent sum into an intermediate variable. This is a subtle + optimization, where given enough registers, all operations on the exponent + happen in registers and the result is written out only once into EZ. */ + int e = EX + EY; + /* Is there a carry beyond the most significant digit? */ - if (__glibc_unlikely (Z[1] == ZERO)) + if (__glibc_unlikely (Z[1] == 0)) { - for (i = 1; i <= p; i++) + for (i = 1; i <= p2; i++) Z[i] = Z[i + 1]; - EZ--; + e--; } + EZ = e; Z[0] = X[0] * Y[0]; } +#endif + +#ifndef NO__SQR +/* Square *X and store result in *Y. X and Y may not overlap. For P in + [1, 2, 3], the exact result is truncated to P digits. In case P > 3 the + error is bounded by 1.001 ULP. This is a faster special case of + multiplication. */ +void +SECTION +__sqr (const mp_no *x, mp_no *y, int p) +{ + long i, j, k, ip; + mantissa_store_t yk; + + /* Is z=0? */ + if (__glibc_unlikely (X[0] == 0)) + { + Y[0] = 0; + return; + } + + /* We need not iterate through all X's since it's pointless to + multiply zeroes. */ + for (ip = p; ip > 0; ip--) + if (X[ip] != 0) + break; + + k = (__glibc_unlikely (p < 3)) ? p + p : p + 3; + + while (k > 2 * ip + 1) + Y[k--] = 0; + + yk = 0; + + while (k > p) + { + mantissa_store_t yk2 = 0; + long lim = k / 2; + + if (k % 2 == 0) + yk += X[lim] * (mantissa_store_t) X[lim]; + + /* In __mul, this loop (and the one within the next while loop) run + between a range to calculate the mantissa as follows: + + Z[k] = X[k] * Y[n] + X[k+1] * Y[n-1] ... + X[n-1] * Y[k+1] + + X[n] * Y[k] + + For X == Y, we can get away with summing halfway and doubling the + result. For cases where the range size is even, the mid-point needs + to be added separately (above). */ + for (i = k - p, j = p; i < j; i++, j--) + yk2 += X[i] * (mantissa_store_t) X[j]; + + yk += 2 * yk2; + + DIV_RADIX (yk, Y[k]); + k--; + } + + while (k > 1) + { + mantissa_store_t yk2 = 0; + long lim = k / 2; + + if (k % 2 == 0) + yk += X[lim] * (mantissa_store_t) X[lim]; + + /* Likewise for this loop. */ + for (i = 1, j = k - 1; i < j; i++, j--) + yk2 += X[i] * (mantissa_store_t) X[j]; + + yk += 2 * yk2; + + DIV_RADIX (yk, Y[k]); + k--; + } + Y[k] = yk; + + /* Squares are always positive. */ + Y[0] = 1; + + /* Get the exponent sum into an intermediate variable. This is a subtle + optimization, where given enough registers, all operations on the exponent + happen in registers and the result is written out only once into EZ. */ + int e = EX * 2; + + /* Is there a carry beyond the most significant digit? */ + if (__glibc_unlikely (Y[1] == 0)) + { + for (i = 1; i <= p; i++) + Y[i] = Y[i + 1]; + e--; + } + + EY = e; +} +#endif /* Invert *X and store in *Y. Relative error bound: - For P = 2: 1.001 * R ^ (1 - P) @@ -664,7 +857,7 @@ static void SECTION __inv (const mp_no *x, mp_no *y, int p) { - int i; + long i; double t; mp_no z, w; static const int np1[] = @@ -675,7 +868,7 @@ __inv (const mp_no *x, mp_no *y, int p) __cpy (x, &z, p); z.e = 0; __mp_dbl (&z, &t, p); - t = ONE / t; + t = 1 / t; __dbl_mp (t, y, p); EY -= EX; @@ -701,8 +894,8 @@ __dvd (const mp_no *x, const mp_no *y, mp_no *z, int p) { mp_no w; - if (X[0] == ZERO) - Z[0] = ZERO; + if (X[0] == 0) + Z[0] = 0; else { __inv (y, &w, p); diff --git a/sysdeps/ieee754/dbl-64/mpa.h b/sysdeps/ieee754/dbl-64/mpa.h index 06343d46d1..54044a0586 100644 --- a/sysdeps/ieee754/dbl-64/mpa.h +++ b/sysdeps/ieee754/dbl-64/mpa.h @@ -35,6 +35,7 @@ /* Common types and definition */ /************************************************************************/ +#include <mpa-arch.h> /* The mp_no structure holds the details of a multi-precision floating point number. @@ -61,7 +62,7 @@ typedef struct { int e; - double d[40]; + mantissa_t d[40]; } mp_no; typedef union @@ -82,9 +83,13 @@ extern const mp_no mptwo; #define ABS(x) ((x) < 0 ? -(x) : (x)) -#define RADIX 0x1.0p24 /* 2^24 */ -#define RADIXI 0x1.0p-24 /* 2^-24 */ -#define CUTTER 0x1.0p76 /* 2^76 */ +#ifndef RADIXI +# define RADIXI 0x1.0p-24 /* 2^-24 */ +#endif + +#ifndef TWO52 +# define TWO52 0x1.0p52 /* 2^52 */ +#endif #define ZERO 0.0 /* 0 */ #define MZERO -0.0 /* 0 with the sign bit set */ @@ -92,13 +97,13 @@ extern const mp_no mptwo; #define MONE -1.0 /* -1 */ #define TWO 2.0 /* 2 */ -#define TWO5 0x1.0p5 /* 2^5 */ -#define TWO8 0x1.0p8 /* 2^52 */ -#define TWO10 0x1.0p10 /* 2^10 */ -#define TWO18 0x1.0p18 /* 2^18 */ -#define TWO19 0x1.0p19 /* 2^19 */ -#define TWO23 0x1.0p23 /* 2^23 */ -#define TWO52 0x1.0p52 /* 2^52 */ +#define TWO5 TWOPOW (5) /* 2^5 */ +#define TWO8 TWOPOW (8) /* 2^52 */ +#define TWO10 TWOPOW (10) /* 2^10 */ +#define TWO18 TWOPOW (18) /* 2^18 */ +#define TWO19 TWOPOW (19) /* 2^19 */ +#define TWO23 TWOPOW (23) /* 2^23 */ + #define TWO57 0x1.0p57 /* 2^57 */ #define TWO71 0x1.0p71 /* 2^71 */ #define TWOM1032 0x1.0p-1032 /* 2^-1032 */ @@ -115,6 +120,7 @@ void __dbl_mp (double, mp_no *, int); void __add (const mp_no *, const mp_no *, mp_no *, int); void __sub (const mp_no *, const mp_no *, mp_no *, int); void __mul (const mp_no *, const mp_no *, mp_no *, int); +void __sqr (const mp_no *, mp_no *, int); void __dvd (const mp_no *, const mp_no *, mp_no *, int); extern void __mpatan (mp_no *, mp_no *, int); diff --git a/sysdeps/ieee754/dbl-64/mpatan.c b/sysdeps/ieee754/dbl-64/mpatan.c index db5868092a..cc879d8ec4 100644 --- a/sysdeps/ieee754/dbl-64/mpatan.c +++ b/sysdeps/ieee754/dbl-64/mpatan.c @@ -39,63 +39,78 @@ #include "mpatan.h" -void __mpsqrt(mp_no *, mp_no *, int); - void SECTION -__mpatan(mp_no *x, mp_no *y, int p) { +__mpatan (mp_no *x, mp_no *y, int p) +{ - int i,m,n; + int i, m, n; double dx; - mp_no - mptwoim1 = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, - 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, - 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}}; + mp_no mptwoim1 = + { + 0, + { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 + } + }; - mp_no mps,mpsm,mpt,mpt1,mpt2,mpt3; + mp_no mps, mpsm, mpt, mpt1, mpt2, mpt3; - /* Choose m and initiate mptwoim1 */ - if (EX>0) m=7; - else if (EX<0) m=0; - else { - __mp_dbl(x,&dx,p); dx=ABS(dx); - for (m=6; m>0; m--) - {if (dx>__atan_xm[m].d) break;} + /* Choose m and initiate mptwoim1. */ + if (EX > 0) + m = 7; + else if (EX < 0) + m = 0; + else + { + __mp_dbl (x, &dx, p); + dx = ABS (dx); + for (m = 6; m > 0; m--) + { + if (dx > __atan_xm[m].d) + break; + } } - mptwoim1.e = 1; - mptwoim1.d[0] = ONE; + mptwoim1.e = 1; + mptwoim1.d[0] = ONE; - /* Reduce x m times */ - __mul(x,x,&mpsm,p); - if (m==0) __cpy(x,&mps,p); - else { - for (i=0; i<m; i++) { - __add(&mpone,&mpsm,&mpt1,p); - __mpsqrt(&mpt1,&mpt2,p); - __add(&mpt2,&mpt2,&mpt1,p); - __add(&mptwo,&mpsm,&mpt2,p); - __add(&mpt1,&mpt2,&mpt3,p); - __dvd(&mpsm,&mpt3,&mpt1,p); - __cpy(&mpt1,&mpsm,p); - } - __mpsqrt(&mpsm,&mps,p); mps.d[0] = X[0]; + /* Reduce x m times. */ + __sqr (x, &mpsm, p); + if (m == 0) + __cpy (x, &mps, p); + else + { + for (i = 0; i < m; i++) + { + __add (&mpone, &mpsm, &mpt1, p); + __mpsqrt (&mpt1, &mpt2, p); + __add (&mpt2, &mpt2, &mpt1, p); + __add (&mptwo, &mpsm, &mpt2, p); + __add (&mpt1, &mpt2, &mpt3, p); + __dvd (&mpsm, &mpt3, &mpt1, p); + __cpy (&mpt1, &mpsm, p); + } + __mpsqrt (&mpsm, &mps, p); + mps.d[0] = X[0]; } - /* Evaluate a truncated power series for Atan(s) */ - n=__atan_np[p]; mptwoim1.d[1] = __atan_twonm1[p].d; - __dvd(&mpsm,&mptwoim1,&mpt,p); - for (i=n-1; i>1; i--) { + /* Evaluate a truncated power series for Atan(s). */ + n = __atan_np[p]; + mptwoim1.d[1] = __atan_twonm1[p].d; + __dvd (&mpsm, &mptwoim1, &mpt, p); + for (i = n - 1; i > 1; i--) + { mptwoim1.d[1] -= TWO; - __dvd(&mpsm,&mptwoim1,&mpt1,p); - __mul(&mpsm,&mpt,&mpt2,p); - __sub(&mpt1,&mpt2,&mpt,p); + __dvd (&mpsm, &mptwoim1, &mpt1, p); + __mul (&mpsm, &mpt, &mpt2, p); + __sub (&mpt1, &mpt2, &mpt, p); } - __mul(&mps,&mpt,&mpt1,p); - __sub(&mps,&mpt1,&mpt,p); - - /* Compute Atan(x) */ - mptwoim1.d[1] = 1 << m; - __mul(&mptwoim1,&mpt,y,p); + __mul (&mps, &mpt, &mpt1, p); + __sub (&mps, &mpt1, &mpt, p); - return; + /* Compute Atan(x). */ + mptwoim1.d[1] = 1 << m; + __mul (&mptwoim1, &mpt, y, p); } diff --git a/sysdeps/ieee754/dbl-64/mpatan2.c b/sysdeps/ieee754/dbl-64/mpatan2.c index c0b9aea1e2..d29c2fbade 100644 --- a/sysdeps/ieee754/dbl-64/mpatan2.c +++ b/sysdeps/ieee754/dbl-64/mpatan2.c @@ -32,37 +32,36 @@ /* */ /******************************************************************/ - - #include "mpa.h" #ifndef SECTION # define SECTION #endif -void __mpsqrt(mp_no *, mp_no *, int); -void __mpatan(mp_no *, mp_no *, int); - -/* Multi-Precision Atan2(y,x) function subroutine, for p >= 4. */ -/* y=0 is not permitted if x<=0. No error messages are given. */ +/* Multi-Precision Atan2 (y, x) function subroutine, for p >= 4. + y = 0 is not permitted if x <= 0. No error messages are given. */ void SECTION -__mpatan2(mp_no *y, mp_no *x, mp_no *z, int p) { +__mpatan2 (mp_no *y, mp_no *x, mp_no *z, int p) +{ + mp_no mpt1, mpt2, mpt3; - mp_no mpt1,mpt2,mpt3; - - - if (X[0] <= ZERO) { - __dvd(x,y,&mpt1,p); __mul(&mpt1,&mpt1,&mpt2,p); - if (mpt1.d[0] != ZERO) mpt1.d[0] = ONE; - __add(&mpt2,&mpone,&mpt3,p); __mpsqrt(&mpt3,&mpt2,p); - __add(&mpt1,&mpt2,&mpt3,p); mpt3.d[0]=Y[0]; - __mpatan(&mpt3,&mpt1,p); __add(&mpt1,&mpt1,z,p); - } + if (X[0] <= ZERO) + { + __dvd (x, y, &mpt1, p); + __mul (&mpt1, &mpt1, &mpt2, p); + if (mpt1.d[0] != ZERO) + mpt1.d[0] = ONE; + __add (&mpt2, &mpone, &mpt3, p); + __mpsqrt (&mpt3, &mpt2, p); + __add (&mpt1, &mpt2, &mpt3, p); + mpt3.d[0] = Y[0]; + __mpatan (&mpt3, &mpt1, p); + __add (&mpt1, &mpt1, z, p); + } else - { __dvd(y,x,&mpt1,p); - __mpatan(&mpt1,z,p); - } - - return; + { + __dvd (y, x, &mpt1, p); + __mpatan (&mpt1, z, p); + } } diff --git a/sysdeps/ieee754/dbl-64/mpexp.c b/sysdeps/ieee754/dbl-64/mpexp.c index 8d288ff9a1..565c6c8531 100644 --- a/sysdeps/ieee754/dbl-64/mpexp.c +++ b/sysdeps/ieee754/dbl-64/mpexp.c @@ -49,6 +49,7 @@ __mpexp (mp_no *x, mp_no *y, int p) 0, 0, 0, 0, 3, 3, 4, 4, 5, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8 }; + static const int m1p[33] = { 0, 0, 0, 0, @@ -71,16 +72,7 @@ __mpexp (mp_no *x, mp_no *y, int p) {0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 39, 43, 47, 51, 55, 59, 63}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 50, 54} }; - mp_no mpk = - { - 0, - { - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 - } - }; - mp_no mps, mpak, mpt1, mpt2; + mp_no mps, mpk, mpt1, mpt2; /* Choose m,n and compute a=2**(-m). */ n = np[p]; @@ -115,37 +107,52 @@ __mpexp (mp_no *x, mp_no *y, int p) break; } - /* Compute s=x*2**(-m). Put result in mps. */ + /* Compute s=x*2**(-m). Put result in mps. This is the range-reduced input + that we will use to compute e^s. For the final result, simply raise it + to 2^m. */ __pow_mp (-m, &mpt1, p); __mul (x, &mpt1, &mps, p); - /* Evaluate the polynomial. Put result in mpt2. */ - mpk.e = 1; - mpk.d[0] = ONE; - mpk.d[1] = n; - __dvd (&mps, &mpk, &mpt1, p); - __add (&mpone, &mpt1, &mpak, p); - for (k = n - 1; k > 1; k--) + /* Compute the Taylor series for e^s: + + 1 + x/1! + x^2/2! + x^3/3! ... + + for N iterations. We compute this as: + + e^x = 1 + (x * n!/1! + x^2 * n!/2! + x^3 * n!/3!) / n! + = 1 + (x * (n!/1! + x * (n!/2! + x * (n!/3! + x ...)))) / n! + + k! is computed on the fly as KF and at the end of the polynomial loop, KF + is n!, which can be used directly. */ + __cpy (&mps, &mpt2, p); + + double kf = 1.0; + + /* Evaluate the rest. The result will be in mpt2. */ + for (k = n - 1; k > 0; k--) { - __mul (&mps, &mpak, &mpt1, p); - mpk.d[1] = k; - __dvd (&mpt1, &mpk, &mpt2, p); - __add (&mpone, &mpt2, &mpak, p); + /* n! / k! = n * (n - 1) ... * (n - k + 1) */ + kf *= k + 1; + + __dbl_mp (kf, &mpk, p); + __add (&mpt2, &mpk, &mpt1, p); + __mul (&mps, &mpt1, &mpt2, p); } - __mul (&mps, &mpak, &mpt1, p); + __dbl_mp (kf, &mpk, p); + __dvd (&mpt2, &mpk, &mpt1, p); __add (&mpone, &mpt1, &mpt2, p); /* Raise polynomial value to the power of 2**m. Put result in y. */ for (k = 0, j = 0; k < m;) { - __mul (&mpt2, &mpt2, &mpt1, p); + __sqr (&mpt2, &mpt1, p); k++; if (k == m) { j = 1; break; } - __mul (&mpt1, &mpt1, &mpt2, p); + __sqr (&mpt1, &mpt2, p); k++; } if (j) diff --git a/sysdeps/ieee754/dbl-64/mplog.c b/sysdeps/ieee754/dbl-64/mplog.c index e3d10846e2..f8d5c1095f 100644 --- a/sysdeps/ieee754/dbl-64/mplog.c +++ b/sysdeps/ieee754/dbl-64/mplog.c @@ -1,4 +1,3 @@ - /* * IBM Accurate Mathematical Library * written by International Business Machines Corp. @@ -37,27 +36,30 @@ #include "endian.h" #include "mpa.h" -void __mpexp(mp_no *, mp_no *, int); - -void __mplog(mp_no *x, mp_no *y, int p) { - int i,m; - static const int mp[33] = {0,0,0,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, - 4,4,4,4,4,4,4,4,4,4,4,4,4,4}; - mp_no mpt1,mpt2; +void +__mplog (mp_no *x, mp_no *y, int p) +{ + int i, m; + static const int mp[33] = + { + 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + }; + mp_no mpt1, mpt2; - /* Choose m */ + /* Choose m. */ m = mp[p]; - /* Perform m newton iterations to solve for y: exp(y)-x=0. */ - /* The iterations formula is: y(n+1)=y(n)+(x*exp(-y(n))-1). */ - __cpy(y,&mpt1,p); - for (i=0; i<m; i++) { - mpt1.d[0]=-mpt1.d[0]; - __mpexp(&mpt1,&mpt2,p); - __mul(x,&mpt2,&mpt1,p); - __sub(&mpt1,&mpone,&mpt2,p); - __add(y,&mpt2,&mpt1,p); - __cpy(&mpt1,y,p); - } - return; + /* Perform m newton iterations to solve for y: exp(y) - x = 0. The + iterations formula is: y(n + 1) = y(n) + (x * exp(-y(n)) - 1). */ + __cpy (y, &mpt1, p); + for (i = 0; i < m; i++) + { + mpt1.d[0] = -mpt1.d[0]; + __mpexp (&mpt1, &mpt2, p); + __mul (x, &mpt2, &mpt1, p); + __sub (&mpt1, &mpone, &mpt2, p); + __add (y, &mpt2, &mpt1, p); + __cpy (&mpt1, y, p); + } } diff --git a/sysdeps/ieee754/dbl-64/mpsqrt.c b/sysdeps/ieee754/dbl-64/mpsqrt.c index 65df9fd067..230d1f36e8 100644 --- a/sysdeps/ieee754/dbl-64/mpsqrt.c +++ b/sysdeps/ieee754/dbl-64/mpsqrt.c @@ -45,33 +45,37 @@ /* p as integer. Routine computes sqrt(*x) and stores result in *y */ /****************************************************************************/ -static double fastiroot(double); +static double fastiroot (double); void SECTION -__mpsqrt(mp_no *x, mp_no *y, int p) { - int i,m,ey; - double dx,dy; - static const mp_no - mphalf = {0,{1.0,8388608.0 /* 2^23 */}}, - mp3halfs = {1,{1.0,1.0,8388608.0 /* 2^23 */}}; - mp_no mpxn,mpz,mpu,mpt1,mpt2; +__mpsqrt (mp_no *x, mp_no *y, int p) +{ + int i, m, ey; + double dx, dy; + static const mp_no mphalf = {0, {1.0, HALFRAD}}; + static const mp_no mp3halfs = {1, {1.0, 1.0, HALFRAD}}; + mp_no mpxn, mpz, mpu, mpt1, mpt2; - ey=EX/2; __cpy(x,&mpxn,p); mpxn.e -= (ey+ey); - __mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); __dbl_mp(dy,&mpu,p); - __mul(&mpxn,&mphalf,&mpz,p); + ey = EX / 2; + __cpy (x, &mpxn, p); + mpxn.e -= (ey + ey); + __mp_dbl (&mpxn, &dx, p); + dy = fastiroot (dx); + __dbl_mp (dy, &mpu, p); + __mul (&mpxn, &mphalf, &mpz, p); - m=__mpsqrt_mp[p]; - for (i=0; i<m; i++) { - __mul(&mpu,&mpu,&mpt1,p); - __mul(&mpt1,&mpz,&mpt2,p); - __sub(&mp3halfs,&mpt2,&mpt1,p); - __mul(&mpu,&mpt1,&mpt2,p); - __cpy(&mpt2,&mpu,p); - } - __mul(&mpxn,&mpu,y,p); EY += ey; - - return; + m = __mpsqrt_mp[p]; + for (i = 0; i < m; i++) + { + __sqr (&mpu, &mpt1, p); + __mul (&mpt1, &mpz, &mpt2, p); + __sub (&mp3halfs, &mpt2, &mpt1, p); + __mul (&mpu, &mpt1, &mpt2, p); + __cpy (&mpt2, &mpu, p); + } + __mul (&mpxn, &mpu, y, p); + EY += ey; } /***********************************************************/ @@ -80,22 +84,28 @@ __mpsqrt(mp_no *x, mp_no *y, int p) { /***********************************************************/ static double SECTION -fastiroot(double x) { - union {int i[2]; double d;} p,q; - double y,z, t; +fastiroot (double x) +{ + union + { + int i[2]; + double d; + } p, q; + double y, z, t; int n; - static const double c0 = 0.99674, c1 = -0.53380, c2 = 0.45472, c3 = -0.21553; + static const double c0 = 0.99674, c1 = -0.53380; + static const double c2 = 0.45472, c3 = -0.21553; p.d = x; - p.i[HIGH_HALF] = (p.i[HIGH_HALF] & 0x3FFFFFFF ) | 0x3FE00000 ; + p.i[HIGH_HALF] = (p.i[HIGH_HALF] & 0x3FFFFFFF) | 0x3FE00000; q.d = x; y = p.d; - z = y -1.0; - n = (q.i[HIGH_HALF] - p.i[HIGH_HALF])>>1; - z = ((c3*z + c2)*z + c1)*z + c0; /* 2**-7 */ - z = z*(1.5 - 0.5*y*z*z); /* 2**-14 */ - p.d = z*(1.5 - 0.5*y*z*z); /* 2**-28 */ + z = y - 1.0; + n = (q.i[HIGH_HALF] - p.i[HIGH_HALF]) >> 1; + z = ((c3 * z + c2) * z + c1) * z + c0; /* 2**-7 */ + z = z * (1.5 - 0.5 * y * z * z); /* 2**-14 */ + p.d = z * (1.5 - 0.5 * y * z * z); /* 2**-28 */ p.i[HIGH_HALF] -= n; - t = x*p.d; - return p.d*(1.5 - 0.5*p.d*t); + t = x * p.d; + return p.d * (1.5 - 0.5 * p.d * t); } diff --git a/sysdeps/ieee754/dbl-64/mptan.c b/sysdeps/ieee754/dbl-64/mptan.c index 234108e373..51b5718e73 100644 --- a/sysdeps/ieee754/dbl-64/mptan.c +++ b/sysdeps/ieee754/dbl-64/mptan.c @@ -40,23 +40,25 @@ # define SECTION #endif -int __mpranred(double, mp_no *, int); -void __c32(mp_no *, mp_no *, mp_no *, int); - void SECTION -__mptan(double x, mp_no *mpy, int p) { +__mptan (double x, mp_no *mpy, int p) +{ int n; mp_no mpw, mpc, mps; - n = __mpranred(x, &mpw, p) & 0x00000001; /* negative or positive result */ - __c32(&mpw, &mpc, &mps, p); /* computing sin(x) and cos(x) */ - if (n) /* second or fourth quarter of unit circle */ - { __dvd(&mpc,&mps,mpy,p); - mpy->d[0] *= MONE; - } /* tan is negative in this area */ - else __dvd(&mps,&mpc,mpy,p); - - return; + /* Negative or positive result. */ + n = __mpranred (x, &mpw, p) & 0x00000001; + /* Computing sin(x) and cos(x). */ + __c32 (&mpw, &mpc, &mps, p); + /* Second or fourth quarter of unit circle. */ + if (n) + { + __dvd (&mpc, &mps, mpy, p); + mpy->d[0] *= MONE; + } + /* tan is negative in this area. */ + else + __dvd (&mps, &mpc, mpy, p); } diff --git a/sysdeps/ieee754/dbl-64/s_atan.c b/sysdeps/ieee754/dbl-64/s_atan.c index 37442b72e8..aa3564d560 100644 --- a/sysdeps/ieee754/dbl-64/s_atan.c +++ b/sysdeps/ieee754/dbl-64/s_atan.c @@ -62,18 +62,9 @@ double atan(double x) { #ifndef DLA_FMS double t4,t5,t6; #endif -#if 0 - double y1,y2; -#endif int i,ux,dx; -#if 0 - int p; -#endif static const int pr[M]={6,8,10,32}; number num; -#if 0 - mp_no mpt1,mpx,mpy,mpy1,mpy2,mperr; -#endif num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF]; diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c index 496f1e1917..5038b72612 100644 --- a/sysdeps/ieee754/dbl-64/s_sin.c +++ b/sysdeps/ieee754/dbl-64/s_sin.c @@ -100,14 +100,8 @@ double SECTION __sin(double x){ double xx,res,t,cor,y,s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2; -#if 0 - double w[2]; -#endif mynumber u,v; int4 k,m,n; -#if 0 - int4 nn; -#endif double retval = 0; SET_RESTORE_ROUND_53BIT (FE_TONEAREST); @@ -902,10 +896,6 @@ SECTION bsloww(double x,double dx, double orig,int n) { static const double th2_36 = 206158430208.0; /* 1.5*2**37 */ double y,x1,x2,xx,r,t,res,cor,w[2]; -#if 0 - double a,da,xn; - union {int4 i[2]; double x;} v; -#endif x1=(x+th2_36)-th2_36; y = aa.x*x1*x1*x1; r=x+y; diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c index c5446a6e56..faa5221e5e 100644 --- a/sysdeps/ieee754/dbl-64/s_tan.c +++ b/sysdeps/ieee754/dbl-64/s_tan.c @@ -64,9 +64,6 @@ tan(double x) { int p; number num,v; mp_no mpa,mpt1,mpt2; -#if 0 - mp_no mpy; -#endif double retval; diff --git a/sysdeps/ieee754/dbl-64/sincos32.c b/sysdeps/ieee754/dbl-64/sincos32.c index 6c5ffded52..954db66d6b 100644 --- a/sysdeps/ieee754/dbl-64/sincos32.c +++ b/sysdeps/ieee754/dbl-64/sincos32.c @@ -57,17 +57,10 @@ SECTION ss32(mp_no *x, mp_no *y, int p) { int i; double a; -#if 0 - double b; - static const mp_no mpone = {1,{1.0,1.0}}; -#endif mp_no mpt1,x2,gor,sum ,mpk={1,{1.0}}; -#if 0 - mp_no mpt2; -#endif for (i=1;i<=p;i++) mpk.d[i]=0; - __mul(x,x,&x2,p); + __sqr(x,&x2,p); __cpy(&oofac27,&gor,p); __cpy(&gor,&sum,p); for (a=27.0;a>1.0;a-=2.0) { @@ -89,17 +82,10 @@ SECTION cc32(mp_no *x, mp_no *y, int p) { int i; double a; -#if 0 - double b; - static const mp_no mpone = {1,{1.0,1.0}}; -#endif mp_no mpt1,x2,gor,sum ,mpk={1,{1.0}}; -#if 0 - mp_no mpt2; -#endif for (i=1;i<=p;i++) mpk.d[i]=0; - __mul(x,x,&x2,p); + __sqr(x,&x2,p); mpk.d[1]=27.0; __mul(&oofac27,&mpk,&gor,p); __cpy(&gor,&sum,p); @@ -119,7 +105,6 @@ cc32(mp_no *x, mp_no *y, int p) { void SECTION __c32(mp_no *x, mp_no *y, mp_no *z, int p) { - static const mp_no mpt={1,{1.0,2.0}}, one={1,{1.0,1.0}}; mp_no u,t,t1,t2,c,s; int i; __cpy(x,&u,p); @@ -130,11 +115,11 @@ __c32(mp_no *x, mp_no *y, mp_no *z, int p) { __mul(&c,&s,&t,p); __sub(&s,&t,&t1,p); __add(&t1,&t1,&s,p); - __sub(&mpt,&c,&t1,p); + __sub(&mptwo,&c,&t1,p); __mul(&t1,&c,&t2,p); __add(&t2,&t2,&c,p); } - __sub(&one,&c,y,p); + __sub(&mpone,&c,y,p); __cpy(&s,z,p); } @@ -251,7 +236,6 @@ __mpranred(double x, mp_no *y, int p) number v; double t,xn; int i,k,n; - static const mp_no one = {1,{1.0,1.0}}; mp_no a,b,c; if (ABS(x) < 2.8e14) { @@ -278,9 +262,9 @@ __mpranred(double x, mp_no *y, int p) for (i=1;i<=p-c.e;i++) c.d[i]=c.d[i+c.e]; for (i=p+1-c.e;i<=p;i++) c.d[i]=0; c.e=0; - if (c.d[1] >= 8388608.0) + if (c.d[1] >= HALFRAD) { t +=1.0; - __sub(&c,&one,&b,p); + __sub(&c,&mpone,&b,p); __mul(&b,&hp,y,p); } else __mul(&c,&hp,y,p); diff --git a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c index 34ca3275eb..8f353f634f 100644 --- a/sysdeps/ieee754/dbl-64/slowexp.c +++ b/sysdeps/ieee754/dbl-64/slowexp.c @@ -27,45 +27,49 @@ /*Converting from double precision to Multi-precision and calculating */ /* e^x */ /**************************************************************************/ -#include "mpa.h" #include <math_private.h> +#ifndef USE_LONG_DOUBLE_FOR_MP +# include "mpa.h" +void __mpexp (mp_no *x, mp_no *y, int p); +#endif + #ifndef SECTION # define SECTION #endif -void __mpexp(mp_no *x, mp_no *y, int p); - /*Converting from double precision to Multi-precision and calculating e^x */ double SECTION -__slowexp(double x) { - double w,z,res,eps=3.0e-26; -#if 0 - double y; -#endif +__slowexp (double x) +{ +#ifndef USE_LONG_DOUBLE_FOR_MP + double w, z, res, eps = 3.0e-26; int p; -#if 0 - int orig,i; -#endif - mp_no mpx, mpy, mpz,mpw,mpeps,mpcor; + mp_no mpx, mpy, mpz, mpw, mpeps, mpcor; - p=6; - __dbl_mp(x,&mpx,p); /* Convert a double precision number x */ - /* into a multiple precision number mpx with prec. p. */ - __mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */ - __dbl_mp(eps,&mpeps,p); - __mul(&mpeps,&mpy,&mpcor,p); - __add(&mpy,&mpcor,&mpw,p); - __sub(&mpy,&mpcor,&mpz,p); - __mp_dbl(&mpw, &w, p); - __mp_dbl(&mpz, &z, p); - if (w == z) return w; - else { /* if calculating is not exactly */ - p = 32; - __dbl_mp(x,&mpx,p); - __mpexp(&mpx, &mpy, p); - __mp_dbl(&mpy, &res, p); - return res; - } + /* Use the multiple precision __MPEXP function to compute the exponential + First at 144 bits and if it is not accurate enough, at 768 bits. */ + p = 6; + __dbl_mp (x, &mpx, p); + __mpexp (&mpx, &mpy, p); + __dbl_mp (eps, &mpeps, p); + __mul (&mpeps, &mpy, &mpcor, p); + __add (&mpy, &mpcor, &mpw, p); + __sub (&mpy, &mpcor, &mpz, p); + __mp_dbl (&mpw, &w, p); + __mp_dbl (&mpz, &z, p); + if (w == z) + return w; + else + { + p = 32; + __dbl_mp (x, &mpx, p); + __mpexp (&mpx, &mpy, p); + __mp_dbl (&mpy, &res, p); + return res; + } +#else + return (double) __ieee754_expl((long double)x); +#endif } diff --git a/sysdeps/ieee754/dbl-64/slowpow.c b/sysdeps/ieee754/dbl-64/slowpow.c index c303eaa5af..a379728b14 100644 --- a/sysdeps/ieee754/dbl-64/slowpow.c +++ b/sysdeps/ieee754/dbl-64/slowpow.c @@ -38,42 +38,76 @@ # define SECTION #endif -void __mpexp(mp_no *x, mp_no *y, int p); -void __mplog(mp_no *x, mp_no *y, int p); -double ulog(double); -double __halfulp(double x,double y); +void __mpexp (mp_no *x, mp_no *y, int p); +void __mplog (mp_no *x, mp_no *y, int p); +double ulog (double); +double __halfulp (double x, double y); double SECTION -__slowpow(double x, double y, double z) { - double res,res1; - mp_no mpx, mpy, mpz,mpw,mpp,mpr,mpr1; - static const mp_no eps = {-3,{1.0,4.0}}; +__slowpow (double x, double y, double z) +{ + double res, res1; + mp_no mpx, mpy, mpz, mpw, mpp, mpr, mpr1; + static const mp_no eps = {-3, {1.0, 4.0}}; int p; - res = __halfulp(x,y); /* halfulp() returns -10 or x^y */ - if (res >= 0) return res; /* if result was really computed by halfulp */ - /* else, if result was not really computed by halfulp */ - p = 10; /* p=precision */ - __dbl_mp(x,&mpx,p); - __dbl_mp(y,&mpy,p); - __dbl_mp(z,&mpz,p); - __mplog(&mpx, &mpz, p); /* log(x) = z */ - __mul(&mpy,&mpz,&mpw,p); /* y * z =w */ - __mpexp(&mpw, &mpp, p); /* e^w =pp */ - __add(&mpp,&eps,&mpr,p); /* pp+eps =r */ - __mp_dbl(&mpr, &res, p); - __sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */ - __mp_dbl(&mpr1, &res1, p); /* converting into double precision */ - if (res == res1) return res; + /* __HALFULP returns -10 or X^Y. */ + res = __halfulp (x, y); - p = 32; /* if we get here result wasn't calculated exactly, continue */ - __dbl_mp(x,&mpx,p); /* for more exact calculation */ - __dbl_mp(y,&mpy,p); - __dbl_mp(z,&mpz,p); - __mplog(&mpx, &mpz, p); /* log(c)=z */ - __mul(&mpy,&mpz,&mpw,p); /* y*z =w */ - __mpexp(&mpw, &mpp, p); /* e^w=pp */ - __mp_dbl(&mpp, &res, p); /* converting into double precision */ + /* Return if the result was computed by __HALFULP. */ + if (res >= 0) + return res; + + /* Compute pow as long double. This is currently only used by powerpc, where + one may get 106 bits of accuracy. */ +#ifdef USE_LONG_DOUBLE_FOR_MP + long double ldw, ldz, ldpp; + static const long double ldeps = 0x4.0p-96; + + ldz = __ieee754_logl ((long double) x); + ldw = (long double) y *ldz; + ldpp = __ieee754_expl (ldw); + res = (double) (ldpp + ldeps); + res1 = (double) (ldpp - ldeps); + + /* Return the result if it is accurate enough. */ + if (res == res1) + return res; +#endif + + /* Or else, calculate using multiple precision. P = 10 implies accuracy of + 240 bits accuracy, since MP_NO has a radix of 2^24. */ + p = 10; + __dbl_mp (x, &mpx, p); + __dbl_mp (y, &mpy, p); + __dbl_mp (z, &mpz, p); + + /* z = x ^ y + log (z) = y * log (x) + z = exp (y * log (x)) */ + __mplog (&mpx, &mpz, p); + __mul (&mpy, &mpz, &mpw, p); + __mpexp (&mpw, &mpp, p); + + /* Add and subtract EPS to ensure that the result remains unchanged, i.e. we + have last bit accuracy. */ + __add (&mpp, &eps, &mpr, p); + __mp_dbl (&mpr, &res, p); + __sub (&mpp, &eps, &mpr1, p); + __mp_dbl (&mpr1, &res1, p); + if (res == res1) + return res; + + /* If we don't, then we repeat using a higher precision. 768 bits of + precision ought to be enough for anybody. */ + p = 32; + __dbl_mp (x, &mpx, p); + __dbl_mp (y, &mpy, p); + __dbl_mp (z, &mpz, p); + __mplog (&mpx, &mpz, p); + __mul (&mpy, &mpz, &mpw, p); + __mpexp (&mpw, &mpp, p); + __mp_dbl (&mpp, &res, p); return res; } diff --git a/sysdeps/ieee754/dbl-64/x2y2m1.c b/sysdeps/ieee754/dbl-64/x2y2m1.c index 0b73f0a2ee..d36a950e36 100644 --- a/sysdeps/ieee754/dbl-64/x2y2m1.c +++ b/sysdeps/ieee754/dbl-64/x2y2m1.c @@ -37,7 +37,7 @@ add_split (double *hi, double *lo, double x, double y) given that the values are small enough that no overflow occurs and large enough (or zero) that no underflow occurs. */ -static inline void +static void mul_split (double *hi, double *lo, double x, double y) { #ifdef __FP_FAST_FMA diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c index 1b18289588..108eff4435 100644 --- a/sysdeps/ieee754/ldbl-128/e_j0l.c +++ b/sysdeps/ieee754/ldbl-128/e_j0l.c @@ -93,6 +93,7 @@ #include <math.h> #include <math_private.h> +#include <float.h> /* 1 / sqrt(pi) */ static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L; @@ -700,6 +701,28 @@ __ieee754_j0l (long double x) return p; } + /* X = x - pi/4 + cos(X) = cos(x) cos(pi/4) + sin(x) sin(pi/4) + = 1/sqrt(2) * (cos(x) + sin(x)) + sin(X) = sin(x) cos(pi/4) - cos(x) sin(pi/4) + = 1/sqrt(2) * (sin(x) - cos(x)) + sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) + cf. Fdlibm. */ + __sincosl (xx, &s, &c); + ss = s - c; + cc = s + c; + if (xx <= LDBL_MAX / 2.0L) + { + z = -__cosl (xx + xx); + if ((s * c) < 0) + cc = z / ss; + else + ss = z / cc; + } + + if (xx > 0x1p256L) + return ONEOSQPI * cc / __ieee754_sqrtl (xx); + xinv = 1.0L / xx; z = xinv * xinv; if (xinv <= 0.25) @@ -761,21 +784,6 @@ __ieee754_j0l (long double x) p = 1.0L + z * p; q = z * xinv * q; q = q - 0.125L * xinv; - /* X = x - pi/4 - cos(X) = cos(x) cos(pi/4) + sin(x) sin(pi/4) - = 1/sqrt(2) * (cos(x) + sin(x)) - sin(X) = sin(x) cos(pi/4) - cos(x) sin(pi/4) - = 1/sqrt(2) * (sin(x) - cos(x)) - sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) - cf. Fdlibm. */ - __sincosl (xx, &s, &c); - ss = s - c; - cc = s + c; - z = -__cosl (xx + xx); - if ((s * c) < 0) - cc = z / ss; - else - ss = z / cc; z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); return z; } @@ -843,6 +851,28 @@ long double return p; } + /* X = x - pi/4 + cos(X) = cos(x) cos(pi/4) + sin(x) sin(pi/4) + = 1/sqrt(2) * (cos(x) + sin(x)) + sin(X) = sin(x) cos(pi/4) - cos(x) sin(pi/4) + = 1/sqrt(2) * (sin(x) - cos(x)) + sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) + cf. Fdlibm. */ + __sincosl (x, &s, &c); + ss = s - c; + cc = s + c; + if (xx <= LDBL_MAX / 2.0L) + { + z = -__cosl (x + x); + if ((s * c) < 0) + cc = z / ss; + else + ss = z / cc; + } + + if (xx > 0x1p256L) + return ONEOSQPI * ss / __ieee754_sqrtl (x); + xinv = 1.0L / xx; z = xinv * xinv; if (xinv <= 0.25) @@ -904,21 +934,6 @@ long double p = 1.0L + z * p; q = z * xinv * q; q = q - 0.125L * xinv; - /* X = x - pi/4 - cos(X) = cos(x) cos(pi/4) + sin(x) sin(pi/4) - = 1/sqrt(2) * (cos(x) + sin(x)) - sin(X) = sin(x) cos(pi/4) - cos(x) sin(pi/4) - = 1/sqrt(2) * (sin(x) - cos(x)) - sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) - cf. Fdlibm. */ - __sincosl (x, &s, &c); - ss = s - c; - cc = s + c; - z = -__cosl (x + x); - if ((s * c) < 0) - cc = z / ss; - else - ss = z / cc; z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x); return z; } diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c index f16343b26b..70a1c86fd2 100644 --- a/sysdeps/ieee754/ldbl-128/e_j1l.c +++ b/sysdeps/ieee754/ldbl-128/e_j1l.c @@ -97,6 +97,7 @@ #include <math.h> #include <math_private.h> +#include <float.h> /* 1 / sqrt(pi) */ static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L; @@ -706,6 +707,32 @@ __ieee754_j1l (long double x) return p; } + /* X = x - 3 pi/4 + cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4) + = 1/sqrt(2) * (-cos(x) + sin(x)) + sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) + = -1/sqrt(2) * (sin(x) + cos(x)) + cf. Fdlibm. */ + __sincosl (xx, &s, &c); + ss = -s - c; + cc = s - c; + if (xx <= LDBL_MAX / 2.0L) + { + z = __cosl (xx + xx); + if ((s * c) > 0) + cc = z / ss; + else + ss = z / cc; + } + + if (xx > 0x1p256L) + { + z = ONEOSQPI * cc / __ieee754_sqrtl (xx); + if (x < 0) + z = -z; + return z; + } + xinv = 1.0L / xx; z = xinv * xinv; if (xinv <= 0.25) @@ -767,20 +794,6 @@ __ieee754_j1l (long double x) p = 1.0L + z * p; q = z * q; q = q * xinv + 0.375L * xinv; - /* X = x - 3 pi/4 - cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4) - = 1/sqrt(2) * (-cos(x) + sin(x)) - sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) - = -1/sqrt(2) * (sin(x) + cos(x)) - cf. Fdlibm. */ - __sincosl (xx, &s, &c); - ss = -s - c; - cc = s - c; - z = __cosl (xx + xx); - if ((s * c) > 0) - cc = z / ss; - else - ss = z / cc; z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx); if (x < 0) z = -z; @@ -850,6 +863,27 @@ __ieee754_y1l (long double x) return p; } + /* X = x - 3 pi/4 + cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4) + = 1/sqrt(2) * (-cos(x) + sin(x)) + sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) + = -1/sqrt(2) * (sin(x) + cos(x)) + cf. Fdlibm. */ + __sincosl (xx, &s, &c); + ss = -s - c; + cc = s - c; + if (xx <= LDBL_MAX / 2.0L) + { + z = __cosl (xx + xx); + if ((s * c) > 0) + cc = z / ss; + else + ss = z / cc; + } + + if (xx > 0x1p256L) + return ONEOSQPI * ss / __ieee754_sqrtl (xx); + xinv = 1.0L / xx; z = xinv * xinv; if (xinv <= 0.25) @@ -911,20 +945,6 @@ __ieee754_y1l (long double x) p = 1.0L + z * p; q = z * q; q = q * xinv + 0.375L * xinv; - /* X = x - 3 pi/4 - cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4) - = 1/sqrt(2) * (-cos(x) + sin(x)) - sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) - = -1/sqrt(2) * (sin(x) + cos(x)) - cf. Fdlibm. */ - __sincosl (xx, &s, &c); - ss = -s - c; - cc = s - c; - z = __cosl (xx + xx); - if ((s * c) > 0) - cc = z / ss; - else - ss = z / cc; z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx); return z; } diff --git a/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c b/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c index 117bd0f052..abc78a35bd 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c @@ -52,7 +52,7 @@ __ieee754_acoshl(long double x) return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one))); } else { /* 1<x<2 */ t = x-one; - return __log1p(t+__sqrtl(2.0*t+t*t)); + return __log1p(t+__ieee754_sqrtl(2.0*t+t*t)); } } strong_alias (__ieee754_acoshl, __acoshl_finite) diff --git a/sysdeps/ieee754/ldbl-128ibm/e_expl.c b/sysdeps/ieee754/ldbl-128ibm/e_expl.c index 82363906b0..9fd61983e3 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_expl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_expl.c @@ -70,11 +70,11 @@ static const long double C[] = { /* Smallest integer x for which e^x overflows. */ #define himark C[0] - 709.08956571282405153382846025171462914L, + 709.78271289338399678773454114191496482L, /* Largest integer x for which e^x underflows. */ #define lomark C[1] --744.44007192138121808966388925909996033L, +-744.44007192138126231410729844608163411L, /* 3x2^96 */ #define THREEp96 C[2] diff --git a/sysdeps/ieee754/ldbl-128ibm/e_logl.c b/sysdeps/ieee754/ldbl-128ibm/e_logl.c index 14f47ebade..15b5edfab3 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_logl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_logl.c @@ -182,6 +182,9 @@ static const long double ln2a = 6.93145751953125e-1L, ln2b = 1.4286068203094172321214581765680755001344E-6L; +static const long double + ldbl_epsilon = 0x1p-106L; + long double __ieee754_logl(long double x) { @@ -258,7 +261,12 @@ __ieee754_logl(long double x) } /* Series expansion of log(1+z). */ w = z * z; - y = ((((((((((((l15 * z + /* Avoid spurious underflows. */ + if (__glibc_unlikely(w <= ldbl_epsilon)) + y = 0.0L; + else + { + y = ((((((((((((l15 * z + l14) * z + l13) * z + l12) * z @@ -271,7 +279,8 @@ __ieee754_logl(long double x) + l5) * z + l4) * z + l3) * z * w; - y -= 0.5 * w; + y -= 0.5 * w; + } y += e * ln2b; /* Base 2 exponent offset times ln(2). */ y += z; y += logtbl[k-26]; /* log(t) - (t-1) */ diff --git a/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h b/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h index be9ac71cb0..1cce1fc4dc 100644 --- a/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h +++ b/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h @@ -125,7 +125,7 @@ ldbl_insert_mantissa (int sign, int exp, int64_t hi64, u_int64_t lo64) /* Handy utility functions to pack/unpack/cononicalize and find the nearbyint of long double implemented as double double. */ static inline long double -ldbl_pack (double a, double aa) +default_ldbl_pack (double a, double aa) { union ibm_extended_long_double u; u.dd[0] = a; @@ -134,7 +134,7 @@ ldbl_pack (double a, double aa) } static inline void -ldbl_unpack (long double l, double *a, double *aa) +default_ldbl_unpack (long double l, double *a, double *aa) { union ibm_extended_long_double u; u.d = l; @@ -142,6 +142,12 @@ ldbl_unpack (long double l, double *a, double *aa) *aa = u.dd[1]; } +#ifndef ldbl_pack +# define ldbl_pack default_ldbl_pack +#endif +#ifndef ldbl_unpack +# define ldbl_unpack default_ldbl_unpack +#endif /* Convert a finite long double to canonical form. Does not handle +/-Inf properly. */ diff --git a/sysdeps/ieee754/ldbl-128ibm/w_expl.c b/sysdeps/ieee754/ldbl-128ibm/w_expl.c index a5e72b2170..70fe5f693e 100644 --- a/sysdeps/ieee754/ldbl-128ibm/w_expl.c +++ b/sysdeps/ieee754/ldbl-128ibm/w_expl.c @@ -1,6 +1,24 @@ -/* Looks like we can use ieee854 w_expl.c as is for IBM extended format. */ +#include <math.h> +#include <math_private.h> #include <math_ldbl_opt.h> -#undef weak_alias -#define weak_alias(n,a) -#include <sysdeps/ieee754/ldbl-128/w_expl.c> + +static const long double o_thres = 709.78271289338399678773454114191496482L; +static const long double u_thres = -744.44007192138126231410729844608163411L; + +long double __expl(long double x) /* wrapper exp */ +{ + long double z; + z = __ieee754_expl(x); + if (_LIB_VERSION == _IEEE_) + return z; + if (__finitel(x)) + { + if (x >= o_thres) + return __kernel_standard_l(x,x,206); /* exp overflow */ + else if (x <= u_thres) + return __kernel_standard_l(x,x,207); /* exp underflow */ + } + return z; +} +hidden_def (__expl) long_double_symbol (libm, __expl, expl); diff --git a/sysdeps/ieee754/ldbl-96/e_j1l.c b/sysdeps/ieee754/ldbl-96/e_j1l.c index 785c0b0676..4c13018aea 100644 --- a/sysdeps/ieee754/ldbl-96/e_j1l.c +++ b/sysdeps/ieee754/ldbl-96/e_j1l.c @@ -203,7 +203,7 @@ __ieee754_y1l (long double x) __sincosl (x, &s, &c); ss = -s - c; cc = s - c; - if (ix < 0x7fe00000) + if (ix < 0x7ffe) { /* make sure x+x not overflow */ z = __cosl (x + x); if ((s * c) > zero) diff --git a/sysdeps/init_array/crti.S b/sysdeps/init_array/crti.S new file mode 100644 index 0000000000..0a6e9fd953 --- /dev/null +++ b/sysdeps/init_array/crti.S @@ -0,0 +1,13 @@ +/* Dummy crti file. + + In this configuration, crti.o and crtn.o are both empty because the + .init_array/.fini_array sections are used exclusively. + + Older ports cannot use this because even if the linker used to + build libc itself has .init_array support, we don't want to produce + a crt[in].o that presume a linker that new will be used to link + other things later. + + But new configurations without compatibility concerns for + toolchains without .init_array support can use this to avoid the + superfluous .init and .fini boilerplate code. */ diff --git a/sysdeps/init_array/crtn.S b/sysdeps/init_array/crtn.S new file mode 100644 index 0000000000..6f70e77160 --- /dev/null +++ b/sysdeps/init_array/crtn.S @@ -0,0 +1,13 @@ +/* Dummy crtn file. + + In this configuration, crti.o and crtn.o are both empty because the + .init_array/.fini_array sections are used exclusively. + + Older ports cannot use this because even if the linker used to + build libc itself has .init_array support, we don't want to produce + a crt[in].o that presume a linker that new will be used to link + other things later. + + But new configurations without compatibility concerns for + toolchains without .init_array support can use this to avoid the + superfluous .init and .fini boilerplate code. */ diff --git a/sysdeps/init_array/elf-init.c b/sysdeps/init_array/elf-init.c new file mode 100644 index 0000000000..c6467aac87 --- /dev/null +++ b/sysdeps/init_array/elf-init.c @@ -0,0 +1,37 @@ +/* Startup support for ELF initializers/finalizers in the main executable. + Copyright (C) 2013 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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 NO_INITFINI +#include <csu/elf-init.c> diff --git a/sysdeps/init_array/gmon-start.c b/sysdeps/init_array/gmon-start.c new file mode 100644 index 0000000000..6f2d6dc8b9 --- /dev/null +++ b/sysdeps/init_array/gmon-start.c @@ -0,0 +1,41 @@ +/* gmon startup hook using .preinit_array. + Copyright (C) 2013 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. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + 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/>. */ + +/* Instead of defining __gmon_start__ globally in gcrt1.o, we make it + static and just put a pointer to it into the .preinit_array section. */ + +#define GMON_START_ARRAY_SECTION ".preinit_array" + +#include <csu/gmon-start.c> diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure index 33cf09bd71..3af372560f 100644 --- a/sysdeps/mach/configure +++ b/sysdeps/mach/configure @@ -162,6 +162,8 @@ fi if test "x$MIG" = xMISSING; then as_fn_error $? "cannot find required build tool mig" "$LINENO" 5 fi +config_vars="$config_vars +MIG = $MIG" ### Sanity checks for Mach header installation diff --git a/sysdeps/mach/configure.in b/sysdeps/mach/configure.in index 2f82c3a873..db85f47eae 100644 --- a/sysdeps/mach/configure.in +++ b/sysdeps/mach/configure.in @@ -4,6 +4,7 @@ AC_CHECK_TOOL(MIG, mig, MISSING) if test "x$MIG" = xMISSING; then AC_MSG_ERROR([cannot find required build tool mig]) fi +LIBC_CONFIG_VAR([MIG], [$MIG]) ### Sanity checks for Mach header installation AC_CHECK_HEADER(mach/mach_types.h,, diff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c index 8d416006b5..5071df15b4 100644 --- a/sysdeps/posix/libc_fatal.c +++ b/sysdeps/posix/libc_fatal.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1993-2013 Free Software Foundation, Inc. +/* Catastrophic failure reports. Generic POSIX.1 version. + Copyright (C) 1993-2013 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,7 +28,7 @@ #include <string.h> #include <sysdep.h> #include <unistd.h> -#include <sys/syslog.h> +#include <sys/mman.h> #include <sys/uio.h> #include <not-cancel.h> @@ -35,6 +36,25 @@ #include FATAL_PREPARE_INCLUDE #endif +#ifndef WRITEV_FOR_FATAL +# define WRITEV_FOR_FATAL writev_for_fatal +static bool +writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) +{ + return TEMP_FAILURE_RETRY (__writev (fd, iov, niov)) == total; +} +#endif + +#ifndef BEFORE_ABORT +# define BEFORE_ABORT before_abort +static void +before_abort (int do_abort __attribute__ ((unused)), + bool written __attribute__ ((unused)), + int fd __attribute__ ((unused))) +{ +} +#endif + struct str_list { const char *str; @@ -42,17 +62,14 @@ struct str_list struct str_list *next; }; - /* Abort with an error message. */ void __libc_message (int do_abort, const char *fmt, ...) { va_list ap; - va_list ap_copy; int fd = -1; va_start (ap, fmt); - va_copy (ap_copy, ap); #ifdef FATAL_PREPARE FATAL_PREPARE; @@ -121,8 +138,7 @@ __libc_message (int do_abort, const char *fmt, ...) list = list->next; } - if (TEMP_FAILURE_RETRY (__writev (fd, iov, nlist)) == total) - written = true; + written = WRITEV_FOR_FATAL (fd, iov, nlist, total); if (do_abort) { @@ -131,7 +147,7 @@ __libc_message (int do_abort, const char *fmt, ...) struct abort_msg_s *buf = __mmap (NULL, total, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); - if (buf != MAP_FAILED) + if (__glibc_likely (buf != MAP_FAILED)) { buf->size = total; char *wp = buf->msg; @@ -151,15 +167,13 @@ __libc_message (int do_abort, const char *fmt, ...) va_end (ap); - /* If we had no success writing the message, use syslog. */ - if (! written) - vsyslog (LOG_ERR, fmt, ap_copy); - - va_end (ap_copy); - if (do_abort) - /* Kill the application. */ - abort (); + { + BEFORE_ABORT (do_abort, written, fd); + + /* Kill the application. */ + abort (); + } } diff --git a/sysdeps/posix/open64.c b/sysdeps/posix/open64.c index 4e4480256e..e0c55b00fb 100644 --- a/sysdeps/posix/open64.c +++ b/sysdeps/posix/open64.c @@ -17,7 +17,6 @@ #include <fcntl.h> #include <stdarg.h> -#include <bp-sym.h> #include <sysdep-cancel.h> /* Open FILE with access OFLAG. If OFLAG includes O_CREAT, @@ -46,6 +45,6 @@ __libc_open64 (const char *file, int oflag, ...) return result; } -weak_alias (__libc_open64, BP_SYM (__open64)) -libc_hidden_weak (BP_SYM (__open64)) -weak_alias (__libc_open64, BP_SYM (open64)) +weak_alias (__libc_open64, __open64) +libc_hidden_weak (__open64) +weak_alias (__libc_open64, open64) diff --git a/sysdeps/powerpc/Implies b/sysdeps/powerpc/Implies index 7ccf9a7c4a..78dba9510c 100644 --- a/sysdeps/powerpc/Implies +++ b/sysdeps/powerpc/Implies @@ -1,4 +1,5 @@ # On PowerPC we use the IBM extended long double format. ieee754/ldbl-128ibm +ieee754/ldbl-opt ieee754/dbl-64 ieee754/flt-32 diff --git a/sysdeps/powerpc/bits/fenv.h b/sysdeps/powerpc/bits/fenv.h index 23c593829b..122edd3dc3 100644 --- a/sysdeps/powerpc/bits/fenv.h +++ b/sysdeps/powerpc/bits/fenv.h @@ -54,7 +54,7 @@ enum these bits is set. Note, though, that you can't disable or enable these exceptions individually. */ - /* Operation with SNaN. */ + /* Operation with a sNaN. */ FE_INVALID_SNAN = # define FE_INVALID_SNAN (1 << (31 - 7)) FE_INVALID_SNAN, @@ -79,7 +79,7 @@ enum # define FE_INVALID_IMZ (1 << (31 - 11)) FE_INVALID_IMZ, - /* Comparison with NaN or SNaN. */ + /* Comparison with a NaN. */ FE_INVALID_COMPARE = # define FE_INVALID_COMPARE (1 << (31 - 12)) FE_INVALID_COMPARE, diff --git a/sysdeps/powerpc/fpu/bits/fenvinline.h b/sysdeps/powerpc/bits/fenvinline.h index 0720795d54..0720795d54 100644 --- a/sysdeps/powerpc/fpu/bits/fenvinline.h +++ b/sysdeps/powerpc/bits/fenvinline.h diff --git a/sysdeps/powerpc/fpu/bits/mathinline.h b/sysdeps/powerpc/bits/mathinline.h index 140fff08ef..140fff08ef 100644 --- a/sysdeps/powerpc/fpu/bits/mathinline.h +++ b/sysdeps/powerpc/bits/mathinline.h diff --git a/sysdeps/powerpc/fpu/Makefile b/sysdeps/powerpc/fpu/Makefile index ffacf1a754..fda59f9fa4 100644 --- a/sysdeps/powerpc/fpu/Makefile +++ b/sysdeps/powerpc/fpu/Makefile @@ -1,6 +1,5 @@ ifeq ($(subdir),math) libm-support += fenv_const fe_nomask fe_mask t_sqrt -libm-tests += test-powerpc-snan # libm needs ld.so to access dl_hwcap $(objpfx)libm.so: $(elfobjdir)/ld.so diff --git a/sysdeps/powerpc/fpu/fegetenv.c b/sysdeps/powerpc/fpu/fegetenv.c index ee60e6df12..a512a91a4e 100644 --- a/sysdeps/powerpc/fpu/fegetenv.c +++ b/sysdeps/powerpc/fpu/fegetenv.c @@ -17,7 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <fenv_libc.h> -#include <bp-sym.h> int __fegetenv (fenv_t *envp) @@ -31,8 +30,8 @@ __fegetenv (fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); #endif libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2); +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h index abae2f3dfb..1910951568 100644 --- a/sysdeps/powerpc/fpu/fenv_libc.h +++ b/sysdeps/powerpc/fpu/fenv_libc.h @@ -116,7 +116,7 @@ enum { FPSCR_UX, /* underflow */ FPSCR_ZX, /* zero divide */ FPSCR_XX, /* inexact */ - FPSCR_VXSNAN, /* invalid operation for SNaN */ + FPSCR_VXSNAN, /* invalid operation for sNaN */ FPSCR_VXISI, /* invalid operation for Inf-Inf */ FPSCR_VXIDI, /* invalid operation for Inf/Inf */ FPSCR_VXZDZ, /* invalid operation for 0/0 */ @@ -152,7 +152,7 @@ enum { #endif /* _ARCH_PWR6 */ /* This operation (i) sets the appropriate FPSCR bits for its - parameter, (ii) converts SNaN to the corresponding NaN, and (iii) + parameter, (ii) converts sNaN to the corresponding qNaN, and (iii) otherwise passes its parameter through unchanged (in particular, -0 and +0 stay as they were). The `obvious' way to do this is optimised out by gcc. */ diff --git a/sysdeps/powerpc/fpu/fesetenv.c b/sysdeps/powerpc/fpu/fesetenv.c index 72989c476d..953af5ddc7 100644 --- a/sysdeps/powerpc/fpu/fesetenv.c +++ b/sysdeps/powerpc/fpu/fesetenv.c @@ -18,7 +18,6 @@ #include <fenv_libc.h> #include <fpu_control.h> -#include <bp-sym.h> #define _FPU_MASK_ALL (_FPU_MASK_ZM | _FPU_MASK_OM | _FPU_MASK_UM | _FPU_MASK_XM | _FPU_MASK_IM) @@ -54,8 +53,8 @@ __fesetenv (const fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, BP_SYM (__old_fesetenv), BP_SYM (fesetenv), GLIBC_2_1); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, BP_SYM (__fesetenv), BP_SYM (fesetenv), GLIBC_2_2); +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/powerpc/fpu/feupdateenv.c b/sysdeps/powerpc/fpu/feupdateenv.c index 66f2826398..9faf930f36 100644 --- a/sysdeps/powerpc/fpu/feupdateenv.c +++ b/sysdeps/powerpc/fpu/feupdateenv.c @@ -19,7 +19,6 @@ #include <fenv_libc.h> #include <fpu_control.h> -#include <bp-sym.h> #define _FPU_MASK_ALL (_FPU_MASK_ZM | _FPU_MASK_OM | _FPU_MASK_UM | _FPU_MASK_XM | _FPU_MASK_IM) @@ -61,8 +60,8 @@ __feupdateenv (const fenv_t *envp) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif libm_hidden_ver (__feupdateenv, feupdateenv) -versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2); +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); diff --git a/sysdeps/powerpc/fpu/fgetexcptflg.c b/sysdeps/powerpc/fpu/fgetexcptflg.c index 987a205472..f6327ce170 100644 --- a/sysdeps/powerpc/fpu/fgetexcptflg.c +++ b/sysdeps/powerpc/fpu/fgetexcptflg.c @@ -17,7 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <fenv_libc.h> -#include <bp-sym.h> int __fegetexceptflag (fexcept_t *flagp, int excepts) @@ -37,7 +36,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -compat_symbol (libm, BP_SYM (__old_fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_1); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); #endif -versioned_symbol (libm, BP_SYM (__fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_2); +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); diff --git a/sysdeps/powerpc/fpu/fraiseexcpt.c b/sysdeps/powerpc/fpu/fraiseexcpt.c index 88d1844768..9118c1954a 100644 --- a/sysdeps/powerpc/fpu/fraiseexcpt.c +++ b/sysdeps/powerpc/fpu/fraiseexcpt.c @@ -17,7 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <fenv_libc.h> -#include <bp-sym.h> #undef feraiseexcept int @@ -61,8 +60,8 @@ __feraiseexcept (int excepts) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, BP_SYM (__old_feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_1); +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); #endif libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, BP_SYM (__feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_2); +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/powerpc/fpu/fsetexcptflg.c b/sysdeps/powerpc/fpu/fsetexcptflg.c index 588fb6a0d7..c050d4022b 100644 --- a/sysdeps/powerpc/fpu/fsetexcptflg.c +++ b/sysdeps/powerpc/fpu/fsetexcptflg.c @@ -17,7 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <fenv_libc.h> -#include <bp-sym.h> int __fesetexceptflag (const fexcept_t *flagp, int excepts) @@ -53,7 +52,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) #include <shlib-compat.h> #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, BP_SYM (__old_fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_1); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); #endif -versioned_symbol (libm, BP_SYM (__fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_2); +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps index 4221967c46..5072190fd7 100644 --- a/sysdeps/powerpc/fpu/libm-test-ulps +++ b/sysdeps/powerpc/fpu/libm-test-ulps @@ -243,9 +243,11 @@ idouble: 1 Test "Real part of: cacos (-0.5 + +0 i) == 2.094395102393195492308428922186335256131 - 0 i": double: 1 idouble: 1 +ldouble: 1 Test "Real part of: cacos (-0.5 - 0 i) == 2.094395102393195492308428922186335256131 + +0 i": double: 1 idouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -265,6 +267,10 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i": +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i": +ldouble: 1 # cacosh Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": diff --git a/sysdeps/powerpc/fpu/math_ldbl.h b/sysdeps/powerpc/fpu/math_ldbl.h index 20224e6646..36378c0239 100644 --- a/sysdeps/powerpc/fpu/math_ldbl.h +++ b/sysdeps/powerpc/fpu/math_ldbl.h @@ -2,132 +2,12 @@ #error "Never use <math_ldbl.h> directly; include <math_private.h> instead." #endif -#include <sysdeps/ieee754/ldbl-128/math_ldbl.h> -#include <ieee754.h> - -static inline void -ldbl_extract_mantissa (int64_t *hi64, u_int64_t *lo64, int *exp, long double x) -{ - /* We have 105 bits of mantissa plus one implicit digit. Since - 106 bits are representable we use the first implicit digit for - the number before the decimal point and the second implicit bit - as bit 53 of the mantissa. */ - unsigned long long hi, lo; - int ediff; - union ibm_extended_long_double eldbl; - eldbl.d = x; - *exp = eldbl.ieee.exponent - IBM_EXTENDED_LONG_DOUBLE_BIAS; - - lo = ((long long)eldbl.ieee.mantissa2 << 32) | eldbl.ieee.mantissa3; - hi = ((long long)eldbl.ieee.mantissa0 << 32) | eldbl.ieee.mantissa1; - /* If the lower double is not a denomal or zero then set the hidden - 53rd bit. */ - if (eldbl.ieee.exponent2 > 0x001) - { - lo |= (1ULL << 52); - lo = lo << 7; /* pre-shift lo to match ieee854. */ - /* The lower double is normalized separately from the upper. We - may need to adjust the lower mantissa to reflect this. */ - ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2; - if (ediff > 53) - lo = lo >> (ediff-53); - } - hi |= (1ULL << 52); - - if ((eldbl.ieee.negative != eldbl.ieee.negative2) - && ((eldbl.ieee.exponent2 != 0) && (lo != 0LL))) - { - hi--; - lo = (1ULL << 60) - lo; - if (hi < (1ULL << 52)) - { - /* we have a borrow from the hidden bit, so shift left 1. */ - hi = (hi << 1) | (lo >> 59); - lo = 0xfffffffffffffffLL & (lo << 1); - *exp = *exp - 1; - } - } - *lo64 = (hi << 60) | lo; - *hi64 = hi >> 4; -} - -static inline long double -ldbl_insert_mantissa (int sign, int exp, int64_t hi64, u_int64_t lo64) -{ - union ibm_extended_long_double u; - unsigned long hidden2, lzcount; - unsigned long long hi, lo; - - u.ieee.negative = sign; - u.ieee.negative2 = sign; - u.ieee.exponent = exp + IBM_EXTENDED_LONG_DOUBLE_BIAS; - u.ieee.exponent2 = exp-53 + IBM_EXTENDED_LONG_DOUBLE_BIAS; - /* Expect 113 bits (112 bits + hidden) right justified in two longs. - The low order 53 bits (52 + hidden) go into the lower double */ - lo = (lo64 >> 7)& ((1ULL << 53) - 1); - hidden2 = (lo64 >> 59) & 1ULL; - /* The high order 53 bits (52 + hidden) go into the upper double */ - hi = (lo64 >> 60) & ((1ULL << 11) - 1); - hi |= (hi64 << 4); - - if (lo != 0LL) - { - /* hidden2 bit of low double controls rounding of the high double. - If hidden2 is '1' then round up hi and adjust lo (2nd mantissa) - plus change the sign of the low double to compensate. */ - if (hidden2) - { - hi++; - u.ieee.negative2 = !sign; - lo = (1ULL << 53) - lo; - } - /* The hidden bit of the lo mantissa is zero so we need to - normalize the it for the low double. Shift it left until the - hidden bit is '1' then adjust the 2nd exponent accordingly. */ - - if (sizeof (lo) == sizeof (long)) - lzcount = __builtin_clzl (lo); - else if ((lo >> 32) != 0) - lzcount = __builtin_clzl ((long) (lo >> 32)); - else - lzcount = __builtin_clzl ((long) lo) + 32; - lzcount = lzcount - 11; - if (lzcount > 0) - { - int expnt2 = u.ieee.exponent2 - lzcount; - if (expnt2 >= 1) - { - /* Not denormal. Normalize and set low exponent. */ - lo = lo << lzcount; - u.ieee.exponent2 = expnt2; - } - else - { - /* Is denormal. */ - lo = lo << (lzcount + expnt2); - u.ieee.exponent2 = 0; - } - } - } - else - { - u.ieee.negative2 = 0; - u.ieee.exponent2 = 0; - } - - u.ieee.mantissa3 = lo & ((1ULL << 32) - 1); - u.ieee.mantissa2 = (lo >> 32) & ((1ULL << 20) - 1); - u.ieee.mantissa1 = hi & ((1ULL << 32) - 1); - u.ieee.mantissa0 = (hi >> 32) & ((1ULL << 20) - 1); - return u.d; -} - -/* gcc generates disgusting code to pack and unpack long doubles. - This tells gcc that pack/unpack is really a nop. We use fr1/fr2 - because those are the regs used to pass/return a single - long double arg. */ +/* GCC does not optimize the default ldbl_pack code to not spill register + in the stack. The following optimization tells gcc that pack/unpack + is really a nop. We use fr1/fr2 because those are the regs used to + pass/return a single long double arg. */ static inline long double -ldbl_pack (double a, double aa) +ldbl_pack_ppc (double a, double aa) { register long double x __asm__ ("fr1"); register double xh __asm__ ("fr1"); @@ -139,7 +19,7 @@ ldbl_pack (double a, double aa) } static inline void -ldbl_unpack (long double l, double *a, double *aa) +ldbl_unpack_ppc (long double l, double *a, double *aa) { register long double x __asm__ ("fr1"); register double xh __asm__ ("fr1"); @@ -150,40 +30,7 @@ ldbl_unpack (long double l, double *a, double *aa) *aa = xl; } +#define ldbl_pack ldbl_pack_ppc +#define ldbl_unpack ldbl_unpack_ppc -/* Convert a finite long double to canonical form. - Does not handle +/-Inf properly. */ -static inline void -ldbl_canonicalize (double *a, double *aa) -{ - double xh, xl; - - xh = *a + *aa; - xl = (*a - xh) + *aa; - *a = xh; - *aa = xl; -} - -/* Simple inline nearbyint (double) function . - Only works in the default rounding mode - but is useful in long double rounding functions. */ -static inline double -ldbl_nearbyint (double a) -{ - double two52 = 0x10000000000000LL; - - if (__builtin_expect ((__builtin_fabs (a) < two52), 1)) - { - if (__builtin_expect ((a > 0.0), 1)) - { - a += two52; - a -= two52; - } - else if (__builtin_expect ((a < 0.0), 1)) - { - a = two52 - a; - a = -(a - two52); - } - } - return a; -} +#include <sysdeps/ieee754/ldbl-128ibm/math_ldbl.h> diff --git a/sysdeps/powerpc/fpu/s_llround.c b/sysdeps/powerpc/fpu/s_llround.c index b53d6eed8f..9a01826539 100644 --- a/sysdeps/powerpc/fpu/s_llround.c +++ b/sysdeps/powerpc/fpu/s_llround.c @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <math.h> +#include <math_ldbl_opt.h> /* I think that what this routine is supposed to do is round a value to the nearest integer, with values exactly on the boundary rounded @@ -47,3 +48,6 @@ weak_alias (__llround, llround) strong_alias (__llround, __llroundl) weak_alias (__llround, llroundl) #endif +#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1) +compat_symbol (libm, __llround, llroundl, GLIBC_2_1); +#endif diff --git a/sysdeps/powerpc/fpu/w_sqrt.c b/sysdeps/powerpc/fpu/w_sqrt.c index 2488ad9b97..70f28dd4df 100644 --- a/sysdeps/powerpc/fpu/w_sqrt.c +++ b/sysdeps/powerpc/fpu/w_sqrt.c @@ -19,6 +19,7 @@ #include <math.h> #include <math_private.h> #include <fenv_libc.h> +#include <math_ldbl_opt.h> double __sqrt (double x) /* wrapper sqrt */ @@ -42,3 +43,6 @@ weak_alias (__sqrt, sqrt) #ifdef NO_LONG_DOUBLE strong_alias (__sqrt, __sqrtl) weak_alias (__sqrt, sqrtl) #endif +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) +compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); +#endif diff --git a/sysdeps/powerpc/fpu/fpu_control.h b/sysdeps/powerpc/fpu_control.h index 159543beed..159543beed 100644 --- a/sysdeps/powerpc/fpu/fpu_control.h +++ b/sysdeps/powerpc/fpu_control.h diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/Makefile b/sysdeps/powerpc/power4/fpu/Makefile index f487ed6014..e17d32f30e 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/Makefile +++ b/sysdeps/powerpc/power4/fpu/Makefile @@ -2,4 +2,6 @@ ifeq ($(subdir),math) CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops +CPPFLAGS-slowpow.c += -DUSE_LONG_DOUBLE_FOR_MP=1 +CPPFLAGS-slowexp.c += -DUSE_LONG_DOUBLE_FOR_MP=1 endif diff --git a/sysdeps/powerpc/power4/fpu/mpa-arch.h b/sysdeps/powerpc/power4/fpu/mpa-arch.h new file mode 100644 index 0000000000..9007c9d0ca --- /dev/null +++ b/sysdeps/powerpc/power4/fpu/mpa-arch.h @@ -0,0 +1,56 @@ +/* Overridable constants and operations. + Copyright (C) 2013 Free Software Foundation, Inc. + + This program 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. + + This program 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 this program; if not, see <http://www.gnu.org/licenses/>. */ + +typedef double mantissa_t; +typedef double mantissa_store_t; + +#define TWOPOW(i) (0x1.0p##i) + +#define RADIX TWOPOW (24) /* 2^24 */ +#define CUTTER TWOPOW (76) /* 2^76 */ +#define RADIXI 0x1.0p-24 /* 2^-24 */ +#define TWO52 TWOPOW (52) /* 2^52 */ + +/* Divide D by RADIX and put the remainder in R. */ +#define DIV_RADIX(d,r) \ + ({ \ + double u = ((d) + CUTTER) - CUTTER; \ + if (u > (d)) \ + u -= RADIX; \ + r = (d) - u; \ + (d) = u * RADIXI; \ + }) + +/* Put the integer component of a double X in R and retain the fraction in + X. */ +#define INTEGER_OF(x, r) \ + ({ \ + double u = ((x) + TWO52) - TWO52; \ + if (u > (x)) \ + u -= ONE; \ + (r) = u; \ + (x) -= u; \ + }) + +/* Align IN down to a multiple of F, where F is a power of two. */ +#define ALIGN_DOWN_TO(in, f) \ + ({ \ + double factor = f * TWO52; \ + double u = (in + factor) - factor; \ + if (u > in) \ + u -= f; \ + u; \ + }) diff --git a/sysdeps/powerpc/power4/fpu/mpa.c b/sysdeps/powerpc/power4/fpu/mpa.c new file mode 100644 index 0000000000..1858c97407 --- /dev/null +++ b/sysdeps/powerpc/power4/fpu/mpa.c @@ -0,0 +1,214 @@ + +/* + * IBM Accurate Mathematical Library + * written by International Business Machines Corp. + * Copyright (C) 2001-2013 Free Software Foundation, Inc. + * + * This program 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. + * + * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. + */ + +/* Define __mul and __sqr and use the rest from generic code. */ +#define NO__MUL +#define NO__SQR + +#include <sysdeps/ieee754/dbl-64/mpa.c> + +/* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X + and Z or Y and Z. For P in [1, 2, 3], the exact result is truncated to P + digits. In case P > 3 the error is bounded by 1.001 ULP. */ +void +__mul (const mp_no *x, const mp_no *y, mp_no *z, int p) +{ + long i, i1, i2, j, k, k2; + long p2 = p; + double u, zk, zk2; + + /* Is z=0? */ + if (__glibc_unlikely (X[0] * Y[0] == ZERO)) + { + Z[0] = ZERO; + return; + } + + /* Multiply, add and carry */ + k2 = (p2 < 3) ? p2 + p2 : p2 + 3; + zk = Z[k2] = ZERO; + for (k = k2; k > 1;) + { + if (k > p2) + { + i1 = k - p2; + i2 = p2 + 1; + } + else + { + i1 = 1; + i2 = k; + } +#if 1 + /* Rearrange this inner loop to allow the fmadd instructions to be + independent and execute in parallel on processors that have + dual symmetrical FP pipelines. */ + if (i1 < (i2 - 1)) + { + /* Make sure we have at least 2 iterations. */ + if (((i2 - i1) & 1L) == 1L) + { + /* Handle the odd iterations case. */ + zk2 = x->d[i2 - 1] * y->d[i1]; + } + else + zk2 = 0.0; + /* Do two multiply/adds per loop iteration, using independent + accumulators; zk and zk2. */ + for (i = i1, j = i2 - 1; i < i2 - 1; i += 2, j -= 2) + { + zk += x->d[i] * y->d[j]; + zk2 += x->d[i + 1] * y->d[j - 1]; + } + zk += zk2; /* Final sum. */ + } + else + { + /* Special case when iterations is 1. */ + zk += x->d[i1] * y->d[i1]; + } +#else + /* The original code. */ + for (i = i1, j = i2 - 1; i < i2; i++, j--) + zk += X[i] * Y[j]; +#endif + + u = (zk + CUTTER) - CUTTER; + if (u > zk) + u -= RADIX; + Z[k] = zk - u; + zk = u * RADIXI; + --k; + } + Z[k] = zk; + + int e = EX + EY; + /* Is there a carry beyond the most significant digit? */ + if (Z[1] == ZERO) + { + for (i = 1; i <= p2; i++) + Z[i] = Z[i + 1]; + e--; + } + + EZ = e; + Z[0] = X[0] * Y[0]; +} + +/* Square *X and store result in *Y. X and Y may not overlap. For P in + [1, 2, 3], the exact result is truncated to P digits. In case P > 3 the + error is bounded by 1.001 ULP. This is a faster special case of + multiplication. */ +void +__sqr (const mp_no *x, mp_no *y, int p) +{ + long i, j, k, ip; + double u, yk; + + /* Is z=0? */ + if (__glibc_unlikely (X[0] == ZERO)) + { + Y[0] = ZERO; + return; + } + + /* We need not iterate through all X's since it's pointless to + multiply zeroes. */ + for (ip = p; ip > 0; ip--) + if (X[ip] != ZERO) + break; + + k = (__glibc_unlikely (p < 3)) ? p + p : p + 3; + + while (k > 2 * ip + 1) + Y[k--] = ZERO; + + yk = ZERO; + + while (k > p) + { + double yk2 = 0.0; + long lim = k / 2; + + if (k % 2 == 0) + { + yk += X[lim] * X[lim]; + lim--; + } + + /* In __mul, this loop (and the one within the next while loop) run + between a range to calculate the mantissa as follows: + + Z[k] = X[k] * Y[n] + X[k+1] * Y[n-1] ... + X[n-1] * Y[k+1] + + X[n] * Y[k] + + For X == Y, we can get away with summing halfway and doubling the + result. For cases where the range size is even, the mid-point needs + to be added separately (above). */ + for (i = k - p, j = p; i <= lim; i++, j--) + yk2 += X[i] * X[j]; + + yk += 2.0 * yk2; + + u = (yk + CUTTER) - CUTTER; + if (u > yk) + u -= RADIX; + Y[k--] = yk - u; + yk = u * RADIXI; + } + + while (k > 1) + { + double yk2 = 0.0; + long lim = k / 2; + + if (k % 2 == 0) + { + yk += X[lim] * X[lim]; + lim--; + } + + /* Likewise for this loop. */ + for (i = 1, j = k - 1; i <= lim; i++, j--) + yk2 += X[i] * X[j]; + + yk += 2.0 * yk2; + + u = (yk + CUTTER) - CUTTER; + if (u > yk) + u -= RADIX; + Y[k--] = yk - u; + yk = u * RADIXI; + } + Y[k] = yk; + + /* Squares are always positive. */ + Y[0] = 1.0; + + int e = EX * 2; + /* Is there a carry beyond the most significant digit? */ + if (__glibc_unlikely (Y[1] == ZERO)) + { + for (i = 1; i <= p; i++) + Y[i] = Y[i + 1]; + e--; + } + EY = e; +} diff --git a/sysdeps/powerpc/powerpc32/__longjmp-common.S b/sysdeps/powerpc/powerpc32/__longjmp-common.S index 5154199310..7874473636 100644 --- a/sysdeps/powerpc/powerpc32/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc32/__longjmp-common.S @@ -23,11 +23,8 @@ #else # include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> -ENTRY (BP_SYM (__longjmp)) - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +ENTRY (__longjmp) #if defined PTR_DEMANGLE || defined CHECK_SP lwz r24,(JB_GPR1*4)(r3) @@ -71,4 +68,4 @@ ENTRY (BP_SYM (__longjmp)) lwz r31,((JB_GPRS+17)*4)(r3) mr r3,r4 blr -END (BP_SYM (__longjmp)) +END (__longjmp) diff --git a/sysdeps/powerpc/powerpc32/a2/memcpy.S b/sysdeps/powerpc/powerpc32/a2/memcpy.S index d1192a3cef..f2f63b1802 100644 --- a/sysdeps/powerpc/powerpc32/a2/memcpy.S +++ b/sysdeps/powerpc/powerpc32/a2/memcpy.S @@ -18,14 +18,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #define PREFETCH_AHEAD 4 /* no cache lines SRC prefetching ahead */ #define ZERO_AHEAD 2 /* no cache lines DST zeroing ahead */ .machine a2 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT dcbt 0,r4 /* Prefetch ONE SRC cacheline */ @@ -525,5 +523,5 @@ L(endloop2_128): b L(lessthancacheline) -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/add_n.S b/sysdeps/powerpc/powerpc32/add_n.S index 0db251ad1a..7ce77e04d8 100644 --- a/sysdeps/powerpc/powerpc32/add_n.S +++ b/sysdeps/powerpc/powerpc32/add_n.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size) @@ -28,14 +26,8 @@ possible 2-unrolled inner loop will not be. Also, watch out for the alignment... */ -EALIGN (BP_SYM (__mpn_add_n), 3, 0) +EALIGN (__mpn_add_n, 3, 0) -#if __BOUNDED_POINTERS__ - slwi r10,r6,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r5, r8, r9, r10) -#endif /* Set up for loop below. */ mtcrf 0x01,r6 srwi. r7,r6,1 @@ -73,4 +65,4 @@ L(0): lwz r9,4(r4) /* Return the carry. */ L(1): addze r3,r10 blr -END (BP_SYM (__mpn_add_n)) +END (__mpn_add_n) diff --git a/sysdeps/powerpc/powerpc32/addmul_1.S b/sysdeps/powerpc/powerpc32/addmul_1.S index 33a52024fa..88a01a154e 100644 --- a/sysdeps/powerpc/powerpc32/addmul_1.S +++ b/sysdeps/powerpc/powerpc32/addmul_1.S @@ -17,18 +17,11 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_addmul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, mp_limb_t s2_limb) Calculate res+s1*s2 and put result back in res; return carry. */ -ENTRY (BP_SYM (__mpn_addmul_1)) -#if __BOUNDED_POINTERS__ - slwi r10,r5,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) -#endif +ENTRY (__mpn_addmul_1) mtctr r5 lwz r0,0(r4) @@ -52,4 +45,4 @@ L(0): lwzu r0,4(r4) L(1): stw r8,4(r3) addze r3,r10 blr -END (BP_SYM (__mpn_addmul_1)) +END (__mpn_addmul_1) diff --git a/sysdeps/powerpc/powerpc32/backtrace.c b/sysdeps/powerpc/powerpc32/backtrace.c index cd04450337..b4b11dd03c 100644 --- a/sysdeps/powerpc/powerpc32/backtrace.c +++ b/sysdeps/powerpc/powerpc32/backtrace.c @@ -31,8 +31,8 @@ */ struct layout { - struct layout *__unbounded next; - void *__unbounded return_address; + struct layout *next; + void *return_address; }; int diff --git a/sysdeps/powerpc/powerpc32/bp-asm.h b/sysdeps/powerpc/powerpc32/bp-asm.h deleted file mode 100644 index 0e5d07be36..0000000000 --- a/sysdeps/powerpc/powerpc32/bp-asm.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Bounded-pointer definitions for PowerPC assembler. - Copyright (C) 2000-2013 Free Software Foundation, Inc. - Contributed by Greg McGary <greg@mcgary.org> - 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. - - 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/>. */ - -#if __BOUNDED_POINTERS__ - -/* Byte offsets of BP components. */ -# define oVALUE 0 -# define oLOW 4 -# define oHIGH 8 - -/* Don't check bounds, just convert the BP register to its simple - pointer value. */ - -# define DISCARD_BOUNDS(rBP) \ - lwz rBP, oVALUE(rBP) - -/* Check low bound, with the side effect that the BP register is converted - its simple pointer value. Move the high bound into a register for - later use. */ - -# define CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH) \ - lwz rHIGH, oHIGH(rBP); \ - lwz rLOW, oLOW(rBP); \ - lwz rBP, oVALUE(rBP); \ - twllt rBP, rLOW - -/* Check the high bound, which is in a register, using the given - conditional trap instruction. */ - -# define CHECK_BOUNDS_HIGH(rVALUE, rHIGH, TWLcc) \ - TWLcc rVALUE, rHIGH - -/* Check the high bound, which is stored at the return-value's high - bound slot, using the given conditional trap instruction. */ - -# define CHECK_BOUNDS_HIGH_RTN(rVALUE, rHIGH, TWLcc) \ - lwz rHIGH, oHIGH(rRTN); \ - TWLcc rVALUE, rHIGH - -/* Check both bounds, with the side effect that the BP register is - converted to its simple pointer value. */ - -# define CHECK_BOUNDS_BOTH(rBP, rLOW, rHIGH) \ - CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH); \ - twlge rBP, rHIGH - -/* Check bounds on a memory region of given length, with the side - effect that the BP register is converted to its simple pointer - value. */ - -# define CHECK_BOUNDS_BOTH_WIDE(rBP, rLOW, rHIGH, rLENGTH) \ - CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \ - sub rHIGH, rHIGH, rLENGTH; \ - twlgt rBP, rHIGH - -# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH) \ - CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \ - subi rHIGH, rHIGH, LENGTH; \ - twlgt rBP, rHIGH - -/* Store a pointer value register into the return-value's pointer - value slot. */ - -# define STORE_RETURN_VALUE(rVALUE) \ - stw rVALUE, oVALUE(rRTN) - -/* Store a low and high bounds into the return-value's pointer bounds - slots. */ - -# define STORE_RETURN_BOUNDS(rLOW, rHIGH) \ - stw rLOW, oLOW(rRTN); \ - stw rHIGH, oHIGH(rRTN) - -/* Stuff zero value/low/high into the BP addressed by rRTN. */ - -# define RETURN_NULL_BOUNDED_POINTER \ - li r4, 0; \ - STORE_RETURN_VALUE (r4); \ - STORE_RETURN_BOUNDS (r4, r4) - -#else - -# define DISCARD_BOUNDS(rBP) -# define CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH) -# define CHECK_BOUNDS_HIGH(rVALUE, rHIGH, TWLcc) -# define CHECK_BOUNDS_HIGH_RTN(rVALUE, rHIGH, TWLcc) -# define CHECK_BOUNDS_BOTH(rBP, rLOW, rHIGH) -# define CHECK_BOUNDS_BOTH_WIDE(rBP, rLOW, rHIGH, rLENGTH) -# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH) -# define STORE_RETURN_VALUE(rVALUE) -# define STORE_RETURN_BOUNDS(rLOW, rHIGH) - -# define RETURN_NULL_BOUNDED_POINTER li rRTN, 0 - -#endif diff --git a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S index 24b80d288b..95e8a5aa10 100644 --- a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S +++ b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S @@ -18,14 +18,13 @@ #include <shlib-compat.h> #include <libc-symbols.h> #include <sysdep.h> -#include <bp-sym.h> #if defined NOT_IN_libc /* Build a non-versioned object for rtld-*. */ -ENTRY (BP_SYM (_setjmp)) +ENTRY (_setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__sigsetjmp@local) -END (BP_SYM (_setjmp)) + b __sigsetjmp@local +END (_setjmp) libc_hidden_def (_setjmp) #else /* Build a versioned object for libc. */ @@ -33,10 +32,10 @@ libc_hidden_def (_setjmp) # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) symbol_version (__novmx_setjmp,_setjmp,GLIBC_2.0); -ENTRY (BP_SYM (__novmx_setjmp)) +ENTRY (__novmx_setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__novmx__sigsetjmp@local) -END (BP_SYM (__novmx_setjmp)) + b __novmx__sigsetjmp@local +END (__novmx_setjmp) libc_hidden_def (__novmx_setjmp) # endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) */ @@ -44,14 +43,14 @@ default_symbol_version (__vmx_setjmp,_setjmp,GLIBC_2.3.4) /* __GI__setjmp prototype is needed for ntpl i.e. _setjmp is defined as a libc_hidden_proto & is used in sysdeps/generic/libc-start.c if HAVE_CLEANUP_JMP_BUF is defined */ -ENTRY (BP_SYM (__GI__setjmp)) +ENTRY (__GI__setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__vmx__sigsetjmp@local) -END (BP_SYM (__GI__setjmp)) + b __vmx__sigsetjmp@local +END (__GI__setjmp) -ENTRY (BP_SYM (__vmx_setjmp)) +ENTRY (__vmx_setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__vmx__sigsetjmp@local) -END (BP_SYM (__vmx_setjmp)) + b __vmx__sigsetjmp@local +END (__vmx_setjmp) libc_hidden_def (__vmx_setjmp) #endif /* !NOT_IN_libc */ diff --git a/sysdeps/powerpc/powerpc32/bsd-setjmp.S b/sysdeps/powerpc/powerpc32/bsd-setjmp.S index bf95f01896..1113ea533c 100644 --- a/sysdeps/powerpc/powerpc32/bsd-setjmp.S +++ b/sysdeps/powerpc/powerpc32/bsd-setjmp.S @@ -18,7 +18,6 @@ #include <shlib-compat.h> #include <libc-symbols.h> #include <sysdep.h> -#include <bp-sym.h> #if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) diff --git a/sysdeps/powerpc/powerpc32/bzero.S b/sysdeps/powerpc/powerpc32/bzero.S index 2cbcb69d55..b5699243f4 100644 --- a/sysdeps/powerpc/powerpc32/bzero.S +++ b/sysdeps/powerpc/powerpc32/bzero.S @@ -17,20 +17,11 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -ENTRY (BP_SYM (__bzero)) +ENTRY (__bzero) -#if __BOUNDED_POINTERS__ - mr r6,r4 - li r5,0 - mr r4,r3 - /* Tell memset that we don't want a return value. */ - li r3,0 -#else mr r5,r4 li r4,0 -#endif - b BP_SYM (memset)@local -END (BP_SYM (__bzero)) -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) + b memset@local +END (__bzero) +weak_alias (__bzero, bzero) diff --git a/sysdeps/powerpc/powerpc32/cell/memcpy.S b/sysdeps/powerpc/powerpc32/cell/memcpy.S index 6d7d4ce5db..f3605d790f 100644 --- a/sysdeps/powerpc/powerpc32/cell/memcpy.S +++ b/sysdeps/powerpc/powerpc32/cell/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #define PREFETCH_AHEAD 6 /* no cache lines SRC prefetching ahead */ #define ZERO_AHEAD 4 /* no cache lines DST zeroing ahead */ @@ -41,7 +39,7 @@ .align 7 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT dcbt 0,r4 /* Prefetch ONE SRC cacheline */ @@ -240,5 +238,5 @@ EALIGN (BP_SYM (memcpy), 5, 0) stb r0,0(r6) 1: blr -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S index 50b84e89a4..9d34cd9165 100644 --- a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S @@ -23,12 +23,9 @@ #else # include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> .machine "altivec" -ENTRY (BP_SYM (__longjmp)) - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +ENTRY (__longjmp) #ifndef __NO_VMX__ # ifdef PIC mflr r6 @@ -173,4 +170,4 @@ L(no_vmx): lfd fp31,((JB_FPRS+17*2)*4)(r3) mr r3,r4 blr -END (BP_SYM (__longjmp)) +END (__longjmp) diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S index 17edbf6794..46ea2b00f9 100644 --- a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S @@ -23,12 +23,9 @@ #else # include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> .machine "altivec" -ENTRY (BP_SYM (__sigsetjmp)) - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +ENTRY (__sigsetjmp) #ifdef PTR_MANGLE mr r5,r1 @@ -179,5 +176,5 @@ L(aligned_save_vmx): stvx 31,0,r6 L(no_vmx): #endif - b BP_SYM (__sigjmp_save@local) -END (BP_SYM (__sigsetjmp)) + b __sigjmp_save@local +END (__sigsetjmp) diff --git a/sysdeps/powerpc/powerpc32/lshift.S b/sysdeps/powerpc/powerpc32/lshift.S index 8e75084a83..1d83910b30 100644 --- a/sysdeps/powerpc/powerpc32/lshift.S +++ b/sysdeps/powerpc/powerpc32/lshift.S @@ -17,19 +17,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_lshift (mp_ptr wp, mp_srcptr up, mp_size_t usize, unsigned int cnt) */ -EALIGN (BP_SYM (__mpn_lshift), 3, 0) +EALIGN (__mpn_lshift, 3, 0) -#if __BOUNDED_POINTERS__ - slwi r10,r5,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) -#endif mtctr r5 # copy size into CTR cmplwi cr0,r5,16 # is size < 16 slwi r0,r5,2 @@ -129,4 +122,4 @@ L(n): lwzu r10,-4(r4); \ DO_LSHIFT(30) DO_LSHIFT(31) -END (BP_SYM (__mpn_lshift)) +END (__mpn_lshift) diff --git a/sysdeps/powerpc/powerpc32/memset.S b/sysdeps/powerpc/powerpc32/memset.S index 45c79d858b..c49bd039f8 100644 --- a/sysdeps/powerpc/powerpc32/memset.S +++ b/sysdeps/powerpc/powerpc32/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. @@ -29,21 +27,14 @@ takes advantage of the dcbz instruction. */ .section ".text" -EALIGN (BP_SYM (memset), 5, 1) +EALIGN (memset, 5, 1) #define rTMP r0 #define rRTN r3 /* initial value of 1st argument */ -#if __BOUNDED_POINTERS__ -# define rMEMP0 r4 /* original value of 1st arg */ -# define rCHR r5 /* char to set in each byte */ -# define rLEN r6 /* length of region to set */ -# define rMEMP r10 /* address at which we are storing */ -#else -# define rMEMP0 r3 /* original value of 1st arg */ -# define rCHR r4 /* char to set in each byte */ -# define rLEN r5 /* length of region to set */ -# define rMEMP r6 /* address at which we are storing */ -#endif +#define rMEMP0 r3 /* original value of 1st arg */ +#define rCHR r4 /* char to set in each byte */ +#define rLEN r5 /* length of region to set */ +#define rMEMP r6 /* address at which we are storing */ #define rALIGN r7 /* number of bytes we are setting now (when aligning) */ #define rMEMP2 r8 @@ -55,15 +46,6 @@ EALIGN (BP_SYM (memset), 5, 1) #define rCLS r8 /* Cache line size obtained from static. */ #define rCLM r9 /* Cache line size mask to check for cache alignment. */ -#if __BOUNDED_POINTERS__ - cmplwi cr1, rRTN, 0 - CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN) - beq cr1, L(b0) - STORE_RETURN_VALUE (rMEMP0) - STORE_RETURN_BOUNDS (rTMP, rTMP2) -L(b0): -#endif - /* take care of case for size <= 4 */ cmplwi cr1, rLEN, 4 andi. rALIGN, rMEMP0, 3 @@ -321,5 +303,5 @@ L(handletail32): clrrwi. rALIGN, rLEN, 5 b L(nondcbz) -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/sysdeps/powerpc/powerpc32/mul_1.S b/sysdeps/powerpc/powerpc32/mul_1.S index fc78658750..0b474d4911 100644 --- a/sysdeps/powerpc/powerpc32/mul_1.S +++ b/sysdeps/powerpc/powerpc32/mul_1.S @@ -17,19 +17,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_mul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, mp_limb_t s2_limb) Calculate s1*s2 and put result in res_ptr; return carry. */ -ENTRY (BP_SYM (__mpn_mul_1)) -#if __BOUNDED_POINTERS__ - slwi r10,r5,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) -#endif +ENTRY (__mpn_mul_1) mtctr r5 lwz r0,0(r4) @@ -49,4 +42,4 @@ L(0): lwzu r0,4(r4) L(1): stw r7,4(r3) addze r3,r10 blr -END (BP_SYM (__mpn_mul_1)) +END (__mpn_mul_1) diff --git a/sysdeps/powerpc/powerpc32/power4/Implies b/sysdeps/powerpc/powerpc32/power4/Implies new file mode 100644 index 0000000000..a372141bb7 --- /dev/null +++ b/sysdeps/powerpc/powerpc32/power4/Implies @@ -0,0 +1,2 @@ +powerpc/power4/fpu +powerpc/power4 diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c deleted file mode 100644 index b1784f27c3..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c +++ /dev/null @@ -1,744 +0,0 @@ - -/* - * IBM Accurate Mathematical Library - * written by International Business Machines Corp. - * Copyright (C) 2001-2013 Free Software Foundation, Inc. - * - * This program 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. - * - * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. - */ -/************************************************************************/ -/* MODULE_NAME: mpa.c */ -/* */ -/* FUNCTIONS: */ -/* mcr */ -/* acr */ -/* cpy */ -/* norm */ -/* denorm */ -/* mp_dbl */ -/* dbl_mp */ -/* add_magnitudes */ -/* sub_magnitudes */ -/* add */ -/* sub */ -/* mul */ -/* inv */ -/* dvd */ -/* */ -/* Arithmetic functions for multiple precision numbers. */ -/* Relative errors are bounded */ -/************************************************************************/ - - -#include "endian.h" -#include "mpa.h" -#include <sys/param.h> - -const mp_no mpone = {1, {1.0, 1.0}}; -const mp_no mptwo = {1, {1.0, 2.0}}; - -/* Compare mantissa of two multiple precision numbers regardless of the sign - and exponent of the numbers. */ -static int -mcr (const mp_no *x, const mp_no *y, int p) -{ - long i; - long p2 = p; - for (i = 1; i <= p2; i++) - { - if (X[i] == Y[i]) - continue; - else if (X[i] > Y[i]) - return 1; - else - return -1; - } - return 0; -} - -/* Compare the absolute values of two multiple precision numbers. */ -int -__acr (const mp_no *x, const mp_no *y, int p) -{ - long i; - - if (X[0] == ZERO) - { - if (Y[0] == ZERO) - i = 0; - else - i = -1; - } - else if (Y[0] == ZERO) - i = 1; - else - { - if (EX > EY) - i = 1; - else if (EX < EY) - i = -1; - else - i = mcr (x, y, p); - } - - return i; -} - -/* Copy multiple precision number X into Y. They could be the same - number. */ -void -__cpy (const mp_no *x, mp_no *y, int p) -{ - long i; - - EY = EX; - for (i = 0; i <= p; i++) - Y[i] = X[i]; - - return; -} - -/* Convert a multiple precision number *X into a double precision - number *Y, normalized case (|x| >= 2**(-1022))). */ -static void -norm (const mp_no *x, double *y, int p) -{ -#define R RADIXI - long i; - double a, c, u, v, z[5]; - if (p < 5) - { - if (p == 1) - c = X[1]; - else if (p == 2) - c = X[1] + R * X[2]; - else if (p == 3) - c = X[1] + R * (X[2] + R * X[3]); - else if (p == 4) - c = (X[1] + R * X[2]) + R * R * (X[3] + R * X[4]); - } - else - { - for (a = ONE, z[1] = X[1]; z[1] < TWO23;) - { - a *= TWO; - z[1] *= TWO; - } - - for (i = 2; i < 5; i++) - { - z[i] = X[i] * a; - u = (z[i] + CUTTER) - CUTTER; - if (u > z[i]) - u -= RADIX; - z[i] -= u; - z[i - 1] += u * RADIXI; - } - - u = (z[3] + TWO71) - TWO71; - if (u > z[3]) - u -= TWO19; - v = z[3] - u; - - if (v == TWO18) - { - if (z[4] == ZERO) - { - for (i = 5; i <= p; i++) - { - if (X[i] == ZERO) - continue; - else - { - z[3] += ONE; - break; - } - } - } - else - z[3] += ONE; - } - - c = (z[1] + R * (z[2] + R * z[3])) / a; - } - - c *= X[0]; - - for (i = 1; i < EX; i++) - c *= RADIX; - for (i = 1; i > EX; i--) - c *= RADIXI; - - *y = c; - return; -#undef R -} - -/* Convert a multiple precision number *X into a double precision - number *Y, Denormal case (|x| < 2**(-1022))). */ -static void -denorm (const mp_no *x, double *y, int p) -{ - long i, k; - long p2 = p; - double c, u, z[5]; - -#define R RADIXI - if (EX < -44 || (EX == -44 && X[1] < TWO5)) - { - *y = ZERO; - return; - } - - if (p2 == 1) - { - if (EX == -42) - { - z[1] = X[1] + TWO10; - z[2] = ZERO; - z[3] = ZERO; - k = 3; - } - else if (EX == -43) - { - z[1] = TWO10; - z[2] = X[1]; - z[3] = ZERO; - k = 2; - } - else - { - z[1] = TWO10; - z[2] = ZERO; - z[3] = X[1]; - k = 1; - } - } - else if (p2 == 2) - { - if (EX == -42) - { - z[1] = X[1] + TWO10; - z[2] = X[2]; - z[3] = ZERO; - k = 3; - } - else if (EX == -43) - { - z[1] = TWO10; - z[2] = X[1]; - z[3] = X[2]; - k = 2; - } - else - { - z[1] = TWO10; - z[2] = ZERO; - z[3] = X[1]; - k = 1; - } - } - else - { - if (EX == -42) - { - z[1] = X[1] + TWO10; - z[2] = X[2]; - k = 3; - } - else if (EX == -43) - { - z[1] = TWO10; - z[2] = X[1]; - k = 2; - } - else - { - z[1] = TWO10; - z[2] = ZERO; - k = 1; - } - z[3] = X[k]; - } - - u = (z[3] + TWO57) - TWO57; - if (u > z[3]) - u -= TWO5; - - if (u == z[3]) - { - for (i = k + 1; i <= p2; i++) - { - if (X[i] == ZERO) - continue; - else - { - z[3] += ONE; - break; - } - } - } - - c = X[0] * ((z[1] + R * (z[2] + R * z[3])) - TWO10); - - *y = c * TWOM1032; - return; - -#undef R -} - -/* Convert multiple precision number *X into double precision number *Y. The - result is correctly rounded to the nearest/even. */ -void -__mp_dbl (const mp_no *x, double *y, int p) -{ - if (X[0] == ZERO) - { - *y = ZERO; - return; - } - - if (EX > -42) - norm (x, y, p); - else if (EX == -42 && X[1] >= TWO10) - norm (x, y, p); - else - denorm (x, y, p); -} - -/* Get the multiple precision equivalent of X into *Y. If the precision is too - small, the result is truncated. */ -void -__dbl_mp (double x, mp_no *y, int p) -{ - long i, n; - long p2 = p; - double u; - - /* Sign. */ - if (x == ZERO) - { - Y[0] = ZERO; - return; - } - else if (x > ZERO) - Y[0] = ONE; - else - { - Y[0] = MONE; - x = -x; - } - - /* Exponent. */ - for (EY = ONE; x >= RADIX; EY += ONE) - x *= RADIXI; - for (; x < ONE; EY -= ONE) - x *= RADIX; - - /* Digits. */ - n = MIN (p2, 4); - for (i = 1; i <= n; i++) - { - u = (x + TWO52) - TWO52; - if (u > x) - u -= ONE; - Y[i] = u; - x -= u; - x *= RADIX; - } - for (; i <= p2; i++) - Y[i] = ZERO; - return; -} - -/* Add magnitudes of *X and *Y assuming that abs (*X) >= abs (*Y) > 0. The - sign of the sum *Z is not changed. X and Y may overlap but not X and Z or - Y and Z. No guard digit is used. The result equals the exact sum, - truncated. */ -static void -add_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - long i, j, k; - long p2 = p; - - EZ = EX; - - i = p2; - j = p2 + EY - EX; - k = p2 + 1; - - if (j < 1) - { - __cpy (x, z, p); - return; - } - else - Z[k] = ZERO; - - for (; j > 0; i--, j--) - { - Z[k] += X[i] + Y[j]; - if (Z[k] >= RADIX) - { - Z[k] -= RADIX; - Z[--k] = ONE; - } - else - Z[--k] = ZERO; - } - - for (; i > 0; i--) - { - Z[k] += X[i]; - if (Z[k] >= RADIX) - { - Z[k] -= RADIX; - Z[--k] = ONE; - } - else - Z[--k] = ZERO; - } - - if (Z[1] == ZERO) - { - for (i = 1; i <= p2; i++) - Z[i] = Z[i + 1]; - } - else - EZ += ONE; -} - -/* Subtract the magnitudes of *X and *Y assuming that abs (*x) > abs (*y) > 0. - The sign of the difference *Z is not changed. X and Y may overlap but not X - and Z or Y and Z. One guard digit is used. The error is less than one - ULP. */ -static void -sub_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - long i, j, k; - long p2 = p; - - EZ = EX; - - if (EX == EY) - { - i = j = k = p2; - Z[k] = Z[k + 1] = ZERO; - } - else - { - j = EX - EY; - if (j > p2) - { - __cpy (x, z, p); - return; - } - else - { - i = p2; - j = p2 + 1 - j; - k = p2; - if (Y[j] > ZERO) - { - Z[k + 1] = RADIX - Y[j--]; - Z[k] = MONE; - } - else - { - Z[k + 1] = ZERO; - Z[k] = ZERO; - j--; - } - } - } - - for (; j > 0; i--, j--) - { - Z[k] += (X[i] - Y[j]); - if (Z[k] < ZERO) - { - Z[k] += RADIX; - Z[--k] = MONE; - } - else - Z[--k] = ZERO; - } - - for (; i > 0; i--) - { - Z[k] += X[i]; - if (Z[k] < ZERO) - { - Z[k] += RADIX; - Z[--k] = MONE; - } - else - Z[--k] = ZERO; - } - - for (i = 1; Z[i] == ZERO; i++); - EZ = EZ - i + 1; - for (k = 1; i <= p2 + 1;) - Z[k++] = Z[i++]; - for (; k <= p2;) - Z[k++] = ZERO; - - return; -} - -/* Add *X and *Y and store the result in *Z. X and Y may overlap, but not X - and Z or Y and Z. One guard digit is used. The error is less than one - ULP. */ -void -__add (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - int n; - - if (X[0] == ZERO) - { - __cpy (y, z, p); - return; - } - else if (Y[0] == ZERO) - { - __cpy (x, z, p); - return; - } - - if (X[0] == Y[0]) - { - if (__acr (x, y, p) > 0) - { - add_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else - { - add_magnitudes (y, x, z, p); - Z[0] = Y[0]; - } - } - else - { - if ((n = __acr (x, y, p)) == 1) - { - sub_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else if (n == -1) - { - sub_magnitudes (y, x, z, p); - Z[0] = Y[0]; - } - else - Z[0] = ZERO; - } - return; -} - -/* Subtract *Y from *X and return the result in *Z. X and Y may overlap but - not X and Z or Y and Z. One guard digit is used. The error is less than - one ULP. */ -void -__sub (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - int n; - - if (X[0] == ZERO) - { - __cpy (y, z, p); - Z[0] = -Z[0]; - return; - } - else if (Y[0] == ZERO) - { - __cpy (x, z, p); - return; - } - - if (X[0] != Y[0]) - { - if (__acr (x, y, p) > 0) - { - add_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else - { - add_magnitudes (y, x, z, p); - Z[0] = -Y[0]; - } - } - else - { - if ((n = __acr (x, y, p)) == 1) - { - sub_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else if (n == -1) - { - sub_magnitudes (y, x, z, p); - Z[0] = -Y[0]; - } - else - Z[0] = ZERO; - } - return; -} - -/* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X - and Z or Y and Z. For P in [1, 2, 3], the exact result is truncated to P - digits. In case P > 3 the error is bounded by 1.001 ULP. */ -void -__mul (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - long i, i1, i2, j, k, k2; - long p2 = p; - double u, zk, zk2; - - /* Is z=0? */ - if (X[0] * Y[0] == ZERO) - { - Z[0] = ZERO; - return; - } - - /* Multiply, add and carry */ - k2 = (p2 < 3) ? p2 + p2 : p2 + 3; - zk = Z[k2] = ZERO; - for (k = k2; k > 1;) - { - if (k > p2) - { - i1 = k - p2; - i2 = p2 + 1; - } - else - { - i1 = 1; - i2 = k; - } -#if 1 - /* Rearrange this inner loop to allow the fmadd instructions to be - independent and execute in parallel on processors that have - dual symmetrical FP pipelines. */ - if (i1 < (i2 - 1)) - { - /* Make sure we have at least 2 iterations. */ - if (((i2 - i1) & 1L) == 1L) - { - /* Handle the odd iterations case. */ - zk2 = x->d[i2 - 1] * y->d[i1]; - } - else - zk2 = 0.0; - /* Do two multiply/adds per loop iteration, using independent - accumulators; zk and zk2. */ - for (i = i1, j = i2 - 1; i < i2 - 1; i += 2, j -= 2) - { - zk += x->d[i] * y->d[j]; - zk2 += x->d[i + 1] * y->d[j - 1]; - } - zk += zk2; /* Final sum. */ - } - else - { - /* Special case when iterations is 1. */ - zk += x->d[i1] * y->d[i1]; - } -#else - /* The original code. */ - for (i = i1, j = i2 - 1; i < i2; i++, j--) - zk += X[i] * Y[j]; -#endif - - u = (zk + CUTTER) - CUTTER; - if (u > zk) - u -= RADIX; - Z[k] = zk - u; - zk = u * RADIXI; - --k; - } - Z[k] = zk; - - /* Is there a carry beyond the most significant digit? */ - if (Z[1] == ZERO) - { - for (i = 1; i <= p2; i++) - Z[i] = Z[i + 1]; - EZ = EX + EY - 1; - } - else - EZ = EX + EY; - - Z[0] = X[0] * Y[0]; - return; -} - -/* Invert *X and store in *Y. Relative error bound: - - For P = 2: 1.001 * R ^ (1 - P) - - For P = 3: 1.063 * R ^ (1 - P) - - For P > 3: 2.001 * R ^ (1 - P) - - *X = 0 is not permissible. */ -void -__inv (const mp_no *x, mp_no *y, int p) -{ - long i; - double t; - mp_no z, w; - static const int np1[] = - { 0, 0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 - }; - - __cpy (x, &z, p); - z.e = 0; - __mp_dbl (&z, &t, p); - t = ONE / t; - __dbl_mp (t, y, p); - EY -= EX; - - for (i = 0; i < np1[p]; i++) - { - __cpy (y, &w, p); - __mul (x, &w, y, p); - __sub (&mptwo, y, &z, p); - __mul (&w, &z, y, p); - } - return; -} - -/* Divide *X by *Y and store result in *Z. X and Y may overlap but not X and Z - or Y and Z. Relative error bound: - - For P = 2: 2.001 * R ^ (1 - P) - - For P = 3: 2.063 * R ^ (1 - P) - - For P > 3: 3.001 * R ^ (1 - P) - - *X = 0 is not permissible. */ -void -__dvd (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - mp_no w; - - if (X[0] == ZERO) - Z[0] = ZERO; - else - { - __inv (y, &w, p); - __mul (x, &w, z, p); - } - return; -} diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c b/sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c deleted file mode 100644 index d93f505445..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * IBM Accurate Mathematical Library - * written by International Business Machines Corp. - * Copyright (C) 2001-2013 Free Software Foundation, Inc. - * - * This program 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. - * - * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. - */ -/**************************************************************************/ -/* MODULE_NAME:slowexp.c */ -/* */ -/* FUNCTION:slowexp */ -/* */ -/* FILES NEEDED:mpa.h */ -/* mpa.c mpexp.c */ -/* */ -/*Converting from double precision to Multi-precision and calculating */ -/* e^x */ -/**************************************************************************/ -#include <math_private.h> - -#ifdef NO_LONG_DOUBLE -#include "mpa.h" -void __mpexp(mp_no *x, mp_no *y, int p); -#endif - -/*Converting from double precision to Multi-precision and calculating e^x */ -double __slowexp(double x) { -#ifdef NO_LONG_DOUBLE - double w,z,res,eps=3.0e-26; - int p; - mp_no mpx, mpy, mpz,mpw,mpeps,mpcor; - - p=6; - __dbl_mp(x,&mpx,p); /* Convert a double precision number x */ - /* into a multiple precision number mpx with prec. p. */ - __mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */ - __dbl_mp(eps,&mpeps,p); - __mul(&mpeps,&mpy,&mpcor,p); - __add(&mpy,&mpcor,&mpw,p); - __sub(&mpy,&mpcor,&mpz,p); - __mp_dbl(&mpw, &w, p); - __mp_dbl(&mpz, &z, p); - if (w == z) return w; - else { /* if calculating is not exactly */ - p = 32; - __dbl_mp(x,&mpx,p); - __mpexp(&mpx, &mpy, p); - __mp_dbl(&mpy, &res, p); - return res; - } -#else - return (double) __ieee754_expl((long double)x); -#endif -} diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c b/sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c deleted file mode 100644 index 7c97d95817..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * IBM Accurate Mathematical Library - * written by International Business Machines Corp. - * Copyright (C) 2001-2013 Free Software Foundation, Inc. - * - * This program 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. - * - * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. - */ -/*************************************************************************/ -/* MODULE_NAME:slowpow.c */ -/* */ -/* FUNCTION:slowpow */ -/* */ -/*FILES NEEDED:mpa.h */ -/* mpa.c mpexp.c mplog.c halfulp.c */ -/* */ -/* Given two IEEE double machine numbers y,x , routine computes the */ -/* correctly rounded (to nearest) value of x^y. Result calculated by */ -/* multiplication (in halfulp.c) or if result isn't accurate enough */ -/* then routine converts x and y into multi-precision doubles and */ -/* recompute. */ -/*************************************************************************/ - -#include "mpa.h" -#include <math_private.h> - -void __mpexp (mp_no * x, mp_no * y, int p); -void __mplog (mp_no * x, mp_no * y, int p); -double ulog (double); -double __halfulp (double x, double y); - -double -__slowpow (double x, double y, double z) -{ - double res, res1; - long double ldw, ldz, ldpp; - static const long double ldeps = 0x4.0p-96; - - res = __halfulp (x, y); /* halfulp() returns -10 or x^y */ - if (res >= 0) - return res; /* if result was really computed by halfulp */ - /* else, if result was not really computed by halfulp */ - - /* Compute pow as long double, 106 bits */ - ldz = __ieee754_logl ((long double) x); - ldw = (long double) y *ldz; - ldpp = __ieee754_expl (ldw); - res = (double) (ldpp + ldeps); - res1 = (double) (ldpp - ldeps); - - if (res != res1) /* if result still not accurate enough */ - { /* use mpa for higher precision. */ - mp_no mpx, mpy, mpz, mpw, mpp, mpr, mpr1; - static const mp_no eps = { -3, {1.0, 4.0} }; - int p; - - p = 10; /* p=precision 240 bits */ - __dbl_mp (x, &mpx, p); - __dbl_mp (y, &mpy, p); - __dbl_mp (z, &mpz, p); - __mplog (&mpx, &mpz, p); /* log(x) = z */ - __mul (&mpy, &mpz, &mpw, p); /* y * z =w */ - __mpexp (&mpw, &mpp, p); /* e^w =pp */ - __add (&mpp, &eps, &mpr, p); /* pp+eps =r */ - __mp_dbl (&mpr, &res, p); - __sub (&mpp, &eps, &mpr1, p); /* pp -eps =r1 */ - __mp_dbl (&mpr1, &res1, p); /* converting into double precision */ - if (res == res1) - return res; - - /* if we get here result wasn't calculated exactly, continue for - more exact calculation using 768 bits. */ - p = 32; - __dbl_mp (x, &mpx, p); - __dbl_mp (y, &mpy, p); - __dbl_mp (z, &mpz, p); - __mplog (&mpx, &mpz, p); /* log(c)=z */ - __mul (&mpy, &mpz, &mpw, p); /* y*z =w */ - __mpexp (&mpw, &mpp, p); /* e^w=pp */ - __mp_dbl (&mpp, &res, p); /* converting into double precision */ - } - return res; -} diff --git a/sysdeps/powerpc/powerpc32/power4/memcmp.S b/sysdeps/powerpc/powerpc32/power4/memcmp.S index bbee6f4d35..edec7ab274 100644 --- a/sysdeps/powerpc/powerpc32/power4/memcmp.S +++ b/sysdeps/powerpc/powerpc32/power4/memcmp.S @@ -17,13 +17,11 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ .machine power4 -EALIGN (BP_SYM(memcmp), 4, 0) +EALIGN (memcmp, 4, 0) CALL_MCOUNT #define rTMP r0 @@ -979,7 +977,7 @@ L(dureturn25): lwz r24,20(r1) lwz 1,0(1) blr -END (BP_SYM (memcmp)) +END (memcmp) libc_hidden_builtin_def (memcmp) weak_alias (memcmp, bcmp) diff --git a/sysdeps/powerpc/powerpc32/power4/memcpy.S b/sysdeps/powerpc/powerpc32/power4/memcpy.S index aa2aab1ec8..d9146631e3 100644 --- a/sysdeps/powerpc/powerpc32/power4/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power4/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. @@ -34,7 +32,7 @@ Each case has an optimized unrolled loop. */ .machine power4 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT stwu 1,-32(1) @@ -420,6 +418,6 @@ EALIGN (BP_SYM (memcpy), 5, 0) lwz 31,24(1) addi 1,1,32 blr -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/power4/memset.S b/sysdeps/powerpc/powerpc32/power4/memset.S index 58497f4b17..1e8785cb4a 100644 --- a/sysdeps/powerpc/powerpc32/power4/memset.S +++ b/sysdeps/powerpc/powerpc32/power4/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. @@ -28,7 +26,7 @@ to 0, to take advantage of the dcbz instruction. */ .machine power4 -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) CALL_MCOUNT #define rTMP r0 @@ -224,5 +222,5 @@ L(medium_28t): stw rCHR, -4(rMEMP) stw rCHR, -8(rMEMP) blr -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/sysdeps/powerpc/powerpc32/power4/strncmp.S b/sysdeps/powerpc/powerpc32/power4/strncmp.S index 50d79dc967..724d9084a9 100644 --- a/sysdeps/powerpc/powerpc32/power4/strncmp.S +++ b/sysdeps/powerpc/powerpc32/power4/strncmp.S @@ -17,23 +17,18 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ -EALIGN (BP_SYM(strncmp), 4, 0) +EALIGN (strncmp, 4, 0) #define rTMP r0 #define rRTN r3 #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rWORD3 r10 @@ -171,5 +166,5 @@ L(u4): sub rRTN, rWORD1, rWORD2 L(ux): li rRTN, 0 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S index 203c979d1b..d900028cb6 100644 --- a/sysdeps/powerpc/powerpc32/power6/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. @@ -34,7 +32,7 @@ Each case has an optimized unrolled loop. */ .machine power6 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT stwu 1,-32(1) @@ -837,6 +835,6 @@ L(wdus_0): lwz 31,24(1) addi 1,1,32 blr -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S index 3612e7c356..ce06630014 100644 --- a/sysdeps/powerpc/powerpc32/power6/memset.S +++ b/sysdeps/powerpc/powerpc32/power6/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. @@ -28,7 +26,7 @@ to 0, to take advantage of the dcbz instruction. */ .machine power6 -EALIGN (BP_SYM (memset), 7, 0) +EALIGN (memset, 7, 0) CALL_MCOUNT #define rTMP r0 @@ -537,5 +535,5 @@ L(medium_28t): stw rCHR, -4(rMEMP) stw rCHR, -8(rMEMP) blr -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/sysdeps/powerpc/powerpc32/power7/memchr.S b/sysdeps/powerpc/powerpc32/power7/memchr.S index 3d8389e95c..369e5e0483 100644 --- a/sysdeps/powerpc/powerpc32/power7/memchr.S +++ b/sysdeps/powerpc/powerpc32/power7/memchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memchr (char *s [r3], int byte [r4], int size [r5]) */ .machine power7 -ENTRY (BP_SYM (__memchr)) +ENTRY (__memchr) CALL_MCOUNT dcbt 0,r3 clrrwi r8,r3,2 @@ -202,6 +200,6 @@ L(loop_small): /* loop_small has been unrolled. */ li r3,0 blr -END (BP_SYM (__memchr)) -weak_alias (BP_SYM (__memchr), BP_SYM(memchr)) +END (__memchr) +weak_alias (__memchr, memchr) libc_hidden_builtin_def (memchr) diff --git a/sysdeps/powerpc/powerpc32/power7/memcmp.S b/sysdeps/powerpc/powerpc32/power7/memcmp.S index 815e3c3953..f764b7ce31 100644 --- a/sysdeps/powerpc/powerpc32/power7/memcmp.S +++ b/sysdeps/powerpc/powerpc32/power7/memcmp.S @@ -17,15 +17,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ .machine power7 -EALIGN (BP_SYM(memcmp),4,0) +EALIGN (memcmp,4,0) CALL_MCOUNT #define rTMP r0 @@ -982,6 +980,6 @@ L(dureturn25): lwz r24,20(r1) lwz 1,0(1) blr -END (BP_SYM (memcmp)) +END (memcmp) libc_hidden_builtin_def (memcmp) weak_alias (memcmp,bcmp) diff --git a/sysdeps/powerpc/powerpc32/power7/memcpy.S b/sysdeps/powerpc/powerpc32/power7/memcpy.S index 4f228d3b62..7f00778236 100644 --- a/sysdeps/powerpc/powerpc32/power7/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power7/memcpy.S @@ -18,14 +18,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. */ .machine power7 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT stwu 1,-32(1) @@ -522,5 +520,5 @@ L(end_unaligned_loop): addi 1,1,32 blr -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/power7/mempcpy.S b/sysdeps/powerpc/powerpc32/power7/mempcpy.S index 9a88a1b783..5ad4edb580 100644 --- a/sysdeps/powerpc/powerpc32/power7/mempcpy.S +++ b/sysdeps/powerpc/powerpc32/power7/mempcpy.S @@ -18,14 +18,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst' + 'len'. */ .machine power7 -EALIGN (BP_SYM (__mempcpy), 5, 0) +EALIGN (__mempcpy, 5, 0) CALL_MCOUNT stwu 1,-32(1) @@ -464,7 +462,7 @@ L(end_unaligned_loop): addi 1,1,32 blr -END (BP_SYM (__mempcpy)) -libc_hidden_def (BP_SYM (__mempcpy)) -weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy)) +END (__mempcpy) +libc_hidden_def (__mempcpy) +weak_alias (__mempcpy, mempcpy) libc_hidden_builtin_def (mempcpy) diff --git a/sysdeps/powerpc/powerpc32/power7/memrchr.S b/sysdeps/powerpc/powerpc32/power7/memrchr.S index 9ff8d662f5..d1e3fda125 100644 --- a/sysdeps/powerpc/powerpc32/power7/memrchr.S +++ b/sysdeps/powerpc/powerpc32/power7/memrchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memrchr (char *s [r3], int byte [r4], int size [r5]) */ .machine power7 -ENTRY (BP_SYM (__memrchr)) +ENTRY (__memrchr) CALL_MCOUNT dcbt 0,r3 mr r7,r3 @@ -172,6 +170,6 @@ L(loop_small): ble L(null) b L(loop_small) -END (BP_SYM (__memrchr)) -weak_alias (BP_SYM (__memrchr), BP_SYM(memrchr)) +END (__memrchr) +weak_alias (__memrchr, memrchr) libc_hidden_builtin_def (memrchr) diff --git a/sysdeps/powerpc/powerpc32/power7/memset.S b/sysdeps/powerpc/powerpc32/power7/memset.S index 00283ab05c..360ea717f4 100644 --- a/sysdeps/powerpc/powerpc32/power7/memset.S +++ b/sysdeps/powerpc/powerpc32/power7/memset.S @@ -18,14 +18,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. */ .machine power7 -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) CALL_MCOUNT .align 4 @@ -429,5 +427,5 @@ L(small): stw 4,4(10) blr -END (BP_SYM (memset)) +END (memset) libc_hidden_builtin_def (memset) diff --git a/sysdeps/powerpc/powerpc32/power7/rawmemchr.S b/sysdeps/powerpc/powerpc32/power7/rawmemchr.S index e37d1327c3..a80c74a092 100644 --- a/sysdeps/powerpc/powerpc32/power7/rawmemchr.S +++ b/sysdeps/powerpc/powerpc32/power7/rawmemchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] rawmemchr (void *s [r3], int c [r4]) */ .machine power7 -ENTRY (BP_SYM(__rawmemchr)) +ENTRY (__rawmemchr) CALL_MCOUNT dcbt 0,r3 clrrwi r8,r3,2 /* Align the address to word boundary. */ @@ -96,6 +94,6 @@ L(done): srwi r0,r0,3 /* Convert leading zeroes to bytes. */ add r3,r8,r0 /* Return address of the matching char. */ blr -END (BP_SYM (__rawmemchr)) +END (__rawmemchr) weak_alias (__rawmemchr,rawmemchr) libc_hidden_builtin_def (__rawmemchr) diff --git a/sysdeps/powerpc/powerpc32/power7/strcasecmp.S b/sysdeps/powerpc/powerpc32/power7/strcasecmp.S index 52d73d9f89..7f0046c34d 100644 --- a/sysdeps/powerpc/powerpc32/power7/strcasecmp.S +++ b/sysdeps/powerpc/powerpc32/power7/strcasecmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #include <locale-defines.h> /* int [r3] strcasecmp (const char *s1 [r3], const char *s2 [r4] ) @@ -33,7 +31,7 @@ # define STRCMP strcasecmp #endif -ENTRY (BP_SYM (__STRCMP)) +ENTRY (__STRCMP) #define rRTN r3 /* Return value */ #define rSTR1 r5 /* 1st string */ @@ -125,7 +123,7 @@ L(loop): bnelr bne cr7,L(loop) blr -END (BP_SYM (__STRCMP)) +END (__STRCMP) -weak_alias (BP_SYM (__STRCMP), BP_SYM (STRCMP)) +weak_alias (__STRCMP, STRCMP) libc_hidden_builtin_def (__STRCMP) diff --git a/sysdeps/powerpc/powerpc32/power7/strchr.S b/sysdeps/powerpc/powerpc32/power7/strchr.S index 1a3795815a..0ecadb271a 100644 --- a/sysdeps/powerpc/powerpc32/power7/strchr.S +++ b/sysdeps/powerpc/powerpc32/power7/strchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strchr (char *s [r3], int c [r4]) */ .machine power7 -ENTRY (BP_SYM(strchr)) +ENTRY (strchr) CALL_MCOUNT dcbt 0,r3 clrrwi r8,r3,2 /* Align the address to word boundary. */ @@ -197,6 +195,6 @@ L(done_null): srwi r0,r0,3 /* Convert leading zeros to bytes. */ add r3,r8,r0 /* Return address of the matching null byte. */ blr -END (BP_SYM (strchr)) -weak_alias (BP_SYM (strchr), BP_SYM (index)) +END (strchr) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/powerpc/powerpc32/power7/strchrnul.S b/sysdeps/powerpc/powerpc32/power7/strchrnul.S index ae304ae9e5..d4cacab60b 100644 --- a/sysdeps/powerpc/powerpc32/power7/strchrnul.S +++ b/sysdeps/powerpc/powerpc32/power7/strchrnul.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strchrnul (char *s [r3], int c [r4]) */ .machine power7 -ENTRY (BP_SYM(__strchrnul)) +ENTRY (__strchrnul) CALL_MCOUNT dcbt 0,r3 clrrwi r8,r3,2 /* Align the address to word boundary. */ @@ -111,6 +109,6 @@ L(done): srwi r0,r0,3 /* Convert leading zeros to bytes. */ add r3,r8,r0 /* Return address of matching c/null byte. */ blr -END (BP_SYM (__strchrnul)) +END (__strchrnul) weak_alias (__strchrnul,strchrnul) libc_hidden_builtin_def (__strchrnul) diff --git a/sysdeps/powerpc/powerpc32/power7/strlen.S b/sysdeps/powerpc/powerpc32/power7/strlen.S index 7694f8a2c5..b71a10f5c7 100644 --- a/sysdeps/powerpc/powerpc32/power7/strlen.S +++ b/sysdeps/powerpc/powerpc32/power7/strlen.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strlen (char *s [r3]) */ .machine power7 -ENTRY (BP_SYM (strlen)) +ENTRY (strlen) CALL_MCOUNT dcbt 0,r3 clrrwi r4,r3,2 /* Align the address to word boundary. */ @@ -93,5 +91,5 @@ L(done): srwi r0,r0,3 /* Convert leading zeroes to bytes. */ add r3,r5,r0 /* Compute final length. */ blr -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/powerpc/powerpc32/power7/strncmp.S b/sysdeps/powerpc/powerpc32/power7/strncmp.S index 3629783bc0..fdae44d265 100644 --- a/sysdeps/powerpc/powerpc32/power7/strncmp.S +++ b/sysdeps/powerpc/powerpc32/power7/strncmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ @@ -26,16 +24,13 @@ const char *s2 [r4], size_t size [r5]) */ -EALIGN (BP_SYM(strncmp),5,0) +EALIGN (strncmp,5,0) #define rTMP r0 #define rRTN r3 #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rWORD3 r10 @@ -175,5 +170,5 @@ L(u4): sub rRTN,rWORD1,rWORD2 L(ux): li rRTN,0 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/powerpc/powerpc32/power7/strnlen.S b/sysdeps/powerpc/powerpc32/power7/strnlen.S index ec716e74a3..ed088366a2 100644 --- a/sysdeps/powerpc/powerpc32/power7/strnlen.S +++ b/sysdeps/powerpc/powerpc32/power7/strnlen.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strnlen (char *s [r3], int size [r4]) */ .machine power7 -ENTRY (BP_SYM (__strnlen)) +ENTRY (__strnlen) CALL_MCOUNT dcbt 0,r3 clrrwi r8,r3,2 /* Align the address to word boundary. */ @@ -166,6 +164,6 @@ L(loop_small): cmplw r9,r7 bge L(end_max) b L(loop_small) -END (BP_SYM (__strnlen)) -weak_alias (BP_SYM (__strnlen), BP_SYM(strnlen)) +END (__strnlen) +weak_alias (__strnlen, strnlen) libc_hidden_builtin_def (strnlen) diff --git a/sysdeps/powerpc/powerpc32/rshift.S b/sysdeps/powerpc/powerpc32/rshift.S index 4fd9cb7fb9..9cc63aa969 100644 --- a/sysdeps/powerpc/powerpc32/rshift.S +++ b/sysdeps/powerpc/powerpc32/rshift.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* INPUT PARAMETERS res_ptr r3 @@ -26,12 +24,7 @@ size r5 cnt r6 */ -ENTRY (BP_SYM (__mpn_rshift)) -#if __BOUNDED_POINTERS__ - slwi r10,r5,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) -#endif +ENTRY (__mpn_rshift) mtctr r5 # copy size into CTR addi r7,r3,-4 # move adjusted res_ptr to free return reg subfic r8,r6,32 @@ -59,4 +52,4 @@ L(1): srw r0,r11,r6 L(2): srw r0,r10,r6 stw r0,4(r7) blr -END (BP_SYM (__mpn_rshift)) +END (__mpn_rshift) diff --git a/sysdeps/powerpc/powerpc32/setjmp-common.S b/sysdeps/powerpc/powerpc32/setjmp-common.S index a35507fa45..60b0026fa6 100644 --- a/sysdeps/powerpc/powerpc32/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/setjmp-common.S @@ -23,12 +23,9 @@ #else # include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> -ENTRY (BP_SYM (__sigsetjmp)) - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +ENTRY (__sigsetjmp) #ifdef PTR_MANGLE mr r5,r1 @@ -67,6 +64,6 @@ ENTRY (BP_SYM (__sigsetjmp)) li r3,0 blr #else - b BP_SYM (__sigjmp_save@local) + b __sigjmp_save@local #endif -END (BP_SYM (__sigsetjmp)) +END (__sigsetjmp) diff --git a/sysdeps/powerpc/powerpc32/start.S b/sysdeps/powerpc/powerpc32/start.S index 6c6970518e..f04446bbba 100644 --- a/sysdeps/powerpc/powerpc32/start.S +++ b/sysdeps/powerpc/powerpc32/start.S @@ -34,7 +34,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include "bp-sym.h" + +/* We do not want .eh_frame info for crt1.o since crt1.o is linked + before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */ +#undef cfi_startproc +#define cfi_startproc +#undef cfi_endproc +#define cfi_endproc /* These are the various addresses we require. */ #ifdef PIC @@ -45,7 +51,7 @@ .align 2 L(start_addresses): .long _SDA_BASE_ - .long BP_SYM (main) + .long main .long __libc_csu_init .long __libc_csu_fini ASM_SIZE_DIRECTIVE(L(start_addresses)) @@ -78,7 +84,7 @@ ENTRY(_start) lwzu r13,L(start_addresses)@l(r8) #endif /* and continue in libc-start, in glibc. */ - b JUMPTARGET(BP_SYM (__libc_start_main)) + b JUMPTARGET(__libc_start_main) END(_start) /* Define a symbol for the first piece of initialized data. */ diff --git a/sysdeps/powerpc/powerpc32/stpcpy.S b/sysdeps/powerpc/powerpc32/stpcpy.S index 49f993d1c8..03c6dddc3a 100644 --- a/sysdeps/powerpc/powerpc32/stpcpy.S +++ b/sysdeps/powerpc/powerpc32/stpcpy.S @@ -17,35 +17,23 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* char * [r3] stpcpy (char *dest [r3], const char *src [r4]) */ -EALIGN (BP_SYM (__stpcpy), 4, 0) +EALIGN (__stpcpy, 4, 0) #define rTMP r0 #define rRTN r3 -#if __BOUNDED_POINTERS__ -# define rDEST r4 /* pointer to previous word in dest */ -# define rSRC r5 /* pointer to previous word in src */ -# define rLOW r11 -# define rHIGH r12 -#else -# define rDEST r3 /* pointer to previous word in dest */ -# define rSRC r4 /* pointer to previous word in src */ -#endif +#define rDEST r3 /* pointer to previous word in dest */ +#define rSRC r4 /* pointer to previous word in src */ #define rWORD r6 /* current word from src */ #define rFEFE r7 /* 0xfefefeff */ #define r7F7F r8 /* 0x7f7f7f7f */ #define rNEG r9 /* ~(word in src | 0x7f7f7f7f) */ #define rALT r10 /* alternate word from src */ - CHECK_BOUNDS_LOW (rSRC, rLOW, rHIGH) - CHECK_BOUNDS_LOW (rDEST, rLOW, rHIGH) - STORE_RETURN_BOUNDS (rLOW, rHIGH) or rTMP, rSRC, rDEST clrlwi. rTMP, rTMP, 30 @@ -84,8 +72,6 @@ L(g1): rlwinm. rTMP, rALT, 8, 24, 31 stbu rTMP, 1(rDEST) beqlr- stbu rALT, 1(rDEST) - CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt) - STORE_RETURN_VALUE (rDEST) blr /* Oh well. In this case, we just do a byte-by-byte copy. */ @@ -107,15 +93,11 @@ L(u0): lbzu rALT, 1(rSRC) cmpwi rWORD, 0 bne+ L(u0) L(u2): stbu rWORD, 1(rDEST) - CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt) - STORE_RETURN_VALUE (rDEST) blr L(u1): stbu rALT, 1(rDEST) - CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt) - STORE_RETURN_VALUE (rDEST) blr -END (BP_SYM (__stpcpy)) +END (__stpcpy) -weak_alias (BP_SYM (__stpcpy), BP_SYM (stpcpy)) +weak_alias (__stpcpy, stpcpy) libc_hidden_def (__stpcpy) libc_hidden_builtin_def (stpcpy) diff --git a/sysdeps/powerpc/powerpc32/strchr.S b/sysdeps/powerpc/powerpc32/strchr.S index f2e0d26c9d..c9952eeccf 100644 --- a/sysdeps/powerpc/powerpc32/strchr.S +++ b/sysdeps/powerpc/powerpc32/strchr.S @@ -17,26 +17,18 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how this works. */ /* char * [r3] strchr (const char *s [r3] , int c [r4] ) */ -ENTRY (BP_SYM (strchr)) +ENTRY (strchr) #define rTMP1 r0 #define rRTN r3 /* outgoing result */ -#if __BOUNDED_POINTERS__ -# define rSTR r4 -# define rCHR r5 /* byte we're looking for, spread over the whole word */ -# define rWORD r8 /* the current word */ -#else -# define rSTR r8 /* current word pointer */ -# define rCHR r4 /* byte we're looking for, spread over the whole word */ -# define rWORD r5 /* the current word */ -#endif +#define rSTR r8 /* current word pointer */ +#define rCHR r4 /* byte we're looking for, spread over the whole word */ +#define rWORD r5 /* the current word */ #define rCLZB rCHR /* leading zero byte count */ #define rFEFE r6 /* constant 0xfefefeff (-0x01010101) */ #define r7F7F r7 /* constant 0x7f7f7f7f */ @@ -45,8 +37,6 @@ ENTRY (BP_SYM (strchr)) #define rMASK r11 /* mask with the bits to ignore set to 0 */ #define rTMP3 r12 - CHECK_BOUNDS_LOW (rSTR, rTMP1, rTMP2) - STORE_RETURN_BOUNDS (rTMP1, rTMP2) rlwimi rCHR, rCHR, 8, 16, 23 li rMASK, -1 @@ -90,7 +80,6 @@ L(loopentry): L(missed): and. rTMP1, rTMP1, rTMP2 li rRTN, 0 - STORE_RETURN_VALUE (rSTR) beqlr /* It did happen. Decide which one was first... I'm not sure if this is actually faster than a sequence of @@ -108,8 +97,6 @@ L(missed): cntlzw rCLZB, rTMP2 srwi rCLZB, rCLZB, 3 add rRTN, rSTR, rCLZB - CHECK_BOUNDS_HIGH_RTN (rSTR, rTMP2, twlge) - STORE_RETURN_VALUE (rSTR) blr L(foundit): @@ -121,10 +108,8 @@ L(foundit): subi rSTR, rSTR, 4 srwi rCLZB, rCLZB, 3 add rRTN, rSTR, rCLZB - CHECK_BOUNDS_HIGH_RTN (rSTR, rTMP2, twlge) - STORE_RETURN_VALUE (rSTR) blr -END (BP_SYM (strchr)) +END (strchr) -weak_alias (BP_SYM (strchr), BP_SYM (index)) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/powerpc/powerpc32/strcmp.S b/sysdeps/powerpc/powerpc32/strcmp.S index d11e556451..297ca3c1b2 100644 --- a/sysdeps/powerpc/powerpc32/strcmp.S +++ b/sysdeps/powerpc/powerpc32/strcmp.S @@ -17,23 +17,17 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */ -EALIGN (BP_SYM (strcmp), 4, 0) +EALIGN (strcmp, 4, 0) #define rTMP r0 #define rRTN r3 #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ -#if __BOUNDED_POINTERS__ -# define rHIGH1 r11 -# define rHIGH2 r12 -#endif #define rWORD1 r5 /* current word in s1 */ #define rWORD2 r6 /* current word in s2 */ #define rFEFE r7 /* constant 0xfefefeff (-0x01010101) */ @@ -41,8 +35,6 @@ EALIGN (BP_SYM (strcmp), 4, 0) #define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f) */ #define rBITDIF r10 /* bits that differ in s1 & s2 words */ - CHECK_BOUNDS_LOW (rSTR1, rTMP, rHIGH1) - CHECK_BOUNDS_LOW (rSTR2, rTMP, rHIGH2) or rTMP, rSTR2, rSTR1 clrlwi. rTMP, rTMP, 30 @@ -82,7 +74,6 @@ L(endstring): bgelr+ cr1 L(equal): li rRTN, 0 - /* GKM FIXME: check high bounds. */ blr L(different): @@ -92,7 +83,6 @@ L(different): bgelr+ L(highbit): ori rRTN, rWORD2, 1 - /* GKM FIXME: check high bounds. */ blr @@ -116,11 +106,9 @@ L(u1): cmpwi cr1, rWORD1, 0 cmpw rWORD1, rWORD2 bne+ cr1, L(u0) L(u3): sub rRTN, rWORD1, rWORD2 - /* GKM FIXME: check high bounds. */ blr L(u4): lbz rWORD1, -1(rSTR1) sub rRTN, rWORD1, rWORD2 - /* GKM FIXME: check high bounds. */ blr -END (BP_SYM (strcmp)) +END (strcmp) libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/powerpc/powerpc32/strcpy.S b/sysdeps/powerpc/powerpc32/strcpy.S index c2405924d3..4ae577dbb6 100644 --- a/sysdeps/powerpc/powerpc32/strcpy.S +++ b/sysdeps/powerpc/powerpc32/strcpy.S @@ -17,43 +17,27 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* char * [r3] strcpy (char *dest [r3], const char *src [r4]) */ -EALIGN (BP_SYM (strcpy), 4, 0) +EALIGN (strcpy, 4, 0) #define rTMP r0 #define rRTN r3 /* incoming DEST arg preserved as result */ -#if __BOUNDED_POINTERS__ -# define rDEST r4 /* pointer to previous word in dest */ -# define rSRC r5 /* pointer to previous word in src */ -# define rLOW r11 -# define rHIGH r12 -#else -# define rSRC r4 /* pointer to previous word in src */ -# define rDEST r5 /* pointer to previous word in dest */ -#endif +#define rSRC r4 /* pointer to previous word in src */ +#define rDEST r5 /* pointer to previous word in dest */ #define rWORD r6 /* current word from src */ #define rFEFE r7 /* constant 0xfefefeff (-0x01010101) */ #define r7F7F r8 /* constant 0x7f7f7f7f */ #define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f) */ #define rALT r10 /* alternate word from src */ - CHECK_BOUNDS_LOW (rSRC, rLOW, rHIGH) - CHECK_BOUNDS_LOW (rDEST, rLOW, rHIGH) - STORE_RETURN_BOUNDS (rLOW, rHIGH) or rTMP, rSRC, rRTN clrlwi. rTMP, rTMP, 30 -#if __BOUNDED_POINTERS__ - addi rDEST, rDEST, -4 -#else addi rDEST, rRTN, -4 -#endif bne L(unaligned) lis rFEFE, -0x101 @@ -88,7 +72,6 @@ L(g1): rlwinm. rTMP, rALT, 8, 24, 31 stb rTMP, 6(rDEST) beqlr- stb rALT, 7(rDEST) - /* GKM FIXME: check high bound. */ blr /* Oh well. In this case, we just do a byte-by-byte copy. */ @@ -110,11 +93,9 @@ L(u0): lbzu rALT, 1(rSRC) cmpwi rWORD, 0 bne+ L(u0) L(u2): stb rWORD, 1(rDEST) - /* GKM FIXME: check high bound. */ blr L(u1): stb rALT, 1(rDEST) - /* GKM FIXME: check high bound. */ blr -END (BP_SYM (strcpy)) +END (strcpy) libc_hidden_builtin_def (strcpy) diff --git a/sysdeps/powerpc/powerpc32/strlen.S b/sysdeps/powerpc/powerpc32/strlen.S index b8193a669d..9a6eafc382 100644 --- a/sysdeps/powerpc/powerpc32/strlen.S +++ b/sysdeps/powerpc/powerpc32/strlen.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* The algorithm here uses the following techniques: @@ -72,7 +70,7 @@ /* int [r3] strlen (char *s [r3]) */ -ENTRY (BP_SYM (strlen)) +ENTRY (strlen) #define rTMP1 r0 #define rRTN r3 /* incoming STR arg, outgoing result */ @@ -88,7 +86,6 @@ ENTRY (BP_SYM (strlen)) #define rTMP3 r11 #define rTMP4 r12 - CHECK_BOUNDS_LOW (rRTN, rTMP1, rTMP2) clrrwi rSTR, rRTN, 2 lis r7F7F, 0x7f7f @@ -153,7 +150,6 @@ L(done0): subf rTMP1, rRTN, rSTR srwi rTMP3, rTMP3, 3 add rRTN, rTMP1, rTMP3 - /* GKM FIXME: check high bound. */ blr -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/powerpc/powerpc32/strncmp.S b/sysdeps/powerpc/powerpc32/strncmp.S index d9e274b69b..fa345d293c 100644 --- a/sysdeps/powerpc/powerpc32/strncmp.S +++ b/sysdeps/powerpc/powerpc32/strncmp.S @@ -17,23 +17,18 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ -EALIGN (BP_SYM(strncmp), 4, 0) +EALIGN (strncmp, 4, 0) #define rTMP r0 #define rRTN r3 #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rFEFE r8 /* constant 0xfefefeff (-0x01010101) */ @@ -156,5 +151,5 @@ L(u1): L(u2): lbzu rWORD1, -1(rSTR1) L(u3): sub rRTN, rWORD1, rWORD2 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/powerpc/powerpc32/sub_n.S b/sysdeps/powerpc/powerpc32/sub_n.S index 617680deca..94d3d3e945 100644 --- a/sysdeps/powerpc/powerpc32/sub_n.S +++ b/sysdeps/powerpc/powerpc32/sub_n.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size) @@ -28,14 +26,7 @@ possible 2-unrolled inner loop will not be. Also, watch out for the alignment... */ -EALIGN (BP_SYM (__mpn_sub_n), 3, 1) - -#if __BOUNDED_POINTERS__ - slwi r10,r6,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r5, r8, r9, r10) -#endif +EALIGN (__mpn_sub_n, 3, 1) /* Set up for loop below. */ mtcrf 0x01,r6 @@ -74,4 +65,4 @@ L(0): L(1): subfe r3,r3,r3 neg r3,r3 blr -END (BP_SYM (__mpn_sub_n)) +END (__mpn_sub_n) diff --git a/sysdeps/powerpc/powerpc32/submul_1.S b/sysdeps/powerpc/powerpc32/submul_1.S index d32f8333e2..d820318c31 100644 --- a/sysdeps/powerpc/powerpc32/submul_1.S +++ b/sysdeps/powerpc/powerpc32/submul_1.S @@ -17,19 +17,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_submul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, mp_limb_t s2_limb) Calculate res-s1*s2 and put result back in res; return carry. */ -ENTRY (BP_SYM (__mpn_submul_1)) -#if __BOUNDED_POINTERS__ - slwi r10,r5,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) -#endif +ENTRY (__mpn_submul_1) mtctr r5 lwz r0,0(r4) @@ -55,4 +48,4 @@ L(0): lwzu r0,4(r4) L(1): stw r8,4(r3) addze r3,r10 blr -END (BP_SYM (__mpn_submul_1)) +END (__mpn_submul_1) diff --git a/sysdeps/powerpc/powerpc64/__longjmp-common.S b/sysdeps/powerpc/powerpc64/__longjmp-common.S index 18032752b4..70c370439f 100644 --- a/sysdeps/powerpc/powerpc64/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc64/__longjmp-common.S @@ -24,8 +24,6 @@ #else # include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> #ifndef __NO_VMX__ .section ".toc","aw" @@ -45,9 +43,8 @@ #endif .machine "altivec" -ENTRY (BP_SYM (__longjmp)) +ENTRY (__longjmp) CALL_MCOUNT 2 - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) #ifndef __NO_VMX__ ld r5,.LC__dl_hwcap@toc(r2) # ifdef SHARED @@ -178,4 +175,4 @@ L(no_vmx): lfd fp31,((JB_FPRS+17)*8)(r3) mr r3,r4 blr -END (BP_SYM (__longjmp)) +END (__longjmp) diff --git a/sysdeps/powerpc/powerpc64/a2/memcpy.S b/sysdeps/powerpc/powerpc64/a2/memcpy.S index 42ec5e3750..84c82bb768 100644 --- a/sysdeps/powerpc/powerpc64/a2/memcpy.S +++ b/sysdeps/powerpc/powerpc64/a2/memcpy.S @@ -18,8 +18,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #define PREFETCH_AHEAD 4 /* no cache lines SRC prefetching ahead */ #define ZERO_AHEAD 2 /* no cache lines DST zeroing ahead */ @@ -32,7 +30,7 @@ .machine a2 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT 3 dcbt 0,r4 /* Prefetch ONE SRC cacheline */ @@ -522,5 +520,5 @@ L(endloop2_128): b L(lessthancacheline) -END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +END_GEN_TB (memcpy,TB_TOCLESS) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c index ca04a6f9cf..2d3e051cb9 100644 --- a/sysdeps/powerpc/powerpc64/backtrace.c +++ b/sysdeps/powerpc/powerpc64/backtrace.c @@ -33,9 +33,9 @@ */ struct layout { - struct layout *__unbounded next; + struct layout *next; long condition_register; - void *__unbounded return_address; + void *return_address; }; int diff --git a/sysdeps/powerpc/powerpc64/bp-asm.h b/sysdeps/powerpc/powerpc64/bp-asm.h deleted file mode 100644 index 6c6c387358..0000000000 --- a/sysdeps/powerpc/powerpc64/bp-asm.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Bounded-pointer definitions for PowerPC64 assembler. - Copyright (C) 2000-2013 Free Software Foundation, Inc. - Contributed by Greg McGary <greg@mcgary.org> - - 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. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ - -#if __BOUNDED_POINTERS__ - -/* Byte offsets of BP components. */ -# define oVALUE 0 -# define oLOW 4 -# define oHIGH 8 - -/* Don't check bounds, just convert the BP register to its simple - pointer value. */ - -# define DISCARD_BOUNDS(rBP) \ - ld rBP, oVALUE(rBP) - -/* Check low bound, with the side effect that the BP register is converted - its simple pointer value. Move the high bound into a register for - later use. */ - -# define CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH) \ - ld rHIGH, oHIGH(rBP); \ - ld rLOW, oLOW(rBP); \ - ld rBP, oVALUE(rBP); \ - tdllt rBP, rLOW - -/* Check the high bound, which is in a register, using the given - conditional trap instruction. */ - -# define CHECK_BOUNDS_HIGH(rVALUE, rHIGH, TWLcc) \ - TWLcc rVALUE, rHIGH - -/* Check the high bound, which is stored at the return-value's high - bound slot, using the given conditional trap instruction. */ - -# define CHECK_BOUNDS_HIGH_RTN(rVALUE, rHIGH, TWLcc) \ - ld rHIGH, oHIGH(rRTN); \ - TWLcc rVALUE, rHIGH - -/* Check both bounds, with the side effect that the BP register is - converted to its simple pointer value. */ - -# define CHECK_BOUNDS_BOTH(rBP, rLOW, rHIGH) \ - CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH); \ - tdlge rBP, rHIGH - -/* Check bounds on a memory region of given length, with the side - effect that the BP register is converted to its simple pointer - value. */ - -# define CHECK_BOUNDS_BOTH_WIDE(rBP, rLOW, rHIGH, rLENGTH) \ - CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \ - sub rHIGH, rHIGH, rLENGTH; \ - tdlgt rBP, rHIGH - -# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH) \ - CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \ - subi rHIGH, rHIGH, LENGTH; \ - tdlgt rBP, rHIGH - -/* Store a pointer value register into the return-value's pointer - value slot. */ - -# define STORE_RETURN_VALUE(rVALUE) \ - std rVALUE, oVALUE(rRTN) - -/* Store a low and high bounds into the return-value's pointer bounds - slots. */ - -# define STORE_RETURN_BOUNDS(rLOW, rHIGH) \ - std rLOW, oLOW(rRTN); \ - std rHIGH, oHIGH(rRTN) - -/* Stuff zero value/low/high into the BP addressed by rRTN. */ - -# define RETURN_NULL_BOUNDED_POINTER \ - li r4, 0; \ - STORE_RETURN_VALUE (r4); \ - STORE_RETURN_BOUNDS (r4, r4) - -#else - -# define DISCARD_BOUNDS(rBP) -# define CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH) -# define CHECK_BOUNDS_HIGH(rVALUE, rHIGH, TWLcc) -# define CHECK_BOUNDS_HIGH_RTN(rVALUE, rHIGH, TWLcc) -# define CHECK_BOUNDS_BOTH(rBP, rLOW, rHIGH) -# define CHECK_BOUNDS_BOTH_WIDE(rBP, rLOW, rHIGH, rLENGTH) -# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH) -# define STORE_RETURN_VALUE(rVALUE) -# define STORE_RETURN_BOUNDS(rLOW, rHIGH) - -# define RETURN_NULL_BOUNDED_POINTER li rRTN, 0 - -#endif diff --git a/sysdeps/powerpc/powerpc64/cell/memcpy.S b/sysdeps/powerpc/powerpc64/cell/memcpy.S index 5ba4ebf625..a271965dd7 100644 --- a/sysdeps/powerpc/powerpc64/cell/memcpy.S +++ b/sysdeps/powerpc/powerpc64/cell/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #define PREFETCH_AHEAD 6 /* no cache lines SRC prefetching ahead */ #define ZERO_AHEAD 4 /* no cache lines DST zeroing ahead */ @@ -41,7 +39,7 @@ .align 7 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT 3 dcbt 0,r4 /* Prefetch ONE SRC cacheline */ @@ -240,5 +238,5 @@ EALIGN (BP_SYM (memcpy), 5, 0) stb r0,0(r6) 1: blr -END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +END_GEN_TB (memcpy,TB_TOCLESS) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc64/memcpy.S b/sysdeps/powerpc/powerpc64/memcpy.S index 7c1b656be1..b8c4cc8b10 100644 --- a/sysdeps/powerpc/powerpc64/memcpy.S +++ b/sysdeps/powerpc/powerpc64/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. @@ -35,7 +33,7 @@ possible when both source and destination are doubleword aligned. Each case has a optimized unrolled loop. */ -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT 3 cmpldi cr1,5,31 @@ -364,5 +362,5 @@ EALIGN (BP_SYM (memcpy), 5, 0) ld 31,-8(1) ld 3,-16(1) blr -END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +END_GEN_TB (memcpy,TB_TOCLESS) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S index f107f8b40a..6acf149c8a 100644 --- a/sysdeps/powerpc/powerpc64/memset.S +++ b/sysdeps/powerpc/powerpc64/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> .section ".toc","aw" .LC0: @@ -33,22 +31,15 @@ cache line (256 bits). There is a special case for setting cache lines to 0, to take advantage of the dcbz instruction. */ -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) CALL_MCOUNT 3 #define rTMP r0 #define rRTN r3 /* Initial value of 1st argument. */ -#if __BOUNDED_POINTERS__ -# define rMEMP0 r4 /* Original value of 1st arg. */ -# define rCHR r5 /* Char to set in each byte. */ -# define rLEN r6 /* Length of region to set. */ -# define rMEMP r10 /* Address at which we are storing. */ -#else -# define rMEMP0 r3 /* Original value of 1st arg. */ -# define rCHR r4 /* Char to set in each byte. */ -# define rLEN r5 /* Length of region to set. */ -# define rMEMP r6 /* Address at which we are storing. */ -#endif +#define rMEMP0 r3 /* Original value of 1st arg. */ +#define rCHR r4 /* Char to set in each byte. */ +#define rLEN r5 /* Length of region to set. */ +#define rMEMP r6 /* Address at which we are storing. */ #define rALIGN r7 /* Number of bytes we are setting now (when aligning). */ #define rMEMP2 r8 @@ -56,14 +47,6 @@ EALIGN (BP_SYM (memset), 5, 0) #define rCLS r8 /* Cache line size obtained from static. */ #define rCLM r9 /* Cache line size mask to check for cache alignment. */ L(_memset): -#if __BOUNDED_POINTERS__ - cmpldi cr1, rRTN, 0 - CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN) - beq cr1, L(b0) - STORE_RETURN_VALUE (rMEMP0) - STORE_RETURN_BOUNDS (rTMP, rTMP2) -L(b0): -#endif /* Take care of case for size <= 4. */ cmpldi cr1, rLEN, 8 andi. rALIGN, rMEMP0, 7 @@ -261,25 +244,16 @@ L(medium_27f): L(medium_28t): std rCHR, -8(rMEMP) blr -END_GEN_TB (BP_SYM (memset),TB_TOCLESS) +END_GEN_TB (memset,TB_TOCLESS) libc_hidden_builtin_def (memset) /* Copied from bzero.S to prevent the linker from inserting a stub between bzero and memset. */ -ENTRY (BP_SYM (__bzero)) +ENTRY (__bzero) CALL_MCOUNT 3 -#if __BOUNDED_POINTERS__ - mr r6,r4 - li r5,0 - mr r4,r3 - /* Tell memset that we don't want a return value. */ - li r3,0 - b L(_memset) -#else mr r5,r4 li r4,0 b L(_memset) -#endif -END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS) +END_GEN_TB (__bzero,TB_TOCLESS) -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) +weak_alias (__bzero, bzero) diff --git a/sysdeps/powerpc/powerpc64/power4/Implies b/sysdeps/powerpc/powerpc64/power4/Implies new file mode 100644 index 0000000000..a372141bb7 --- /dev/null +++ b/sysdeps/powerpc/powerpc64/power4/Implies @@ -0,0 +1,2 @@ +powerpc/power4/fpu +powerpc/power4 diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/Makefile b/sysdeps/powerpc/powerpc64/power4/fpu/Makefile deleted file mode 100644 index f8bb3ef04b..0000000000 --- a/sysdeps/powerpc/powerpc64/power4/fpu/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# Makefile fragment for POWER4/5/5+ platforms with FPU. - -ifeq ($(subdir),math) -CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops -endif diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c deleted file mode 100644 index b1784f27c3..0000000000 --- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c +++ /dev/null @@ -1,744 +0,0 @@ - -/* - * IBM Accurate Mathematical Library - * written by International Business Machines Corp. - * Copyright (C) 2001-2013 Free Software Foundation, Inc. - * - * This program 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. - * - * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. - */ -/************************************************************************/ -/* MODULE_NAME: mpa.c */ -/* */ -/* FUNCTIONS: */ -/* mcr */ -/* acr */ -/* cpy */ -/* norm */ -/* denorm */ -/* mp_dbl */ -/* dbl_mp */ -/* add_magnitudes */ -/* sub_magnitudes */ -/* add */ -/* sub */ -/* mul */ -/* inv */ -/* dvd */ -/* */ -/* Arithmetic functions for multiple precision numbers. */ -/* Relative errors are bounded */ -/************************************************************************/ - - -#include "endian.h" -#include "mpa.h" -#include <sys/param.h> - -const mp_no mpone = {1, {1.0, 1.0}}; -const mp_no mptwo = {1, {1.0, 2.0}}; - -/* Compare mantissa of two multiple precision numbers regardless of the sign - and exponent of the numbers. */ -static int -mcr (const mp_no *x, const mp_no *y, int p) -{ - long i; - long p2 = p; - for (i = 1; i <= p2; i++) - { - if (X[i] == Y[i]) - continue; - else if (X[i] > Y[i]) - return 1; - else - return -1; - } - return 0; -} - -/* Compare the absolute values of two multiple precision numbers. */ -int -__acr (const mp_no *x, const mp_no *y, int p) -{ - long i; - - if (X[0] == ZERO) - { - if (Y[0] == ZERO) - i = 0; - else - i = -1; - } - else if (Y[0] == ZERO) - i = 1; - else - { - if (EX > EY) - i = 1; - else if (EX < EY) - i = -1; - else - i = mcr (x, y, p); - } - - return i; -} - -/* Copy multiple precision number X into Y. They could be the same - number. */ -void -__cpy (const mp_no *x, mp_no *y, int p) -{ - long i; - - EY = EX; - for (i = 0; i <= p; i++) - Y[i] = X[i]; - - return; -} - -/* Convert a multiple precision number *X into a double precision - number *Y, normalized case (|x| >= 2**(-1022))). */ -static void -norm (const mp_no *x, double *y, int p) -{ -#define R RADIXI - long i; - double a, c, u, v, z[5]; - if (p < 5) - { - if (p == 1) - c = X[1]; - else if (p == 2) - c = X[1] + R * X[2]; - else if (p == 3) - c = X[1] + R * (X[2] + R * X[3]); - else if (p == 4) - c = (X[1] + R * X[2]) + R * R * (X[3] + R * X[4]); - } - else - { - for (a = ONE, z[1] = X[1]; z[1] < TWO23;) - { - a *= TWO; - z[1] *= TWO; - } - - for (i = 2; i < 5; i++) - { - z[i] = X[i] * a; - u = (z[i] + CUTTER) - CUTTER; - if (u > z[i]) - u -= RADIX; - z[i] -= u; - z[i - 1] += u * RADIXI; - } - - u = (z[3] + TWO71) - TWO71; - if (u > z[3]) - u -= TWO19; - v = z[3] - u; - - if (v == TWO18) - { - if (z[4] == ZERO) - { - for (i = 5; i <= p; i++) - { - if (X[i] == ZERO) - continue; - else - { - z[3] += ONE; - break; - } - } - } - else - z[3] += ONE; - } - - c = (z[1] + R * (z[2] + R * z[3])) / a; - } - - c *= X[0]; - - for (i = 1; i < EX; i++) - c *= RADIX; - for (i = 1; i > EX; i--) - c *= RADIXI; - - *y = c; - return; -#undef R -} - -/* Convert a multiple precision number *X into a double precision - number *Y, Denormal case (|x| < 2**(-1022))). */ -static void -denorm (const mp_no *x, double *y, int p) -{ - long i, k; - long p2 = p; - double c, u, z[5]; - -#define R RADIXI - if (EX < -44 || (EX == -44 && X[1] < TWO5)) - { - *y = ZERO; - return; - } - - if (p2 == 1) - { - if (EX == -42) - { - z[1] = X[1] + TWO10; - z[2] = ZERO; - z[3] = ZERO; - k = 3; - } - else if (EX == -43) - { - z[1] = TWO10; - z[2] = X[1]; - z[3] = ZERO; - k = 2; - } - else - { - z[1] = TWO10; - z[2] = ZERO; - z[3] = X[1]; - k = 1; - } - } - else if (p2 == 2) - { - if (EX == -42) - { - z[1] = X[1] + TWO10; - z[2] = X[2]; - z[3] = ZERO; - k = 3; - } - else if (EX == -43) - { - z[1] = TWO10; - z[2] = X[1]; - z[3] = X[2]; - k = 2; - } - else - { - z[1] = TWO10; - z[2] = ZERO; - z[3] = X[1]; - k = 1; - } - } - else - { - if (EX == -42) - { - z[1] = X[1] + TWO10; - z[2] = X[2]; - k = 3; - } - else if (EX == -43) - { - z[1] = TWO10; - z[2] = X[1]; - k = 2; - } - else - { - z[1] = TWO10; - z[2] = ZERO; - k = 1; - } - z[3] = X[k]; - } - - u = (z[3] + TWO57) - TWO57; - if (u > z[3]) - u -= TWO5; - - if (u == z[3]) - { - for (i = k + 1; i <= p2; i++) - { - if (X[i] == ZERO) - continue; - else - { - z[3] += ONE; - break; - } - } - } - - c = X[0] * ((z[1] + R * (z[2] + R * z[3])) - TWO10); - - *y = c * TWOM1032; - return; - -#undef R -} - -/* Convert multiple precision number *X into double precision number *Y. The - result is correctly rounded to the nearest/even. */ -void -__mp_dbl (const mp_no *x, double *y, int p) -{ - if (X[0] == ZERO) - { - *y = ZERO; - return; - } - - if (EX > -42) - norm (x, y, p); - else if (EX == -42 && X[1] >= TWO10) - norm (x, y, p); - else - denorm (x, y, p); -} - -/* Get the multiple precision equivalent of X into *Y. If the precision is too - small, the result is truncated. */ -void -__dbl_mp (double x, mp_no *y, int p) -{ - long i, n; - long p2 = p; - double u; - - /* Sign. */ - if (x == ZERO) - { - Y[0] = ZERO; - return; - } - else if (x > ZERO) - Y[0] = ONE; - else - { - Y[0] = MONE; - x = -x; - } - - /* Exponent. */ - for (EY = ONE; x >= RADIX; EY += ONE) - x *= RADIXI; - for (; x < ONE; EY -= ONE) - x *= RADIX; - - /* Digits. */ - n = MIN (p2, 4); - for (i = 1; i <= n; i++) - { - u = (x + TWO52) - TWO52; - if (u > x) - u -= ONE; - Y[i] = u; - x -= u; - x *= RADIX; - } - for (; i <= p2; i++) - Y[i] = ZERO; - return; -} - -/* Add magnitudes of *X and *Y assuming that abs (*X) >= abs (*Y) > 0. The - sign of the sum *Z is not changed. X and Y may overlap but not X and Z or - Y and Z. No guard digit is used. The result equals the exact sum, - truncated. */ -static void -add_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - long i, j, k; - long p2 = p; - - EZ = EX; - - i = p2; - j = p2 + EY - EX; - k = p2 + 1; - - if (j < 1) - { - __cpy (x, z, p); - return; - } - else - Z[k] = ZERO; - - for (; j > 0; i--, j--) - { - Z[k] += X[i] + Y[j]; - if (Z[k] >= RADIX) - { - Z[k] -= RADIX; - Z[--k] = ONE; - } - else - Z[--k] = ZERO; - } - - for (; i > 0; i--) - { - Z[k] += X[i]; - if (Z[k] >= RADIX) - { - Z[k] -= RADIX; - Z[--k] = ONE; - } - else - Z[--k] = ZERO; - } - - if (Z[1] == ZERO) - { - for (i = 1; i <= p2; i++) - Z[i] = Z[i + 1]; - } - else - EZ += ONE; -} - -/* Subtract the magnitudes of *X and *Y assuming that abs (*x) > abs (*y) > 0. - The sign of the difference *Z is not changed. X and Y may overlap but not X - and Z or Y and Z. One guard digit is used. The error is less than one - ULP. */ -static void -sub_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - long i, j, k; - long p2 = p; - - EZ = EX; - - if (EX == EY) - { - i = j = k = p2; - Z[k] = Z[k + 1] = ZERO; - } - else - { - j = EX - EY; - if (j > p2) - { - __cpy (x, z, p); - return; - } - else - { - i = p2; - j = p2 + 1 - j; - k = p2; - if (Y[j] > ZERO) - { - Z[k + 1] = RADIX - Y[j--]; - Z[k] = MONE; - } - else - { - Z[k + 1] = ZERO; - Z[k] = ZERO; - j--; - } - } - } - - for (; j > 0; i--, j--) - { - Z[k] += (X[i] - Y[j]); - if (Z[k] < ZERO) - { - Z[k] += RADIX; - Z[--k] = MONE; - } - else - Z[--k] = ZERO; - } - - for (; i > 0; i--) - { - Z[k] += X[i]; - if (Z[k] < ZERO) - { - Z[k] += RADIX; - Z[--k] = MONE; - } - else - Z[--k] = ZERO; - } - - for (i = 1; Z[i] == ZERO; i++); - EZ = EZ - i + 1; - for (k = 1; i <= p2 + 1;) - Z[k++] = Z[i++]; - for (; k <= p2;) - Z[k++] = ZERO; - - return; -} - -/* Add *X and *Y and store the result in *Z. X and Y may overlap, but not X - and Z or Y and Z. One guard digit is used. The error is less than one - ULP. */ -void -__add (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - int n; - - if (X[0] == ZERO) - { - __cpy (y, z, p); - return; - } - else if (Y[0] == ZERO) - { - __cpy (x, z, p); - return; - } - - if (X[0] == Y[0]) - { - if (__acr (x, y, p) > 0) - { - add_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else - { - add_magnitudes (y, x, z, p); - Z[0] = Y[0]; - } - } - else - { - if ((n = __acr (x, y, p)) == 1) - { - sub_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else if (n == -1) - { - sub_magnitudes (y, x, z, p); - Z[0] = Y[0]; - } - else - Z[0] = ZERO; - } - return; -} - -/* Subtract *Y from *X and return the result in *Z. X and Y may overlap but - not X and Z or Y and Z. One guard digit is used. The error is less than - one ULP. */ -void -__sub (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - int n; - - if (X[0] == ZERO) - { - __cpy (y, z, p); - Z[0] = -Z[0]; - return; - } - else if (Y[0] == ZERO) - { - __cpy (x, z, p); - return; - } - - if (X[0] != Y[0]) - { - if (__acr (x, y, p) > 0) - { - add_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else - { - add_magnitudes (y, x, z, p); - Z[0] = -Y[0]; - } - } - else - { - if ((n = __acr (x, y, p)) == 1) - { - sub_magnitudes (x, y, z, p); - Z[0] = X[0]; - } - else if (n == -1) - { - sub_magnitudes (y, x, z, p); - Z[0] = -Y[0]; - } - else - Z[0] = ZERO; - } - return; -} - -/* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X - and Z or Y and Z. For P in [1, 2, 3], the exact result is truncated to P - digits. In case P > 3 the error is bounded by 1.001 ULP. */ -void -__mul (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - long i, i1, i2, j, k, k2; - long p2 = p; - double u, zk, zk2; - - /* Is z=0? */ - if (X[0] * Y[0] == ZERO) - { - Z[0] = ZERO; - return; - } - - /* Multiply, add and carry */ - k2 = (p2 < 3) ? p2 + p2 : p2 + 3; - zk = Z[k2] = ZERO; - for (k = k2; k > 1;) - { - if (k > p2) - { - i1 = k - p2; - i2 = p2 + 1; - } - else - { - i1 = 1; - i2 = k; - } -#if 1 - /* Rearrange this inner loop to allow the fmadd instructions to be - independent and execute in parallel on processors that have - dual symmetrical FP pipelines. */ - if (i1 < (i2 - 1)) - { - /* Make sure we have at least 2 iterations. */ - if (((i2 - i1) & 1L) == 1L) - { - /* Handle the odd iterations case. */ - zk2 = x->d[i2 - 1] * y->d[i1]; - } - else - zk2 = 0.0; - /* Do two multiply/adds per loop iteration, using independent - accumulators; zk and zk2. */ - for (i = i1, j = i2 - 1; i < i2 - 1; i += 2, j -= 2) - { - zk += x->d[i] * y->d[j]; - zk2 += x->d[i + 1] * y->d[j - 1]; - } - zk += zk2; /* Final sum. */ - } - else - { - /* Special case when iterations is 1. */ - zk += x->d[i1] * y->d[i1]; - } -#else - /* The original code. */ - for (i = i1, j = i2 - 1; i < i2; i++, j--) - zk += X[i] * Y[j]; -#endif - - u = (zk + CUTTER) - CUTTER; - if (u > zk) - u -= RADIX; - Z[k] = zk - u; - zk = u * RADIXI; - --k; - } - Z[k] = zk; - - /* Is there a carry beyond the most significant digit? */ - if (Z[1] == ZERO) - { - for (i = 1; i <= p2; i++) - Z[i] = Z[i + 1]; - EZ = EX + EY - 1; - } - else - EZ = EX + EY; - - Z[0] = X[0] * Y[0]; - return; -} - -/* Invert *X and store in *Y. Relative error bound: - - For P = 2: 1.001 * R ^ (1 - P) - - For P = 3: 1.063 * R ^ (1 - P) - - For P > 3: 2.001 * R ^ (1 - P) - - *X = 0 is not permissible. */ -void -__inv (const mp_no *x, mp_no *y, int p) -{ - long i; - double t; - mp_no z, w; - static const int np1[] = - { 0, 0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 - }; - - __cpy (x, &z, p); - z.e = 0; - __mp_dbl (&z, &t, p); - t = ONE / t; - __dbl_mp (t, y, p); - EY -= EX; - - for (i = 0; i < np1[p]; i++) - { - __cpy (y, &w, p); - __mul (x, &w, y, p); - __sub (&mptwo, y, &z, p); - __mul (&w, &z, y, p); - } - return; -} - -/* Divide *X by *Y and store result in *Z. X and Y may overlap but not X and Z - or Y and Z. Relative error bound: - - For P = 2: 2.001 * R ^ (1 - P) - - For P = 3: 2.063 * R ^ (1 - P) - - For P > 3: 3.001 * R ^ (1 - P) - - *X = 0 is not permissible. */ -void -__dvd (const mp_no *x, const mp_no *y, mp_no *z, int p) -{ - mp_no w; - - if (X[0] == ZERO) - Z[0] = ZERO; - else - { - __inv (y, &w, p); - __mul (x, &w, z, p); - } - return; -} diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c b/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c deleted file mode 100644 index d93f505445..0000000000 --- a/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * IBM Accurate Mathematical Library - * written by International Business Machines Corp. - * Copyright (C) 2001-2013 Free Software Foundation, Inc. - * - * This program 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. - * - * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. - */ -/**************************************************************************/ -/* MODULE_NAME:slowexp.c */ -/* */ -/* FUNCTION:slowexp */ -/* */ -/* FILES NEEDED:mpa.h */ -/* mpa.c mpexp.c */ -/* */ -/*Converting from double precision to Multi-precision and calculating */ -/* e^x */ -/**************************************************************************/ -#include <math_private.h> - -#ifdef NO_LONG_DOUBLE -#include "mpa.h" -void __mpexp(mp_no *x, mp_no *y, int p); -#endif - -/*Converting from double precision to Multi-precision and calculating e^x */ -double __slowexp(double x) { -#ifdef NO_LONG_DOUBLE - double w,z,res,eps=3.0e-26; - int p; - mp_no mpx, mpy, mpz,mpw,mpeps,mpcor; - - p=6; - __dbl_mp(x,&mpx,p); /* Convert a double precision number x */ - /* into a multiple precision number mpx with prec. p. */ - __mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */ - __dbl_mp(eps,&mpeps,p); - __mul(&mpeps,&mpy,&mpcor,p); - __add(&mpy,&mpcor,&mpw,p); - __sub(&mpy,&mpcor,&mpz,p); - __mp_dbl(&mpw, &w, p); - __mp_dbl(&mpz, &z, p); - if (w == z) return w; - else { /* if calculating is not exactly */ - p = 32; - __dbl_mp(x,&mpx,p); - __mpexp(&mpx, &mpy, p); - __mp_dbl(&mpy, &res, p); - return res; - } -#else - return (double) __ieee754_expl((long double)x); -#endif -} diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c b/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c deleted file mode 100644 index 7c97d95817..0000000000 --- a/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * IBM Accurate Mathematical Library - * written by International Business Machines Corp. - * Copyright (C) 2001-2013 Free Software Foundation, Inc. - * - * This program 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. - * - * This program 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 this program; if not, see <http://www.gnu.org/licenses/>. - */ -/*************************************************************************/ -/* MODULE_NAME:slowpow.c */ -/* */ -/* FUNCTION:slowpow */ -/* */ -/*FILES NEEDED:mpa.h */ -/* mpa.c mpexp.c mplog.c halfulp.c */ -/* */ -/* Given two IEEE double machine numbers y,x , routine computes the */ -/* correctly rounded (to nearest) value of x^y. Result calculated by */ -/* multiplication (in halfulp.c) or if result isn't accurate enough */ -/* then routine converts x and y into multi-precision doubles and */ -/* recompute. */ -/*************************************************************************/ - -#include "mpa.h" -#include <math_private.h> - -void __mpexp (mp_no * x, mp_no * y, int p); -void __mplog (mp_no * x, mp_no * y, int p); -double ulog (double); -double __halfulp (double x, double y); - -double -__slowpow (double x, double y, double z) -{ - double res, res1; - long double ldw, ldz, ldpp; - static const long double ldeps = 0x4.0p-96; - - res = __halfulp (x, y); /* halfulp() returns -10 or x^y */ - if (res >= 0) - return res; /* if result was really computed by halfulp */ - /* else, if result was not really computed by halfulp */ - - /* Compute pow as long double, 106 bits */ - ldz = __ieee754_logl ((long double) x); - ldw = (long double) y *ldz; - ldpp = __ieee754_expl (ldw); - res = (double) (ldpp + ldeps); - res1 = (double) (ldpp - ldeps); - - if (res != res1) /* if result still not accurate enough */ - { /* use mpa for higher precision. */ - mp_no mpx, mpy, mpz, mpw, mpp, mpr, mpr1; - static const mp_no eps = { -3, {1.0, 4.0} }; - int p; - - p = 10; /* p=precision 240 bits */ - __dbl_mp (x, &mpx, p); - __dbl_mp (y, &mpy, p); - __dbl_mp (z, &mpz, p); - __mplog (&mpx, &mpz, p); /* log(x) = z */ - __mul (&mpy, &mpz, &mpw, p); /* y * z =w */ - __mpexp (&mpw, &mpp, p); /* e^w =pp */ - __add (&mpp, &eps, &mpr, p); /* pp+eps =r */ - __mp_dbl (&mpr, &res, p); - __sub (&mpp, &eps, &mpr1, p); /* pp -eps =r1 */ - __mp_dbl (&mpr1, &res1, p); /* converting into double precision */ - if (res == res1) - return res; - - /* if we get here result wasn't calculated exactly, continue for - more exact calculation using 768 bits. */ - p = 32; - __dbl_mp (x, &mpx, p); - __dbl_mp (y, &mpy, p); - __dbl_mp (z, &mpz, p); - __mplog (&mpx, &mpz, p); /* log(c)=z */ - __mul (&mpy, &mpz, &mpw, p); /* y*z =w */ - __mpexp (&mpw, &mpp, p); /* e^w=pp */ - __mp_dbl (&mpp, &res, p); /* converting into double precision */ - } - return res; -} diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S index 7df52f810b..6378ecb2d9 100644 --- a/sysdeps/powerpc/powerpc64/power4/memcmp.S +++ b/sysdeps/powerpc/powerpc64/power4/memcmp.S @@ -17,13 +17,11 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ .machine power4 -EALIGN (BP_SYM(memcmp), 4, 0) +EALIGN (memcmp, 4, 0) CALL_MCOUNT 3 #define rTMP r0 @@ -31,9 +29,6 @@ EALIGN (BP_SYM(memcmp), 4, 0) #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rWORD3 r8 /* next word in s1 */ @@ -976,6 +971,6 @@ L(duzeroLength): li rRTN,0 blr -END (BP_SYM (memcmp)) +END (memcmp) libc_hidden_builtin_def (memcmp) weak_alias (memcmp, bcmp) diff --git a/sysdeps/powerpc/powerpc64/power4/memcpy.S b/sysdeps/powerpc/powerpc64/power4/memcpy.S index 734434af07..c43d1d2e4e 100644 --- a/sysdeps/powerpc/powerpc64/power4/memcpy.S +++ b/sysdeps/powerpc/powerpc64/power4/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. @@ -36,7 +34,7 @@ Each case has a optimized unrolled loop. */ .machine power4 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT 3 cmpldi cr1,5,31 @@ -413,5 +411,5 @@ EALIGN (BP_SYM (memcpy), 5, 0) ld 31,-8(1) ld 3,-16(1) blr -END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +END_GEN_TB (memcpy,TB_TOCLESS) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S index 198269272b..dbecee8b97 100644 --- a/sysdeps/powerpc/powerpc64/power4/memset.S +++ b/sysdeps/powerpc/powerpc64/power4/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. @@ -28,22 +26,15 @@ to 0, to take advantage of the dcbz instruction. */ .machine power4 -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) CALL_MCOUNT 3 #define rTMP r0 #define rRTN r3 /* Initial value of 1st argument. */ -#if __BOUNDED_POINTERS__ -# define rMEMP0 r4 /* Original value of 1st arg. */ -# define rCHR r5 /* Char to set in each byte. */ -# define rLEN r6 /* Length of region to set. */ -# define rMEMP r10 /* Address at which we are storing. */ -#else -# define rMEMP0 r3 /* Original value of 1st arg. */ -# define rCHR r4 /* Char to set in each byte. */ -# define rLEN r5 /* Length of region to set. */ -# define rMEMP r6 /* Address at which we are storing. */ -#endif +#define rMEMP0 r3 /* Original value of 1st arg. */ +#define rCHR r4 /* Char to set in each byte. */ +#define rLEN r5 /* Length of region to set. */ +#define rMEMP r6 /* Address at which we are storing. */ #define rALIGN r7 /* Number of bytes we are setting now (when aligning). */ #define rMEMP2 r8 @@ -51,14 +42,6 @@ EALIGN (BP_SYM (memset), 5, 0) #define rCLS r8 /* Cache line size obtained from static. */ #define rCLM r9 /* Cache line size mask to check for cache alignment. */ L(_memset): -#if __BOUNDED_POINTERS__ - cmpldi cr1, rRTN, 0 - CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN) - beq cr1, L(b0) - STORE_RETURN_VALUE (rMEMP0) - STORE_RETURN_BOUNDS (rTMP, rTMP2) -L(b0): -#endif /* Take care of case for size <= 4. */ cmpldi cr1, rLEN, 8 andi. rALIGN, rMEMP0, 7 @@ -249,25 +232,16 @@ L(medium_27f): L(medium_28t): std rCHR, -8(rMEMP) blr -END_GEN_TB (BP_SYM (memset),TB_TOCLESS) +END_GEN_TB (memset,TB_TOCLESS) libc_hidden_builtin_def (memset) /* Copied from bzero.S to prevent the linker from inserting a stub between bzero and memset. */ -ENTRY (BP_SYM (__bzero)) +ENTRY (__bzero) CALL_MCOUNT 3 -#if __BOUNDED_POINTERS__ - mr r6,r4 - li r5,0 - mr r4,r3 - /* Tell memset that we don't want a return value. */ - li r3,0 - b L(_memset) -#else mr r5,r4 li r4,0 b L(_memset) -#endif -END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS) +END_GEN_TB (__bzero,TB_TOCLESS) -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) +weak_alias (__bzero, bzero) diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S index 19877fa785..1276e16a59 100644 --- a/sysdeps/powerpc/powerpc64/power4/strncmp.S +++ b/sysdeps/powerpc/powerpc64/power4/strncmp.S @@ -17,14 +17,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ -EALIGN (BP_SYM(strncmp), 4, 0) +EALIGN (strncmp, 4, 0) CALL_MCOUNT 3 #define rTMP r0 @@ -32,9 +30,6 @@ EALIGN (BP_SYM(strncmp), 4, 0) #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rWORD3 r10 @@ -175,5 +170,5 @@ L(u4): sub rRTN, rWORD1, rWORD2 L(ux): li rRTN, 0 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/powerpc/powerpc64/power6/memcpy.S b/sysdeps/powerpc/powerpc64/power6/memcpy.S index 64f5b2f427..55c0d71184 100644 --- a/sysdeps/powerpc/powerpc64/power6/memcpy.S +++ b/sysdeps/powerpc/powerpc64/power6/memcpy.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. @@ -43,7 +41,7 @@ for the destination. */ .machine "power6" -EALIGN (BP_SYM (memcpy), 7, 0) +EALIGN (memcpy, 7, 0) CALL_MCOUNT 3 cmpldi cr1,5,31 @@ -1165,5 +1163,5 @@ L(du_done): ld 31,-8(1) ld 3,-16(1) blr -END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +END_GEN_TB (memcpy,TB_TOCLESS) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S index a7913a10a6..541a45fd36 100644 --- a/sysdeps/powerpc/powerpc64/power6/memset.S +++ b/sysdeps/powerpc/powerpc64/power6/memset.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. @@ -28,34 +26,19 @@ to 0, to take advantage of the dcbz instruction. */ .machine power6 -EALIGN (BP_SYM (memset), 7, 0) +EALIGN (memset, 7, 0) CALL_MCOUNT 3 #define rTMP r0 #define rRTN r3 /* Initial value of 1st argument. */ -#if __BOUNDED_POINTERS__ -# define rMEMP0 r4 /* Original value of 1st arg. */ -# define rCHR r5 /* Char to set in each byte. */ -# define rLEN r6 /* Length of region to set. */ -# define rMEMP r10 /* Address at which we are storing. */ -#else -# define rMEMP0 r3 /* Original value of 1st arg. */ -# define rCHR r4 /* Char to set in each byte. */ -# define rLEN r5 /* Length of region to set. */ -# define rMEMP r6 /* Address at which we are storing. */ -#endif +#define rMEMP0 r3 /* Original value of 1st arg. */ +#define rCHR r4 /* Char to set in each byte. */ +#define rLEN r5 /* Length of region to set. */ +#define rMEMP r6 /* Address at which we are storing. */ #define rALIGN r7 /* Number of bytes we are setting now (when aligning). */ #define rMEMP2 r8 #define rMEMP3 r9 /* Alt mem pointer. */ L(_memset): -#if __BOUNDED_POINTERS__ - cmpldi cr1, rRTN, 0 - CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN) - beq cr1, L(b0) - STORE_RETURN_VALUE (rMEMP0) - STORE_RETURN_BOUNDS (rTMP, rTMP2) -L(b0): -#endif /* Take care of case for size <= 4. */ cmpldi cr1, rLEN, 8 andi. rALIGN, rMEMP0, 7 @@ -393,25 +376,16 @@ L(medium_27f): L(medium_28t): std rCHR, -8(rMEMP) blr -END_GEN_TB (BP_SYM (memset),TB_TOCLESS) +END_GEN_TB (memset,TB_TOCLESS) libc_hidden_builtin_def (memset) /* Copied from bzero.S to prevent the linker from inserting a stub between bzero and memset. */ -ENTRY (BP_SYM (__bzero)) +ENTRY (__bzero) CALL_MCOUNT 3 -#if __BOUNDED_POINTERS__ - mr r6,r4 - li r5,0 - mr r4,r3 - /* Tell memset that we don't want a return value. */ - li r3,0 - b L(_memset) -#else mr r5,r4 li r4,0 b L(_memset) -#endif -END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS) +END_GEN_TB (__bzero,TB_TOCLESS) -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) +weak_alias (__bzero, bzero) diff --git a/sysdeps/powerpc/powerpc64/power7/memchr.S b/sysdeps/powerpc/powerpc64/power7/memchr.S index 7b71a19e6c..3416897f50 100644 --- a/sysdeps/powerpc/powerpc64/power7/memchr.S +++ b/sysdeps/powerpc/powerpc64/power7/memchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memchr (char *s [r3], int byte [r4], int size [r5]) */ .machine power7 -ENTRY (BP_SYM (__memchr)) +ENTRY (__memchr) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 @@ -202,6 +200,6 @@ L(loop_small): /* loop_small has been unrolled. */ blr -END (BP_SYM (__memchr)) -weak_alias (BP_SYM (__memchr), BP_SYM(memchr)) +END (__memchr) +weak_alias (__memchr, memchr) libc_hidden_builtin_def (memchr) diff --git a/sysdeps/powerpc/powerpc64/power7/memcmp.S b/sysdeps/powerpc/powerpc64/power7/memcmp.S index a7caa48946..f190c64611 100644 --- a/sysdeps/powerpc/powerpc64/power7/memcmp.S +++ b/sysdeps/powerpc/powerpc64/power7/memcmp.S @@ -17,15 +17,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ .machine power7 -EALIGN (BP_SYM(memcmp),4,0) +EALIGN (memcmp,4,0) CALL_MCOUNT 3 #define rTMP r0 @@ -33,9 +31,6 @@ EALIGN (BP_SYM(memcmp),4,0) #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rWORD3 r8 /* next word in s1 */ @@ -978,6 +973,6 @@ L(duzeroLength): li rRTN,0 blr -END (BP_SYM (memcmp)) +END (memcmp) libc_hidden_builtin_def (memcmp) weak_alias (memcmp,bcmp) diff --git a/sysdeps/powerpc/powerpc64/power7/memcpy.S b/sysdeps/powerpc/powerpc64/power7/memcpy.S index aa0db8e152..800a9f1bb1 100644 --- a/sysdeps/powerpc/powerpc64/power7/memcpy.S +++ b/sysdeps/powerpc/powerpc64/power7/memcpy.S @@ -18,15 +18,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst'. */ .machine power7 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT 3 cmpldi cr1,5,31 @@ -502,5 +500,5 @@ L(end_unaligned_loop): ld 3,-16(1) blr -END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +END_GEN_TB (memcpy,TB_TOCLESS) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc64/power7/mempcpy.S b/sysdeps/powerpc/powerpc64/power7/mempcpy.S index 9993040acf..f20be938d2 100644 --- a/sysdeps/powerpc/powerpc64/power7/mempcpy.S +++ b/sysdeps/powerpc/powerpc64/power7/mempcpy.S @@ -18,15 +18,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); Returns 'dst' + 'len'. */ .machine power7 -EALIGN (BP_SYM (__mempcpy), 5, 0) +EALIGN (__mempcpy, 5, 0) CALL_MCOUNT 3 cmpldi cr1,5,31 @@ -451,7 +449,7 @@ L(end_unaligned_loop): add 3,3,5 blr -END_GEN_TB (BP_SYM (__mempcpy),TB_TOCLESS) -libc_hidden_def (BP_SYM (__mempcpy)) -weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy)) +END_GEN_TB (__mempcpy,TB_TOCLESS) +libc_hidden_def (__mempcpy) +weak_alias (__mempcpy, mempcpy) libc_hidden_builtin_def (mempcpy) diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S index d3ffe4c087..d24fbbb1b9 100644 --- a/sysdeps/powerpc/powerpc64/power7/memrchr.S +++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] memrchr (char *s [r3], int byte [r4], int size [r5]) */ .machine power7 -ENTRY (BP_SYM (__memrchr)) +ENTRY (__memrchr) CALL_MCOUNT dcbt 0,r3 mr r7,r3 @@ -174,6 +172,6 @@ L(loop_small): ble L(null) b L(loop_small) -END (BP_SYM (__memrchr)) -weak_alias (BP_SYM (__memrchr), BP_SYM(memrchr)) +END (__memrchr) +weak_alias (__memrchr, memrchr) libc_hidden_builtin_def (memrchr) diff --git a/sysdeps/powerpc/powerpc64/power7/memset.S b/sysdeps/powerpc/powerpc64/power7/memset.S index abb2d35282..b24cfa163a 100644 --- a/sysdeps/powerpc/powerpc64/power7/memset.S +++ b/sysdeps/powerpc/powerpc64/power7/memset.S @@ -18,14 +18,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); Returns 's'. */ .machine power7 -EALIGN (BP_SYM (memset), 5, 0) +EALIGN (memset, 5, 0) CALL_MCOUNT 3 L(_memset): @@ -382,16 +380,16 @@ L(small): stw 4,4(10) blr -END_GEN_TB (BP_SYM (memset),TB_TOCLESS) +END_GEN_TB (memset,TB_TOCLESS) libc_hidden_builtin_def (memset) /* Copied from bzero.S to prevent the linker from inserting a stub between bzero and memset. */ -ENTRY (BP_SYM (__bzero)) +ENTRY (__bzero) CALL_MCOUNT 3 mr r5,r4 li r4,0 b L(_memset) -END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS) +END_GEN_TB (__bzero,TB_TOCLESS) -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) +weak_alias (__bzero, bzero) diff --git a/sysdeps/powerpc/powerpc64/power7/rawmemchr.S b/sysdeps/powerpc/powerpc64/power7/rawmemchr.S index 5fc284de8d..50a33d8fae 100644 --- a/sysdeps/powerpc/powerpc64/power7/rawmemchr.S +++ b/sysdeps/powerpc/powerpc64/power7/rawmemchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] rawmemchr (void *s [r3], int c [r4]) */ .machine power7 -ENTRY (BP_SYM(__rawmemchr)) +ENTRY (__rawmemchr) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ @@ -97,6 +95,6 @@ L(done): srdi r0,r0,3 /* Convert leading zeroes to bytes. */ add r3,r8,r0 /* Return address of the matching char. */ blr -END (BP_SYM (__rawmemchr)) +END (__rawmemchr) weak_alias (__rawmemchr,rawmemchr) libc_hidden_builtin_def (__rawmemchr) diff --git a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S index 6323154eaa..9eee384692 100644 --- a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S +++ b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #include <locale-defines.h> /* int [r3] strcasecmp (const char *s1 [r3], const char *s2 [r4] ) @@ -33,7 +31,7 @@ # define STRCMP strcasecmp #endif -ENTRY (BP_SYM (__STRCMP)) +ENTRY (__STRCMP) CALL_MCOUNT 2 #define rRTN r3 /* Return value */ @@ -118,7 +116,7 @@ L(done): subf r0, rLWR2, rLWR1 extsw rRTN, r0 blr -END (BP_SYM (__STRCMP)) +END (__STRCMP) -weak_alias (BP_SYM (__STRCMP), BP_SYM (STRCMP)) +weak_alias (__STRCMP, STRCMP) libc_hidden_builtin_def (__STRCMP) diff --git a/sysdeps/powerpc/powerpc64/power7/strchr.S b/sysdeps/powerpc/powerpc64/power7/strchr.S index 04b7d4f5e1..3ffe7a1887 100644 --- a/sysdeps/powerpc/powerpc64/power7/strchr.S +++ b/sysdeps/powerpc/powerpc64/power7/strchr.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strchr (char *s [r3], int c [r4]) */ .machine power7 -ENTRY (BP_SYM(strchr)) +ENTRY (strchr) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ @@ -198,6 +196,6 @@ L(done_null): srdi r0,r0,3 /* Convert leading zeros to bytes. */ add r3,r8,r0 /* Return address of the matching null byte. */ blr -END (BP_SYM (strchr)) -weak_alias (BP_SYM (strchr), BP_SYM (index)) +END (strchr) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/powerpc/powerpc64/power7/strchrnul.S b/sysdeps/powerpc/powerpc64/power7/strchrnul.S index 2b1e1c002d..9dbc51b0d1 100644 --- a/sysdeps/powerpc/powerpc64/power7/strchrnul.S +++ b/sysdeps/powerpc/powerpc64/power7/strchrnul.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strchrnul (char *s [r3], int c [r4]) */ .machine power7 -ENTRY (BP_SYM(__strchrnul)) +ENTRY (__strchrnul) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ @@ -112,6 +110,6 @@ L(done): srdi r0,r0,3 /* Convert leading zeros to bytes. */ add r3,r8,r0 /* Return address of matching c/null byte. */ blr -END (BP_SYM (__strchrnul)) +END (__strchrnul) weak_alias (__strchrnul,strchrnul) libc_hidden_builtin_def (__strchrnul) diff --git a/sysdeps/powerpc/powerpc64/power7/strlen.S b/sysdeps/powerpc/powerpc64/power7/strlen.S index a36aa7d975..343216952e 100644 --- a/sysdeps/powerpc/powerpc64/power7/strlen.S +++ b/sysdeps/powerpc/powerpc64/power7/strlen.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strlen (char *s [r3]) */ .machine power7 -ENTRY (BP_SYM (strlen)) +ENTRY (strlen) CALL_MCOUNT 1 dcbt 0,r3 clrrdi r4,r3,3 /* Align the address to doubleword boundary. */ @@ -94,5 +92,5 @@ L(done): srdi r0,r0,3 /* Convert leading zeroes to bytes. */ add r3,r5,r0 /* Compute final length. */ blr -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S index 25a6baf479..77ecad5ab1 100644 --- a/sysdeps/powerpc/powerpc64/power7/strncmp.S +++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ @@ -26,7 +24,7 @@ const char *s2 [r4], size_t size [r5]) */ -EALIGN (BP_SYM(strncmp),5,0) +EALIGN (strncmp,5,0) CALL_MCOUNT 3 #define rTMP r0 @@ -34,9 +32,6 @@ EALIGN (BP_SYM(strncmp),5,0) #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rWORD3 r10 @@ -179,5 +174,5 @@ L(u4): sub rRTN,rWORD1,rWORD2 L(ux): li rRTN,0 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/powerpc/powerpc64/power7/strnlen.S b/sysdeps/powerpc/powerpc64/power7/strnlen.S index 23e0a355c4..37c7dbfe81 100644 --- a/sysdeps/powerpc/powerpc64/power7/strnlen.S +++ b/sysdeps/powerpc/powerpc64/power7/strnlen.S @@ -18,12 +18,10 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int [r3] strnlen (char *s [r3], int size [r4]) */ .machine power7 -ENTRY (BP_SYM (__strnlen)) +ENTRY (__strnlen) CALL_MCOUNT 2 dcbt 0,r3 clrrdi r8,r3,3 @@ -167,6 +165,6 @@ L(loop_small): cmpld r9,r7 bge L(end_max) b L(loop_small) -END (BP_SYM (__strnlen)) -weak_alias (BP_SYM (__strnlen), BP_SYM(strnlen)) +END (__strnlen) +weak_alias (__strnlen, strnlen) libc_hidden_builtin_def (strnlen) diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S index 8586c2d4ef..58ec610620 100644 --- a/sysdeps/powerpc/powerpc64/setjmp-common.S +++ b/sysdeps/powerpc/powerpc64/setjmp-common.S @@ -23,8 +23,6 @@ #else #include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> #ifndef __NO_VMX__ .section ".toc","aw" @@ -55,24 +53,23 @@ END (setjmp) that saves r2 since the call won't go via a plt call stub. See bugz #269. __GI__setjmp is used in csu/libc-start.c when HAVE_CLEANUP_JMP_BUF is defined. */ -ENTRY (BP_SYM (__GI__setjmp)) +ENTRY (__GI__setjmp) std r2,40(r1) /* Save the callers TOC in the save area. */ cfi_endproc -END_2 (BP_SYM (__GI__setjmp)) +END_2 (__GI__setjmp) /* Fall thru. */ #endif -ENTRY (BP_SYM (_setjmp)) +ENTRY (_setjmp) CALL_MCOUNT 1 li r4,0 /* Set second argument to 0. */ b JUMPTARGET (GLUE(__sigsetjmp,_ent)) -END (BP_SYM (_setjmp)) +END (_setjmp) libc_hidden_def (_setjmp) -ENTRY (BP_SYM (__sigsetjmp)) +ENTRY (__sigsetjmp) CALL_MCOUNT 2 JUMPTARGET(GLUE(__sigsetjmp,_ent)): - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) #ifdef PTR_MANGLE mr r5, r1 PTR_MANGLE (r5, r6) @@ -219,18 +216,18 @@ L(no_vmx): li r3,0 blr #elif defined SHARED - b JUMPTARGET (BP_SYM (__sigjmp_save)) + b JUMPTARGET (__sigjmp_save) #else mflr r0 std r0,16(r1) stdu r1,-112(r1) cfi_adjust_cfa_offset(112) cfi_offset(lr,16) - bl JUMPTARGET (BP_SYM (__sigjmp_save)) + bl JUMPTARGET (__sigjmp_save) nop ld r0,112+16(r1) addi r1,r1,112 mtlr r0 blr #endif -END (BP_SYM (__sigsetjmp)) +END (__sigsetjmp) diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S index 210779c842..09ab464cbc 100644 --- a/sysdeps/powerpc/powerpc64/start.S +++ b/sysdeps/powerpc/powerpc64/start.S @@ -34,7 +34,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include "bp-sym.h" + +/* We do not want .eh_frame info for crt1.o since crt1.o is linked + before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */ +#undef cfi_startproc +#define cfi_startproc +#undef cfi_endproc +#define cfi_endproc /* These are the various addresses we require. */ #ifdef PIC @@ -46,7 +52,7 @@ L(start_addresses): .quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/ /* function descriptors so don't need JUMPTARGET */ - .quad BP_SYM(main) + .quad main .quad __libc_csu_init .quad __libc_csu_fini @@ -71,7 +77,7 @@ ENTRY(_start) ld r8,.L01(r2) /* and continue in libc-start, in glibc. */ - b JUMPTARGET(BP_SYM(__libc_start_main)) + b JUMPTARGET(__libc_start_main) /* The linker needs this nop to recognize that it's OK to call via a TOC adjusting stub. */ nop diff --git a/sysdeps/powerpc/powerpc64/stpcpy.S b/sysdeps/powerpc/powerpc64/stpcpy.S index d9cffe9ad4..070cd4662f 100644 --- a/sysdeps/powerpc/powerpc64/stpcpy.S +++ b/sysdeps/powerpc/powerpc64/stpcpy.S @@ -17,37 +17,24 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* char * [r3] stpcpy (char *dest [r3], const char *src [r4]) */ -EALIGN (BP_SYM (__stpcpy), 4, 0) +EALIGN (__stpcpy, 4, 0) CALL_MCOUNT 2 #define rTMP r0 #define rRTN r3 -#if __BOUNDED_POINTERS__ -# define rDEST r4 /* pointer to previous word in dest */ -# define rSRC r5 /* pointer to previous word in src */ -# define rLOW r11 -# define rHIGH r12 -#else -# define rDEST r3 /* pointer to previous word in dest */ -# define rSRC r4 /* pointer to previous word in src */ -#endif +#define rDEST r3 /* pointer to previous word in dest */ +#define rSRC r4 /* pointer to previous word in src */ #define rWORD r6 /* current word from src */ #define rFEFE r7 /* 0xfefefeff */ #define r7F7F r8 /* 0x7f7f7f7f */ #define rNEG r9 /* ~(word in src | 0x7f7f7f7f) */ #define rALT r10 /* alternate word from src */ - CHECK_BOUNDS_LOW (rSRC, rLOW, rHIGH) - CHECK_BOUNDS_LOW (rDEST, rLOW, rHIGH) - STORE_RETURN_BOUNDS (rLOW, rHIGH) - or rTMP, rSRC, rDEST clrldi. rTMP, rTMP, 62 addi rDEST, rDEST, -4 @@ -85,8 +72,6 @@ L(g1): rlwinm. rTMP, rALT, 8, 24, 31 stbu rTMP, 1(rDEST) beqlr- stbu rALT, 1(rDEST) - CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt) - STORE_RETURN_VALUE (rDEST) blr /* Oh well. In this case, we just do a byte-by-byte copy. */ @@ -108,15 +93,11 @@ L(u0): lbzu rALT, 1(rSRC) cmpwi rWORD, 0 bne+ L(u0) L(u2): stbu rWORD, 1(rDEST) - CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt) - STORE_RETURN_VALUE (rDEST) blr L(u1): stbu rALT, 1(rDEST) - CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt) - STORE_RETURN_VALUE (rDEST) blr -END (BP_SYM (__stpcpy)) +END (__stpcpy) -weak_alias (BP_SYM (__stpcpy), BP_SYM (stpcpy)) +weak_alias (__stpcpy, stpcpy) libc_hidden_def (__stpcpy) libc_hidden_builtin_def (stpcpy) diff --git a/sysdeps/powerpc/powerpc64/strchr.S b/sysdeps/powerpc/powerpc64/strchr.S index 3bd392949d..d2d8cd361a 100644 --- a/sysdeps/powerpc/powerpc64/strchr.S +++ b/sysdeps/powerpc/powerpc64/strchr.S @@ -17,32 +17,19 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how this works. */ /* char * [r3] strchr (const char *s [r3] , int c [r4] ) */ -ENTRY (BP_SYM (strchr)) +ENTRY (strchr) CALL_MCOUNT 2 #define rTMP1 r0 #define rRTN r3 /* outgoing result */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Currently PPC gcc does not support -fbounds-check or -fbounded-pointers. - These artifacts are left in the code as a reminder in case we need - bounded pointer support in the future. */ -#if __BOUNDED_POINTERS__ -# define rSTR r4 -# define rCHR r5 /* byte we're looking for, spread over the whole word */ -# define rWORD r8 /* the current word */ -#else -# define rSTR r8 /* current word pointer */ -# define rCHR r4 /* byte we're looking for, spread over the whole word */ -# define rWORD r5 /* the current word */ -#endif +#define rSTR r8 /* current word pointer */ +#define rCHR r4 /* byte we're looking for, spread over the whole word */ +#define rWORD r5 /* the current word */ #define rCLZB rCHR /* leading zero byte count */ #define rFEFE r6 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ #define r7F7F r7 /* constant 0x7f7f7f7f7f7f7f7f */ @@ -51,9 +38,6 @@ ENTRY (BP_SYM (strchr)) #define rMASK r11 /* mask with the bits to ignore set to 0 */ #define rTMP3 r12 - CHECK_BOUNDS_LOW (rSTR, rTMP1, rTMP2) - STORE_RETURN_BOUNDS (rTMP1, rTMP2) - dcbt 0,rRTN rlwimi rCHR, rCHR, 8, 16, 23 li rMASK, -1 @@ -101,7 +85,6 @@ L(loopentry): L(missed): and. rTMP1, rTMP1, rTMP2 li rRTN, 0 - STORE_RETURN_VALUE (rSTR) beqlr /* It did happen. Decide which one was first... I'm not sure if this is actually faster than a sequence of @@ -119,8 +102,6 @@ L(missed): cntlzd rCLZB, rTMP2 srdi rCLZB, rCLZB, 3 add rRTN, rSTR, rCLZB - CHECK_BOUNDS_HIGH_RTN (rSTR, rTMP2, tdlge) - STORE_RETURN_VALUE (rSTR) blr L(foundit): @@ -132,10 +113,8 @@ L(foundit): subi rSTR, rSTR, 8 srdi rCLZB, rCLZB, 3 add rRTN, rSTR, rCLZB - CHECK_BOUNDS_HIGH_RTN (rSTR, rTMP2, tdlge) - STORE_RETURN_VALUE (rSTR) blr -END (BP_SYM (strchr)) +END (strchr) -weak_alias (BP_SYM (strchr), BP_SYM (index)) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/powerpc/powerpc64/strcmp.S b/sysdeps/powerpc/powerpc64/strcmp.S index 46600d5d01..c9d6dac121 100644 --- a/sysdeps/powerpc/powerpc64/strcmp.S +++ b/sysdeps/powerpc/powerpc64/strcmp.S @@ -17,29 +17,18 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */ -EALIGN (BP_SYM(strcmp), 4, 0) +EALIGN (strcmp, 4, 0) CALL_MCOUNT 2 #define rTMP r0 #define rRTN r3 #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. - These artifacts are left in the code as a reminder in case we need - bounded pointer support in the future. */ -#if __BOUNDED_POINTERS__ -# define rHIGH1 r11 -# define rHIGH2 r12 -#endif #define rWORD1 r5 /* current word in s1 */ #define rWORD2 r6 /* current word in s2 */ #define rFEFE r7 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ @@ -47,9 +36,6 @@ EALIGN (BP_SYM(strcmp), 4, 0) #define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */ #define rBITDIF r10 /* bits that differ in s1 & s2 words */ - CHECK_BOUNDS_LOW (rSTR1, rTMP, rHIGH1) - CHECK_BOUNDS_LOW (rSTR2, rTMP, rHIGH2) - dcbt 0,rSTR1 or rTMP, rSTR2, rSTR1 dcbt 0,rSTR2 @@ -98,7 +84,6 @@ L(endstring): blr L(equal): li rRTN, 0 - /* GKM FIXME: check high bounds. */ blr L(different): @@ -113,7 +98,6 @@ L(highbit): srdi rWORD2, rWORD2, 56 srdi rWORD1, rWORD1, 56 sub rRTN, rWORD1, rWORD2 - /* GKM FIXME: check high bounds. */ blr @@ -137,11 +121,9 @@ L(u1): cmpwi cr1, rWORD1, 0 cmpd rWORD1, rWORD2 bne+ cr1, L(u0) L(u3): sub rRTN, rWORD1, rWORD2 - /* GKM FIXME: check high bounds. */ blr L(u4): lbz rWORD1, -1(rSTR1) sub rRTN, rWORD1, rWORD2 - /* GKM FIXME: check high bounds. */ blr -END (BP_SYM (strcmp)) +END (strcmp) libc_hidden_builtin_def (strcmp) diff --git a/sysdeps/powerpc/powerpc64/strcpy.S b/sysdeps/powerpc/powerpc64/strcpy.S index 56845cf8fd..4c6fd3f9d7 100644 --- a/sysdeps/powerpc/powerpc64/strcpy.S +++ b/sysdeps/powerpc/powerpc64/strcpy.S @@ -17,50 +17,28 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* char * [r3] strcpy (char *dest [r3], const char *src [r4]) */ -EALIGN (BP_SYM (strcpy), 4, 0) +EALIGN (strcpy, 4, 0) CALL_MCOUNT 2 #define rTMP r0 #define rRTN r3 /* incoming DEST arg preserved as result */ -/* Note. The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. - These artifacts are left in the code as a reminder in case we need - bounded pointer support in the future. */ -#if __BOUNDED_POINTERS__ -# define rDEST r4 /* pointer to previous word in dest */ -# define rSRC r5 /* pointer to previous word in src */ -# define rLOW r11 -# define rHIGH r12 -#else -# define rSRC r4 /* pointer to previous word in src */ -# define rDEST r5 /* pointer to previous word in dest */ -#endif +#define rSRC r4 /* pointer to previous word in src */ +#define rDEST r5 /* pointer to previous word in dest */ #define rWORD r6 /* current word from src */ #define rFEFE r7 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ #define r7F7F r8 /* constant 0x7f7f7f7f7f7f7f7f */ #define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */ #define rALT r10 /* alternate word from src */ - CHECK_BOUNDS_LOW (rSRC, rLOW, rHIGH) - CHECK_BOUNDS_LOW (rDEST, rLOW, rHIGH) - STORE_RETURN_BOUNDS (rLOW, rHIGH) - dcbt 0,rSRC or rTMP, rSRC, rRTN clrldi. rTMP, rTMP, 61 -#if __BOUNDED_POINTERS__ - addi rDEST, rDEST, -8 -#else addi rDEST, rRTN, -8 -#endif dcbtst 0,rRTN bne L(unaligned) @@ -112,7 +90,6 @@ L(g1): stb rTMP, 14(rDEST) beqlr- stb rALT, 15(rDEST) - /* GKM FIXME: check high bound. */ blr /* Oh well. In this case, we just do a byte-by-byte copy. */ @@ -134,11 +111,9 @@ L(u0): lbzu rALT, 1(rSRC) cmpwi rWORD, 0 bne+ L(u0) L(u2): stb rWORD, 1(rDEST) - /* GKM FIXME: check high bound. */ blr L(u1): stb rALT, 1(rDEST) - /* GKM FIXME: check high bound. */ blr -END (BP_SYM (strcpy)) +END (strcpy) libc_hidden_builtin_def (strcpy) diff --git a/sysdeps/powerpc/powerpc64/strlen.S b/sysdeps/powerpc/powerpc64/strlen.S index 3ef4cc88e0..dafd033877 100644 --- a/sysdeps/powerpc/powerpc64/strlen.S +++ b/sysdeps/powerpc/powerpc64/strlen.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* The algorithm here uses the following techniques: @@ -77,7 +75,7 @@ /* int [r3] strlen (char *s [r3]) */ -ENTRY (BP_SYM (strlen)) +ENTRY (strlen) CALL_MCOUNT 1 #define rTMP1 r0 @@ -94,13 +92,6 @@ ENTRY (BP_SYM (strlen)) #define rTMP3 r11 #define rTMP4 r12 -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. - These artifacts are left in the code as a reminder in case we need - bounded pointer support in the future. */ - CHECK_BOUNDS_LOW (rRTN, rTMP1, rTMP2) - dcbt 0,rRTN clrrdi rSTR, rRTN, 3 lis r7F7F, 0x7f7f @@ -168,7 +159,6 @@ L(done0): subf rTMP1, rRTN, rSTR srdi rTMP3, rTMP3, 3 add rRTN, rTMP1, rTMP3 - /* GKM FIXME: check high bound. */ blr -END (BP_SYM (strlen)) +END (strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/powerpc/powerpc64/strncmp.S b/sysdeps/powerpc/powerpc64/strncmp.S index 89a3246fdc..e2726883f2 100644 --- a/sysdeps/powerpc/powerpc64/strncmp.S +++ b/sysdeps/powerpc/powerpc64/strncmp.S @@ -17,14 +17,12 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* See strlen.s for comments on how the end-of-string testing works. */ /* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ -EALIGN (BP_SYM(strncmp), 4, 0) +EALIGN (strncmp, 4, 0) CALL_MCOUNT 3 #define rTMP r0 @@ -32,9 +30,6 @@ EALIGN (BP_SYM(strncmp), 4, 0) #define rSTR1 r3 /* first string arg */ #define rSTR2 r4 /* second string arg */ #define rN r5 /* max string length */ -/* Note: The Bounded pointer support in this code is broken. This code - was inherited from PPC32 and that support was never completed. - Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */ #define rWORD1 r6 /* current word in s1 */ #define rWORD2 r7 /* current word in s2 */ #define rFEFE r8 /* constant 0xfefefefefefefeff (-0x0101010101010101) */ @@ -160,5 +155,5 @@ L(u1): L(u2): lbzu rWORD1, -1(rSTR1) L(u3): sub rRTN, rWORD1, rWORD2 blr -END (BP_SYM (strncmp)) +END (strncmp) libc_hidden_builtin_def (strncmp) diff --git a/sysdeps/s390/s390-32/dl-trampoline.S b/sysdeps/s390/s390-32/dl-trampoline.S index 2846d845c0..1ae43cbbc5 100644 --- a/sysdeps/s390/s390-32/dl-trampoline.S +++ b/sysdeps/s390/s390-32/dl-trampoline.S @@ -95,16 +95,16 @@ _dl_runtime_profile: lr %r1,%r2 # function addr returned in r2 icm %r0,15,20(%r12) # load & test framesize jnm 2f + lm %r2,%r6,32(%r12) ld %f0,56(%r12) ld %f2,64(%r12) - basr %r14,%r1 # call resolved function -1: lr %r15,%r12 # remove stack frame + lr %r15,%r12 # remove stack frame cfi_def_cfa_register (15) l %r14,16(%r15) # restore registers l %r12,12(%r15) - l %r6,8(%r15) - br %r14 + br %r1 # tail-call to the resolved function + cfi_def_cfa_register (12) 2: jz 4f # framesize == 0 ? ahi %r0,7 # align framesize to 8 @@ -131,7 +131,13 @@ _dl_runtime_profile: la %r4,32(%r12) # pointer to struct La_s390_32_regs la %r5,72(%r12) # pointer to struct La_s390_32_retval basr %r14,%r1 # call _dl_call_pltexit - j 1b + + lr %r15,%r12 # remove stack frame + cfi_def_cfa_register (15) + l %r14,16(%r15) # restore registers + l %r12,12(%r15) + br %r14 + 6: .long _dl_profile_fixup - 0b 7: .long _dl_call_pltexit - 5b cfi_endproc diff --git a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c index fcbd15e26e..d57a907dff 100644 --- a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c +++ b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c @@ -34,9 +34,9 @@ \ /* Make the declarations of the optimized functions hidden in order to prevent GOT slots being generated for them. */ \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \ - extern __attribute__((visibility("hidden"))) void *FUNC##_g5; \ + extern void *FUNC##_z196 attribute_hidden; \ + extern void *FUNC##_z10 attribute_hidden; \ + extern void *FUNC##_g5 attribute_hidden; \ \ void *resolve_##FUNC (unsigned long int dl_hwcap) \ { \ diff --git a/sysdeps/s390/s390-64/dl-trampoline.S b/sysdeps/s390/s390-64/dl-trampoline.S index 81144a0cae..29d374f868 100644 --- a/sysdeps/s390/s390-64/dl-trampoline.S +++ b/sysdeps/s390/s390-64/dl-trampoline.S @@ -1,4 +1,4 @@ -/* PLT trampolines. s390 version. +/* PLT trampolines. s390x version. Copyright (C) 2005-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -20,8 +20,8 @@ * with the following linkage: * r2 - r6 : parameter registers * f0, f2, f4, f6 : floating point parameter registers - * 24(r15), 28(r15) : PLT arguments PLT1, PLT2 - * 96(r15) : additional stack parameters + * 48(r15), 56(r15) : PLT arguments PLT1, PLT2 + * 160(r15) : additional stack parameters * The normal clobber rules for function calls apply: * r0 - r5 : call clobbered * r6 - r13 : call saved @@ -39,21 +39,21 @@ cfi_startproc .align 16 _dl_runtime_resolve: - stmg 2,5,64(15) # save registers - stg 14,96(15) + stmg %r2,%r5,64(15) # save call-clobbered argument registers + stg %r14,96(15) cfi_offset (r14, -64) - lgr 0,15 # create stack frame - aghi 15,-160 + lgr %r0,%r15 + aghi %r15,-160 # create stack frame cfi_adjust_cfa_offset (160) - stg 0,0(15) - lmg 2,3,208(15) # load args saved by PLT - brasl 14,_dl_fixup # call fixup - lgr 1,2 # function addr returned in r2 - aghi 15,160 # remove stack frame + stg %r0,0(%r15) # write backchain + lmg %r2,%r3,208(%r15)# load args saved by PLT + brasl %r14,_dl_fixup # call fixup + lgr %r1,%r2 # function addr returned in r2 + aghi %r15,160 # remove stack frame cfi_adjust_cfa_offset (-160) - lg 14,96(15) # restore registers - lmg 2,5,64(15) - br 1 + lg %r14,96(15) # restore registers + lmg %r2,%r5,64(15) + br %r1 cfi_endproc .size _dl_runtime_resolve, .-_dl_runtime_resolve @@ -64,13 +64,12 @@ _dl_runtime_resolve: cfi_startproc .align 16 _dl_runtime_profile: - stmg %r2,%r6,64(%r15) # save registers - std %f0,104(%r15) - std %f2,112(%r15) + stmg %r2,%r6,64(%r15) # save call-clobbered arg regs + std %f0,104(%r15) # + r6 needed as arg for + std %f2,112(%r15) # _dl_profile_fixup std %f4,120(%r15) std %f6,128(%r15) - stg %r6,16(%r15) - stg %r12,24(%r15) + stg %r12,24(%r15) # r12 is used as backup of r15 stg %r14,32(%r15) cfi_offset (r6, -96) cfi_offset (f0, -56) @@ -79,10 +78,10 @@ _dl_runtime_profile: cfi_offset (f6, -32) cfi_offset (r12, -136) cfi_offset (r14, -128) - lgr %r12,%r15 # create stack frame + lgr %r12,%r15 # backup stack pointer cfi_def_cfa_register (12) - aghi %r15,-160 - stg %r12,0(%r15) + aghi %r15,-160 # create stack frame + stg %r12,0(%r15) # save backchain lmg %r2,%r3,48(%r12) # load arguments saved by PLT lgr %r4,%r14 # return address as third parameter la %r5,64(%r12) # pointer to struct La_s390_32_regs @@ -92,18 +91,19 @@ _dl_runtime_profile: lg %r0,40(%r12) # load framesize ltgr %r0,%r0 jnm 1f - lmg %r2,%r6,64(%r12) - ld %f0,104(%r12) - ld %f2,112(%r12) + + lmg %r2,%r6,64(%r12) # framesize < 0 means no pltexit call + ld %f0,104(%r12) # so we can do a tail call without + ld %f2,112(%r12) # copying the arg overflow area ld %f4,120(%r12) ld %f6,128(%r12) - basr %r14,%r1 # call resolved function -0: lgr %r15,%r12 # remove stack frame + + lgr %r15,%r12 # remove stack frame cfi_def_cfa_register (15) lg %r14,32(%r15) # restore registers lg %r12,24(%r15) - lg %r6,16(%r15) - br %r14 + br %r1 # tail-call to resolved function + cfi_def_cfa_register (12) 1: jz 4f # framesize == 0 ? aghi %r0,7 # align framesize to 8 @@ -118,7 +118,7 @@ _dl_runtime_profile: la %r3,8(%r3) brctg %r0,3b 4: lmg %r2,%r6,64(%r12) # load register parameters - ld %f0,104(%r12) + ld %f0,104(%r12) # restore call-clobbered arg regs ld %f2,112(%r12) ld %f4,120(%r12) ld %f6,128(%r12) @@ -129,7 +129,13 @@ _dl_runtime_profile: la %r4,32(%r12) # pointer to struct La_s390_32_regs la %r5,72(%r12) # pointer to struct La_s390_32_retval brasl %r14,_dl_call_pltexit - j 0b + + lgr %r15,%r12 # remove stack frame + cfi_def_cfa_register (15) + lg %r14,32(%r15) # restore registers + lg %r12,24(%r15) + br %r14 + cfi_endproc .size _dl_runtime_profile, .-_dl_runtime_profile #endif diff --git a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c index 256179b269..14d9c13ebf 100644 --- a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c +++ b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c @@ -34,9 +34,9 @@ \ /* Make the declarations of the optimized functions hidden in order to prevent GOT slots being generated for them. */ \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z900; \ + extern void *FUNC##_z196 attribute_hidden; \ + extern void *FUNC##_z10 attribute_hidden; \ + extern void *FUNC##_z900 attribute_hidden; \ \ void *resolve_##FUNC (unsigned long int dl_hwcap) \ { \ diff --git a/sysdeps/sparc/backtrace.c b/sysdeps/sparc/backtrace.c index a0ba1fdfd7..48f3cf6c13 100644 --- a/sysdeps/sparc/backtrace.c +++ b/sysdeps/sparc/backtrace.c @@ -30,7 +30,7 @@ struct layout unsigned long locals[8]; unsigned long ins[6]; unsigned long next; - void *__unbounded return_address; + void *return_address; }; struct trace_arg @@ -127,9 +127,9 @@ __backtrace (void **array, int size) asm volatile ("mov %%fp, %0" : "=r"(fp)); asm volatile ("mov %%i7, %0" : "=r"(i7)); - current = (struct layout *__unbounded) (fp + BACKTRACE_STACK_BIAS); + current = (struct layout *) (fp + BACKTRACE_STACK_BIAS); - array[0] = (void *__unbounded) i7; + array[0] = (void *) i7; if (size == 1) return 1; @@ -140,8 +140,7 @@ __backtrace (void **array, int size) array[count] = current->return_address; if (!current->next) break; - current = (struct layout *__unbounded) (current->next - + BACKTRACE_STACK_BIAS); + current = (struct layout *) (current->next + BACKTRACE_STACK_BIAS); } } else diff --git a/sysdeps/sparc/configure b/sysdeps/sparc/configure index 3abba27501..63e02de4a6 100644 --- a/sysdeps/sparc/configure +++ b/sysdeps/sparc/configure @@ -40,6 +40,8 @@ if test $libc_cv_sparc_as_vis3 = yes; then $as_echo "#define HAVE_AS_VIS3_SUPPORT 1" >>confdefs.h fi +config_vars="$config_vars +have-as-vis3 = $libc_cv_sparc_as_vis3" # Check for a GCC emitting GOTDATA relocations. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc gcc GOTDATA reloc support" >&5 diff --git a/sysdeps/sparc/configure.in b/sysdeps/sparc/configure.in index 080be992dc..982077c9b9 100644 --- a/sysdeps/sparc/configure.in +++ b/sysdeps/sparc/configure.in @@ -28,6 +28,7 @@ rm -f conftest*]) if test $libc_cv_sparc_as_vis3 = yes; then AC_DEFINE(HAVE_AS_VIS3_SUPPORT) fi +LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3]) # Check for a GCC emitting GOTDATA relocations. AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps index f282a160ac..4620af6976 100644 --- a/sysdeps/sparc/fpu/libm-test-ulps +++ b/sysdeps/sparc/fpu/libm-test-ulps @@ -198,12 +198,178 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (-0.25 + 1.0 i) == 1.747098759571863549650000258275841544745 - 8.924633639033482359562124741744951972772e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.25 + 1.0 i) == 1.747098759571863549650000258275841544745 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.25 - 1.0 i) == 1.747098759571863549650000258275841544745 + 8.924633639033482359562124741744951972772e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.25 - 1.0 i) == 1.747098759571863549650000258275841544745 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (-0.5 + +0 i) == 2.094395102393195492308428922186335256131 - 0 i": ildouble: 1 ldouble: 1 +Test "Real part of: cacos (-0.5 + 1.0 i) == 1.920235389652109912858733517715121394831 - 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.5 + 1.0 i) == 1.920235389652109912858733517715121394831 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (-0.5 - 0 i) == 2.094395102393195492308428922186335256131 + +0 i": ildouble: 1 ldouble: 1 +Test "Real part of: cacos (-0.5 - 1.0 i) == 1.920235389652109912858733517715121394831 + 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.5 - 1.0 i) == 1.920235389652109912858733517715121394831 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i) == 1.572134236154454360143880041170803681211 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i) == 1.572134236154454360143880041170803681211 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (-0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691640832196834 - 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691640832196834 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691640832196834 + 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691640832196834 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442101 - 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442101 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442101 + 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442101 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-16385 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-16385 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-16385 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-16385 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-30 + 1.0 i) == 1.570796328070826603447840231892468927106 - 8.813735870195430258081932989769495326854e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i) == 1.570796328070826603447840231892468927106 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-30 - 1.0 i) == 1.570796328070826603447840231892468927106 + 8.813735870195430258081932989769495326854e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i) == 1.570796328070826603447840231892468927106 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-0x1p500 + 1.0 i) == 3.141592653589793238462643383279502884197 - 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 @@ -216,6 +382,17 @@ ldouble: 1 Test "Imaginary part of: cacos (-0x1p5000 - 1.0 i) == 3.141592653589793238462643383279502884197 + 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (-1.0 + 0.5 i) == 2.466703808003786858297978415967328452322 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-10 i) == 3.098101355958774410750062883737683164607 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-30 i) == 3.141550174918818561961484385371624132331 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (-1.0 + 0x1p50 i) == 1.570796326794897507409741391764983781004 - 3.535050620855721078027883819436759661753e1 i": float: 1 ifloat: 1 @@ -225,6 +402,17 @@ ldouble: 1 Test "Imaginary part of: cacos (-1.0 + 0x1p5000 i) == 1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (-1.0 - 0.5 i) == 2.466703808003786858297978415967328452322 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-10 i) == 3.098101355958774410750062883737683164607 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-30 i) == 3.141550174918818561961484385371624132331 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (-1.0 - 0x1p50 i) == 1.570796326794897507409741391764983781004 + 3.535050620855721078027883819436759661753e1 i": float: 1 ifloat: 1 @@ -246,22 +434,160 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0.25 + 1.0 i) == 1.394493894017929688812643125003661339452 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.25 - 1.0 i) == 1.394493894017929688812643125003661339452 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (0.5 + 1.0 i) == 1.221357263937683325603909865564381489366 - 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.5 + 1.0 i) == 1.221357263937683325603909865564381489366 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (0.5 - 1.0 i) == 1.221357263937683325603909865564381489366 + 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.5 - 1.0 i) == 1.221357263937683325603909865564381489366 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": float: 1 ifloat: 1 Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i) == 1.569458417435338878318763342108699202986 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i) == 1.569458417435338878318763342108699202986 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691638670687364 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691638670687364 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691638670687364 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691638670687364 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442097 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442097 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442097 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442097 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-16385 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-16385 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-16385 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-16385 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i) == 1.570796325518966635014803151387033957091 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i) == 1.570796325518966635014803151387033957091 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i": double: 1 idouble: 1 @@ -283,12 +609,58 @@ ldouble: 1 Test "Imaginary part of: cacos (0x1p5000 - 1.0 i) == 7.079811261048172892385615158694057552948e-1506 + 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Real part of: cacos (1.0 + 0.25 i) == 4.890443302710802929202843732146540079124e-1 - 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (1.0 + 0.5 i) == 6.748888455860063801646649673121744318756e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 + 0.5 i) == 6.748888455860063801646649673121744318756e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Real part of: cacos (1.0 + 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 - 4.350501469856803800217957402220976497152e-2 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cacos (1.0 + 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 + 0x1.fp-100 i) == 1.236292038260260888664514866456887257525e-15 - 1.236292038260260888664514866457202186027e-15 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 + 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (1.0 + 0x1p500 i) == 1.570796326794896619231321691639751442099 - 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: cacos (1.0 + 0x1p5000 i) == 1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Real part of: cacos (1.0 - 0.25 i) == 4.890443302710802929202843732146540079124e-1 + 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (1.0 - 0.5 i) == 6.748888455860063801646649673121744318756e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 - 0.5 i) == 6.748888455860063801646649673121744318756e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Real part of: cacos (1.0 - 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 + 4.350501469856803800217957402220976497152e-2 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cacos (1.0 - 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 - 0x1.fp-100 i) == 1.236292038260260888664514866456887257525e-15 + 1.236292038260260888664514866457202186027e-15 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 - 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (1.0 - 0x1p500 i) == 1.570796326794896619231321691639751442099 + 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 @@ -481,6 +853,154 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: casin (-0.25 + 1.0 i) == -1.763024327769669304186785666360901026468e-1 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.25 - 1.0 i) == -1.763024327769669304186785666360901026468e-1 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0.5 + 1.0 i) == -3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.5 + 1.0 i) == -3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0.5 - 1.0 i) == -3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.5 - 1.0 i) == -3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1.fp-10 + 1.0 i) == -1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-10 + 1.0 i) == -1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (-0x1.fp-10 - 1.0 i) == -1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-10 - 1.0 i) == -1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-100 + 1.0 i) == -1.080754735021050612990719608916167354321e-30 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-100 - 1.0 i) == -1.080754735021050612990719608916167354321e-30 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1000 + 1.0 i) == -1.278589251976747242280879285935084814093e-301 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1000 - 1.0 i) == -1.278589251976747242280879285935084814093e-301 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-10000 + 1.0 i) == -6.867047849047171855399183659351043150871e-3011 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-10000 - 1.0 i) == -6.867047849047171855399183659351043150871e-3011 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.0 i) == -3.810492908885321743133304375216617626230e-309 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i) == -2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.0 i) == -3.810492908885321743133304375216617626230e-309 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i) == -2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 1.0 i) == -2.013062564695348242280482517399205554874e-39 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i) == -1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 1.0 i) == -2.013062564695348242280482517399205554874e-39 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i) == -1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-16385 + 1.0 i) == -5.757683115456107044131264955348448954458e-4933 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-16385 + 1.5 i) == -4.516698239814521372306784062043266700598e-4933 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-16385 - 1.0 i) == -5.757683115456107044131264955348448954458e-4933 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-16385 - 1.5 i) == -4.516698239814521372306784062043266700598e-4933 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1.fp-30 + 1.0 i) == -1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-30 + 1.0 i) == -1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1.fp-30 - 1.0 i) == -1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-30 - 1.0 i) == -1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-0x1p500 + 1.0 i) == -1.570796326794896619231321691639751442099 + 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 @@ -493,12 +1013,56 @@ ldouble: 1 Test "Imaginary part of: casin (-0x1p5000 - 1.0 i) == -1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Real part of: casin (-1.0 + 0.25 i) == -1.081751996523816326311037318425097434186 + 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 + 0.5 i) == -8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.0 + 0.5 i) == -8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.0 + 0x1.fp-10 i) == -1.527305029163877791518741192097931722508 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 + 0x1.fp-129 i) == -1.570796326794896619177965338869929107115 + 5.335635276982233498398987585285818977933e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0x1.fp-30 i) == -1.570753848123921942730162693731872690232 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-1.0 + 0x1p500 i) == -3.054936363499604682051979393213617699789e-151 + 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: casin (-1.0 + 0x1p5000 i) == -7.079811261048172892385615158694057552948e-1506 + 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Real part of: casin (-1.0 - 0.25 i) == -1.081751996523816326311037318425097434186 - 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 - 0.5 i) == -8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.0 - 0.5 i) == -8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.0 - 0x1.fp-10 i) == -1.527305029163877791518741192097931722508 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 - 0x1.fp-129 i) == -1.570796326794896619177965338869929107115 - 5.335635276982233498398987585285818977933e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0x1.fp-30 i) == -1.570753848123921942730162693731872690232 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-1.0 - 0x1p500 i) == -3.054936363499604682051979393213617699789e-151 - 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 @@ -512,6 +1076,32 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: casin (0.25 + 1.0 i) == 1.763024327769669304186785666360901026468e-1 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.25 - 1.0 i) == 1.763024327769669304186785666360901026468e-1 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.5 + 1.0 i) == 3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.5 + 1.0 i) == 3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.5 - 1.0 i) == 3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.5 - 1.0 i) == 3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 1 @@ -520,6 +1110,128 @@ ifloat: 1 Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": ildouble: 1 ldouble: 1 +Test "Real part of: casin (0x1.fp-10 + 1.0 i) == 1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-10 + 1.0 i) == 1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (0x1.fp-10 - 1.0 i) == 1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-10 - 1.0 i) == 1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp-100 + 1.0 i) == 1.080754735021050612990719608916167354321e-30 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-100 - 1.0 i) == 1.080754735021050612990719608916167354321e-30 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1000 + 1.0 i) == 1.278589251976747242280879285935084814093e-301 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1000 - 1.0 i) == 1.278589251976747242280879285935084814093e-301 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-10000 + 1.0 i) == 6.867047849047171855399183659351043150871e-3011 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-10000 - 1.0 i) == 6.867047849047171855399183659351043150871e-3011 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 + 1.0 i) == 3.810492908885321743133304375216617626230e-309 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i) == 2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 - 1.0 i) == 3.810492908885321743133304375216617626230e-309 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i) == 2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 1.0 i) == 2.013062564695348242280482517399205554874e-39 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i) == 1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 1.0 i) == 2.013062564695348242280482517399205554874e-39 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i) == 1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-16385 + 1.0 i) == 5.757683115456107044131264955348448954458e-4933 + 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-16385 + 1.5 i) == 4.516698239814521372306784062043266700598e-4933 + 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-16385 - 1.0 i) == 5.757683115456107044131264955348448954458e-4933 - 8.813735870195430252326093249797923090282e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-16385 - 1.5 i) == 4.516698239814521372306784062043266700598e-4933 - 1.194763217287109304111930828519090523536 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1.fp-30 + 1.0 i) == 1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-30 + 1.0 i) == 1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1.fp-30 - 1.0 i) == 1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-30 - 1.0 i) == 1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 + 7.107906849659093345062145442726115449315e2 i": double: 1 idouble: 1 @@ -541,12 +1253,56 @@ ldouble: 1 Test "Imaginary part of: casin (0x1p5000 - 1.0 i) == 1.570796326794896619231321691639751442099 - 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Real part of: casin (1.0 + 0.25 i) == 1.081751996523816326311037318425097434186 + 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 + 0.5 i) == 8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.0 + 0.5 i) == 8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.0 + 0x1.fp-10 i) == 1.527305029163877791518741192097931722508 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 + 0x1.fp-129 i) == 1.570796326794896619177965338869929107115 + 5.335635276982233498398987585285818977933e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0x1.fp-30 i) == 1.570753848123921942730162693731872690232 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (1.0 + 0x1p500 i) == 3.054936363499604682051979393213617699789e-151 + 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: casin (1.0 + 0x1p5000 i) == 7.079811261048172892385615158694057552948e-1506 + 3.466429049980286492395577839412341016946e3 i": ildouble: 1 ldouble: 1 +Test "Real part of: casin (1.0 - 0.25 i) == 1.081751996523816326311037318425097434186 - 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 - 0.5 i) == 8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.0 - 0.5 i) == 8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.0 - 0x1.fp-10 i) == 1.527305029163877791518741192097931722508 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 - 0x1.fp-129 i) == 1.570796326794896619177965338869929107115 - 5.335635276982233498398987585285818977933e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0x1.fp-30 i) == 1.570753848123921942730162693731872690232 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (1.0 - 0x1p500 i) == 3.054936363499604682051979393213617699789e-151 - 3.472667374605326000180332928505464606058e2 i": ildouble: 1 ldouble: 1 @@ -576,6 +1332,16 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: casinh (-0.25 + 1.0 i) == -5.097911466811016354623559941115413499164e-1 + 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0.25 - 1.0 i) == -5.097911466811016354623559941115413499164e-1 - 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": double: 2 float: 1 @@ -583,6 +1349,12 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.5 + 1.0 i) == -7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (-0.5 + 1.0 i) == -7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": double: 2 float: 1 @@ -590,6 +1362,34 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.5 - 1.0 i) == -7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (-0.5 - 1.0 i) == -7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.fp-10 + 1.0 i) == -4.350501469856803800217957402220976497152e-2 + 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.fp-10 - 1.0 i) == -4.350501469856803800217957402220976497152e-2 - 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.fp-129 + 1.0 i) == -5.335635276982233498398987585285818977933e-20 + 1.570796326794896619177965338869929107115 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.fp-129 - 1.0 i) == -5.335635276982233498398987585285818977933e-20 - 1.570796326794896619177965338869929107115 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.fp-30 + 1.0 i) == -4.247867098745151888768727039216644758847e-5 + 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.fp-30 - 1.0 i) == -4.247867098745151888768727039216644758847e-5 - 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0x1p500 + 1.0 i) == -3.472667374605326000180332928505464606058e2 + 3.054936363499604682051979393213617699789e-151 i": ildouble: 1 ldouble: 1 @@ -609,6 +1409,67 @@ idouble: 2 ifloat: 1 ildouble: 3 ldouble: 3 +Test "Real part of: casinh (-1.0 + 0.25 i) == -8.924633639033482359562124741744951972772e-1 + 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0.5 i) == -9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0.5 i) == -9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-100 i) == -8.813735870195430252326093249797923090282e-1 + 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-1000 i) == -8.813735870195430252326093249797923090282e-1 + 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-10000 i) == -8.813735870195430252326093249797923090282e-1 + 6.867047849047171855399183659351043150871e-3011 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-1025 i) == -8.813735870195430252326093249797923090282e-1 + 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-129 i) == -8.813735870195430252326093249797923090282e-1 + 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-16385 i) == -8.813735870195430252326093249797923090282e-1 + 5.757683115456107044131264955348448954458e-4933 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.0 + 0x1p500 i) == -3.472667374605326000180332928505464606058e2 + 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -622,6 +1483,67 @@ idouble: 2 ifloat: 1 ildouble: 3 ldouble: 3 +Test "Real part of: casinh (-1.0 - 0.25 i) == -8.924633639033482359562124741744951972772e-1 - 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0.5 i) == -9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0.5 i) == -9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-100 i) == -8.813735870195430252326093249797923090282e-1 - 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-1000 i) == -8.813735870195430252326093249797923090282e-1 - 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-10000 i) == -8.813735870195430252326093249797923090282e-1 - 6.867047849047171855399183659351043150871e-3011 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-1025 i) == -8.813735870195430252326093249797923090282e-1 - 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-129 i) == -8.813735870195430252326093249797923090282e-1 - 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-16385 i) == -8.813735870195430252326093249797923090282e-1 - 5.757683115456107044131264955348448954458e-4933 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.0 - 0x1p500 i) == -3.472667374605326000180332928505464606058e2 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -635,6 +1557,19 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.5 + 0x1.fp-1025 i) == -1.194763217287109304111930828519090523536 + 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 + 0x1.fp-129 i) == -1.194763217287109304111930828519090523536 + 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 + 0x1.fp-16385 i) == -1.194763217287109304111930828519090523536 + 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.5 - 0 i) == -1.194763217287109304111930828519090523536 - 0 i": double: 2 float: 1 @@ -642,6 +1577,19 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.5 - 0x1.fp-1025 i) == -1.194763217287109304111930828519090523536 - 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 - 0x1.fp-129 i) == -1.194763217287109304111930828519090523536 - 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.5 - 0x1.fp-16385 i) == -1.194763217287109304111930828519090523536 - 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 5 float: 1 @@ -656,16 +1604,38 @@ idouble: 3 ifloat: 6 ildouble: 2 ldouble: 2 +Test "Imaginary part of: casinh (0.25 + 1.0 i) == 5.097911466811016354623559941115413499164e-1 + 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.25 - 1.0 i) == 5.097911466811016354623559941115413499164e-1 - 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0.5 + 1.0 i) == 7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.5 + 1.0 i) == 7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0.5 - 1.0 i) == 7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casinh (0.5 - 1.0 i) == 7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -678,6 +1648,28 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0x1.fp-10 + 1.0 i) == 4.350501469856803800217957402220976497152e-2 + 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.fp-10 - 1.0 i) == 4.350501469856803800217957402220976497152e-2 - 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.fp-129 + 1.0 i) == 5.335635276982233498398987585285818977933e-20 + 1.570796326794896619177965338869929107115 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.fp-129 - 1.0 i) == 5.335635276982233498398987585285818977933e-20 - 1.570796326794896619177965338869929107115 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.fp-30 + 1.0 i) == 4.247867098745151888768727039216644758847e-5 + 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.fp-30 - 1.0 i) == 4.247867098745151888768727039216644758847e-5 - 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i) == 7.107906849659093345062145442726115449315e2 + 7.853981633974483096156608458198757210493e-1 i": double: 1 idouble: 1 @@ -706,6 +1698,67 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.0 + 0.25 i) == 8.924633639033482359562124741744951972772e-1 + 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0.5 i) == 9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0.5 i) == 9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (1.0 + 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-100 i) == 8.813735870195430252326093249797923090282e-1 + 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-1000 i) == 8.813735870195430252326093249797923090282e-1 + 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-10000 i) == 8.813735870195430252326093249797923090282e-1 + 6.867047849047171855399183659351043150871e-3011 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-1025 i) == 8.813735870195430252326093249797923090282e-1 + 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-129 i) == 8.813735870195430252326093249797923090282e-1 + 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-16385 i) == 8.813735870195430252326093249797923090282e-1 + 5.757683115456107044131264955348448954458e-4933 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.0 + 0x1p500 i) == 3.472667374605326000180332928505464606058e2 + 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -719,6 +1772,67 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.0 - 0.25 i) == 8.924633639033482359562124741744951972772e-1 - 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0.5 i) == 9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0.5 i) == 9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (1.0 - 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-100 i) == 8.813735870195430252326093249797923090282e-1 - 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-1000 i) == 8.813735870195430252326093249797923090282e-1 - 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-10000 i) == 8.813735870195430252326093249797923090282e-1 - 6.867047849047171855399183659351043150871e-3011 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-1025 i) == 8.813735870195430252326093249797923090282e-1 - 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-129 i) == 8.813735870195430252326093249797923090282e-1 - 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-16385 i) == 8.813735870195430252326093249797923090282e-1 - 5.757683115456107044131264955348448954458e-4933 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.0 - 0x1p500 i) == 3.472667374605326000180332928505464606058e2 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -730,11 +1844,37 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.5 + 0x1.fp-1025 i) == 1.194763217287109304111930828519090523536 + 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 + 0x1.fp-129 i) == 1.194763217287109304111930828519090523536 + 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 + 0x1.fp-16385 i) == 1.194763217287109304111930828519090523536 + 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.5 - 0 i) == 1.194763217287109304111930828519090523536 - 0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (1.5 - 0x1.fp-1025 i) == 1.194763217287109304111930828519090523536 - 2.989196569048182929051881765490354365918e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 - 0x1.fp-129 i) == 1.194763217287109304111930828519090523536 - 1.579176199917649005841160751101628985741e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.5 - 0x1.fp-16385 i) == 1.194763217287109304111930828519090523536 - 4.516698239814521372306784062043266700598e-4933 i": +ildouble: 1 +ldouble: 1 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -2475,6 +3615,12 @@ float: 2 ifloat: 2 ildouble: 1 ldouble: 1 +Test "j0 (0x1p1023) == -1.5665258060609012834424478437196679802783e-155": +ildouble: 1 +ldouble: 1 +Test "j0 (0x1p16383) == 9.5859502826270374691362975419147645151233e-2467": +ildouble: 2 +ldouble: 2 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 @@ -2515,6 +3661,15 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "j1 (0x1p1023) == 8.2687542933709649327986678723012001545638e-155": +ildouble: 1 +ldouble: 1 +Test "j1 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467": +ildouble: 1 +ldouble: 1 +Test "j1 (0x1p16383) == -3.8895531955766020648617743624167352352217e-2467": +ildouble: 2 +ldouble: 2 Test "j1 (1.0) == 0.440050585744933515959682203718914913": ildouble: 1 ldouble: 1 @@ -3115,6 +4270,15 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "y0 (0x1p1023) == 8.2687542933709649327986678723012001545638e-155": +ildouble: 1 +ldouble: 1 +Test "y0 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467": +ildouble: 1 +ldouble: 1 +Test "y0 (0x1p16383) == -3.8895531955766020648617743624167352352217e-2467": +ildouble: 2 +ldouble: 2 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 @@ -3159,6 +4323,12 @@ ldouble: 1 Test "y1 (0x1p-30) == -6.8356527557643159612937462812258975438856e+08": ildouble: 1 ldouble: 1 +Test "y1 (0x1p1023) == 1.5665258060609012834424478437196679802783e-155": +ildouble: 1 +ldouble: 1 +Test "y1 (0x1p16383) == -9.5859502826270374691362975419147645151233e-2467": +ildouble: 2 +ldouble: 2 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -3340,9 +4510,9 @@ ifloat: 1 Function: Real part of "cacos": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 1 ldouble: 1 @@ -3375,14 +4545,16 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "casin": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 3 -ldouble: 3 +ildouble: 1 +ldouble: 1 Function: Real part of "casinh": double: 5 @@ -3971,8 +5143,8 @@ double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 1 -ldouble: 1 +ildouble: 2 +ldouble: 2 Function: "yn": double: 3 diff --git a/sysdeps/sparc/sparc32/memchr.S b/sysdeps/sparc/sparc32/memchr.S index 295005dd8b..7ea7825381 100644 --- a/sysdeps/sparc/sparc32/memchr.S +++ b/sysdeps/sparc/sparc32/memchr.S @@ -139,7 +139,4 @@ ENTRY(__memchr) END(__memchr) weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif libc_hidden_builtin_def (memchr) diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile index 8a9330f7a6..7d475b0897 100644 --- a/sysdeps/sparc/sparc32/sparcv9/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/Makefile @@ -10,13 +10,11 @@ ASFLAGS-.o += -Wa,-Av9d ASFLAGS-.os += -Wa,-Av9d ASFLAGS-.op += -Wa,-Av9d ASFLAGS-.og += -Wa,-Av9d -ASFLAGS-.ob += -Wa,-Av9d ASFLAGS-.oS += -Wa,-Av9d else ASFLAGS-.o += -Wa,-Av9a ASFLAGS-.os += -Wa,-Av9a ASFLAGS-.op += -Wa,-Av9a ASFLAGS-.og += -Wa,-Av9a -ASFLAGS-.ob += -Wa,-Av9a ASFLAGS-.oS += -Wa,-Av9a endif diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile index 2b7b83035a..fb161ea13f 100644 --- a/sysdeps/sparc/sparc64/Makefile +++ b/sysdeps/sparc/sparc64/Makefile @@ -12,6 +12,5 @@ ASFLAGS-.o += -Wa,-Av9d ASFLAGS-.os += -Wa,-Av9d ASFLAGS-.op += -Wa,-Av9d ASFLAGS-.og += -Wa,-Av9d -ASFLAGS-.ob += -Wa,-Av9d ASFLAGS-.oS += -Wa,-Av9d endif diff --git a/sysdeps/sparc/sparc64/memchr.S b/sysdeps/sparc/sparc64/memchr.S index ee700b6e2b..0cd2573a07 100644 --- a/sysdeps/sparc/sparc64/memchr.S +++ b/sysdeps/sparc/sparc64/memchr.S @@ -256,7 +256,4 @@ ENTRY(__memchr) END(__memchr) weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif libc_hidden_builtin_def (memchr) diff --git a/sysdeps/unix/i386/sysdep.S b/sysdeps/unix/i386/sysdep.S index 249a11543e..24e0b1df4d 100644 --- a/sysdeps/unix/i386/sysdep.S +++ b/sysdeps/unix/i386/sysdep.S @@ -18,8 +18,6 @@ #include <sysdep.h> #define _ERRNO_H #include <bits/errno.h> -#include <bp-asm.h> -#include <bp-sym.h> #ifdef IS_IN_rtld # include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */ diff --git a/sysdeps/unix/inet/Subdirs b/sysdeps/unix/inet/Subdirs index 4a191e2993..0a02dd4447 100644 --- a/sysdeps/unix/inet/Subdirs +++ b/sysdeps/unix/inet/Subdirs @@ -4,4 +4,5 @@ hesiod sunrpc nis nscd +nss streams diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index ecd9c2c973..f82c94982e 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -35,7 +35,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ bits/a.out.h sys/inotify.h sys/signalfd.h sys/eventfd.h \ sys/timerfd.h sys/fanotify.h bits/eventfd.h bits/inotify.h \ bits/signalfd.h bits/timerfd.h bits/epoll.h \ - bits/socket_type.h bits/syscall.h bits/sysctl.h + bits/socket_type.h bits/syscall.h bits/sysctl.h \ + bits/mman-linux.h tests += tst-clone diff --git a/sysdeps/unix/sysv/linux/aio_sigqueue.c b/sysdeps/unix/sysv/linux/aio_sigqueue.c index 1cd5802d74..9af05e86af 100644 --- a/sysdeps/unix/sysv/linux/aio_sigqueue.c +++ b/sysdeps/unix/sysv/linux/aio_sigqueue.c @@ -47,8 +47,7 @@ __aio_sigqueue (sig, val, caller_pid) info.si_uid = getuid (); info.si_value = val; - return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, - sig, __ptrvalue (&info)); + return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, sig, &info); } #else # include <rt/aio_sigqueue.c> diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h new file mode 100644 index 0000000000..05d2d9237b --- /dev/null +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -0,0 +1,108 @@ +/* Definitions for POSIX memory map interface. Linux generic version. + Copyright (C) 2001-2013 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 _SYS_MMAN_H +# error "Never use <bits/mman-linux.h> directly; include <sys/mman.h> instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ +#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of + growsdown vma (mprotect only). */ +#define PROT_GROWSUP 0x02000000 /* Extend change to start of + growsup vma (mprotect only). */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# ifdef __MAP_ANONYMOUS +# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */ +# else +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# endif +# define MAP_ANON MAP_ANONYMOUS +/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ +# define MAP_HUGE_SHIFT 26 +# define MAP_HUGE_MASK 0x3f +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +# define MADV_REMOVE 9 /* Remove these pages and resources. */ +# define MADV_DONTFORK 10 /* Do not inherit across fork. */ +# define MADV_DOFORK 11 /* Do inherit across fork. */ +# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ +# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ +# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ +# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ +# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, + overrides the coredump filter bits. */ +# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ +# define MADV_HWPOISON 100 /* Poison a page for testing. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* Flags for `mlockall'. */ +#ifndef MCL_CURRENT +# define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +# define MCL_FUTURE 2 /* Lock all additions to address + space. */ +#endif diff --git a/sysdeps/unix/sysv/linux/bits/msq.h b/sysdeps/unix/sysv/linux/bits/msq.h index bd005fb10e..8f6eb8a7d0 100644 --- a/sysdeps/unix/sysv/linux/bits/msq.h +++ b/sysdeps/unix/sysv/linux/bits/msq.h @@ -25,6 +25,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c index a4ca119d8b..e80cb8d9f0 100644 --- a/sysdeps/unix/sysv/linux/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/dl-sysdep.c @@ -43,7 +43,7 @@ int attribute_hidden _dl_discover_osversion (void) { -#if (defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO) && defined SHARED +#if defined NEED_DL_SYSINFO_DSO && defined SHARED if (GLRO(dl_sysinfo_map) != NULL) { /* If the kernel-supplied DSO contains a note indicating the kernel's diff --git a/sysdeps/unix/sysv/linux/execve.c b/sysdeps/unix/sysv/linux/execve.c index 4aae3b4302..5ee5ecbe55 100644 --- a/sysdeps/unix/sysv/linux/execve.c +++ b/sysdeps/unix/sysv/linux/execve.c @@ -21,7 +21,8 @@ #include <sysdep.h> #include <alloca.h> #include <sys/syscall.h> -#include <bp-checks.h> + +/* Consider moving to syscalls.list. */ int __execve (file, argv, envp) @@ -29,34 +30,6 @@ __execve (file, argv, envp) char *const argv[]; char *const envp[]; { -#if __BOUNDED_POINTERS__ - { - char *const *v; - int i; - char *__unbounded *__unbounded ubp_argv; - char *__unbounded *__unbounded ubp_envp; - char *__unbounded *__unbounded ubp_v; - - for (v = argv; *v; v++) - ; - i = v - argv + 1; - ubp_argv = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_argv) * i); - for (v = argv, ubp_v = ubp_argv; --i; v++, ubp_v++) - *ubp_v = CHECK_STRING (*v); - *ubp_v = 0; - - for (v = envp; *v; v++) - ; - i = v - envp + 1; - ubp_envp = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_envp) * i); - for (v = envp, ubp_v = ubp_envp; --i; v++, ubp_v++) - *ubp_v = CHECK_STRING (*v); - *ubp_v = 0; - - return INLINE_SYSCALL (execve, 3, CHECK_STRING (file), ubp_argv, ubp_envp); - } -#else return INLINE_SYSCALL (execve, 3, file, argv, envp); -#endif } weak_alias (__execve, execve) diff --git a/sysdeps/unix/sysv/linux/fips-private.h b/sysdeps/unix/sysv/linux/fips-private.h index ceae4891c6..271dca3e5f 100644 --- a/sysdeps/unix/sysv/linux/fips-private.h +++ b/sysdeps/unix/sysv/linux/fips-private.h @@ -29,7 +29,7 @@ /* Return true if FIPS mode is enabled. See sysdeps/generic/fips-private.h for more information. */ -static inline bool +static bool fips_enabled_p (void) { static enum diff --git a/sysdeps/unix/sysv/linux/fpathconf.c b/sysdeps/unix/sysv/linux/fpathconf.c index c97164468e..e8c4dc972d 100644 --- a/sysdeps/unix/sysv/linux/fpathconf.c +++ b/sysdeps/unix/sysv/linux/fpathconf.c @@ -33,7 +33,6 @@ __fpathconf (fd, name) int name; { struct statfs fsbuf; - int r; switch (name) { @@ -49,12 +48,6 @@ __fpathconf (fd, name) case _PC_CHOWN_RESTRICTED: return __statfs_chown_restricted (__fstatfs (fd, &fsbuf), &fsbuf); - case _PC_PIPE_BUF: - r = __fcntl (fd, F_GETPIPE_SZ); - if (r > 0) - return r; - /* FALLTHROUGH */ - default: return posix_fpathconf (fd, name); } diff --git a/sysdeps/unix/sysv/linux/fxstat.c b/sysdeps/unix/sysv/linux/fxstat.c index d2dd109107..3623fdf1c1 100644 --- a/sysdeps/unix/sysv/linux/fxstat.c +++ b/sysdeps/unix/sysv/linux/fxstat.c @@ -28,7 +28,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <xstatconv.h> @@ -37,7 +36,7 @@ int __fxstat (int vers, int fd, struct stat *buf) { if (vers == _STAT_VER_KERNEL) - return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 ((struct kernel_stat *) buf)); + return INLINE_SYSCALL (fstat, 2, fd, (struct kernel_stat *) buf); #ifdef STAT_IS_KERNEL_STAT errno = EINVAL; @@ -46,7 +45,7 @@ __fxstat (int vers, int fd, struct stat *buf) struct kernel_stat kbuf; int result; - result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf)); + result = INLINE_SYSCALL (fstat, 2, fd, &kbuf); if (result == 0) result = __xstat_conv (vers, &kbuf, buf); diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c index a13beeba5e..3cb1c35037 100644 --- a/sysdeps/unix/sysv/linux/fxstat64.c +++ b/sysdeps/unix/sysv/linux/fxstat64.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -33,7 +32,7 @@ int ___fxstat64 (int vers, int fd, struct stat64 *buf) { int result; - result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (buf)); + result = INLINE_SYSCALL (fstat64, 2, fd, buf); #if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) buf->st_ino = buf->__st_ino; diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c index 1cb4acfd2e..b8bd8a5c16 100644 --- a/sysdeps/unix/sysv/linux/fxstatat.c +++ b/sysdeps/unix/sysv/linux/fxstatat.c @@ -29,7 +29,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> #include <xstatconv.h> @@ -109,11 +108,11 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (vers == _STAT_VER_KERNEL) { if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file), - CHECK_1 ((struct kernel_stat *) st)); + result = INTERNAL_SYSCALL (lstat, err, 2, file, + (struct kernel_stat *) st); else - result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file), - CHECK_1 ((struct kernel_stat *) st)); + result = INTERNAL_SYSCALL (stat, err, 2, file, + (struct kernel_stat *) st); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return result; @@ -126,11 +125,9 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) } #else if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file), - __ptrvalue (&kst)); + result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); else - result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file), - __ptrvalue (&kst)); + result = INTERNAL_SYSCALL (stat, err, 2, file, &kst); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return __xstat_conv (vers, &kst, st); diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c index 4837b733ee..abd39ea906 100644 --- a/sysdeps/unix/sysv/linux/fxstatat64.c +++ b/sysdeps/unix/sysv/linux/fxstatat64.c @@ -25,7 +25,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -99,11 +98,9 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag) } if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file), - CHECK_1 (st)); + result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); else - result = INTERNAL_SYSCALL (stat64, err, 2, CHECK_STRING (file), - CHECK_1 (st)); + result = INTERNAL_SYSCALL (stat64, err, 2, file, st); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) { # if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 diff --git a/sysdeps/unix/sysv/linux/gai_sigqueue.c b/sysdeps/unix/sysv/linux/gai_sigqueue.c index 5097dc730e..5c8cb44987 100644 --- a/sysdeps/unix/sysv/linux/gai_sigqueue.c +++ b/sysdeps/unix/sysv/linux/gai_sigqueue.c @@ -47,8 +47,7 @@ __gai_sigqueue (sig, val, caller_pid) info.si_uid = __getuid (); info.si_value = val; - return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, - sig, __ptrvalue (&info)); + return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, sig, &info); } #else # include <resolv/gai_sigqueue.c> diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c index 72fb0c96ad..212b6b7a21 100644 --- a/sysdeps/unix/sysv/linux/getcwd.c +++ b/sysdeps/unix/sysv/linux/getcwd.c @@ -26,7 +26,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -78,7 +77,7 @@ __getcwd (char *buf, size_t size) int retval; - retval = INLINE_SYSCALL (getcwd, 2, CHECK_STRING (path), alloc_size); + retval = INLINE_SYSCALL (getcwd, 2, path, alloc_size); if (retval >= 0) { #ifndef NO_ALLOCATION diff --git a/sysdeps/unix/sysv/linux/getdents.c b/sysdeps/unix/sysv/linux/getdents.c index eebdee8eca..2d588a6021 100644 --- a/sysdeps/unix/sysv/linux/getdents.c +++ b/sysdeps/unix/sysv/linux/getdents.c @@ -28,7 +28,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -109,7 +108,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes) && (offsetof (struct kernel_dirent, d_reclen) == offsetof (struct dirent, d_reclen))) { - retval = INLINE_SYSCALL (getdents, 3, fd, CHECK_N(buf, nbytes), nbytes); + retval = INLINE_SYSCALL (getdents, 3, fd, buf, nbytes); /* The kernel added the d_type value after the name. Change this now. */ @@ -158,8 +157,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes) - offsetof (DIRENT_TYPE, d_name); kbuf = __alloca(kbytes); } - retval = INLINE_SYSCALL (getdents64, 3, fd, CHECK_N(kbuf, kbytes), - kbytes); + retval = INLINE_SYSCALL (getdents64, 3, fd, kbuf, kbytes); # ifndef __ASSUME_GETDENTS64_SYSCALL if (retval != -1 || (errno != EINVAL && errno != ENOSYS)) # endif @@ -255,8 +253,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes) skdp = kdp = __alloca (red_nbytes); - retval = INLINE_SYSCALL (getdents, 3, fd, - CHECK_N ((char *) kdp, red_nbytes), red_nbytes); + retval = INLINE_SYSCALL (getdents, 3, fd, (char *) kdp, red_nbytes); if (retval == -1) return -1; diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c index eea4e02b0e..880542a61b 100644 --- a/sysdeps/unix/sysv/linux/i386/brk.c +++ b/sysdeps/unix/sysv/linux/i386/brk.c @@ -20,8 +20,6 @@ #include <unistd.h> #include <sysdep.h> -#include <bp-checks.h> - /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; @@ -33,11 +31,10 @@ weak_alias (__curbrk, ___brk_addr) int __brk (void *addr) { - void *__unbounded newbrk; + void *newbrk; INTERNAL_SYSCALL_DECL (err); - newbrk = (void *__unbounded) INTERNAL_SYSCALL (brk, err, 1, - __ptrvalue (addr)); + newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr); __curbrk = newbrk; diff --git a/sysdeps/unix/sysv/linux/i386/chown.c b/sysdeps/unix/sysv/linux/i386/chown.c index bb6d7009c3..94f294007e 100644 --- a/sysdeps/unix/sysv/linux/i386/chown.c +++ b/sysdeps/unix/sysv/linux/i386/chown.c @@ -21,7 +21,6 @@ #include <sysdep.h> #include <sys/syscall.h> #include <shlib-compat.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -45,7 +44,7 @@ extern int __real_chown (const char *__file, uid_t __owner, gid_t __group); int __real_chown (const char *file, uid_t owner, gid_t group) { - return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); + return INLINE_SYSCALL (chown32, 3, file, owner, group); } diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S index 4df18c8be9..dbd65d8da6 100644 --- a/sysdeps/unix/sysv/linux/i386/clone.S +++ b/sysdeps/unix/sysv/linux/i386/clone.S @@ -23,20 +23,18 @@ #define _ERRNO_H 1 #include <bits/errno.h> #include <asm-syntax.h> -#include <bp-sym.h> -#include <bp-asm.h> /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, pid_t *ptid, struct user_desc *tls, pid_t *ctid); */ -#define PARMS LINKAGE /* no space for saved regs */ +#define PARMS 4 /* no space for saved regs */ #define FUNC PARMS #define STACK FUNC+4 -#define FLAGS STACK+PTR_SIZE +#define FLAGS STACK+4 #define ARG FLAGS+4 -#define PTID ARG+PTR_SIZE -#define TLS PTID+PTR_SIZE -#define CTID TLS+PTR_SIZE +#define PTID ARG+4 +#define TLS PTID+4 +#define CTID TLS+4 #define __NR_clone 120 #define SYS_clone 120 @@ -45,7 +43,7 @@ #define CLONE_THREAD 0x00010000 .text -ENTRY (BP_SYM (__clone)) +ENTRY (__clone) /* Sanity check arguments. */ movl $-EINVAL,%eax movl FUNC(%esp),%ecx /* no NULL function pointers */ @@ -156,6 +154,6 @@ L(nomoregetpid): cfi_endproc; cfi_startproc -PSEUDO_END (BP_SYM (__clone)) +PSEUDO_END (__clone) -weak_alias (BP_SYM (__clone), BP_SYM (clone)) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/i386/fchownat.c b/sysdeps/unix/sysv/linux/i386/fchownat.c index 8dab70022b..4a8288b378 100644 --- a/sysdeps/unix/sysv/linux/i386/fchownat.c +++ b/sysdeps/unix/sysv/linux/i386/fchownat.c @@ -24,7 +24,6 @@ #include <sysdep.h> #include <sys/syscall.h> #include <shlib-compat.h> -#include <bp-checks.h> #include <linux/posix_types.h> #include <kernel-features.h> @@ -86,11 +85,9 @@ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) INTERNAL_SYSCALL_DECL (err); if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, - group); + result = INTERNAL_SYSCALL (lchown32, err, 3, file, owner, group); else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); + result = INTERNAL_SYSCALL (chown32, err, 3, file, owner, group); if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c index 0ab94f53d2..4f34a4cefe 100644 --- a/sysdeps/unix/sysv/linux/i386/fxstat.c +++ b/sysdeps/unix/sysv/linux/i386/fxstat.c @@ -27,7 +27,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -40,12 +39,12 @@ __fxstat (int vers, int fd, struct stat *buf) int result; if (vers == _STAT_VER_KERNEL) - return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 ((struct kernel_stat *) buf)); + return INLINE_SYSCALL (fstat, 2, fd, (struct kernel_stat *) buf); { struct stat64 buf64; - result = INLINE_SYSCALL (fstat64, 2, fd, __ptrvalue (&buf64)); + result = INLINE_SYSCALL (fstat64, 2, fd, &buf64); if (result == 0) result = __xstat32_conv (vers, &buf64, buf); return result; diff --git a/sysdeps/unix/sysv/linux/i386/fxstatat.c b/sysdeps/unix/sysv/linux/i386/fxstatat.c index 866a6bc555..7ecbbe0891 100644 --- a/sysdeps/unix/sysv/linux/i386/fxstatat.c +++ b/sysdeps/unix/sysv/linux/i386/fxstatat.c @@ -29,7 +29,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -102,20 +101,18 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) if (vers == _STAT_VER_KERNEL) { if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file), - CHECK_1 ((struct kernel_stat *) st)); + result = INTERNAL_SYSCALL (lstat, err, 2, file, + (struct kernel_stat *) st); else - result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file), - CHECK_1 ((struct kernel_stat *) st)); + result = INTERNAL_SYSCALL (stat, err, 2, file, + (struct kernel_stat *) st); goto out; } if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file), - __ptrvalue (&st64)); + result = INTERNAL_SYSCALL (lstat64, err, 2, file, &st64); else - result = INTERNAL_SYSCALL (stat64, err, 2, CHECK_STRING (file), - __ptrvalue (&st64)); + result = INTERNAL_SYSCALL (stat64, err, 2, file, &st64); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) return __xstat32_conv (vers, &st64, st); diff --git a/sysdeps/unix/sysv/linux/i386/getgroups.c b/sysdeps/unix/sysv/linux/i386/getgroups.c index c7e44fd03b..7d85f8f39b 100644 --- a/sysdeps/unix/sysv/linux/i386/getgroups.c +++ b/sysdeps/unix/sysv/linux/i386/getgroups.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -34,7 +33,7 @@ int __getgroups (int n, gid_t *groups) { - return INLINE_SYSCALL (getgroups32, 2, n, CHECK_N (groups, n)); + return INLINE_SYSCALL (getgroups32, 2, n, groups); } weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/linux/i386/getresgid.c b/sysdeps/unix/sysv/linux/i386/getresgid.c index e0b6999dd4..bdc3b82b69 100644 --- a/sysdeps/unix/sysv/linux/i386/getresgid.c +++ b/sysdeps/unix/sysv/linux/i386/getresgid.c @@ -23,15 +23,13 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Consider moving to syscalls.list. */ int __getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid) { - return INLINE_SYSCALL (getresgid32, 3, CHECK_1 (rgid), - CHECK_1 (egid), CHECK_1 (sgid)); + return INLINE_SYSCALL (getresgid32, 3, rgid, egid, sgid); } libc_hidden_def (__getresgid) weak_alias (__getresgid, getresgid) diff --git a/sysdeps/unix/sysv/linux/i386/getresuid.c b/sysdeps/unix/sysv/linux/i386/getresuid.c index 5a06ad68d8..49b3302840 100644 --- a/sysdeps/unix/sysv/linux/i386/getresuid.c +++ b/sysdeps/unix/sysv/linux/i386/getresuid.c @@ -23,15 +23,13 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Consider moving to syscalls.list. */ int __getresuid (uid_t *ruid, uid_t *euid, uid_t *suid) { - return INLINE_SYSCALL (getresuid32, 3, CHECK_1 (ruid), - CHECK_1 (euid), CHECK_1 (suid)); + return INLINE_SYSCALL (getresuid32, 3, ruid, euid, suid); } libc_hidden_def (__getresuid) weak_alias (__getresuid, getresuid) diff --git a/sysdeps/unix/sysv/linux/i386/lchown.c b/sysdeps/unix/sysv/linux/i386/lchown.c index 9357df4b49..0b7073c14a 100644 --- a/sysdeps/unix/sysv/linux/i386/lchown.c +++ b/sysdeps/unix/sysv/linux/i386/lchown.c @@ -20,7 +20,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -29,7 +28,7 @@ int __lchown (const char *file, uid_t owner, gid_t group) { - return INLINE_SYSCALL (lchown32, 3, CHECK_STRING (file), owner, group); + return INLINE_SYSCALL (lchown32, 3, file, owner, group); } weak_alias (__lchown, lchown) diff --git a/sysdeps/unix/sysv/linux/i386/lxstat.c b/sysdeps/unix/sysv/linux/i386/lxstat.c index a3d42d49f4..8e595b1b58 100644 --- a/sysdeps/unix/sysv/linux/i386/lxstat.c +++ b/sysdeps/unix/sysv/linux/i386/lxstat.c @@ -27,7 +27,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -41,12 +40,12 @@ __lxstat (int vers, const char *name, struct stat *buf) int result; if (vers == _STAT_VER_KERNEL) - return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), CHECK_1 ((struct kernel_stat *) buf)); + return INLINE_SYSCALL (lstat, 2, name, (struct kernel_stat *) buf); { struct stat64 buf64; - result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), __ptrvalue (&buf64)); + result = INLINE_SYSCALL (lstat64, 2, name, &buf64); if (result == 0) result = __xstat32_conv (vers, &buf64, buf); return result; diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S index 4f9c7856f1..31a0f67827 100644 --- a/sysdeps/unix/sysv/linux/i386/mmap64.S +++ b/sysdeps/unix/sysv/linux/i386/mmap64.S @@ -16,8 +16,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #include <kernel-features.h> @@ -25,9 +23,9 @@ #define ENOSYS 38 #define SVRSP 16 /* saved register space */ -#define PARMS LINKAGE+SVRSP /* space for 4 saved regs */ +#define PARMS 4+SVRSP /* space for 4 saved regs */ #define ADDR PARMS -#define LEN ADDR+PTR_SIZE +#define LEN ADDR+4 #define PROT LEN+4 #define FLAGS PROT+4 #define FD FLAGS+4 @@ -35,7 +33,7 @@ #define OFFHI OFFLO+4 .text -ENTRY (BP_SYM (__mmap64)) +ENTRY (__mmap64) /* Save registers. */ pushl %ebp @@ -115,6 +113,6 @@ L(einval): movl $-EINVAL, %eax jmp SYSCALL_ERROR_LABEL -PSEUDO_END (BP_SYM (__mmap64)) +PSEUDO_END (__mmap64) -weak_alias (BP_SYM (__mmap64), BP_SYM (mmap64)) +weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/i386/msgctl.c b/sysdeps/unix/sysv/linux/i386/msgctl.c index 37cfcb6fce..e0af4e3e93 100644 --- a/sysdeps/unix/sysv/linux/i386/msgctl.c +++ b/sysdeps/unix/sysv/linux/i386/msgctl.c @@ -23,20 +23,19 @@ #include <sysdep.h> #include <string.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <shlib-compat.h> struct __old_msqid_ds { struct __old_ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__unbounded __msg_first; /* pointer to first message on queue */ - struct msg *__unbounded __msg_last; /* pointer to last message on queue */ + struct msg *__msg_first; /* pointer to first message on queue */ + struct msg *__msg_last; /* pointer to last message on queue */ __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgrcv command */ __time_t msg_ctime; /* time of last change */ - struct wait_queue *__unbounded __wwait; /* ??? */ - struct wait_queue *__unbounded __rwait; /* ??? */ + struct wait_queue *__wwait; /* ??? */ + struct wait_queue *__rwait; /* ??? */ unsigned short int __msg_cbytes; /* current number of bytes on queue */ unsigned short int msg_qnum; /* number of messages currently on queue */ unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ @@ -56,8 +55,7 @@ int attribute_compat_text_section __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf) { - return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, - msqid, cmd, 0, CHECK_1 (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf); } compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0); #endif @@ -66,7 +64,7 @@ int __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) { return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, - msqid, cmd | __IPC_64, 0, CHECK_1 (buf)); + msqid, cmd | __IPC_64, 0, buf); } versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist index 67d592959b..3cb314ddfc 100644 --- a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist @@ -1819,6 +1819,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S b/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S index 5f9de9d80e..6c42c610f7 100644 --- a/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S +++ b/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S @@ -16,15 +16,13 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #define EINVAL 22 #define ENOSYS 38 #define EOVERFLOW 75 #define SVRSP 16 /* saved register space */ -#define PARMS LINKAGE+SVRSP /* space for 4 saved regs */ +#define PARMS 4+SVRSP /* space for 4 saved regs */ #define FD PARMS #define OFFLO FD+4 #define OFFHI OFFLO+4 @@ -33,7 +31,7 @@ #define FLAGS LENHI+4 .text -ENTRY (BP_SYM (__posix_fadvise64_l64)) +ENTRY (__posix_fadvise64_l64) /* Save registers. */ pushl %ebp @@ -81,7 +79,7 @@ ENTRY (BP_SYM (__posix_fadvise64_l64)) /* Successful; return the syscall's value. */ ret -END (BP_SYM (__posix_fadvise64_l64)) +END (__posix_fadvise64_l64) .section .text.compat, "ax" ENTRY (__posix_fadvise64_l32) diff --git a/sysdeps/unix/sysv/linux/i386/semtimedop.S b/sysdeps/unix/sysv/linux/i386/semtimedop.S index 01250f65e7..35eb4a8725 100644 --- a/sysdeps/unix/sysv/linux/i386/semtimedop.S +++ b/sysdeps/unix/sysv/linux/i386/semtimedop.S @@ -21,14 +21,14 @@ #define SYSOP_semtimedop 4 #define SVRSP 12 /* saved register space */ -#define PARMS LINKAGE+SVRSP /* space for 3 saved regs */ +#define PARMS 4+SVRSP /* space for 3 saved regs */ #define SEMID PARMS #define SOPS SEMID+4 -#define NSOPS SOPS+PTR_SIZE +#define NSOPS SOPS+4 #define TIMEOUT NSOPS+4 .text -ENTRY (BP_SYM (semtimedop)) +ENTRY (semtimedop) pushl %ebp cfi_adjust_cfa_offset (4) @@ -70,4 +70,4 @@ ENTRY (BP_SYM (semtimedop)) #ifdef PIC .align 4 #endif -PSEUDO_END (BP_SYM (semtimedop)) +PSEUDO_END (semtimedop) diff --git a/sysdeps/unix/sysv/linux/i386/setgroups.c b/sysdeps/unix/sysv/linux/i386/setgroups.c index c0895a19b0..701ce6ee7b 100644 --- a/sysdeps/unix/sysv/linux/i386/setgroups.c +++ b/sysdeps/unix/sysv/linux/i386/setgroups.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <setxid.h> #include <linux/posix_types.h> @@ -33,6 +32,6 @@ int setgroups (size_t n, const gid_t *groups) { - return INLINE_SETXID_SYSCALL (setgroups32, 2, n, CHECK_N (groups, n)); + return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups); } libc_hidden_def (setgroups) diff --git a/sysdeps/unix/sysv/linux/i386/setrlimit.c b/sysdeps/unix/sysv/linux/i386/setrlimit.c index cc11847108..0fe31e19df 100644 --- a/sysdeps/unix/sysv/linux/i386/setrlimit.c +++ b/sysdeps/unix/sysv/linux/i386/setrlimit.c @@ -22,17 +22,16 @@ #include <sysdep.h> #include <sys/syscall.h> #include <shlib-compat.h> -#include <bp-checks.h> extern int __new_setrlimit (enum __rlimit_resource resource, - const struct rlimit *__unboundedrlimits); + const struct rlimit *rlimits); /* Consider moving to syscalls.list. */ int __new_setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits) { - return INLINE_SYSCALL (setrlimit, 2, resource, CHECK_1 (rlimits)); + return INLINE_SYSCALL (setrlimit, 2, resource, rlimits); } weak_alias (__new_setrlimit, __setrlimit); diff --git a/sysdeps/unix/sysv/linux/i386/shmctl.c b/sysdeps/unix/sysv/linux/i386/shmctl.c index 15f055d845..8459dff321 100644 --- a/sysdeps/unix/sysv/linux/i386/shmctl.c +++ b/sysdeps/unix/sysv/linux/i386/shmctl.c @@ -24,7 +24,6 @@ #include <string.h> #include <sys/syscall.h> #include <bits/wordsize.h> -#include <bp-checks.h> #include <shlib-compat.h> @@ -39,8 +38,8 @@ struct __old_shmid_ds __ipc_pid_t shm_lpid; /* pid of last shmop */ unsigned short int shm_nattch; /* number of current attaches */ unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ }; struct __old_shminfo @@ -63,8 +62,7 @@ int attribute_compat_text_section __old_shmctl (int shmid, int cmd, struct __old_shmid_ds *buf) { - return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, - shmid, cmd, 0, CHECK_1 (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf); } compat_symbol (libc, __old_shmctl, shmctl, GLIBC_2_0); #endif @@ -73,7 +71,7 @@ int __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) { return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, - shmid, cmd | __IPC_64, 0, CHECK_1 (buf)); + shmid, cmd | __IPC_64, 0, buf); } versioned_symbol (libc, __new_shmctl, shmctl, GLIBC_2_2); diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index 6b70b1541c..d2bac9122a 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -72,8 +72,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ result = INLINE_SYSCALL (rt_sigaction, 4, - sig, act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + sig, act ? &kact : NULL, + oact ? &koact : NULL, _NSIG / 8); if (oact && result >= 0) { diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 071da71408..684fe27d69 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -21,8 +21,6 @@ /* There is some commonality. */ #include <sysdeps/unix/i386/sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ #include <dl-sysdep.h> #include <tls.h> diff --git a/sysdeps/unix/sysv/linux/i386/xstat.c b/sysdeps/unix/sysv/linux/i386/xstat.c index 4e7354aaa6..e2abe8bb95 100644 --- a/sysdeps/unix/sysv/linux/i386/xstat.c +++ b/sysdeps/unix/sysv/linux/i386/xstat.c @@ -27,7 +27,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -41,12 +40,12 @@ __xstat (int vers, const char *name, struct stat *buf) int result; if (vers == _STAT_VER_KERNEL) - return INLINE_SYSCALL (stat, 2, CHECK_STRING (name), CHECK_1 ((struct kernel_stat *) buf)); + return INLINE_SYSCALL (stat, 2, name, (struct kernel_stat *) buf); { struct stat64 buf64; - result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), __ptrvalue (&buf64)); + result = INLINE_SYSCALL (stat64, 2, name, &buf64); if (result == 0) result = __xstat32_conv (vers, &buf64, buf); return result; diff --git a/sysdeps/unix/sysv/linux/internal_statvfs.c b/sysdeps/unix/sysv/linux/internal_statvfs.c index 4cd4f042c9..45a66b83d5 100644 --- a/sysdeps/unix/sysv/linux/internal_statvfs.c +++ b/sysdeps/unix/sysv/linux/internal_statvfs.c @@ -117,6 +117,12 @@ __statvfs_getflags (const char *name, int fstype, struct stat64 *st) case LUSTRE_SUPER_MAGIC: fsname = "lustre"; break; + case F2FS_SUPER_MAGIC: + fsname = "f2fs"; + break; + case EFIVARFS_MAGIC: + fsname = "efivarfs"; + break; } FILE *mtab = __setmntent ("/proc/mounts", "r"); diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 21eef4372f..8fdff7e381 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -187,6 +187,11 @@ # define __ASSUME_PWRITEV 1 #endif +/* Support for FUTEX_*_REQUEUE_PI was added in 2.6.31. */ +#if __LINUX_KERNEL_VERSION >= 0x02061f +# define __ASSUME_REQUEUE_PI 1 +#endif + /* Support for F_GETOWN_EX was introduced in 2.6.32. */ #if __LINUX_KERNEL_VERSION >= 0x020620 # define __ASSUME_F_GETOWN_EX 1 diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h index 081fa01f80..18ff8528c2 100644 --- a/sysdeps/unix/sysv/linux/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/ldsodefs.h @@ -29,12 +29,6 @@ /* We have the auxiliary vector. */ #define HAVE_AUX_VECTOR -/* Used by static binaries to check the auxiliary vector. */ -extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function; - -/* Initialization which is normally done by the dynamic linker. */ -extern void _dl_non_dynamic_init (void) internal_function; - /* We can assume that the kernel always provides the AT_UID, AT_EUID, AT_GID, and AT_EGID values in the auxiliary vector from 2.4.0 or so on. */ #define HAVE_AUX_XID diff --git a/sysdeps/unix/sysv/linux/libc_fatal.c b/sysdeps/unix/sysv/linux/libc_fatal.c index bac4b87411..84429cdae0 100644 --- a/sysdeps/unix/sysv/linux/libc_fatal.c +++ b/sysdeps/unix/sysv/linux/libc_fatal.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1993-2013 Free Software Foundation, Inc. +/* Catastrophic failure reports. Linux version. + Copyright (C) 1993-2013 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 @@ -15,195 +16,52 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <atomic.h> #include <errno.h> -#include <fcntl.h> -#include <ldsodefs.h> -#include <paths.h> -#include <stdarg.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sysdep.h> -#include <unistd.h> -#include <sys/mman.h> -#include <sys/syslog.h> #include <execinfo.h> - -/* Abort with an error message. */ +#include <fcntl.h> #include <not-cancel.h> +#include <sys/mman.h> +#include <sys/uio.h> -#ifdef FATAL_PREPARE_INCLUDE -#include FATAL_PREPARE_INCLUDE -#endif - -struct str_list +static bool +writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) { - const char *str; - size_t len; - struct str_list *next; -}; - + INTERNAL_SYSCALL_DECL (err); + ssize_t cnt; + do + cnt = INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov); + while (INTERNAL_SYSCALL_ERROR_P (cnt, err) + && INTERNAL_SYSCALL_ERRNO (cnt, err) == EINTR); + return cnt == total; +} +#define WRITEV_FOR_FATAL writev_for_fatal -/* Abort with an error message. */ -void -__libc_message (int do_abort, const char *fmt, ...) +static void +backtrace_and_maps (int do_abort, bool written, int fd) { - va_list ap; - va_list ap_copy; - int fd = -1; - - va_start (ap, fmt); - va_copy (ap_copy, ap); - -#ifdef FATAL_PREPARE - FATAL_PREPARE; -#endif - - /* Open a descriptor for /dev/tty unless the user explicitly - requests errors on standard error. */ - const char *on_2 = __libc_secure_getenv ("LIBC_FATAL_STDERR_"); - if (on_2 == NULL || *on_2 == '\0') - fd = open_not_cancel_2 (_PATH_TTY, O_RDWR | O_NOCTTY | O_NDELAY); - - if (fd == -1) - fd = STDERR_FILENO; - - struct str_list *list = NULL; - int nlist = 0; - - const char *cp = fmt; - while (*cp != '\0') - { - /* Find the next "%s" or the end of the string. */ - const char *next = cp; - while (next[0] != '%' || next[1] != 's') - { - next = __strchrnul (next + 1, '%'); - - if (next[0] == '\0') - break; - } - - /* Determine what to print. */ - const char *str; - size_t len; - if (cp[0] == '%' && cp[1] == 's') - { - str = va_arg (ap, const char *); - len = strlen (str); - cp += 2; - } - else - { - str = cp; - len = next - cp; - cp = next; - } - - struct str_list *newp = alloca (sizeof (struct str_list)); - newp->str = str; - newp->len = len; - newp->next = list; - list = newp; - ++nlist; - } - - bool written = false; - if (nlist > 0) - { - struct iovec *iov = alloca (nlist * sizeof (struct iovec)); - ssize_t total = 0; - - for (int cnt = nlist - 1; cnt >= 0; --cnt) - { - iov[cnt].iov_base = (void *) list->str; - iov[cnt].iov_len = list->len; - total += list->len; - list = list->next; - } - - INTERNAL_SYSCALL_DECL (err); - ssize_t cnt; - do - cnt = INTERNAL_SYSCALL (writev, err, 3, fd, iov, nlist); - while (INTERNAL_SYSCALL_ERROR_P (cnt, err) - && INTERNAL_SYSCALL_ERRNO (cnt, err) == EINTR); - - if (cnt == total) - written = true; - - if (do_abort) - { - total = ((total + 1 + GLRO(dl_pagesize) - 1) - & ~(GLRO(dl_pagesize) - 1)); - struct abort_msg_s *buf = __mmap (NULL, total, - PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); - if (__builtin_expect (buf != MAP_FAILED, 1)) - { - buf->size = total; - char *wp = buf->msg; - for (int cnt = 0; cnt < nlist; ++cnt) - wp = mempcpy (wp, iov[cnt].iov_base, iov[cnt].iov_len); - *wp = '\0'; - - /* We have to free the old buffer since the application might - catch the SIGABRT signal. */ - struct abort_msg_s *old = atomic_exchange_acq (&__abort_msg, - buf); - if (old != NULL) - __munmap (old, old->size); - } - } - } - - va_end (ap); - - /* If we had no success writing the message, use syslog. */ - if (! written) - vsyslog (LOG_ERR, fmt, ap_copy); - - va_end (ap_copy); - - if (do_abort) + if (do_abort > 1 && written) { - if (do_abort > 1 && written) - { - void *addrs[64]; + void *addrs[64]; #define naddrs (sizeof (addrs) / sizeof (addrs[0])) - int n = __backtrace (addrs, naddrs); - if (n > 2) - { + int n = __backtrace (addrs, naddrs); + if (n > 2) + { #define strnsize(str) str, strlen (str) #define writestr(str) write_not_cancel (fd, str) - writestr (strnsize ("======= Backtrace: =========\n")); - __backtrace_symbols_fd (addrs + 1, n - 1, fd); - - writestr (strnsize ("======= Memory map: ========\n")); - int fd2 = open_not_cancel_2 ("/proc/self/maps", O_RDONLY); - char buf[1024]; - ssize_t n2; - while ((n2 = read_not_cancel (fd2, buf, sizeof (buf))) > 0) - if (write_not_cancel (fd, buf, n2) != n2) - break; - close_not_cancel_no_status (fd2); - } - } - - /* Terminate the process. */ - abort (); + writestr (strnsize ("======= Backtrace: =========\n")); + __backtrace_symbols_fd (addrs + 1, n - 1, fd); + + writestr (strnsize ("======= Memory map: ========\n")); + int fd2 = open_not_cancel_2 ("/proc/self/maps", O_RDONLY); + char buf[1024]; + ssize_t n2; + while ((n2 = read_not_cancel (fd2, buf, sizeof (buf))) > 0) + if (write_not_cancel (fd, buf, n2) != n2) + break; + close_not_cancel_no_status (fd2); + } } } +#define BEFORE_ABORT backtrace_and_maps - -void -__libc_fatal (message) - const char *message; -{ - /* The loop is added only to keep gcc happy. */ - while (1) - __libc_message (1, "%s", message); -} -libc_hidden_def (__libc_fatal) +#include <sysdeps/posix/libc_fatal.c> diff --git a/sysdeps/unix/sysv/linux/linux_fsinfo.h b/sysdeps/unix/sysv/linux/linux_fsinfo.h index 1bcd9e2b27..2312b4702a 100644 --- a/sysdeps/unix/sysv/linux/linux_fsinfo.h +++ b/sysdeps/unix/sysv/linux/linux_fsinfo.h @@ -61,9 +61,15 @@ #define EFS_SUPER_MAGIC 0x414a53 #define EFS_MAGIC 0x072959 +/* Constants that identifies the `evivar' filesystem. */ +#define EFIVARFS_MAGIC 0xde5e81e4 + /* Constant that identifies the `ext2' and `ext3' filesystems. */ #define EXT2_SUPER_MAGIC 0xef53 +/* Constant that identifies the `f2fs' filesystem. */ +#define F2FS_SUPER_MAGIC 0xf2f52010 + /* Constant that identifies the `hpfs' filesystem. */ #define HPFS_SUPER_MAGIC 0xf995e849 @@ -153,6 +159,7 @@ #define COH_LINK_MAX 10000 #define EXT2_LINK_MAX 32000 #define EXT4_LINK_MAX 65000 +#define F2FS_LINK_MAX 32000 #define LUSTRE_LINK_MAX EXT4_LINK_MAX #define MINIX2_LINK_MAX 65530 #define MINIX_LINK_MAX 250 diff --git a/sysdeps/unix/sysv/linux/llseek.c b/sysdeps/unix/sysv/linux/llseek.c index 4580b872f4..a15be30249 100644 --- a/sysdeps/unix/sysv/linux/llseek.c +++ b/sysdeps/unix/sysv/linux/llseek.c @@ -32,7 +32,7 @@ __llseek (int fd, loff_t offset, int whence) return (loff_t) (INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32), (off_t) (offset & 0xffffffff), - __ptrvalue (&retval), whence) ?: retval); + &retval, whence) ?: retval); } weak_alias (__llseek, llseek) strong_alias (__llseek, __libc_lseek64) diff --git a/sysdeps/unix/sysv/linux/lxstat.c b/sysdeps/unix/sysv/linux/lxstat.c index 7abd2b45a0..3a838918e0 100644 --- a/sysdeps/unix/sysv/linux/lxstat.c +++ b/sysdeps/unix/sysv/linux/lxstat.c @@ -27,7 +27,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <xstatconv.h> @@ -36,8 +35,7 @@ int __lxstat (int vers, const char *name, struct stat *buf) { if (vers == _STAT_VER_KERNEL) - return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), - CHECK_1 ((struct kernel_stat *) buf)); + return INLINE_SYSCALL (lstat, 2, name, (struct kernel_stat *) buf); #ifdef STAT_IS_KERNEL_STAT errno = EINVAL; @@ -46,7 +44,7 @@ __lxstat (int vers, const char *name, struct stat *buf) struct kernel_stat kbuf; int result; - result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf)); + result = INLINE_SYSCALL (lstat, 2, name, &kbuf); if (result == 0) result = __xstat_conv (vers, &kbuf, buf); diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c index 12ab8202b3..de889966fe 100644 --- a/sysdeps/unix/sysv/linux/lxstat64.c +++ b/sysdeps/unix/sysv/linux/lxstat64.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -32,7 +31,7 @@ int ___lxstat64 (int vers, const char *name, struct stat64 *buf) { int result; - result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (buf)); + result = INLINE_SYSCALL (lstat64, 2, name, buf); #if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) buf->st_ino = buf->__st_ino; diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c index 7d94c1db9a..175e4abba1 100644 --- a/sysdeps/unix/sysv/linux/mmap64.c +++ b/sysdeps/unix/sysv/linux/mmap64.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -54,14 +53,10 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset) return MAP_FAILED; } void *result; - __ptrvalue (result) = (void *__unbounded) - INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr), + result = (void *) + INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)); -#if __BOUNDED_POINTERS__ - __ptrlow (result) = __ptrvalue (result); - __ptrhigh (result) = __ptrvalue (result) + len; -#endif return result; } weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c index 4dc6b08878..0bbaf086cc 100644 --- a/sysdeps/unix/sysv/linux/msgctl.c +++ b/sysdeps/unix/sysv/linux/msgctl.c @@ -24,20 +24,19 @@ #include <string.h> #include <sys/syscall.h> #include <shlib-compat.h> -#include <bp-checks.h> #include <kernel-features.h> struct __old_msqid_ds { struct __old_ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__unbounded __msg_first; /* pointer to first message on queue */ - struct msg *__unbounded __msg_last; /* pointer to last message on queue */ + struct msg *__msg_first; /* pointer to first message on queue */ + struct msg *__msg_last; /* pointer to last message on queue */ __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgrcv command */ __time_t msg_ctime; /* time of last change */ - struct wait_queue *__unbounded __wwait; /* ??? */ - struct wait_queue *__unbounded __rwait; /* ??? */ + struct wait_queue *__wwait; /* ??? */ + struct wait_queue *__rwait; /* ??? */ unsigned short int __msg_cbytes; /* current number of bytes on queue */ unsigned short int msg_qnum; /* number of messages currently on queue */ unsigned short int msg_qbytes; /* max number of bytes allowed on queue */ @@ -57,7 +56,7 @@ int attribute_compat_text_section __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf) { - return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, CHECK_1 (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf); } compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0); #endif @@ -67,7 +66,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) { #if __ASSUME_IPC64 > 0 return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, - msqid, cmd | __IPC_64, 0, CHECK_1 (buf)); + msqid, cmd | __IPC_64, 0, buf); #else switch (cmd) { case MSG_STAT: @@ -76,7 +75,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) break; default: return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, - msqid, cmd, 0, CHECK_1 (buf)); + msqid, cmd, 0, buf); } { @@ -86,7 +85,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) /* Unfortunately there is no way how to find out for sure whether we should use old or new msgctl. */ result = INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, - msqid, cmd | __IPC_64, 0, CHECK_1 (buf)); + msqid, cmd | __IPC_64, 0, buf); if (result != -1 || errno != EINVAL) return result; @@ -104,8 +103,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf) return -1; } } - result = INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, - msqid, cmd, 0, __ptrvalue (&old)); + result = INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, &old); if (result != -1 && cmd != IPC_SET) { memset(buf, 0, sizeof(*buf)); diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c index f9b399ebd8..7ec9b253bc 100644 --- a/sysdeps/unix/sysv/linux/msgrcv.c +++ b/sysdeps/unix/sysv/linux/msgrcv.c @@ -23,13 +23,11 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> - /* Kludge to work around Linux' restriction of only up to five arguments to a system call. */ struct ipc_kludge { - void *__unbounded msgp; + void *msgp; long int msgtyp; }; @@ -46,17 +44,16 @@ __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) fives parameters to a system call. */ struct ipc_kludge tmp; - tmp.msgp = CHECK_N (msgp, msgsz); + tmp.msgp = msgp; tmp.msgtyp = msgtyp; if (SINGLE_THREAD_P) - return INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, - __ptrvalue (&tmp)); + return INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, &tmp); int oldtype = LIBC_CANCEL_ASYNC (); ssize_t result = INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, - __ptrvalue (&tmp)); + &tmp); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c index 853ea91741..556159b327 100644 --- a/sysdeps/unix/sysv/linux/msgsnd.c +++ b/sysdeps/unix/sysv/linux/msgsnd.c @@ -23,8 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> - int __libc_msgsnd (msqid, msgp, msgsz, msgflg) int msqid; @@ -34,12 +32,12 @@ __libc_msgsnd (msqid, msgp, msgsz, msgflg) { if (SINGLE_THREAD_P) return INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz, - msgflg, (void *) CHECK_N (msgp, msgsz)); + msgflg, (void *) msgp); int oldtype = LIBC_CANCEL_ASYNC (); int result = INLINE_SYSCALL (ipc, 5, IPCOP_msgsnd, msqid, msgsz, - msgflg, (void *) CHECK_N (msgp, msgsz)); + msgflg, (void *) msgp); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c index e86925f7d6..de91a4541b 100644 --- a/sysdeps/unix/sysv/linux/pathconf.c +++ b/sysdeps/unix/sysv/linux/pathconf.c @@ -39,8 +39,6 @@ long int __pathconf (const char *file, int name) { struct statfs fsbuf; - int fd; - int flags; switch (name) { @@ -56,21 +54,6 @@ __pathconf (const char *file, int name) case _PC_CHOWN_RESTRICTED: return __statfs_chown_restricted (__statfs (file, &fsbuf), &fsbuf); - case _PC_PIPE_BUF: - flags = O_RDONLY|O_NONBLOCK|O_NOCTTY; -#ifdef O_CLOEXEC - flags |= O_CLOEXEC; -#endif - fd = open_not_cancel_2 (file, flags); - if (fd >= 0) - { - long int r = __fcntl (fd, F_GETPIPE_SZ); - close_not_cancel_no_status (fd); - if (r > 0) - return r; - } - /* FALLTHROUGH */ - default: return posix_pathconf (file, name); } @@ -168,6 +151,9 @@ __statfs_link_max (int result, const struct statfs *fsbuf, const char *file, the hard way. */ return distinguish_extX (fsbuf, file, fd); + case F2FS_SUPER_MAGIC: + return F2FS_LINK_MAX; + case MINIX_SUPER_MAGIC: case MINIX_SUPER_MAGIC2: return MINIX_LINK_MAX; @@ -221,6 +207,9 @@ __statfs_filesize_max (int result, const struct statfs *fsbuf) switch (fsbuf->f_type) { + case F2FS_SUPER_MAGIC: + return 256; + case BTRFS_SUPER_MAGIC: return 255; diff --git a/sysdeps/unix/sysv/linux/powerpc/Implies b/sysdeps/unix/sysv/linux/powerpc/Implies deleted file mode 100644 index ff27cdb568..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/Implies +++ /dev/null @@ -1,4 +0,0 @@ -# Make sure these routines come before ldbl-opt. -ieee754/ldbl-128ibm -# These supply the ABI compatibility for when long double was double. -ieee754/ldbl-opt diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h index 545fda462a..5f5fc1eb3a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h @@ -32,6 +32,16 @@ extern void *__vdso_get_tbfreq; extern void *__vdso_getcpu; +/* This macro is needed for PPC64 to return a skeleton OPD entry of a vDSO + symbol. This works because _dl_vdso_vsym always return the function + address, and no vDSO symbols use the TOC or chain pointers from the OPD + so we can allow them to be garbage. */ +#if defined(__PPC64__) || defined(__powerpc64__) +#define VDSO_IFUNC_RET(value) &value +#else +#define VDSO_IFUNC_RET(value) value +#endif + #endif #endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h index a270189652..3f72c03351 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h @@ -17,42 +17,13 @@ <http://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H -# error "Never use <bits/mman.h> directly; iclude <sys/mman.h> instead." +# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." #endif /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ #define PROT_SAO 0x10 /* Strong Access Ordering. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x001 /* Share changes. */ -#define MAP_PRIVATE 0x002 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x00f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x010 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0x000 -# define MAP_ANONYMOUS 0x020 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif /* These are Linux-specific. */ #ifdef __USE_MISC @@ -67,48 +38,10 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - /* Flags for `mlockall'. */ #define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ #define MCL_FUTURE 0x4000 /* Lock all additions to address space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/msq.h b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h index b9811c6567..59147c268c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/msq.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h @@ -25,6 +25,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c index 36512a0fcb..6506d75e64 100644 --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c @@ -15,26 +15,49 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include <bp-checks.h> -#include <stddef.h> + #include <sys/time.h> -#include <time.h> -#include <hp-timing.h> -#include <bits/libc-vdso.h> +#ifdef SHARED + +# include <dl-vdso.h> +# include <bits/libc-vdso.h> + +void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday"); + +static int +__gettimeofday_syscall (struct timeval *tv, struct timezone *tz) +{ + return INLINE_SYSCALL (gettimeofday, 2, tv, tz); +} + +void * +gettimeofday_ifunc (void) +{ + /* If the vDSO is not available we fall back syscall. */ + return (__vdso_gettimeofday ? VDSO_IFUNC_RET (__vdso_gettimeofday) + : __gettimeofday_syscall); +} +asm (".type __gettimeofday, %gnu_indirect_function"); + +/* This is doing "libc_hidden_def (__gettimeofday)" but the compiler won't + let us do it in C because it doesn't know we're defining __gettimeofday + here in this file. */ +asm (".globl __GI___gettimeofday\n" + "__GI___gettimeofday = __gettimeofday"); + +#else -/* Get the current time of day and timezone information, - putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. - Returns 0 on success, -1 on errors. */ +# include <sysdep.h> +# include <errno.h> int -__gettimeofday (tv, tz) - struct timeval *tv; - struct timezone *tz; +__gettimeofday (struct timeval *tv, struct timezone *tz) { - return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz)); + return INLINE_SYSCALL (gettimeofday, 2, tv, tz); } libc_hidden_def (__gettimeofday) + +#endif weak_alias (__gettimeofday, gettimeofday) libc_hidden_weak (gettimeofday) diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c index fb1f9a4eae..4e6e9e92f8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c @@ -19,7 +19,6 @@ #include <unistd.h> #include <ldsodefs.h> #include <sysdep.h> -#include <bp-sym.h> int __cache_line_size attribute_hidden; @@ -33,43 +32,35 @@ int __cache_line_size attribute_hidden; struct startup_info { - void *__unbounded sda_base; + void *sda_base; int (*main) (int, char **, char **, void *); int (*init) (int, char **, char **, void *); void (*fini) (void); }; int -/* GKM FIXME: GCC: this should get __BP_ prefix by virtue of the - BPs in the arglist of startup_info.main and startup_info.init. */ - BP_SYM (__libc_start_main) (int argc, char *__unbounded *__unbounded ubp_av, - char *__unbounded *__unbounded ubp_ev, - ElfW (auxv_t) * __unbounded auxvec, - void (*rtld_fini) (void), - struct startup_info *__unbounded stinfo, - char *__unbounded *__unbounded stack_on_entry) +__libc_start_main (int argc, char **argv, + char **ev, + ElfW (auxv_t) * auxvec, + void (*rtld_fini) (void), + struct startup_info *stinfo, + char **stack_on_entry) { -#if __BOUNDED_POINTERS__ - char **argv; -#else -# define argv ubp_av -#endif - /* the PPC SVR4 ABI says that the top thing on the stack will be a NULL pointer, so if not we assume that we're being called as a statically-linked program by Linux... */ if (*stack_on_entry != NULL) { - char *__unbounded * __unbounded temp; + char **temp; /* ...in which case, we have argc as the top thing on the stack, followed by argv (NULL-terminated), envp (likewise), and the auxilary vector. */ /* 32/64-bit agnostic load from stack */ - argc = *(long int *__unbounded) stack_on_entry; - ubp_av = stack_on_entry + 1; - ubp_ev = ubp_av + argc + 1; + argc = *(long int *) stack_on_entry; + argv = stack_on_entry + 1; + ev = argv + argc + 1; #ifdef HAVE_AUX_VECTOR - temp = ubp_ev; + temp = ev; while (*temp != NULL) ++temp; auxvec = (ElfW (auxv_t) *)++ temp; @@ -86,7 +77,7 @@ int break; } - return generic_start_main (stinfo->main, argc, ubp_av, auxvec, + return generic_start_main (stinfo->main, argc, argv, auxvec, stinfo->init, stinfo->fini, rtld_fini, stack_on_entry); } diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S index 2fc9fa2372..eb27f42cda 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S @@ -19,13 +19,10 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#include <bp-sym.h> -#include <bp-asm.h> .comm __curbrk,4,4 .section ".text" -ENTRY (BP_SYM (__brk)) - DISCARD_BOUNDS (r3) /* the bounds are meaningless, so toss 'em */ +ENTRY (__brk) mflr r0 stwu r1,-16(r1) cfi_adjust_cfa_offset (16) @@ -50,6 +47,6 @@ ENTRY (BP_SYM (__brk)) blelr+ li r3,ENOMEM b __syscall_error@local -END (BP_SYM (__brk)) +END (__brk) -weak_alias (BP_SYM (__brk), BP_SYM (brk)) +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S index 197b85203a..5790eff4c1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S @@ -20,8 +20,6 @@ #define _ERRNO_H 1 #include <bits/errno.h> #include <kernel-features.h> -#include <bp-sym.h> -#include <bp-asm.h> #define CLONE_VM 0x00000100 #define CLONE_THREAD 0x00010000 @@ -35,10 +33,7 @@ int flags [r5], void *arg [r6], void *parent_tid [r7], void *tls [r8], void *child_tid [r9]); */ -ENTRY (BP_SYM (__clone)) - /* GKM FIXME: add bounds checks, where sensible. */ - DISCARD_BOUNDS (r4) - DISCARD_BOUNDS (r6) +ENTRY (__clone) /* Check for child_stack == NULL || fn == NULL. */ cmpwi cr0,r4,0 @@ -124,6 +119,6 @@ L(badargs): b __syscall_error@local cfi_startproc -END (BP_SYM (__clone)) +END (__clone) -weak_alias (BP_SYM (__clone), BP_SYM (clone)) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist index 8e4595825b..f27b48b3c6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist @@ -1781,6 +1781,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c index 3695d8fb9a..619db32618 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -38,7 +37,7 @@ __libc_pread (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset >> 31, offset); return result; @@ -47,7 +46,7 @@ __libc_pread (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset >> 31, offset); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c index 12e83aa95b..75407b3165 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c @@ -21,7 +21,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -38,7 +37,7 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (long) (offset >> 32), (long) offset); @@ -48,7 +47,7 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (long) (offset >> 32), (long) offset); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c index 005e24f964..e71c91b261 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -39,7 +38,7 @@ __libc_pwrite (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset >> 31, offset); return result; @@ -48,7 +47,7 @@ __libc_pwrite (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset >> 31, offset); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c index f001c6e97d..7094e93d3c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c @@ -21,7 +21,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -38,7 +37,7 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (long) (offset >> 32), (long) offset); @@ -48,7 +47,7 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (long) (offset >> 32), (long) offset); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c index 3146dde71f..c018cecdbc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c @@ -21,7 +21,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Truncate the file referenced by FD to LENGTH bytes. */ int @@ -30,7 +29,7 @@ truncate64 (path, length) off64_t length; { /* On PPC32 64bit values are aligned in odd/even register pairs. */ - int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0, + int result = INLINE_SYSCALL (truncate64, 4, path, 0, (long) (length >> 32), (long) length); return result; diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S index 06596ce587..348aeb5ba0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S @@ -19,17 +19,14 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#include <bp-sym.h> -#include <bp-asm.h> .comm __curbrk,8,8 .section ".toc","aw" .LC__curbrk: .tc __curbrk[TC],__curbrk .section ".text" -ENTRY (BP_SYM (__brk)) +ENTRY (__brk) CALL_MCOUNT 1 - DISCARD_BOUNDS (r3) /* the bounds are meaningless, so toss 'em. */ std r3,48(r1) DO_CALL(SYS_ify(brk)) @@ -41,6 +38,6 @@ ENTRY (BP_SYM (__brk)) blelr+ li r3,ENOMEM TAIL_CALL_SYSCALL_ERROR -END (BP_SYM (__brk)) +END (__brk) -weak_alias (BP_SYM (__brk), BP_SYM (brk)) +weak_alias (__brk, brk) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S index f74dcae903..cf46856e1a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S @@ -19,8 +19,6 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#include <bp-sym.h> -#include <bp-asm.h> #define CLONE_VM 0x00000100 #define CLONE_THREAD 0x00010000 @@ -33,11 +31,8 @@ int flags [r5], void *arg [r6], void *parent_tid [r7], void *tls [r8], void *child_tid [r9]); */ -ENTRY (BP_SYM (__clone)) +ENTRY (__clone) CALL_MCOUNT 7 - /* GKM FIXME: add bounds checks, where sensible. */ - DISCARD_BOUNDS (r4) - DISCARD_BOUNDS (r6) /* Check for child_stack == NULL || fn == NULL. */ cmpdi cr0,r4,0 @@ -144,6 +139,6 @@ L(parent): cfi_restore(r31) PSEUDO_RET -END (BP_SYM (__clone)) +END (__clone) -weak_alias (BP_SYM (__clone), BP_SYM (clone)) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist index 8eaaccdfc7..195b58757b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist @@ -87,6 +87,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.3 GLIBC_2.3 A _Exit F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c index 896a415d87..70f1d6c580 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -40,16 +39,14 @@ __libc_pread (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); return result; } int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c index aaf18e5daa..a11f6e31f4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c @@ -21,7 +21,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -39,16 +38,14 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); return result; } int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c index 9795756f2b..0ccb0a98a3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -40,16 +39,14 @@ __libc_pwrite (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); return result; } int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c index 65ddefd3c4..6a8acb4512 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c @@ -21,7 +21,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -39,16 +38,14 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); return result; } int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, - offset); + result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h index dfda1c889d..e6e916b0f2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h @@ -136,7 +136,8 @@ enum __ptrace_setoptions PTRACE_O_TRACEVFORKDONE = 0x00000020, PTRACE_O_TRACEEXIT = 0x00000040, PTRACE_O_TRACESECCOMP = 0x00000080, - PTRACE_O_MASK = 0x000000ff + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff }; /* Wait extended result codes for the above trace options. */ diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c index aa3ee63792..1494879ab9 100644 --- a/sysdeps/unix/sysv/linux/pread.c +++ b/sysdeps/unix/sysv/linux/pread.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -44,7 +43,7 @@ do_pread (int fd, void *buf, size_t count, off_t offset) ssize_t result; assert (sizeof (offset) == 4); - result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pread, 5, fd, buf, count, __LONG_LONG_PAIR (offset >> 31, offset)); return result; diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c index 36cb66b8b8..be829ce3f6 100644 --- a/sysdeps/unix/sysv/linux/pread64.c +++ b/sysdeps/unix/sysv/linux/pread64.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -39,7 +38,7 @@ do_pread64 (int fd, void *buf, size_t count, off64_t offset) { ssize_t result; - result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pread, 5, fd, buf, count, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c index 926dfbd9e0..3a6ca6c0e4 100644 --- a/sysdeps/unix/sysv/linux/ptrace.c +++ b/sysdeps/unix/sysv/linux/ptrace.c @@ -24,7 +24,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> long int ptrace (enum __ptrace_request request, ...) @@ -43,79 +42,7 @@ ptrace (enum __ptrace_request request, ...) if (request > 0 && request < 4) data = &ret; -#if __BOUNDED_POINTERS__ - switch (request) - { - case PTRACE_PEEKTEXT: - case PTRACE_PEEKDATA: - case PTRACE_PEEKUSER: - case PTRACE_POKETEXT: - case PTRACE_POKEDATA: - case PTRACE_POKEUSER: - (void) CHECK_1 ((int *) addr); - (void) CHECK_1 ((int *) data); - break; - - case PTRACE_GETREGS: - case PTRACE_SETREGS: -#ifdef __i386__ - (void) CHECK_1 ((struct user_regs_struct *) data); -#else - /* We don't know the size of data, so the best we can do is ensure - that `data' is valid for at least one word. */ - (void) CHECK_1 ((int *) data); -#endif - break; - - case PTRACE_GETFPREGS: - case PTRACE_SETFPREGS: -#ifdef __i386__ - (void) CHECK_1 ((struct user_fpregs_struct *) data); -#else - /* We don't know the size of data, so the best we can do is ensure - that `data' is valid for at least one word. */ - (void) CHECK_1 ((int *) data); -#endif - break; - - case PTRACE_GETFPXREGS: - case PTRACE_SETFPXREGS: -#ifdef __i386__ - (void) CHECK_1 ((struct user_fpxregs_struct *) data); -#else - /* We don't know the size of data, so the best we can do is ensure - that `data' is valid for at least one word. */ - (void) CHECK_1 ((int *) data); -#endif - break; - - case PTRACE_GETSIGINFO: - case PTRACE_SETSIGINFO: - (void) CHECK_1 ((siginfo_t *) data); - break; - - case PTRACE_GETEVENTMSG: - (void) CHECK_1 ((unsigned long *) data); - break; - - case PTRACE_SETOPTIONS: - (void) CHECK_1 ((long *) data); - break; - - case PTRACE_TRACEME: - case PTRACE_CONT: - case PTRACE_KILL: - case PTRACE_SINGLESTEP: - case PTRACE_ATTACH: - case PTRACE_DETACH: - case PTRACE_SYSCALL: - /* Neither `data' nor `addr' needs any checks. */ - break; - }; -#endif - - res = INLINE_SYSCALL (ptrace, 4, request, pid, - __ptrvalue (addr), __ptrvalue (data)); + res = INLINE_SYSCALL (ptrace, 4, request, pid, addr, data); if (res >= 0 && request > 0 && request < 4) { __set_errno (0); diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c index 25147167d4..5a31d17ed4 100644 --- a/sysdeps/unix/sysv/linux/pwrite.c +++ b/sysdeps/unix/sysv/linux/pwrite.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -44,7 +43,7 @@ do_pwrite (int fd, const void *buf, size_t count, off_t offset) ssize_t result; assert (sizeof (offset) == 4); - result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, __LONG_LONG_PAIR (offset >> 31, offset)); return result; diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c index f2a99b6620..fb46e4ba53 100644 --- a/sysdeps/unix/sysv/linux/pwrite64.c +++ b/sysdeps/unix/sysv/linux/pwrite64.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -39,7 +38,7 @@ do_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) { ssize_t result; - result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, + result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c index efee11d4e0..8bdb97a0b1 100644 --- a/sysdeps/unix/sysv/linux/readv.c +++ b/sysdeps/unix/sysv/linux/readv.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> #ifndef __ASSUME_COMPLETE_READV_WRITEV @@ -47,12 +46,12 @@ __libc_readv (fd, vector, count) ssize_t result; if (SINGLE_THREAD_P) - result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count); + result = INLINE_SYSCALL (readv, 3, fd, vector, count); else { int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count); + result = INLINE_SYSCALL (readv, 3, fd, vector, count); LIBC_CANCEL_RESET (oldtype); } diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h index 3e7bf92f4a..b788fa50d0 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/mman.h +++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h @@ -24,39 +24,9 @@ But the kernel header is not namespace clean. */ -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -# define MAP_GROWSUP 0x00200 /* Register stack-like segment */ # define MAP_DENYWRITE 0x00800 /* ETXTBSY */ # define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ # define MAP_LOCKED 0x02000 /* Lock the mapping. */ @@ -67,47 +37,5 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/sysdeps/unix/sysv/linux/s390/bits/msq.h b/sysdeps/unix/sysv/linux/s390/bits/msq.h index 5a1f6b29e1..a5eaf89ddf 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/msq.h +++ b/sysdeps/unix/sysv/linux/s390/bits/msq.h @@ -26,6 +26,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/sysdeps/unix/sysv/linux/s390/gettimeofday.c b/sysdeps/unix/sysv/linux/s390/gettimeofday.c index 54c5e1d202..22df7282a3 100644 --- a/sysdeps/unix/sysv/linux/s390/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/s390/gettimeofday.c @@ -16,7 +16,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-checks.h> #include <stddef.h> #include <sys/time.h> #include <time.h> @@ -33,7 +32,7 @@ __gettimeofday (tv, tz) struct timeval *tv; struct timezone *tz; { - return INLINE_VSYSCALL (gettimeofday, 2, CHECK_1 (tv), CHECK_1 (tz)); + return INLINE_VSYSCALL (gettimeofday, 2, tv, tz); } libc_hidden_def (__gettimeofday) weak_alias (__gettimeofday, gettimeofday) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c index 408d24aae8..cd0cb743b5 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c @@ -21,7 +21,6 @@ #include <sysdep.h> #include <sys/syscall.h> #include <shlib-compat.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -42,7 +41,7 @@ int __real_chown (const char *file, uid_t owner, gid_t group) { - return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); + return INLINE_SYSCALL (chown32, 3, file, owner, group); } diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S index 1a3712d8c6..0a2e63e78a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S @@ -31,41 +31,42 @@ other than the PRESERVED state. */ ENTRY(__getcontext) - lr %r5,%r2 + lr %r1,%r2 /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ la %r2,SIG_BLOCK slr %r3,%r3 - la %r4,SC_MASK(%r5) + la %r4,SC_MASK(%r1) + lhi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Store fpu context. */ - stfpc SC_FPC(%r5) - std %f0,SC_FPRS(%r5) - std %f1,SC_FPRS+8(%r5) - std %f2,SC_FPRS+16(%r5) - std %f3,SC_FPRS+24(%r5) - std %f4,SC_FPRS+32(%r5) - std %f5,SC_FPRS+40(%r5) - std %f6,SC_FPRS+48(%r5) - std %f7,SC_FPRS+56(%r5) - std %f8,SC_FPRS+64(%r5) - std %f9,SC_FPRS+72(%r5) - std %f10,SC_FPRS+80(%r5) - std %f11,SC_FPRS+88(%r5) - std %f12,SC_FPRS+96(%r5) - std %f13,SC_FPRS+104(%r5) - std %f14,SC_FPRS+112(%r5) - std %f15,SC_FPRS+120(%r5) + stfpc SC_FPC(%r1) + std %f0,SC_FPRS(%r1) + std %f1,SC_FPRS+8(%r1) + std %f2,SC_FPRS+16(%r1) + std %f3,SC_FPRS+24(%r1) + std %f4,SC_FPRS+32(%r1) + std %f5,SC_FPRS+40(%r1) + std %f6,SC_FPRS+48(%r1) + std %f7,SC_FPRS+56(%r1) + std %f8,SC_FPRS+64(%r1) + std %f9,SC_FPRS+72(%r1) + std %f10,SC_FPRS+80(%r1) + std %f11,SC_FPRS+88(%r1) + std %f12,SC_FPRS+96(%r1) + std %f13,SC_FPRS+104(%r1) + std %f14,SC_FPRS+112(%r1) + std %f15,SC_FPRS+120(%r1) /* Set __getcontext return value to 0. */ slr %r2,%r2 /* Store access registers. */ - stam %a0,%a15,SC_ACRS(%r5) + stam %a0,%a15,SC_ACRS(%r1) /* Store general purpose registers. */ - stm %r0,%r15,SC_GPRS(%r5) + stm %r0,%r15,SC_GPRS(%r1) /* Return. */ br %r14 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c b/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c index 9357df4b49..0b7073c14a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c @@ -20,7 +20,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -29,7 +28,7 @@ int __lchown (const char *file, uid_t owner, gid_t group) { - return INLINE_SYSCALL (lchown32, 3, CHECK_STRING (file), owner, group); + return INLINE_SYSCALL (lchown32, 3, file, owner, group); } weak_alias (__lchown, lchown) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist index d9914ff53f..b6256d5c25 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist @@ -1771,6 +1771,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S index fe56c24aae..ac25bea507 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S @@ -31,38 +31,39 @@ other than the PRESERVED state. */ ENTRY(__setcontext) - lr %r5,%r2 + lr %r1,%r2 /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ la %r2,SIG_BLOCK - la %r3,SC_MASK(%r5) + la %r3,SC_MASK(%r1) slr %r4,%r4 + lhi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Load fpu context. */ - lfpc SC_FPC(%r5) - ld %f0,SC_FPRS(%r5) - ld %f1,SC_FPRS+8(%r5) - ld %f2,SC_FPRS+16(%r5) - ld %f3,SC_FPRS+24(%r5) - ld %f4,SC_FPRS+32(%r5) - ld %f5,SC_FPRS+40(%r5) - ld %f6,SC_FPRS+48(%r5) - ld %f7,SC_FPRS+56(%r5) - ld %f8,SC_FPRS+64(%r5) - ld %f9,SC_FPRS+72(%r5) - ld %f10,SC_FPRS+80(%r5) - ld %f11,SC_FPRS+88(%r5) - ld %f12,SC_FPRS+96(%r5) - ld %f13,SC_FPRS+104(%r5) - ld %f14,SC_FPRS+112(%r5) - ld %f15,SC_FPRS+120(%r5) + lfpc SC_FPC(%r1) + ld %f0,SC_FPRS(%r1) + ld %f1,SC_FPRS+8(%r1) + ld %f2,SC_FPRS+16(%r1) + ld %f3,SC_FPRS+24(%r1) + ld %f4,SC_FPRS+32(%r1) + ld %f5,SC_FPRS+40(%r1) + ld %f6,SC_FPRS+48(%r1) + ld %f7,SC_FPRS+56(%r1) + ld %f8,SC_FPRS+64(%r1) + ld %f9,SC_FPRS+72(%r1) + ld %f10,SC_FPRS+80(%r1) + ld %f11,SC_FPRS+88(%r1) + ld %f12,SC_FPRS+96(%r1) + ld %f13,SC_FPRS+104(%r1) + ld %f14,SC_FPRS+112(%r1) + ld %f15,SC_FPRS+120(%r1) /* Don't touch %a0, used for thread purposes. */ - lam %a1,%a15,SC_ACRS+4(%r5) + lam %a1,%a15,SC_ACRS+4(%r1) /* Load general purpose registers. */ - lm %r0,%r15,SC_GPRS(%r5) + lm %r0,%r15,SC_GPRS(%r1) /* Return. */ br %r14 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S index 9a4b2b9873..ecb0b3f80c 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S @@ -34,12 +34,13 @@ ENTRY(__swapcontext) lr %r1,%r2 - lr %r5,%r3 + lr %r0,%r3 /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ la %r2,SIG_BLOCK slr %r3,%r3 la %r4,SC_MASK(%r1) + lhi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Store fpu context. */ @@ -72,11 +73,14 @@ ENTRY(__swapcontext) /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ la %r2,SIG_BLOCK + lr %r5,%r0 la %r3,SC_MASK(%r5) slr %r4,%r4 + lhi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Load fpu context. */ + lr %r5,%r0 lfpc SC_FPC(%r5) ld %f0,SC_FPRS(%r5) ld %f1,SC_FPRS+8(%r5) diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S index 68e89102a0..7c406cb237 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S @@ -31,41 +31,42 @@ other than the PRESERVED state. */ ENTRY(__getcontext) - lgr %r5,%r2 + lgr %r1,%r2 /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ la %r2,SIG_BLOCK slgr %r3,%r3 - la %r4,SC_MASK(%r5) + la %r4,SC_MASK(%r1) + lghi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Store fpu context. */ - stfpc SC_FPC(%r5) - std %f0,SC_FPRS(%r5) - std %f1,SC_FPRS+8(%r5) - std %f2,SC_FPRS+16(%r5) - std %f3,SC_FPRS+24(%r5) - std %f4,SC_FPRS+32(%r5) - std %f5,SC_FPRS+40(%r5) - std %f6,SC_FPRS+48(%r5) - std %f7,SC_FPRS+56(%r5) - std %f8,SC_FPRS+64(%r5) - std %f9,SC_FPRS+72(%r5) - std %f10,SC_FPRS+80(%r5) - std %f11,SC_FPRS+88(%r5) - std %f12,SC_FPRS+96(%r5) - std %f13,SC_FPRS+104(%r5) - std %f14,SC_FPRS+112(%r5) - std %f15,SC_FPRS+120(%r5) + stfpc SC_FPC(%r1) + std %f0,SC_FPRS(%r1) + std %f1,SC_FPRS+8(%r1) + std %f2,SC_FPRS+16(%r1) + std %f3,SC_FPRS+24(%r1) + std %f4,SC_FPRS+32(%r1) + std %f5,SC_FPRS+40(%r1) + std %f6,SC_FPRS+48(%r1) + std %f7,SC_FPRS+56(%r1) + std %f8,SC_FPRS+64(%r1) + std %f9,SC_FPRS+72(%r1) + std %f10,SC_FPRS+80(%r1) + std %f11,SC_FPRS+88(%r1) + std %f12,SC_FPRS+96(%r1) + std %f13,SC_FPRS+104(%r1) + std %f14,SC_FPRS+112(%r1) + std %f15,SC_FPRS+120(%r1) /* Set __getcontext return value to 0. */ slgr %r2,%r2 /* Store access registers. */ - stam %a0,%a15,SC_ACRS(%r5) + stam %a0,%a15,SC_ACRS(%r1) /* Store general purpose registers. */ - stmg %r0,%r15,SC_GPRS(%r5) + stmg %r0,%r15,SC_GPRS(%r1) /* Return. */ br %r14 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist index ef1ead3069..265f66d905 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist @@ -92,6 +92,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _Exit F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S index 7415bd9384..8157327bf4 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S @@ -31,38 +31,39 @@ other than the PRESERVED state. */ ENTRY(__setcontext) - lgr %r5,%r2 + lgr %r1,%r2 /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ la %r2,SIG_BLOCK - la %r3,SC_MASK(%r5) + la %r3,SC_MASK(%r1) slgr %r4,%r4 + lghi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Load fpu context. */ - lfpc SC_FPC(%r5) - ld %f0,SC_FPRS(%r5) - ld %f1,SC_FPRS+8(%r5) - ld %f2,SC_FPRS+16(%r5) - ld %f3,SC_FPRS+24(%r5) - ld %f4,SC_FPRS+32(%r5) - ld %f5,SC_FPRS+40(%r5) - ld %f6,SC_FPRS+48(%r5) - ld %f7,SC_FPRS+56(%r5) - ld %f8,SC_FPRS+64(%r5) - ld %f9,SC_FPRS+72(%r5) - ld %f10,SC_FPRS+80(%r5) - ld %f11,SC_FPRS+88(%r5) - ld %f12,SC_FPRS+96(%r5) - ld %f13,SC_FPRS+104(%r5) - ld %f14,SC_FPRS+112(%r5) - ld %f15,SC_FPRS+120(%r5) + lfpc SC_FPC(%r1) + ld %f0,SC_FPRS(%r1) + ld %f1,SC_FPRS+8(%r1) + ld %f2,SC_FPRS+16(%r1) + ld %f3,SC_FPRS+24(%r1) + ld %f4,SC_FPRS+32(%r1) + ld %f5,SC_FPRS+40(%r1) + ld %f6,SC_FPRS+48(%r1) + ld %f7,SC_FPRS+56(%r1) + ld %f8,SC_FPRS+64(%r1) + ld %f9,SC_FPRS+72(%r1) + ld %f10,SC_FPRS+80(%r1) + ld %f11,SC_FPRS+88(%r1) + ld %f12,SC_FPRS+96(%r1) + ld %f13,SC_FPRS+104(%r1) + ld %f14,SC_FPRS+112(%r1) + ld %f15,SC_FPRS+120(%r1) /* Don't touch %a0 and %a1, used for thread purposes. */ - lam %a2,%a15,SC_ACRS+8(%r5) + lam %a2,%a15,SC_ACRS+8(%r1) /* Load general purpose registers. */ - lmg %r0,%r15,SC_GPRS(%r5) + lmg %r0,%r15,SC_GPRS(%r1) /* Return. */ br %r14 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S index 2d8f0d50ee..a08e68cdd9 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S @@ -34,12 +34,13 @@ ENTRY(__swapcontext) lgr %r1,%r2 - lgr %r5,%r3 + lgr %r0,%r3 /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ la %r2,SIG_BLOCK slgr %r3,%r3 la %r4,SC_MASK(%r1) + lghi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) /* Store fpu context. */ @@ -72,11 +73,14 @@ ENTRY(__swapcontext) /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ la %r2,SIG_BLOCK + lgr %r5,%r0 la %r3,SC_MASK(%r5) + lghi %r5,_NSIG8 slgr %r4,%r4 svc SYS_ify(rt_sigprocmask) /* Load fpu context. */ + lgr %r5,%r0 lfpc SC_FPC(%r5) ld %f0,SC_FPRS(%r5) ld %f1,SC_FPRS+8(%r5) diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h index b9062dc1ae..ca2ebb9590 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h @@ -175,7 +175,8 @@ enum __ptrace_setoptions PTRACE_O_TRACEVFORKDONE = 0x00000020, PTRACE_O_TRACEEXIT = 0x00000040, PTRACE_O_TRACESECCOMP = 0x00000080, - PTRACE_O_MASK = 0x000000ff + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff }; /* Wait extended result codes for the above trace options. */ diff --git a/sysdeps/unix/sysv/linux/s390/ucontext_i.sym b/sysdeps/unix/sysv/linux/s390/ucontext_i.sym index 525b54300c..6cc9f19624 100644 --- a/sysdeps/unix/sysv/linux/s390/ucontext_i.sym +++ b/sysdeps/unix/sysv/linux/s390/ucontext_i.sym @@ -8,6 +8,8 @@ SIG_BLOCK SIG_UNBLOCK SIG_SETMASK +_NSIG8 (_NSIG / 8) + #define ucontext(member) offsetof (ucontext_t, member) #define mcontext(member) ucontext (uc_mcontext.member) diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c index 6c5c51e930..b28861d429 100644 --- a/sysdeps/unix/sysv/linux/semctl.c +++ b/sysdeps/unix/sysv/linux/semctl.c @@ -33,10 +33,10 @@ struct __old_semid_ds struct __old_ipc_perm sem_perm; /* operation permission struct */ __time_t sem_otime; /* last semop() time */ __time_t sem_ctime; /* last time changed by semctl() */ - struct sem *__unbounded __sembase; /* ptr to first semaphore in array */ - struct sem_queue *__unbounded __sem_pending; /* pending operations */ - struct sem_queue *__unbounded __sem_pending_last; /* last pending operation */ - struct sem_undo *__unbounded __undo; /* ondo requests on this array */ + struct sem *__sembase; /* ptr to first semaphore in array */ + struct sem_queue *__sem_pending; /* pending operations */ + struct sem_queue *__sem_pending_last; /* last pending operation */ + struct sem_undo *__undo; /* ondo requests on this array */ unsigned short int sem_nsems; /* number of semaphores in set */ }; diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c index f0ea7780b8..cbe42ac62d 100644 --- a/sysdeps/unix/sysv/linux/semop.c +++ b/sysdeps/unix/sysv/linux/semop.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Perform user-defined atomical operation of array of semaphores. */ @@ -32,6 +31,5 @@ semop (semid, sops, nsops) struct sembuf *sops; size_t nsops; { - return INLINE_SYSCALL (ipc, 5, IPCOP_semop, - semid, (int) nsops, 0, CHECK_N (sops, nsops)); + return INLINE_SYSCALL (ipc, 5, IPCOP_semop, semid, (int) nsops, 0, sops); } diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c index 22a50375fa..3da3554700 100644 --- a/sysdeps/unix/sysv/linux/semtimedop.c +++ b/sysdeps/unix/sysv/linux/semtimedop.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Perform user-defined atomical operation of array of semaphores. */ @@ -34,6 +33,6 @@ semtimedop (semid, sops, nsops, timeout) const struct timespec *timeout; { return INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop, - semid, (int) nsops, 0, CHECK_N (sops, nsops), + semid, (int) nsops, 0, sops, timeout); } diff --git a/sysdeps/unix/sysv/linux/sh/bits/mman.h b/sysdeps/unix/sysv/linux/sh/bits/mman.h index 40da97e2fa..396a9b918f 100644 --- a/sysdeps/unix/sysv/linux/sh/bits/mman.h +++ b/sysdeps/unix/sysv/linux/sh/bits/mman.h @@ -23,36 +23,6 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ @@ -66,47 +36,5 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/sysdeps/unix/sysv/linux/sh/chown.c b/sysdeps/unix/sysv/linux/sh/chown.c index 2714969368..853d48af8d 100644 --- a/sysdeps/unix/sysv/linux/sh/chown.c +++ b/sysdeps/unix/sysv/linux/sh/chown.c @@ -20,7 +20,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <linux/posix_types.h> @@ -29,7 +28,7 @@ int __chown (const char *file, uid_t owner, gid_t group) { - return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group); + return INLINE_SYSCALL (chown32, 3, file, owner, group); } libc_hidden_def (__chown) weak_alias (__chown, chown) diff --git a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist index 733b550fee..a653292c24 100644 --- a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist @@ -92,6 +92,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _Exit F diff --git a/sysdeps/unix/sysv/linux/sh/pread.c b/sysdeps/unix/sysv/linux/sh/pread.c index 6f0c3badb2..ae338dc218 100644 --- a/sysdeps/unix/sysv/linux/sh/pread.c +++ b/sysdeps/unix/sysv/linux/sh/pread.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -46,14 +45,14 @@ __libc_pread (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); return result; } int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/sh/pread64.c b/sysdeps/unix/sysv/linux/sh/pread64.c index acce914c70..2a46d7034c 100644 --- a/sysdeps/unix/sysv/linux/sh/pread64.c +++ b/sysdeps/unix/sysv/linux/sh/pread64.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -45,7 +44,7 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); return result; @@ -53,7 +52,7 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); diff --git a/sysdeps/unix/sysv/linux/sh/pwrite.c b/sysdeps/unix/sysv/linux/sh/pwrite.c index 441c867bf5..4b20e518cd 100644 --- a/sysdeps/unix/sysv/linux/sh/pwrite.c +++ b/sysdeps/unix/sysv/linux/sh/pwrite.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -46,14 +45,14 @@ __libc_pwrite (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); return result; } int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/sh/pwrite64.c b/sysdeps/unix/sysv/linux/sh/pwrite64.c index a4ca56077d..5639b3c419 100644 --- a/sysdeps/unix/sysv/linux/sh/pwrite64.c +++ b/sysdeps/unix/sysv/linux/sh/pwrite64.c @@ -22,7 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -45,7 +44,7 @@ __libc_pwrite64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); @@ -54,7 +53,7 @@ __libc_pwrite64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, + result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c index 91d9443767..bac1b290ac 100644 --- a/sysdeps/unix/sysv/linux/shmat.c +++ b/sysdeps/unix/sysv/linux/shmat.c @@ -36,21 +36,12 @@ shmat (shmid, shmaddr, shmflg) { INTERNAL_SYSCALL_DECL(err); unsigned long resultvar; - void *__unbounded raddr; - -#if __BOUNDED_POINTERS__ - size_t length = ~0; - struct shmid_ds shmds; - /* It's unfortunate that we need to make another system call to get - the shared memory segment length... */ - if (shmctl (shmid, IPC_STAT, &shmds) == 0) - length = shmds.shm_segsz; -#endif + void *raddr; resultvar = INTERNAL_SYSCALL (ipc, err, 5, IPCOP_shmat, shmid, shmflg, - (long int) __ptrvalue (&raddr), - __ptrvalue ((void *) shmaddr)); + (long int) &raddr, + (void *) shmaddr); if (INTERNAL_SYSCALL_ERROR_P (resultvar, err)) { __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, err)); diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c index 01dbdd087d..34806fbb6b 100644 --- a/sysdeps/unix/sysv/linux/shmctl.c +++ b/sysdeps/unix/sysv/linux/shmctl.c @@ -25,7 +25,6 @@ #include <sys/syscall.h> #include <bits/wordsize.h> #include <shlib-compat.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -40,8 +39,8 @@ struct __old_shmid_ds __ipc_pid_t shm_lpid; /* pid of last shmop */ unsigned short int shm_nattch; /* number of current attaches */ unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */ + unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ + struct vm_area_struct *__attaches; /* descriptors for attaches */ }; struct __old_shminfo @@ -64,8 +63,7 @@ int attribute_compat_text_section __old_shmctl (int shmid, int cmd, struct __old_shmid_ds *buf) { - return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, - cmd, 0, CHECK_1_NULL_OK (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf); } compat_symbol (libc, __old_shmctl, shmctl, GLIBC_2_0); #endif @@ -75,7 +73,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) { #if __ASSUME_IPC64 > 0 return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0, - CHECK_1 (buf)); + buf); #else switch (cmd) { case SHM_STAT: @@ -86,8 +84,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) #endif break; default: - return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, - CHECK_1 (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf); } { @@ -101,7 +98,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) /* Unfortunately there is no way how to find out for sure whether we should use old or new shmctl. */ result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0, - CHECK_1 (buf)); + buf); if (result != -1 || errno != EINVAL) return result; @@ -118,8 +115,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf) return -1; } } - result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, - __ptrvalue (&old.ds)); + result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, &old.ds); if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT)) { memset(buf, 0, sizeof(*buf)); diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c index aac66199b6..260526bb7f 100644 --- a/sysdeps/unix/sysv/linux/shmdt.c +++ b/sysdeps/unix/sysv/linux/shmdt.c @@ -30,5 +30,5 @@ int shmdt (shmaddr) const void *shmaddr; { - return INLINE_SYSCALL (ipc, 5, IPCOP_shmdt, 0, 0, 0, __ptrvalue ((void *) shmaddr)); + return INLINE_SYSCALL (ipc, 5, IPCOP_shmdt, 0, 0, 0, (void *) shmaddr); } diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c index 3fe882eecc..336975c51d 100644 --- a/sysdeps/unix/sysv/linux/sigaction.c +++ b/sysdeps/unix/sysv/linux/sigaction.c @@ -55,8 +55,8 @@ __libc_sigaction (sig, act, oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ result = INLINE_SYSCALL (rt_sigaction, 4, sig, - act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + act ? &kact : NULL, + oact ? &koact : NULL, _NSIG / 8); if (oact && result >= 0) { diff --git a/sysdeps/unix/sysv/linux/sigqueue.c b/sysdeps/unix/sysv/linux/sigqueue.c index eb056f3e92..37d61c8a1a 100644 --- a/sysdeps/unix/sysv/linux/sigqueue.c +++ b/sysdeps/unix/sysv/linux/sigqueue.c @@ -43,7 +43,7 @@ __sigqueue (pid, sig, val) info.si_uid = __getuid (); info.si_value = val; - return INLINE_SYSCALL (rt_sigqueueinfo, 3, pid, sig, __ptrvalue (&info)); + return INLINE_SYSCALL (rt_sigqueueinfo, 3, pid, sig, &info); } weak_alias (__sigqueue, sigqueue) #else diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c index df14c2b5d6..20fe3550d8 100644 --- a/sysdeps/unix/sysv/linux/sigtimedwait.c +++ b/sysdeps/unix/sysv/linux/sigtimedwait.c @@ -21,7 +21,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #ifdef __NR_rt_sigtimedwait @@ -52,7 +51,7 @@ do_sigtimedwait (const sigset_t *set, siginfo_t *info, /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, - CHECK_1 (info), timeout, _NSIG / 8); + info, timeout, _NSIG / 8); /* The kernel generates a SI_TKILL code in si_code in case tkill is used. tkill is transparently used in raise(). Since having diff --git a/sysdeps/unix/sysv/linux/sigwaitinfo.c b/sysdeps/unix/sysv/linux/sigwaitinfo.c index 46afb46ef2..50fa72bf4b 100644 --- a/sysdeps/unix/sysv/linux/sigwaitinfo.c +++ b/sysdeps/unix/sysv/linux/sigwaitinfo.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #ifdef __NR_rt_sigtimedwait @@ -53,7 +52,7 @@ do_sigwaitinfo (const sigset_t *set, siginfo_t *info) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, - CHECK_1 (info), NULL, _NSIG / 8); + info, NULL, _NSIG / 8); /* The kernel generates a SI_TKILL code in si_code in case tkill is used. tkill is transparently used in raise(). Since having diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h index 616e24333a..ad0389ca3f 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h @@ -24,36 +24,6 @@ But the kernel header is not namespace clean. */ -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0x00 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -# define MAP_RENAME MAP_ANONYMOUS -#endif - /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */ @@ -68,48 +38,14 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - /* Flags for `mlockall'. */ #define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ #define MCL_FUTURE 0x4000 /* Lock all additions to address space. */ +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_FREE 5 /* Content can be freed (Solaris). */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +/* Other flags. */ +#ifdef __USE_MISC +# define MAP_RENAME MAP_ANONYMOUS #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/msq.h b/sysdeps/unix/sysv/linux/sparc/bits/msq.h index 84c4b858b7..0a0192732c 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/msq.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/msq.h @@ -26,6 +26,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist index 3a96ea883b..9defbdf133 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist @@ -1776,6 +1776,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c b/sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c index 3bda4b275c..d55511e105 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Allows to control internal state and destruction of message queue objects. */ @@ -33,5 +32,5 @@ msgctl (msqid, cmd, buf) int cmd; struct msqid_ds *buf; { - return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, CHECK_1 (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf); } diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c b/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c index bce7a58d2c..625eeb27cf 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c @@ -22,8 +22,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> - ssize_t __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) int msqid; @@ -34,12 +32,12 @@ __libc_msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) { if (SINGLE_THREAD_P) return INLINE_SYSCALL (ipc, 6, IPCOP_msgrcv, msqid, msgsz, msgflg, - CHECK_N (msgp, msgsz), msgtyp); + msgp, msgtyp); int oldtype = LIBC_CANCEL_ASYNC (); ssize_t result = INLINE_SYSCALL (ipc, 6, IPCOP_msgrcv, msqid, msgsz, msgflg, - CHECK_N (msgp, msgsz), msgtyp); + msgp, msgtyp); LIBC_CANCEL_RESET (oldtype); diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist index aa892b8b8b..35987faa6e 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist @@ -97,6 +97,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2 GLIBC_2.2 A _Exit F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c b/sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c index fc2573905c..7c4af74768 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Provide operations to control over shared memory segments. */ @@ -32,5 +31,5 @@ shmctl (shmid, cmd, buf) int cmd; struct shmid_ds *buf; { - return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, CHECK_1 (buf)); + return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf); } diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c index 988d26662b..d5e708777d 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c @@ -48,8 +48,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ ret = INLINE_SYSCALL (rt_sigaction, 5, sig, - act ? __ptrvalue (&kact) : 0, - oact ? __ptrvalue (&koact) : 0, stub, _NSIG / 8); + act ? &kact : 0, + oact ? &koact : 0, stub, _NSIG / 8); if (oact && ret >= 0) { diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h index bd6fd536d7..7ba8f5f254 100644 --- a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h @@ -219,7 +219,8 @@ enum __ptrace_setoptions PTRACE_O_TRACEVFORKDONE = 0x00000020, PTRACE_O_TRACEEXIT = 0x00000040, PTRACE_O_TRACESECCOMP = 0x00000080, - PTRACE_O_MASK = 0x000000ff + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff }; /* Wait extended result codes for the above trace options. */ diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h index d04fab599d..08709bf64c 100644 --- a/sysdeps/unix/sysv/linux/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/sys/ptrace.h @@ -166,7 +166,8 @@ enum __ptrace_setoptions PTRACE_O_TRACEVFORKDONE = 0x00000020, PTRACE_O_TRACEEXIT = 0x00000040, PTRACE_O_TRACESECCOMP = 0x00000080, - PTRACE_O_MASK = 0x000000ff + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff }; /* Wait extended result codes for the above trace options. */ diff --git a/sysdeps/unix/sysv/linux/sysctl.c b/sysdeps/unix/sysv/linux/sysctl.c index 5c6b1fb301..4ff1bf3787 100644 --- a/sysdeps/unix/sysv/linux/sysctl.c +++ b/sysdeps/unix/sysv/linux/sysctl.c @@ -22,13 +22,11 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> int __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, void *newval, size_t newlen) { - /* GKM FIXME: force __sysctl_args decl to have unbounded pointers. */ struct __sysctl_args args = { .name = name, @@ -38,11 +36,8 @@ __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp, .newval = newval, .newlen = newlen }; - (void) CHECK_N (name, nlen); - (void) CHECK_N (oldval, *oldlenp); - (void) CHECK_N (newval, newlen); - return INLINE_SYSCALL (_sysctl, 1, __ptrvalue (&args)); + return INLINE_SYSCALL (_sysctl, 1, &args); } libc_hidden_def (__sysctl) weak_alias (__sysctl, sysctl) diff --git a/sysdeps/unix/sysv/linux/times.c b/sysdeps/unix/sysv/linux/times.c index f3b5f014e2..2a5caf2cd1 100644 --- a/sysdeps/unix/sysv/linux/times.c +++ b/sysdeps/unix/sysv/linux/times.c @@ -26,13 +26,14 @@ __times (struct tms *buf) INTERNAL_SYSCALL_DECL (err); clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf); if (INTERNAL_SYSCALL_ERROR_P (ret, err) - && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0)) + && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0) + && buf) { /* This might be an error or not. For architectures which have no separate return value and error indicators we cannot distinguish a return value of -1 from an error. Do it the - hard way. We crash applications which pass in an invalid BUF - pointer. */ + hard way. We crash applications which pass in an invalid + non-NULL BUF pointer. Linux allows BUF to be NULL. */ #define touch(v) \ do { \ clock_t temp = v; \ @@ -44,7 +45,8 @@ __times (struct tms *buf) touch (buf->tms_cutime); touch (buf->tms_cstime); - /* If we come here the memory is valid and the kernel did not + /* If we come here the memory is valid (or BUF is NULL, which is + a valid condition for the kernel syscall) and the kernel did not return an EFAULT error. Return the value given by the kernel. */ } diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c index 82c132782a..8c9e8488be 100644 --- a/sysdeps/unix/sysv/linux/truncate64.c +++ b/sysdeps/unix/sysv/linux/truncate64.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Truncate the file referenced by FD to LENGTH bytes. */ int @@ -30,7 +29,7 @@ truncate64 (const char *path, off64_t length) { unsigned int low = length & 0xffffffff; unsigned int high = length >> 32; - int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path), + int result = INLINE_SYSCALL (truncate64, 3, path, __LONG_LONG_PAIR (high, low)); return result; } diff --git a/sysdeps/unix/sysv/linux/ustat.c b/sysdeps/unix/sysv/linux/ustat.c index 7a57ee1e9f..499ed7eaf3 100644 --- a/sysdeps/unix/sysv/linux/ustat.c +++ b/sysdeps/unix/sysv/linux/ustat.c @@ -22,7 +22,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> int ustat (dev_t dev, struct ustat *ubuf) @@ -37,5 +36,5 @@ ustat (dev_t dev, struct ustat *ubuf) return -1; } - return INLINE_SYSCALL (ustat, 2, (unsigned int) k_dev, CHECK_1 (ubuf)); + return INLINE_SYSCALL (ustat, 2, (unsigned int) k_dev, ubuf); } diff --git a/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c b/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c index bbaa0e04d9..d6023e2a23 100644 --- a/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c +++ b/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c @@ -26,14 +26,13 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Get information about the file FD in BUF. */ int __fxstat (int vers, int fd, struct stat *buf) { if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX) - return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 (buf)); + return INLINE_SYSCALL (fstat, 2, fd, buf); __set_errno (EINVAL); return -1; diff --git a/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c b/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c index 733348cbf8..73a2e871c9 100644 --- a/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c +++ b/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c @@ -29,7 +29,6 @@ #include <sysdep.h> #include <kernel-features.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Get information about the file NAME relative to FD in ST. */ @@ -95,9 +94,9 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) INTERNAL_SYSCALL_DECL (err); if (flag & AT_SYMLINK_NOFOLLOW) - res = INTERNAL_SYSCALL (lstat, err, 2, file, CHECK_1 (st)); + res = INTERNAL_SYSCALL (lstat, err, 2, file, st); else - res = INTERNAL_SYSCALL (stat, err, 2, file, CHECK_1 (st)); + res = INTERNAL_SYSCALL (stat, err, 2, file, st); if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0)) { diff --git a/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c b/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c index 4a34c84125..62b6c89ba5 100644 --- a/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c +++ b/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c @@ -26,14 +26,13 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Get information about the file FD in BUF. */ int __lxstat (int vers, const char *name, struct stat *buf) { if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX) - return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), CHECK_1 (buf)); + return INLINE_SYSCALL (lstat, 2, name, buf); __set_errno (EINVAL); return -1; diff --git a/sysdeps/unix/sysv/linux/wordsize-64/xstat.c b/sysdeps/unix/sysv/linux/wordsize-64/xstat.c index b9b533d306..1fa2280c2d 100644 --- a/sysdeps/unix/sysv/linux/wordsize-64/xstat.c +++ b/sysdeps/unix/sysv/linux/wordsize-64/xstat.c @@ -26,14 +26,13 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Get information about the file NAME in BUF. */ int __xstat (int vers, const char *name, struct stat *buf) { if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX) - return INLINE_SYSCALL (stat, 2, name, CHECK_1 (buf)); + return INLINE_SYSCALL (stat, 2, name, buf); __set_errno (EINVAL); return -1; diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c index 993660a119..e53c0d345a 100644 --- a/sysdeps/unix/sysv/linux/writev.c +++ b/sysdeps/unix/sysv/linux/writev.c @@ -23,7 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> #ifndef __ASSUME_COMPLETE_READV_WRITEV @@ -47,12 +46,12 @@ __libc_writev (fd, vector, count) ssize_t result; if (SINGLE_THREAD_P) - result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count); + result = INLINE_SYSCALL (writev, 3, fd, vector, count); else { int oldtype = LIBC_CANCEL_ASYNC (); - result = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count); + result = INLINE_SYSCALL (writev, 3, fd, vector, count); LIBC_CANCEL_RESET (oldtype); } diff --git a/sysdeps/unix/sysv/linux/x86/bits/mman.h b/sysdeps/unix/sysv/linux/x86/bits/mman.h index 591df139d7..a2fa808796 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/mman.h +++ b/sysdeps/unix/sysv/linux/x86/bits/mman.h @@ -23,34 +23,8 @@ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of - growsdown vma (mprotect only). */ -#define PROT_GROWSUP 0x02000000 /* Extend change to start of - growsup vma (mprotect only). */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - /* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ #ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS # define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ #endif @@ -67,47 +41,5 @@ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - -/* Advice to `madvise'. */ -#ifdef __USE_BSD -# define MADV_NORMAL 0 /* No further special treatment. */ -# define MADV_RANDOM 1 /* Expect random page references. */ -# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define MADV_WILLNEED 3 /* Will need these pages. */ -# define MADV_DONTNEED 4 /* Don't need these pages. */ -# define MADV_REMOVE 9 /* Remove these pages and resources. */ -# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -# define MADV_DOFORK 11 /* Do inherit across fork. */ -# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, - overrides the coredump filter bits. */ -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ -# define MADV_HWPOISON 100 /* Poison a page for testing. */ -#endif - -/* The POSIX people had to invent similar names for the same things. */ -#ifdef __USE_XOPEN2K -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -#endif +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> diff --git a/sysdeps/unix/sysv/linux/x86/bits/msq.h b/sysdeps/unix/sysv/linux/x86/bits/msq.h index ef5cc38681..9355e465d5 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/msq.h +++ b/sysdeps/unix/sysv/linux/x86/bits/msq.h @@ -25,6 +25,7 @@ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +# define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ diff --git a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist index a42d424cde..914b5908f0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist @@ -88,6 +88,9 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F GLIBC_2.2.5 GLIBC_2.2.5 A _Exit F diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S b/sysdeps/unix/sysv/linux/x86_64/clone.S index c131a40242..144eaf7520 100644 --- a/sysdeps/unix/sysv/linux/x86_64/clone.S +++ b/sysdeps/unix/sysv/linux/x86_64/clone.S @@ -22,8 +22,6 @@ #define _ERRNO_H 1 #include <bits/errno.h> #include <asm-syntax.h> -#include <bp-sym.h> -#include <bp-asm.h> #define CLONE_VM 0x00000100 #define CLONE_THREAD 0x00010000 @@ -52,7 +50,7 @@ .text -ENTRY (BP_SYM (__clone)) +ENTRY (__clone) /* Sanity check arguments. */ movq $-EINVAL,%rax testq %rdi,%rdi /* no NULL function pointers */ @@ -117,6 +115,6 @@ L(thread_start): cfi_endproc; cfi_startproc; -PSEUDO_END (BP_SYM (__clone)) +PSEUDO_END (__clone) -weak_alias (BP_SYM (__clone), BP_SYM (clone)) +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/x86_64/sigaction.c b/sysdeps/unix/sysv/linux/x86_64/sigaction.c index 0fcb754a55..4b5d1e1a8b 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sigaction.c +++ b/sysdeps/unix/sysv/linux/x86_64/sigaction.c @@ -62,8 +62,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ result = INLINE_SYSCALL (rt_sigaction, 4, - sig, act ? __ptrvalue (&kact) : NULL, - oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + sig, act ? &kact : NULL, + oact ? &koact : NULL, _NSIG / 8); if (oact && result >= 0) { oact->sa_handler = koact.k_sa_handler; diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index 763a748bcb..d68112a614 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -20,8 +20,6 @@ /* There is some commonality. */ #include <sysdeps/unix/x86_64/sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> #include <tls.h> #ifdef IS_IN_rtld diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist index 108b80fb43..0f64c8d20f 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist @@ -2086,3 +2086,6 @@ GLIBC_2.17 clock_nanosleep F clock_settime F secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libpthread.abilist index ee69932913..b07d16f784 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libpthread.abilist @@ -73,7 +73,6 @@ GLIBC_2.16 pause F pread F pread64 F - pthread_atfork F pthread_attr_destroy F pthread_attr_getaffinity_np F pthread_attr_getdetachstate F diff --git a/sysdeps/unix/sysv/linux/xmknod.c b/sysdeps/unix/sysv/linux/xmknod.c index 23c83ef241..154dc9a037 100644 --- a/sysdeps/unix/sysv/linux/xmknod.c +++ b/sysdeps/unix/sysv/linux/xmknod.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor @@ -47,8 +46,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) return -1; } - return INLINE_SYSCALL (mknod, 3, CHECK_STRING (path), mode, - (unsigned int) k_dev); + return INLINE_SYSCALL (mknod, 3, path, mode, (unsigned int) k_dev); } weak_alias (__xmknod, _xmknod) diff --git a/sysdeps/unix/sysv/linux/xmknodat.c b/sysdeps/unix/sysv/linux/xmknodat.c index 79f3e55bc4..8cb9021272 100644 --- a/sysdeps/unix/sysv/linux/xmknodat.c +++ b/sysdeps/unix/sysv/linux/xmknodat.c @@ -26,7 +26,6 @@ #include <sysdep.h> #include <kernel-features.h> #include <sys/syscall.h> -#include <bp-checks.h> /* Create a device file named PATH relative to FD, with permission and @@ -92,8 +91,7 @@ __xmknodat (int vers, int fd, const char *file, mode_t mode, dev_t *dev) file = buf; } - return INLINE_SYSCALL (mknod, 3, CHECK_STRING (file), mode, - (unsigned int) k_dev); + return INLINE_SYSCALL (mknod, 3, file, mode, (unsigned int) k_dev); #endif } diff --git a/sysdeps/unix/sysv/linux/xstat.c b/sysdeps/unix/sysv/linux/xstat.c index 07fbcd08e8..ac342cec75 100644 --- a/sysdeps/unix/sysv/linux/xstat.c +++ b/sysdeps/unix/sysv/linux/xstat.c @@ -27,7 +27,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <xstatconv.h> @@ -36,8 +35,7 @@ int __xstat (int vers, const char *name, struct stat *buf) { if (vers == _STAT_VER_KERNEL) - return INLINE_SYSCALL (stat, 2, CHECK_STRING (name), - CHECK_1 ((struct kernel_stat *) buf)); + return INLINE_SYSCALL (stat, 2, name, (struct kernel_stat *) buf); #ifdef STAT_IS_KERNEL_STAT errno = EINVAL; @@ -46,8 +44,7 @@ __xstat (int vers, const char *name, struct stat *buf) struct kernel_stat kbuf; int result; - result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), - __ptrvalue (&kbuf)); + result = INLINE_SYSCALL (stat, 2, name, &kbuf); if (result == 0) result = __xstat_conv (vers, &kbuf, buf); diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c index 061de1a4da..2377ac5030 100644 --- a/sysdeps/unix/sysv/linux/xstat64.c +++ b/sysdeps/unix/sysv/linux/xstat64.c @@ -23,7 +23,6 @@ #include <sysdep.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <kernel-features.h> @@ -33,7 +32,7 @@ int ___xstat64 (int vers, const char *name, struct stat64 *buf) { int result; - result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (buf)); + result = INLINE_SYSCALL (stat64, 2, name, buf); #if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0 if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino) buf->st_ino = buf->__st_ino; diff --git a/sysdeps/unix/x86_64/sysdep.S b/sysdeps/unix/x86_64/sysdep.S index 7f2daa6663..4ac535e579 100644 --- a/sysdeps/unix/x86_64/sysdep.S +++ b/sysdeps/unix/x86_64/sysdep.S @@ -18,8 +18,6 @@ #include <sysdep.h> #define _ERRNO_H #include <bits/errno.h> -#include <bp-asm.h> -#include <bp-sym.h> #include <tls.h> #ifdef IS_IN_rtld diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h index 41d204199c..24b64ec94d 100644 --- a/sysdeps/x86/bits/string.h +++ b/sysdeps/x86/bits/string.h @@ -36,7 +36,7 @@ /* We only provide optimizations if the user selects them and if GNU CC is used. */ # if !defined __NO_STRING_INLINES && defined __USE_STRING_INLINES \ - && defined __GNUC__ && __GNUC__ >= 2 && !__BOUNDED_POINTERS__ + && defined __GNUC__ && __GNUC__ >= 2 # ifndef __STRING_INLINE # ifndef __extern_inline diff --git a/sysdeps/x86_64/bp-asm.h b/sysdeps/x86_64/bp-asm.h deleted file mode 100644 index 10916fd95e..0000000000 --- a/sysdeps/x86_64/bp-asm.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Bounded-pointer definitions for x86-64 assembler. - Copyright (C) 2001-2013 Free Software Foundation, Inc. - - 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 _bp_asm_h_ -# define _bp_asm_h_ 1 - -# if __ASSEMBLER__ - -# if __BOUNDED_POINTERS__ - -/* Bounded pointers occupy three words. */ -# define PTR_SIZE 24 -/* Bounded pointer return values are passed back through a hidden - argument that points to caller-allocate space. The hidden arg - occupies one word on the stack. */ -# define RTN_SIZE 6 -/* Although the caller pushes the hidden arg, the callee is - responsible for popping it. */ -# define RET_PTR ret $RTN_SIZE -/* Maintain frame pointer chain in leaf assembler functions for the benefit - of debugging stack traces when bounds violations occur. */ -# define ENTER pushq %rbp; movq %rsp, %rbp -# define LEAVE movq %rbp, %rsp; popq %rbp -/* Stack space overhead of procedure-call linkage: return address and - frame pointer. */ -# define LINKAGE 16 -/* Stack offset of return address after calling ENTER. */ -# define PCOFF 8 - -/* Int 5 is the "bound range" exception also raised by the "bound" - instruction. */ -# define BOUNDS_VIOLATED int $5 - -# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) \ - cmpq 8+BP_MEM, VAL_REG; \ - jae 0f; /* continue if value >= low */ \ - BOUNDS_VIOLATED; \ - 0: - -# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) \ - cmpq 16+BP_MEM, VAL_REG; \ - Jcc 0f; /* continue if value < high */ \ - BOUNDS_VIOLATED; \ - 0: - -# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) \ - cmpq 8+BP_MEM, VAL_REG; \ - jb 1f; /* die if value < low */ \ - cmpq 16+BP_MEM, VAL_REG; \ - jb 0f; /* continue if value < high */ \ - 1: BOUNDS_VIOLATED; \ - 0: - -# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) \ - CHECK_BOUNDS_LOW(VAL_REG, BP_MEM); \ - addl LENGTH, VAL_REG; \ - cmpq 16+BP_MEM, VAL_REG; \ - jbe 0f; /* continue if value <= high */ \ - BOUNDS_VIOLATED; \ - 0: subq LENGTH, VAL_REG /* restore value */ - -/* Take bounds from BP_MEM and affix them to the pointer - value in %rax, stuffing all into memory at RTN(%esp). - Use %rdx as a scratch register. */ - -# define RETURN_BOUNDED_POINTER(BP_MEM) \ - movq RTN(%rsp), %rdx; \ - movq %rax, 0(%rdx); \ - movq 8+BP_MEM, %rax; \ - movq %rax, 4(%rdx); \ - movq 16+BP_MEM, %rax; \ - movq %rax, 8(%rdx) - -# define RETURN_NULL_BOUNDED_POINTER \ - movl RTN(%rsp), %rdx; \ - movl %rax, 0(%rdx); \ - movl %rax, 4(%rdx); \ - movl %rax, 8(%rdx) - -/* The caller of __errno_location is responsible for allocating space - for the three-word BP return-value and passing pushing its address - as an implicit first argument. */ -# define PUSH_ERRNO_LOCATION_RETURN \ - subl $16, %esp; \ - subl $8, %esp; \ - pushq %rsp - -/* __errno_location is responsible for popping the implicit first - argument, but we must pop the space for the BP itself. We also - dereference the return value in order to dig out the pointer value. */ -# define POP_ERRNO_LOCATION_RETURN \ - popq %rax; \ - addq $16, %rsp - -# else /* !__BOUNDED_POINTERS__ */ - -/* Unbounded pointers occupy one word. */ -# define PTR_SIZE 8 -/* Unbounded pointer return values are passed back in the register %rax. */ -# define RTN_SIZE 0 -/* Use simple return instruction for unbounded pointer values. */ -# define RET_PTR ret -/* Don't maintain frame pointer chain for leaf assembler functions. */ -# define ENTER -# define LEAVE -/* Stack space overhead of procedure-call linkage: return address only. */ -# define LINKAGE 8 -/* Stack offset of return address after calling ENTER. */ -# define PCOFF 0 - -# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) -# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) -# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) -# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) -# define RETURN_BOUNDED_POINTER(BP_MEM) - -# define RETURN_NULL_BOUNDED_POINTER - -# define PUSH_ERRNO_LOCATION_RETURN -# define POP_ERRNO_LOCATION_RETURN - -# endif /* !__BOUNDED_POINTERS__ */ - -# endif /* __ASSEMBLER__ */ - -#endif /* _bp_asm_h_ */ diff --git a/sysdeps/x86_64/bsd-_setjmp.S b/sysdeps/x86_64/bsd-_setjmp.S index 8769a80faa..4bb4978bf4 100644 --- a/sysdeps/x86_64/bsd-_setjmp.S +++ b/sysdeps/x86_64/bsd-_setjmp.S @@ -24,16 +24,14 @@ #define _ASM #define _SETJMP_H #include <bits/setjmp.h> -#include "bp-sym.h" -#include "bp-asm.h" -ENTRY (BP_SYM (_setjmp)) +ENTRY (_setjmp) /* Set up arguments, we only need to set the second arg. */ xorl %esi, %esi #ifdef PIC jmp HIDDEN_JUMPTARGET (__sigsetjmp) #else - jmp BP_SYM (__sigsetjmp) + jmp __sigsetjmp #endif -END (BP_SYM (_setjmp)) +END (_setjmp) libc_hidden_def (_setjmp) diff --git a/sysdeps/x86_64/bsd-setjmp.S b/sysdeps/x86_64/bsd-setjmp.S index 32fba70206..6a5cfe2f3b 100644 --- a/sysdeps/x86_64/bsd-setjmp.S +++ b/sysdeps/x86_64/bsd-setjmp.S @@ -24,15 +24,13 @@ #define _ASM #define _SETJMP_H #include <bits/setjmp.h> -#include "bp-sym.h" -#include "bp-asm.h" -ENTRY (BP_SYM (setjmp)) +ENTRY (setjmp) /* Set up arguments, we only need to set the 2nd arg. */ movl $1, %esi #ifdef PIC jmp HIDDEN_JUMPTARGET (__sigsetjmp) #else - jmp BP_SYM (__sigsetjmp) + jmp __sigsetjmp #endif -END (BP_SYM (setjmp)) +END (setjmp) diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index 0fa0e1ecfa..9232411951 100644 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -66,6 +66,8 @@ 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 AVX support" >&5 $as_echo_n "checking for AVX support... " >&6; } @@ -90,6 +92,8 @@ 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; } @@ -114,6 +118,8 @@ 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; } @@ -138,6 +144,8 @@ 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; } @@ -158,6 +166,8 @@ 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 "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in index 94bcd19f3c..c682f93c3e 100644 --- a/sysdeps/x86_64/configure.in +++ b/sysdeps/x86_64/configure.in @@ -12,6 +12,7 @@ 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 -mavx works. AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl @@ -20,6 +21,7 @@ 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 @@ -30,6 +32,7 @@ LIBC_TRY_CC_OPTION([-msse2avx], 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 @@ -38,6 +41,7 @@ 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 @@ -45,6 +49,7 @@ 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 It is always possible to access static and hidden symbols in an dnl position independent way. diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index b828774c7a..f370aebcbb 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -244,27 +244,207 @@ ifloat: 1 Test "Imaginary part of: cacos (-0 - 1.5 i) == pi/2 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0.0 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0.0 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.25 + 1.0 i) == 1.747098759571863549650000258275841544745 - 8.924633639033482359562124741744951972772e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.25 + 1.0 i) == 1.747098759571863549650000258275841544745 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.25 - 1.0 i) == 1.747098759571863549650000258275841544745 + 8.924633639033482359562124741744951972772e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.25 - 1.0 i) == 1.747098759571863549650000258275841544745 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.5 + 1.0 i) == 1.920235389652109912858733517715121394831 - 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.5 + 1.0 i) == 1.920235389652109912858733517715121394831 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0.5 - 1.0 i) == 1.920235389652109912858733517715121394831 + 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0.5 - 1.0 i) == 1.920235389652109912858733517715121394831 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000000002p0 + 0x1p-63 i) == 3.141592653377875508152537040020250564229 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (-0x1.0000000000000002p0 - 0x1p-63 i) == 3.141592653377875508152537040020250564229 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 + 0.0 i) == 3.141592653589793238462643383279502884197 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 + 0x1.fp-1025 i) == 3.141592653589793238462643383279502884197 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 + 0x1p-52 i) == 3.141592643999491532482601997450598791535 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 - 0.0 i) == 3.141592653589793238462643383279502884197 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 - 0x1.fp-1025 i) == 3.141592653589793238462643383279502884197 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.0000000000001p0 - 0x1p-52 i) == 3.141592643999491532482601997450598791535 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.000002p0 + 0x1p-23 i) == 3.141370441751352383825802745874586120521 - 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.000002p0 - 0x1p-23 i) == 3.141370441751352383825802745874586120521 + 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i) == 1.572134236154454360143880041170803681211 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i) == 1.572134236154454360143880041170803681211 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691640832196834 - 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691640832196834 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: cacos (-0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691640832196834 + 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691640832196834 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: cacos (-0x1.fp-129 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442101 - 8.813736713132375348727889167749389235161e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442101 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442101 - 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442101 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Real part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": float: 1 ifloat: 1 Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442100 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: cacos (-0x1.fp-129 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442101 + 8.813736713132375348727889167749389235161e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442101 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442101 + 8.813735870195430252326093249797923090282e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442101 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Real part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": float: 1 ifloat: 1 Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442100 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: cacos (-0x1.fp-30 + 1.0 i) == 1.570796328070826603447840231892468927106 - 8.813735870195430258081932989769495326854e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i) == 1.570796328070826603447840231892468927106 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (-0x1.fp-30 - 1.0 i) == 1.570796328070826603447840231892468927106 + 8.813735870195430258081932989769495326854e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i) == 1.570796328070826603447840231892468927106 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 + 0.5 i) == 2.466703808003786858297978415967328452322 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-10 i) == 3.098101355958774410750062883737683164607 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-30 i) == 3.141550174918818561961484385371624132331 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (-1.0 + 0x1p50 i) == 1.570796326794897507409741391764983781004 - 3.535050620855721078027883819436759661753e1 i": float: 1 ifloat: 1 +Test "Imaginary part of: cacos (-1.0 - 0.5 i) == 2.466703808003786858297978415967328452322 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-10 i) == 3.098101355958774410750062883737683164607 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-30 i) == 3.141550174918818561961484385371624132331 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (-1.0 - 0x1p50 i) == 1.570796326794897507409741391764983781004 + 3.535050620855721078027883819436759661753e1 i": float: 1 ifloat: 1 @@ -299,16 +479,48 @@ ldouble: 1 Test "Real part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": float: 1 ifloat: 1 +Test "Imaginary part of: cacos (0.0 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.0 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442099 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.25 + 1.0 i) == 1.394493894017929688812643125003661339452 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.25 - 1.0 i) == 1.394493894017929688812643125003661339452 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 + +0 i) == 1.047197551196597746154214461093167628066 - 0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (0.5 + 1.0 i) == 1.221357263937683325603909865564381489366 - 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.5 + 1.0 i) == 1.221357263937683325603909865564381489366 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.5 - 0 i) == 1.047197551196597746154214461093167628066 + +0 i": double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: cacos (0.5 - 1.0 i) == 1.221357263937683325603909865564381489366 + 9.261330313501824245501244453057873152694e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0.5 - 1.0 i) == 1.221357263937683325603909865564381489366 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i": float: 1 ifloat: 1 @@ -317,24 +529,182 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: cacos (0x1.0000000000000002p0 + 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000000002p0 + 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: cacos (0x1.0000000000000002p0 - 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000000002p0 - 0x1p-63 i) == 2.119177303101063432592523199680782317447e-10 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cacos (0x1.0000000000001p0 + 0.0 i) == 0.0 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 + 0x1.fp-1025 i) == 2.557178503953494342609835913586108008322e-301 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0x1.0000000000001p0 + 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 - 2.315303644582684770975188768022139415020e-8 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 + 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 - 0.0 i) == 0.0 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 - 0x1.fp-1025 i) == 2.557178503953494342609835913586108008322e-301 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0x1.0000000000001p0 - 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 + 2.315303644582684770975188768022139415020e-8 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.0000000000001p0 - 0x1p-52 i) == 9.590301705980041385828904092662391018164e-9 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (0x1.000002p0 + 0x1p-23 i) == 2.222118384408546368406374049167636760903e-4 - 5.364668491573609633134147164031476452679e-4 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cacos (0x1.000002p0 + 0x1p-23 i) == 2.222118384408546368406374049167636760903e-4 - 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Real part of: cacos (0x1.000002p0 - 0x1p-23 i) == 2.222118384408546368406374049167636760903e-4 + 5.364668491573609633134147164031476452679e-4 i": +float: 2 +ifloat: 2 +Test "Imaginary part of: cacos (0x1.000002p0 - 0x1p-23 i) == 2.222118384408546368406374049167636760903e-4 + 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i) == 1.569458417435338878318763342108699202986 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i) == 1.569458417435338878318763342108699202986 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i) == 1.570796326794896619231321691638670687364 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i) == 1.570796326794896619231321691638670687364 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i) == 1.570796326794896619231321691639751442099 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i) == 1.570796326794896619231321691639751442099 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i) == 1.570796326794896619231321691639751442099 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i) == 1.570796326794896619231321691639751442099 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 0x1.000002p0 i) == 1.570796326794896619231321691639751442097 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i) == 1.570796326794896619231321691639751442097 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i) == 1.570796326794896619231321691639751442097 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 0x1.000002p0 i) == 1.570796326794896619231321691639751442097 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i) == 1.570796326794896619231321691639751442097 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i) == 1.570796326794896619231321691639751442097 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i) == 1.570796325518966635014803151387033957091 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i) == 1.570796325518966635014803151387033957091 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i": double: 1 idouble: 1 Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i": double: 1 idouble: 1 +Test "Real part of: cacos (1.0 + 0.25 i) == 4.890443302710802929202843732146540079124e-1 - 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (1.0 + 0.5 i) == 6.748888455860063801646649673121744318756e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 + 0.5 i) == 6.748888455860063801646649673121744318756e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 + 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 - 4.350501469856803800217957402220976497152e-2 i": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 + 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 + 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 - 0.25 i) == 4.890443302710802929202843732146540079124e-1 + 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: cacos (1.0 - 0.5 i) == 6.748888455860063801646649673121744318756e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 - 0.5 i) == 6.748888455860063801646649673121744318756e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacos (1.0 - 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 + 4.350501469856803800217957402220976497152e-2 i": +float: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (1.0 - 0x1.fp-10 i) == 4.349129763101882771258049954181971959031e-2 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: cacos (1.0 - 0x1.fp-30 i) == 4.247867097467650115899790787875186617316e-5 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (1.5 + +0 i) == +0 - 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -526,18 +896,214 @@ ifloat: 1 Test "Imaginary part of: casin (-0 - 1.5 i) == -0 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: casin (-0.0 + 0x1.000002p0 i) == -0.0 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.0 - 0x1.000002p0 i) == -0.0 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.25 + 1.0 i) == -1.763024327769669304186785666360901026468e-1 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.25 - 1.0 i) == -1.763024327769669304186785666360901026468e-1 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0.5 + 1.0 i) == -3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.5 + 1.0 i) == -3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0.5 - 1.0 i) == -3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0.5 - 1.0 i) == -3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000000002p0 + 0x1p-63 i) == -1.570796326582978888921215348380499122131 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0x1.0000000000000002p0 - 0x1p-63 i) == -1.570796326582978888921215348380499122131 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (-0x1.0000000000001p0 + 0.0 i) == -1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 + 0x1.fp-1025 i) == -1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 + 0x1p-52 i) == -1.570796317204594913251280305810847349436 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 - 0.0 i) == -1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 - 0x1.fp-1025 i) == -1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.0000000000001p0 - 0x1p-52 i) == -1.570796317204594913251280305810847349436 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.000002p0 + 0x1p-23 i) == -1.570574114956455764594481054234834678422 + 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.000002p0 - 0x1p-23 i) == -1.570574114956455764594481054234834678422 - 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Real part of: casin (-0x1.fp-10 + 1.0 i) == -1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.fp-10 + 1.0 i) == -1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1.fp-10 - 1.0 i) == -1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.fp-10 - 1.0 i) == -1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-100 + 1.0 i) == -1.080754735021050612990719608916167354321e-30 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.fp-100 - 1.0 i) == -1.080754735021050612990719608916167354321e-30 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (-0x1.fp-1000 + 1.0 i) == -1.278589251976747242280879285935084814093e-301 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1000 - 1.0 i) == -1.278589251976747242280879285935084814093e-301 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.0 i) == -3.810492908885321743133304375216617626230e-309 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i) == -2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.0 i) == -3.810492908885321743133304375216617626230e-309 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i) == -2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (-0x1.fp-129 + 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 + 1.0 i) == -2.013062564695348242280482517399205554874e-39 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i) == -1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (-0x1.fp-129 - 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 0x1.000002p0 i) == -2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-129 - 1.0 i) == -2.013062564695348242280482517399205554874e-39 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i) == -1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (-0x1.fp-30 + 1.0 i) == -1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-30 + 1.0 i) == -1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1.fp-30 - 1.0 i) == -1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-0x1.fp-30 - 1.0 i) == -1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1p-23 + 0x1.000002p0 i) == -8.429369199749229560964789467980644296420e-8 + 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (-0x1p-23 - 0x1.000002p0 i) == -8.429369199749229560964789467980644296420e-8 - 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (-0x1p-63 + 0x1.0000000000000002p0 i) == -7.666467083416870406778649849746878368519e-20 + 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-0x1p-63 - 0x1.0000000000000002p0 i) == -7.666467083416870406778649849746878368519e-20 - 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 + 0.25 i) == -1.081751996523816326311037318425097434186 + 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (-1.0 + 0.5 i) == -8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0.5 i) == -8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 + 0x1.fp-10 i) == -1.527305029163877791518741192097931722508 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.0 + 0x1.fp-30 i) == -1.570753848123921942730162693731872690232 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (-1.0 - 0.25 i) == -1.081751996523816326311037318425097434186 - 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (-1.0 - 0.5 i) == -8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0.5 i) == -8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (-1.0 - 0x1.fp-10 i) == -1.527305029163877791518741192097931722508 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (-1.0 - 0x1.fp-30 i) == -1.570753848123921942730162693731872690232 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-1.5 + +0 i) == -pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -566,6 +1132,38 @@ ldouble: 1 Test "Imaginary part of: casin (-1.5 - 0x1.fp-16385 i) == -1.570796326794896619231321691639751442099 - 9.624236501192068949955178268487368462704e-1 i": ildouble: 1 ldouble: 1 +Test "Imaginary part of: casin (0.0 + 0x1.000002p0 i) == 0.0 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.0 - 0x1.000002p0 i) == 0.0 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.25 + 1.0 i) == 1.763024327769669304186785666360901026468e-1 + 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.25 - 1.0 i) == 1.763024327769669304186785666360901026468e-1 - 8.924633639033482359562124741744951972772e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.5 + 1.0 i) == 3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.5 + 1.0 i) == 3.494390628572132936274118260753699527325e-1 + 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0.5 - 1.0 i) == 3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0.5 - 1.0 i) == 3.494390628572132936274118260753699527325e-1 - 9.261330313501824245501244453057873152694e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i": double: 1 float: 1 @@ -578,24 +1176,188 @@ float: 1 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Imaginary part of: casin (0x1.0000000000000002p0 + 0x1p-63 i) == 1.570796326582978888921215348380499122131 + 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (0x1.0000000000000002p0 - 0x1p-63 i) == 1.570796326582978888921215348380499122131 - 5.116146586219826555037807251857670783420e-10 i": +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: casin (0x1.0000000000001p0 + 0.0 i) == 1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 + 0x1.fp-1025 i) == 1.570796326794896619231321691639751442099 + 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 + 0x1p-52 i) == 1.570796317204594913251280305810847349436 + 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 - 0.0 i) == 1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 - 0x1.fp-1025 i) == 1.570796326794896619231321691639751442099 - 2.107342425544701550354780375182800088393e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.0000000000001p0 - 0x1p-52 i) == 1.570796317204594913251280305810847349436 - 2.315303644582684770975188768022139415020e-8 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.000002p0 + 0x1p-23 i) == 1.570574114956455764594481054234834678422 + 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.000002p0 - 0x1p-23 i) == 1.570574114956455764594481054234834678422 - 5.364668491573609633134147164031476452679e-4 i": +float: 1 +ifloat: 1 +Test "Real part of: casin (0x1.fp-10 + 1.0 i) == 1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.fp-10 + 1.0 i) == 1.337909359557740912558349531052239112857e-3 + 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1.fp-10 - 1.0 i) == 1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.fp-10 - 1.0 i) == 1.337909359557740912558349531052239112857e-3 - 8.813742198809567991336704287826445879025e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-100 + 1.0 i) == 1.080754735021050612990719608916167354321e-30 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.fp-100 - 1.0 i) == 1.080754735021050612990719608916167354321e-30 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: casin (0x1.fp-1000 + 1.0 i) == 1.278589251976747242280879285935084814093e-301 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp-1000 - 1.0 i) == 1.278589251976747242280879285935084814093e-301 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 + 1.0 i) == 3.810492908885321743133304375216617626230e-309 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i) == 2.989196569048182929051881765490354365918e-309 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Imaginary part of: casin (0x1.fp-1025 - 1.0 i) == 3.810492908885321743133304375216617626230e-309 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +idouble: 1 Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i) == 2.989196569048182929051881765490354365918e-309 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1.fp-129 + 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 + 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 + 1.0 i) == 2.013062564695348242280482517399205554874e-39 + 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i) == 1.579176199917649005841160751101628985741e-39 + 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1.fp-129 - 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 0x1.000002p0 i) == 2.013062444707472738895109955455676357057e-39 - 8.813736713132375348727889167749389235161e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-129 - 1.0 i) == 2.013062564695348242280482517399205554874e-39 - 8.813735870195430252326093249797923090282e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i) == 1.579176199917649005841160751101628985741e-39 - 1.194763217287109304111930828519090523536 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1.fp-30 + 1.0 i) == 1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-30 + 1.0 i) == 1.275929984216518540252717485007112529021e-9 + 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1.fp-30 - 1.0 i) == 1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (0x1.fp-30 - 1.0 i) == 1.275929984216518540252717485007112529021e-9 - 8.813735870195430258081932989769495326854e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 + 7.107906849659093345062145442726115449315e2 i": double: 1 idouble: 1 Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 + 8.973081118419833726837456344608533993585e1 i": double: 1 idouble: 1 +Test "Real part of: casin (0x1p-23 + 0x1.000002p0 i) == 8.429369199749229560964789467980644296420e-8 + 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (0x1p-23 - 0x1.000002p0 i) == 8.429369199749229560964789467980644296420e-8 - 8.813736713132400470205730751186547909968e-1 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casin (0x1p-63 + 0x1.0000000000000002p0 i) == 7.666467083416870406778649849746878368519e-20 + 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (0x1p-63 - 0x1.0000000000000002p0 i) == 7.666467083416870406778649849746878368519e-20 - 8.813735870195430253092739958139610131001e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 + 0.25 i) == 1.081751996523816326311037318425097434186 + 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (1.0 + 0.5 i) == 8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0.5 i) == 8.959074812088902390666567243275770102229e-1 + 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 + 0x1.fp-10 i) == 1.527305029163877791518741192097931722508 + 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.0 + 0x1.fp-30 i) == 1.570753848123921942730162693731872690232 + 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casin (1.0 - 0.25 i) == 1.081751996523816326311037318425097434186 - 5.097911466811016354623559941115413499164e-1 i": +double: 1 +idouble: 1 +Test "Real part of: casin (1.0 - 0.5 i) == 8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0.5 i) == 8.959074812088902390666567243275770102229e-1 - 7.328576759736452608886724437653071523305e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casin (1.0 - 0x1.fp-10 i) == 1.527305029163877791518741192097931722508 - 4.350501469856803800217957402220976497152e-2 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: casin (1.0 - 0x1.fp-30 i) == 1.570753848123921942730162693731872690232 - 4.247867098745151888768727039216644758847e-5 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (1.5 + +0 i) == pi/2 + 0.9624236501192068949955178268487368462704 i": double: 1 float: 1 @@ -646,6 +1408,18 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.0 + 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0.0 - 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0.25 + 1.0 i) == -5.097911466811016354623559941115413499164e-1 + 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (-0.25 - 1.0 i) == -5.097911466811016354623559941115413499164e-1 - 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 Test "Real part of: casinh (-0.5 + +0 i) == -0.4812118250596034474977589134243684231352 + +0 i": double: 2 float: 1 @@ -653,6 +1427,16 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.5 + 1.0 i) == -7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0.5 + 1.0 i) == -7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0.5 - 0 i) == -0.4812118250596034474977589134243684231352 - 0 i": double: 2 float: 1 @@ -660,9 +1444,65 @@ idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0.5 - 1.0 i) == -7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0.5 - 1.0 i) == -7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.0000000000000002p0 + 0x1p-63 i) == -8.813735870195430253092739958139610131001e-1 + 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.0000000000000002p0 - 0x1p-63 i) == -8.813735870195430253092739958139610131001e-1 - 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.000002p0 + 0.0 i) == -8.813736713132375348727889167749389235161e-1 + 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.000002p0 + 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1p-23 i) == -8.813736713132400470205730751186547909968e-1 + 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.000002p0 - 0.0 i) == -8.813736713132375348727889167749389235161e-1 - 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.000002p0 - 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1.fp-129 i) == -8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1p-23 i) == -8.813736713132400470205730751186547909968e-1 - 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.fp-10 + 1.0 i) == -4.350501469856803800217957402220976497152e-2 + 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.fp-10 - 1.0 i) == -4.350501469856803800217957402220976497152e-2 - 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1.fp-1025 + 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0x1.fp-1025 + 1.5 i) == -9.624236501192068949955178268487368462704e-1 + 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0x1.fp-1025 - 0x1.0000000000001p0 i) == -2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-0x1.fp-1025 - 1.5 i) == -9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -678,6 +1518,30 @@ ldouble: 1 Test "Real part of: casinh (-0x1.fp-16385 - 1.5 i) == -9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (-0x1.fp-30 + 1.0 i) == -4.247867098745151888768727039216644758847e-5 + 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1.fp-30 - 1.0 i) == -4.247867098745151888768727039216644758847e-5 - 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p-23 + 0x1.000002p0 i) == -5.364668491573609633134147164031476452679e-4 + 1.570574114956455764594481054234834678422 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1p-23 - 0x1.000002p0 i) == -5.364668491573609633134147164031476452679e-4 - 1.570574114956455764594481054234834678422 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-0x1p-52 + 0x1.0000000000001p0 i) == -2.315303644582684770975188768022139415020e-8 + 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p-52 - 0x1.0000000000001p0 i) == -2.315303644582684770975188768022139415020e-8 - 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-0x1p-63 + 0x1.0000000000000002p0 i) == -5.116146586219826555037807251857670783420e-10 + 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (-0x1p-63 - 0x1.0000000000000002p0 i) == -5.116146586219826555037807251857670783420e-10 - 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 Test "Real part of: casinh (-1.0 + +0 i) == -0.8813735870195430252326093249797923090282 + +0 i": double: 2 float: 1 @@ -685,6 +1549,53 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.0 + 0.25 i) == -8.924633639033482359562124741744951972772e-1 + 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0.5 i) == -9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0.5 i) == -9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-100 i) == -8.813735870195430252326093249797923090282e-1 + 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-1000 i) == -8.813735870195430252326093249797923090282e-1 + 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-1025 i) == -8.813735870195430252326093249797923090282e-1 + 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-129 i) == -8.813735870195430252326093249797923090282e-1 + 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 + 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.0 - 0 i) == -0.8813735870195430252326093249797923090282 - 0 i": double: 2 float: 1 @@ -692,6 +1603,53 @@ idouble: 2 ifloat: 1 ildouble: 2 ldouble: 2 +Test "Real part of: casinh (-1.0 - 0.25 i) == -8.924633639033482359562124741744951972772e-1 - 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0.5 i) == -9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0.5 i) == -9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-10 i) == -8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-100 i) == -8.813735870195430252326093249797923090282e-1 - 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-1000 i) == -8.813735870195430252326093249797923090282e-1 - 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-1025 i) == -8.813735870195430252326093249797923090282e-1 - 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-129 i) == -8.813735870195430252326093249797923090282e-1 - 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (-1.0 - 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-30 i) == -8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (-1.5 + +0 i) == -1.194763217287109304111930828519090523536 + +0 i": double: 2 float: 1 @@ -728,16 +1686,48 @@ idouble: 3 ifloat: 6 ildouble: 5 ldouble: 5 +Test "Real part of: casinh (0.0 + 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0.0 - 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.25 + 1.0 i) == 5.097911466811016354623559941115413499164e-1 + 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0.25 - 1.0 i) == 5.097911466811016354623559941115413499164e-1 - 1.081751996523816326311037318425097434186 i": +double: 1 +idouble: 1 Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0.5 + 1.0 i) == 7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.5 + 1.0 i) == 7.328576759736452608886724437653071523305e-1 + 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0.5 - 1.0 i) == 7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0.5 - 1.0 i) == 7.328576759736452608886724437653071523305e-1 - 8.959074812088902390666567243275770102229e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -748,9 +1738,55 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Imaginary part of: casinh (0x1.0000000000000002p0 + 0x1p-63 i) == 8.813735870195430253092739958139610131001e-1 + 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.0000000000000002p0 - 0x1p-63 i) == 8.813735870195430253092739958139610131001e-1 - 7.666467083416870406778649849746878368519e-20 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.000002p0 + 0.0 i) == 8.813736713132375348727889167749389235161e-1 + 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.000002p0 + 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 + 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1p-23 i) == 8.813736713132400470205730751186547909968e-1 + 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (0x1.000002p0 - 0.0 i) == 8.813736713132375348727889167749389235161e-1 - 0.0 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.000002p0 - 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1.fp-129 i) == 8.813736713132375348727889167749389235161e-1 - 2.013062444707472738895109955455676357057e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1p-23 i) == 8.813736713132400470205730751186547909968e-1 - 8.429369199749229560964789467980644296420e-8 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (0x1.fp-10 + 1.0 i) == 4.350501469856803800217957402220976497152e-2 + 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0x1.fp-10 - 1.0 i) == 4.350501469856803800217957402220976497152e-2 - 1.527305029163877791518741192097931722508 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0x1.fp-1025 + 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp-1025 + 1.5 i) == 9.624236501192068949955178268487368462704e-1 + 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0x1.fp-1025 - 0x1.0000000000001p0 i) == 2.107342425544701550354780375182800088393e-8 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp-1025 - 1.5 i) == 9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 @@ -766,22 +1802,140 @@ ldouble: 1 Test "Real part of: casinh (0x1.fp-16385 - 1.5 i) == 9.624236501192068949955178268487368462704e-1 - 1.570796326794896619231321691639751442099 i": ildouble: 1 ldouble: 1 +Test "Real part of: casinh (0x1.fp-30 + 1.0 i) == 4.247867098745151888768727039216644758847e-5 + 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1.fp-30 - 1.0 i) == 4.247867098745151888768727039216644758847e-5 - 1.570753848123921942730162693731872690232 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i) == 7.107906849659093345062145442726115449315e2 + 7.853981633974483096156608458198757210493e-1 i": double: 1 idouble: 1 Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i) == 8.973081118419833726837456344608533993585e1 + 7.853981633974483096156608458198757210493e-1 i": double: 1 idouble: 1 +Test "Real part of: casinh (0x1p-23 + 0x1.000002p0 i) == 5.364668491573609633134147164031476452679e-4 + 1.570574114956455764594481054234834678422 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0x1p-23 - 0x1.000002p0 i) == 5.364668491573609633134147164031476452679e-4 - 1.570574114956455764594481054234834678422 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (0x1p-52 + 0x1.0000000000001p0 i) == 2.315303644582684770975188768022139415020e-8 + 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p-52 - 0x1.0000000000001p0 i) == 2.315303644582684770975188768022139415020e-8 - 1.570796317204594913251280305810847349436 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (0x1p-63 + 0x1.0000000000000002p0 i) == 5.116146586219826555037807251857670783420e-10 + 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: casinh (0x1p-63 - 0x1.0000000000000002p0 i) == 5.116146586219826555037807251857670783420e-10 - 1.570796326582978888921215348380499122131 i": +ildouble: 2 +ldouble: 2 Test "Real part of: casinh (1.0 + +0 i) == 0.8813735870195430252326093249797923090282 + +0 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.0 + 0.25 i) == 8.924633639033482359562124741744951972772e-1 + 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0.5 i) == 9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0.5 i) == 9.261330313501824245501244453057873152694e-1 + 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 + 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-100 i) == 8.813735870195430252326093249797923090282e-1 + 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-1000 i) == 8.813735870195430252326093249797923090282e-1 + 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-1025 i) == 8.813735870195430252326093249797923090282e-1 + 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-129 i) == 8.813735870195430252326093249797923090282e-1 + 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 + 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 + 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 + 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.0 - 0 i) == 0.8813735870195430252326093249797923090282 - 0 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: casinh (1.0 - 0.25 i) == 8.924633639033482359562124741744951972772e-1 - 1.763024327769669304186785666360901026468e-1 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0.5 i) == 9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0.5 i) == 9.261330313501824245501244453057873152694e-1 - 3.494390628572132936274118260753699527325e-1 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0x1.fp-10 i) == 8.813742198809567991336704287826445879025e-1 - 1.337909359557740912558349531052239112857e-3 i": +float: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-100 i) == 8.813735870195430252326093249797923090282e-1 - 1.080754735021050612990719608916167354321e-30 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-1000 i) == 8.813735870195430252326093249797923090282e-1 - 1.278589251976747242280879285935084814093e-301 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-1025 i) == 8.813735870195430252326093249797923090282e-1 - 3.810492908885321743133304375216617626230e-309 i": +double: 1 +idouble: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-129 i) == 8.813735870195430252326093249797923090282e-1 - 2.013062564695348242280482517399205554874e-39 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: casinh (1.0 - 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: casinh (1.0 - 0x1.fp-30 i) == 8.813735870195430258081932989769495326854e-1 - 1.275929984216518540252717485007112529021e-9 i": +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (1.5 + +0 i) == 1.194763217287109304111930828519090523536 + +0 i": double: 1 idouble: 1 @@ -2390,6 +3544,9 @@ ifloat: 1 Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17": float: 2 ifloat: 2 +Test "j0 (0x1p16382) == -1.2193782500509000574176799046642541129387e-2466": +ildouble: 1 +ldouble: 1 Test "j0 (10.0) == -0.245935764451348335197760862485328754": double: 2 float: 1 @@ -2420,6 +3577,9 @@ ldouble: 1 Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127": double: 1 idouble: 1 +Test "j1 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467": +ildouble: 1 +ldouble: 1 Test "j1 (10.0) == 0.0434727461688614366697487680258592883": float: 2 ifloat: 2 @@ -3073,6 +4233,9 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "y0 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467": +ildouble: 1 +ldouble: 1 Test "y0 (1.0) == 0.0882569642156769579829267660235151628": double: 2 float: 1 @@ -3117,6 +4280,9 @@ ldouble: 1 Test "y1 (0x1p-10) == -6.5190099301063115047395187618929589514382e+02": double: 1 idouble: 1 +Test "y1 (0x1p16382) == 1.2193782500509000574176799046642541129387e-2466": +ildouble: 1 +ldouble: 1 Test "y1 (1.5) == -0.412308626973911295952829820633445323": float: 1 ifloat: 1 @@ -3306,9 +4472,9 @@ ldouble: 1 Function: Real part of "cacos": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 ildouble: 1 ldouble: 1 diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-avx.c b/sysdeps/x86_64/fpu/multiarch/mpa-avx.c index d3f4d7ab2e..366b0b7134 100644 --- a/sysdeps/x86_64/fpu/multiarch/mpa-avx.c +++ b/sysdeps/x86_64/fpu/multiarch/mpa-avx.c @@ -1,5 +1,6 @@ #define __add __add_avx #define __mul __mul_avx +#define __sqr __sqr_avx #define __sub __sub_avx #define __dbl_mp __dbl_mp_avx #define __dvd __dvd_avx diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c index 6abb671b59..a4a759407e 100644 --- a/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c +++ b/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c @@ -1,5 +1,6 @@ #define __add __add_fma4 #define __mul __mul_fma4 +#define __sqr __sqr_fma4 #define __sub __sub_fma4 #define __dbl_mp __dbl_mp_fma4 #define __dvd __dvd_fma4 diff --git a/sysdeps/x86_64/mempcpy.S b/sysdeps/x86_64/mempcpy.S index 5cb256e65b..acee5e56b1 100644 --- a/sysdeps/x86_64/mempcpy.S +++ b/sysdeps/x86_64/mempcpy.S @@ -3,6 +3,6 @@ #define __memcpy_chk __mempcpy_chk #include <sysdeps/x86_64/memcpy.S> -libc_hidden_def (BP_SYM (__mempcpy)) -weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy)) +libc_hidden_def (__mempcpy) +weak_alias (__mempcpy, mempcpy) libc_hidden_builtin_def (mempcpy) diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S index f3a4d448db..b393efe445 100644 --- a/sysdeps/x86_64/memset.S +++ b/sysdeps/x86_64/memset.S @@ -23,7 +23,7 @@ #define __STOS_UPPER_BOUNDARY $65536 .text -#if !defined NOT_IN_libc && !defined USE_MULTIARCH +#if !defined NOT_IN_libc ENTRY(__bzero) mov %rsi,%rdx /* Adjust parameter. */ xorl %esi,%esi /* Fill with 0s. */ diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile index dd6c27d0b4..86787ee6ea 100644 --- a/sysdeps/x86_64/multiarch/Makefile +++ b/sysdeps/x86_64/multiarch/Makefile @@ -10,14 +10,12 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 strncmp-ssse3 \ strend-sse4 memcmp-sse4 memcpy-ssse3 mempcpy-ssse3 \ memmove-ssse3 memcpy-ssse3-back mempcpy-ssse3-back \ memmove-ssse3-back strcasestr-nonascii strcasecmp_l-ssse3 \ - strncase_l-ssse3 strlen-sse4 strlen-sse2-no-bsf memset-x86-64 \ + strncase_l-ssse3 strcat-ssse3 strncat-ssse3\ strcpy-ssse3 strncpy-ssse3 stpcpy-ssse3 stpncpy-ssse3 \ strcpy-sse2-unaligned strncpy-sse2-unaligned \ stpcpy-sse2-unaligned stpncpy-sse2-unaligned \ strcat-sse2-unaligned strncat-sse2-unaligned \ - strcat-ssse3 strncat-ssse3 strlen-sse2-pminub \ - strnlen-sse2-no-bsf strrchr-sse2-no-bsf strchr-sse2-no-bsf \ - memcmp-ssse3 + strrchr-sse2-no-bsf strchr-sse2-no-bsf memcmp-ssse3 ifeq (yes,$(config-cflags-sse4)) sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c varshift CFLAGS-varshift.c += -msse4 diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c index 643cb2dd0a..05315fdd7a 100644 --- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c +++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c @@ -61,17 +61,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __memmove_ssse3) IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_sse2)) - /* Support sysdeps/x86_64/multiarch/memset_chk.S. */ - IFUNC_IMPL (i, name, __memset_chk, - IFUNC_IMPL_ADD (array, i, __memset_chk, 1, __memset_chk_sse2) - IFUNC_IMPL_ADD (array, i, __memset_chk, 1, - __memset_chk_x86_64)) - - /* Support sysdeps/x86_64/multiarch/memset.S. */ - IFUNC_IMPL (i, name, memset, - IFUNC_IMPL_ADD (array, i, memset, 1, __memset_sse2) - IFUNC_IMPL_ADD (array, i, memset, 1, __memset_x86_64)) - /* Support sysdeps/x86_64/multiarch/rawmemchr.S. */ IFUNC_IMPL (i, name, rawmemchr, IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE4_2, @@ -187,11 +176,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __strncpy_sse2_unaligned) IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_sse2)) - /* Support sysdeps/x86_64/multiarch/strnlen.S. */ - IFUNC_IMPL (i, name, strnlen, - IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2_no_bsf) - IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2)) - /* Support sysdeps/x86_64/multiarch/strpbrk.S. */ IFUNC_IMPL (i, name, strpbrk, IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2, @@ -262,14 +246,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __mempcpy_ssse3) IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_sse2)) - /* Support sysdeps/x86_64/multiarch/strlen.S. */ - IFUNC_IMPL (i, name, strlen, - IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE4_2, __strlen_sse42) - IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2_pminub) - IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2_no_bsf) - IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2) - IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2)) - /* Support sysdeps/x86_64/multiarch/strncmp.S. */ IFUNC_IMPL (i, name, strncmp, IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSE4_2, diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c index 992cbfb754..7daaf46099 100644 --- a/sysdeps/x86_64/multiarch/init-arch.c +++ b/sysdeps/x86_64/multiarch/init-arch.c @@ -58,11 +58,6 @@ __init_cpu_features (void) get_common_indeces (&family, &model); - /* Intel processors prefer SSE instruction for memory/string - routines if they are available. */ - __cpu_features.feature[index_Prefer_SSE_for_memop] - |= bit_Prefer_SSE_for_memop; - unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax; unsigned int extended_family = (eax >> 20) & 0xff; unsigned int extended_model = (eax >> 12) & 0xf0; @@ -125,12 +120,6 @@ __init_cpu_features (void) ecx = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx; - /* AMD processors prefer SSE instructions for memory/string routines - if they are available, otherwise they prefer integer instructions. */ - if ((ecx & 0x200)) - __cpu_features.feature[index_Prefer_SSE_for_memop] - |= bit_Prefer_SSE_for_memop; - unsigned int eax; __cpuid (0x80000000, eax, ebx, ecx, edx); if (eax >= 0x80000001) diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h index 0aece18de3..28edbf7d07 100644 --- a/sysdeps/x86_64/multiarch/init-arch.h +++ b/sysdeps/x86_64/multiarch/init-arch.h @@ -18,7 +18,6 @@ #define bit_Fast_Rep_String (1 << 0) #define bit_Fast_Copy_Backward (1 << 1) #define bit_Slow_BSF (1 << 2) -#define bit_Prefer_SSE_for_memop (1 << 3) #define bit_Fast_Unaligned_Load (1 << 4) #define bit_Prefer_PMINUB_for_stringop (1 << 5) #define bit_AVX_Usable (1 << 6) @@ -58,7 +57,6 @@ # define index_Fast_Rep_String FEATURE_INDEX_1*FEATURE_SIZE # define index_Fast_Copy_Backward FEATURE_INDEX_1*FEATURE_SIZE # define index_Slow_BSF FEATURE_INDEX_1*FEATURE_SIZE -# define index_Prefer_SSE_for_memop FEATURE_INDEX_1*FEATURE_SIZE # define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE # define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE # define index_AVX_Usable FEATURE_INDEX_1*FEATURE_SIZE @@ -157,7 +155,6 @@ extern const struct cpu_features *__get_cpu_features (void) # define index_Fast_Rep_String FEATURE_INDEX_1 # define index_Fast_Copy_Backward FEATURE_INDEX_1 # define index_Slow_BSF FEATURE_INDEX_1 -# define index_Prefer_SSE_for_memop FEATURE_INDEX_1 # define index_Fast_Unaligned_Load FEATURE_INDEX_1 # define index_AVX_Usable FEATURE_INDEX_1 # define index_FMA_Usable FEATURE_INDEX_1 @@ -169,7 +166,6 @@ extern const struct cpu_features *__get_cpu_features (void) # define HAS_FAST_REP_STRING HAS_ARCH_FEATURE (Fast_Rep_String) # define HAS_FAST_COPY_BACKWARD HAS_ARCH_FEATURE (Fast_Copy_Backward) # define HAS_SLOW_BSF HAS_ARCH_FEATURE (Slow_BSF) -# define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop) # define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load) # define HAS_AVX HAS_ARCH_FEATURE (AVX_Usable) # define HAS_FMA HAS_ARCH_FEATURE (FMA_Usable) diff --git a/sysdeps/x86_64/multiarch/memset-x86-64.S b/sysdeps/x86_64/multiarch/memset-x86-64.S deleted file mode 100644 index 551d105d21..0000000000 --- a/sysdeps/x86_64/multiarch/memset-x86-64.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sysdep.h> - -#ifndef NOT_IN_libc -# undef ENTRY_CHK -# define ENTRY_CHK(name) \ - .type __memset_chk_x86_64, @function; \ - .globl __memset_chk_x86_64; \ - .p2align 4; \ - __memset_chk_x86_64: cfi_startproc; \ - CALL_MCOUNT -# undef END_CHK -# define END_CHK(name) \ - cfi_endproc; .size __memset_chk_x86_64, .-__memset_chk_x86_64 - -# undef libc_hidden_builtin_def -# define libc_hidden_builtin_def(name) -# define memset __memset_x86_64 -# include "../memset.S" -#endif diff --git a/sysdeps/x86_64/multiarch/memset.S b/sysdeps/x86_64/multiarch/memset.S deleted file mode 100644 index 7f673faa71..0000000000 --- a/sysdeps/x86_64/multiarch/memset.S +++ /dev/null @@ -1,79 +0,0 @@ -/* Multiple versions of memset - All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2013 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 <init-arch.h> - -/* Define multiple versions only for the definition in lib. */ -#ifndef NOT_IN_libc -ENTRY(memset) - .type memset, @gnu_indirect_function - cmpl $0, __cpu_features+KIND_OFFSET(%rip) - jne 1f - call __init_cpu_features -1: leaq __memset_x86_64(%rip), %rax - testl $bit_Prefer_SSE_for_memop, __cpu_features+FEATURE_OFFSET+index_Prefer_SSE_for_memop(%rip) - jz 2f - leaq __memset_sse2(%rip), %rax -2: ret -END(memset) - -/* Define internal IFUNC memset for bzero. */ - .globl __libc_memset - .hidden __libc_memset - __libc_memset = memset - -# define USE_SSE2 1 - -# undef ENTRY -# define ENTRY(name) \ - .type __memset_sse2, @function; \ - .globl __memset_sse2; \ - .p2align 4; \ - __memset_sse2: cfi_startproc; \ - CALL_MCOUNT -# undef END -# define END(name) \ - cfi_endproc; .size __memset_sse2, .-__memset_sse2 - -# undef ENTRY_CHK -# define ENTRY_CHK(name) \ - .type __memset_chk_sse2, @function; \ - .globl __memset_chk_sse2; \ - .p2align 4; \ - __memset_chk_sse2: cfi_startproc; \ - CALL_MCOUNT -# undef END_CHK -# define END_CHK(name) \ - cfi_endproc; .size __memset_chk_sse2, .-__memset_chk_sse2 - -# ifdef SHARED -# undef libc_hidden_builtin_def -/* It doesn't make sense to send libc-internal memset calls through a PLT. - The speedup we get from using GPR instruction is likely eaten away - by the indirect call in the PLT. */ -# define libc_hidden_builtin_def(name) \ - .globl __GI_memset; __GI_memset = __memset_sse2 -# endif - -# undef strong_alias -# define strong_alias(original, alias) -#endif - -#include "../memset.S" diff --git a/sysdeps/x86_64/multiarch/memset_chk.S b/sysdeps/x86_64/multiarch/memset_chk.S deleted file mode 100644 index 55e263542b..0000000000 --- a/sysdeps/x86_64/multiarch/memset_chk.S +++ /dev/null @@ -1,44 +0,0 @@ -/* Multiple versions of __memset_chk - All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2010-2013 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 <init-arch.h> - -/* Define multiple versions only for the definition in lib. */ -#ifndef NOT_IN_libc -# ifdef SHARED -ENTRY(__memset_chk) - .type __memset_chk, @gnu_indirect_function - cmpl $0, __cpu_features+KIND_OFFSET(%rip) - jne 1f - call __init_cpu_features -1: leaq __memset_chk_x86_64(%rip), %rax - testl $bit_Prefer_SSE_for_memop, __cpu_features+FEATURE_OFFSET+index_Prefer_SSE_for_memop(%rip) - jz 2f - leaq __memset_chk_sse2(%rip), %rax -2: ret -END(__memset_chk) - -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 -# include "../memset_chk.S" -# endif -#endif diff --git a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c b/sysdeps/x86_64/multiarch/strcasestr-nonascii.c index 85b7b35753..032a6420d6 100644 --- a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c +++ b/sysdeps/x86_64/multiarch/strcasestr-nonascii.c @@ -22,7 +22,7 @@ /* Similar to __m128i_strloadu. Convert to lower case for none-POSIX/C locale. */ -static inline __m128i +static __m128i __m128i_strloadu_tolower (const unsigned char *p) { union diff --git a/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S b/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S index 72bb609949..028c6d3d74 100644 --- a/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S +++ b/sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S @@ -34,10 +34,236 @@ ENTRY (STRCAT) mov %rdx, %r8 # endif -# define RETURN jmp L(StartStrcpyPart) -# include "strlen-sse2-pminub.S" -# undef RETURN +/* Inline corresponding strlen file, temporary until new strcpy + implementation gets merged. */ + xor %rax, %rax + mov %edi, %ecx + and $0x3f, %ecx + pxor %xmm0, %xmm0 + cmp $0x30, %ecx + ja L(next) + movdqu (%rdi), %xmm1 + pcmpeqb %xmm1, %xmm0 + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit_less16) + mov %rdi, %rax + and $-16, %rax + jmp L(align16_start) +L(next): + mov %rdi, %rax + and $-16, %rax + pcmpeqb (%rax), %xmm0 + mov $-1, %r10d + sub %rax, %rcx + shl %cl, %r10d + pmovmskb %xmm0, %edx + and %r10d, %edx + jnz L(exit) + +L(align16_start): + pxor %xmm0, %xmm0 + pxor %xmm1, %xmm1 + pxor %xmm2, %xmm2 + pxor %xmm3, %xmm3 + pcmpeqb 16(%rax), %xmm0 + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit16) + + pcmpeqb 32(%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + jnz L(exit32) + + pcmpeqb 48(%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + jnz L(exit48) + + pcmpeqb 64(%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + jnz L(exit64) + + pcmpeqb 80(%rax), %xmm0 + add $64, %rax + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit16) + + pcmpeqb 32(%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + jnz L(exit32) + + pcmpeqb 48(%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + jnz L(exit48) + + pcmpeqb 64(%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + jnz L(exit64) + + pcmpeqb 80(%rax), %xmm0 + add $64, %rax + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit16) + + pcmpeqb 32(%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + jnz L(exit32) + + pcmpeqb 48(%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + jnz L(exit48) + + pcmpeqb 64(%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + jnz L(exit64) + + pcmpeqb 80(%rax), %xmm0 + add $64, %rax + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit16) + + pcmpeqb 32(%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + jnz L(exit32) + + pcmpeqb 48(%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + jnz L(exit48) + + pcmpeqb 64(%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + jnz L(exit64) + + test $0x3f, %rax + jz L(align64_loop) + + pcmpeqb 80(%rax), %xmm0 + add $80, %rax + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit) + + test $0x3f, %rax + jz L(align64_loop) + + pcmpeqb 16(%rax), %xmm1 + add $16, %rax + pmovmskb %xmm1, %edx + test %edx, %edx + jnz L(exit) + + test $0x3f, %rax + jz L(align64_loop) + + pcmpeqb 16(%rax), %xmm2 + add $16, %rax + pmovmskb %xmm2, %edx + test %edx, %edx + jnz L(exit) + + test $0x3f, %rax + jz L(align64_loop) + + pcmpeqb 16(%rax), %xmm3 + add $16, %rax + pmovmskb %xmm3, %edx + test %edx, %edx + jnz L(exit) + + add $16, %rax + .p2align 4 + L(align64_loop): + movaps (%rax), %xmm4 + pminub 16(%rax), %xmm4 + movaps 32(%rax), %xmm5 + pminub 48(%rax), %xmm5 + add $64, %rax + pminub %xmm4, %xmm5 + pcmpeqb %xmm0, %xmm5 + pmovmskb %xmm5, %edx + test %edx, %edx + jz L(align64_loop) + + pcmpeqb -64(%rax), %xmm0 + sub $80, %rax + pmovmskb %xmm0, %edx + test %edx, %edx + jnz L(exit16) + + pcmpeqb 32(%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + jnz L(exit32) + + pcmpeqb 48(%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + jnz L(exit48) + + pcmpeqb 64(%rax), %xmm3 + pmovmskb %xmm3, %edx + sub %rdi, %rax + bsf %rdx, %rdx + add %rdx, %rax + add $64, %rax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit): + sub %rdi, %rax +L(exit_less16): + bsf %rdx, %rdx + add %rdx, %rax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit16): + sub %rdi, %rax + bsf %rdx, %rdx + add %rdx, %rax + add $16, %rax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit32): + sub %rdi, %rax + bsf %rdx, %rdx + add %rdx, %rax + add $32, %rax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit48): + sub %rdi, %rax + bsf %rdx, %rdx + add %rdx, %rax + add $48, %rax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit64): + sub %rdi, %rax + bsf %rdx, %rdx + add %rdx, %rax + add $64, %rax + + .p2align 4 L(StartStrcpyPart): lea (%r9, %rax), %rdi mov %rsi, %rcx diff --git a/sysdeps/x86_64/multiarch/strcat-ssse3.S b/sysdeps/x86_64/multiarch/strcat-ssse3.S index fea9d11b40..8101b91e59 100644 --- a/sysdeps/x86_64/multiarch/strcat-ssse3.S +++ b/sysdeps/x86_64/multiarch/strcat-ssse3.S @@ -33,11 +33,321 @@ ENTRY (STRCAT) mov %rdx, %r8 # endif -# define RETURN jmp L(StartStrcpyPart) -# include "strlen-sse2-no-bsf.S" -# undef RETURN +/* Inline corresponding strlen file, temporary until new strcpy + implementation gets merged. */ + + xor %eax, %eax + cmpb $0, (%rdi) + jz L(exit_tail0) + cmpb $0, 1(%rdi) + jz L(exit_tail1) + cmpb $0, 2(%rdi) + jz L(exit_tail2) + cmpb $0, 3(%rdi) + jz L(exit_tail3) + + cmpb $0, 4(%rdi) + jz L(exit_tail4) + cmpb $0, 5(%rdi) + jz L(exit_tail5) + cmpb $0, 6(%rdi) + jz L(exit_tail6) + cmpb $0, 7(%rdi) + jz L(exit_tail7) + + cmpb $0, 8(%rdi) + jz L(exit_tail8) + cmpb $0, 9(%rdi) + jz L(exit_tail9) + cmpb $0, 10(%rdi) + jz L(exit_tail10) + cmpb $0, 11(%rdi) + jz L(exit_tail11) + + cmpb $0, 12(%rdi) + jz L(exit_tail12) + cmpb $0, 13(%rdi) + jz L(exit_tail13) + cmpb $0, 14(%rdi) + jz L(exit_tail14) + cmpb $0, 15(%rdi) + jz L(exit_tail15) + pxor %xmm0, %xmm0 + lea 16(%rdi), %rcx + lea 16(%rdi), %rax + and $-16, %rax + + pcmpeqb (%rax), %xmm0 + pmovmskb %xmm0, %edx + pxor %xmm1, %xmm1 + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm1 + pmovmskb %xmm1, %edx + pxor %xmm2, %xmm2 + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm2 + pmovmskb %xmm2, %edx + pxor %xmm3, %xmm3 + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm0 + pmovmskb %xmm0, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm0 + pmovmskb %xmm0, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm0 + pmovmskb %xmm0, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm1 + pmovmskb %xmm1, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm2 + pmovmskb %xmm2, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + pcmpeqb (%rax), %xmm3 + pmovmskb %xmm3, %edx + test %edx, %edx + lea 16(%rax), %rax + jnz L(exit) + + and $-0x40, %rax + .p2align 4 +L(aligned_64): + pcmpeqb (%rax), %xmm0 + pcmpeqb 16(%rax), %xmm1 + pcmpeqb 32(%rax), %xmm2 + pcmpeqb 48(%rax), %xmm3 + pmovmskb %xmm0, %edx + pmovmskb %xmm1, %r11d + pmovmskb %xmm2, %r10d + pmovmskb %xmm3, %r9d + or %edx, %r9d + or %r11d, %r9d + or %r10d, %r9d + lea 64(%rax), %rax + jz L(aligned_64) + + test %edx, %edx + jnz L(aligned_64_exit_16) + test %r11d, %r11d + jnz L(aligned_64_exit_32) + test %r10d, %r10d + jnz L(aligned_64_exit_48) + +L(aligned_64_exit_64): + pmovmskb %xmm3, %edx + jmp L(exit) + +L(aligned_64_exit_48): + lea -16(%rax), %rax + mov %r10d, %edx + jmp L(exit) + +L(aligned_64_exit_32): + lea -32(%rax), %rax + mov %r11d, %edx + jmp L(exit) + +L(aligned_64_exit_16): + lea -48(%rax), %rax + +L(exit): + sub %rcx, %rax + test %dl, %dl + jz L(exit_high) + test $0x01, %dl + jnz L(exit_tail0) + + test $0x02, %dl + jnz L(exit_tail1) + + test $0x04, %dl + jnz L(exit_tail2) + + test $0x08, %dl + jnz L(exit_tail3) + + test $0x10, %dl + jnz L(exit_tail4) + + test $0x20, %dl + jnz L(exit_tail5) + + test $0x40, %dl + jnz L(exit_tail6) + add $7, %eax +L(exit_tail0): + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_high): + add $8, %eax + test $0x01, %dh + jnz L(exit_tail0) + + test $0x02, %dh + jnz L(exit_tail1) + + test $0x04, %dh + jnz L(exit_tail2) + + test $0x08, %dh + jnz L(exit_tail3) + + test $0x10, %dh + jnz L(exit_tail4) + + test $0x20, %dh + jnz L(exit_tail5) + + test $0x40, %dh + jnz L(exit_tail6) + add $7, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail1): + add $1, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail2): + add $2, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail3): + add $3, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail4): + add $4, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail5): + add $5, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail6): + add $6, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail7): + add $7, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail8): + add $8, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail9): + add $9, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail10): + add $10, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail11): + add $11, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail12): + add $12, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail13): + add $13, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail14): + add $14, %eax + jmp L(StartStrcpyPart) + + .p2align 4 +L(exit_tail15): + add $15, %eax + + .p2align 4 L(StartStrcpyPart): mov %rsi, %rcx lea (%rdi, %rax), %rdx diff --git a/sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S b/sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S deleted file mode 100644 index ff2ab70044..0000000000 --- a/sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S +++ /dev/null @@ -1,685 +0,0 @@ -/* strlen SSE2 without bsf - Copyright (C) 2010-2013 Free Software Foundation, Inc. - Contributed by Intel Corporation. - 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/>. */ - -/* only for strlen case we don't use optimized version for STATIC build just for SHARED */ - -#if (defined SHARED || defined USE_AS_STRCAT || defined USE_AS_STRNLEN) && !defined NOT_IN_libc - -# ifndef USE_AS_STRCAT - -# include <sysdep.h> - -# define RETURN ret - -# ifndef STRLEN -# define STRLEN __strlen_sse2_no_bsf -# endif - - atom_text_section -ENTRY (STRLEN) -# endif - xor %eax, %eax -# ifdef USE_AS_STRNLEN - mov %rsi, %r8 - sub $4, %rsi - jbe L(len_less4_prolog) -# endif - cmpb $0, (%rdi) - jz L(exit_tail0) - cmpb $0, 1(%rdi) - jz L(exit_tail1) - cmpb $0, 2(%rdi) - jz L(exit_tail2) - cmpb $0, 3(%rdi) - jz L(exit_tail3) - -# ifdef USE_AS_STRNLEN - sub $4, %rsi - jbe L(len_less8_prolog) -# endif - - cmpb $0, 4(%rdi) - jz L(exit_tail4) - cmpb $0, 5(%rdi) - jz L(exit_tail5) - cmpb $0, 6(%rdi) - jz L(exit_tail6) - cmpb $0, 7(%rdi) - jz L(exit_tail7) - -# ifdef USE_AS_STRNLEN - sub $4, %rsi - jbe L(len_less12_prolog) -# endif - - cmpb $0, 8(%rdi) - jz L(exit_tail8) - cmpb $0, 9(%rdi) - jz L(exit_tail9) - cmpb $0, 10(%rdi) - jz L(exit_tail10) - cmpb $0, 11(%rdi) - jz L(exit_tail11) - -# ifdef USE_AS_STRNLEN - sub $4, %rsi - jbe L(len_less16_prolog) -# endif - - cmpb $0, 12(%rdi) - jz L(exit_tail12) - cmpb $0, 13(%rdi) - jz L(exit_tail13) - cmpb $0, 14(%rdi) - jz L(exit_tail14) - cmpb $0, 15(%rdi) - jz L(exit_tail15) - pxor %xmm0, %xmm0 - lea 16(%rdi), %rcx - lea 16(%rdi), %rax - and $-16, %rax - -# ifdef USE_AS_STRNLEN - and $15, %rdi - add %rdi, %rsi - sub $64, %rsi - jbe L(len_less64) -# endif - - pcmpeqb (%rax), %xmm0 - pmovmskb %xmm0, %edx - pxor %xmm1, %xmm1 - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm1 - pmovmskb %xmm1, %edx - pxor %xmm2, %xmm2 - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm2 - pmovmskb %xmm2, %edx - pxor %xmm3, %xmm3 - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - -# ifdef USE_AS_STRNLEN - sub $64, %rsi - jbe L(len_less64) -# endif - - pcmpeqb (%rax), %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - -# ifdef USE_AS_STRNLEN - sub $64, %rsi - jbe L(len_less64) -# endif - - pcmpeqb (%rax), %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - -# ifdef USE_AS_STRNLEN - sub $64, %rsi - jbe L(len_less64) -# endif - - pcmpeqb (%rax), %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - - pcmpeqb (%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - lea 16(%rax), %rax - jnz L(exit) - -# ifdef USE_AS_STRNLEN - mov %rax, %rdx - and $63, %rdx - add %rdx, %rsi -# endif - - and $-0x40, %rax - - .p2align 4 -L(aligned_64): -# ifdef USE_AS_STRNLEN - sub $64, %rsi - jbe L(len_less64) -# endif - pcmpeqb (%rax), %xmm0 - pcmpeqb 16(%rax), %xmm1 - pcmpeqb 32(%rax), %xmm2 - pcmpeqb 48(%rax), %xmm3 - pmovmskb %xmm0, %edx - pmovmskb %xmm1, %r11d - pmovmskb %xmm2, %r10d - pmovmskb %xmm3, %r9d - or %edx, %r9d - or %r11d, %r9d - or %r10d, %r9d - lea 64(%rax), %rax - jz L(aligned_64) - - test %edx, %edx - jnz L(aligned_64_exit_16) - test %r11d, %r11d - jnz L(aligned_64_exit_32) - test %r10d, %r10d - jnz L(aligned_64_exit_48) -L(aligned_64_exit_64): - pmovmskb %xmm3, %edx - jmp L(aligned_64_exit) -L(aligned_64_exit_48): - lea -16(%rax), %rax - mov %r10d, %edx - jmp L(aligned_64_exit) -L(aligned_64_exit_32): - lea -32(%rax), %rax - mov %r11d, %edx - jmp L(aligned_64_exit) -L(aligned_64_exit_16): - lea -48(%rax), %rax -L(aligned_64_exit): -L(exit): - sub %rcx, %rax - test %dl, %dl - jz L(exit_high) - test $0x01, %dl - jnz L(exit_tail0) - - test $0x02, %dl - jnz L(exit_tail1) - - test $0x04, %dl - jnz L(exit_tail2) - - test $0x08, %dl - jnz L(exit_tail3) - - test $0x10, %dl - jnz L(exit_tail4) - - test $0x20, %dl - jnz L(exit_tail5) - - test $0x40, %dl - jnz L(exit_tail6) - add $7, %eax -L(exit_tail0): - RETURN - -L(exit_high): - add $8, %eax - test $0x01, %dh - jnz L(exit_tail0) - - test $0x02, %dh - jnz L(exit_tail1) - - test $0x04, %dh - jnz L(exit_tail2) - - test $0x08, %dh - jnz L(exit_tail3) - - test $0x10, %dh - jnz L(exit_tail4) - - test $0x20, %dh - jnz L(exit_tail5) - - test $0x40, %dh - jnz L(exit_tail6) - add $7, %eax - RETURN - -# ifdef USE_AS_STRNLEN - - .p2align 4 -L(len_less64): - pxor %xmm0, %xmm0 - add $64, %rsi - - pcmpeqb (%rax), %xmm0 - pmovmskb %xmm0, %edx - pxor %xmm1, %xmm1 - lea 16(%rax), %rax - test %edx, %edx - jnz L(strnlen_exit) - - sub $16, %rsi - jbe L(return_start_len) - - pcmpeqb (%rax), %xmm1 - pmovmskb %xmm1, %edx - lea 16(%rax), %rax - test %edx, %edx - jnz L(strnlen_exit) - - sub $16, %rsi - jbe L(return_start_len) - - pcmpeqb (%rax), %xmm0 - pmovmskb %xmm0, %edx - lea 16(%rax), %rax - test %edx, %edx - jnz L(strnlen_exit) - - sub $16, %rsi - jbe L(return_start_len) - - pcmpeqb (%rax), %xmm1 - pmovmskb %xmm1, %edx - lea 16(%rax), %rax - test %edx, %edx - jnz L(strnlen_exit) - - mov %r8, %rax - ret - - .p2align 4 -L(strnlen_exit): - sub %rcx, %rax - - test %dl, %dl - jz L(strnlen_exit_high) - mov %dl, %cl - and $15, %cl - jz L(strnlen_exit_8) - test $0x01, %dl - jnz L(exit_tail0) - test $0x02, %dl - jnz L(strnlen_exit_tail1) - test $0x04, %dl - jnz L(strnlen_exit_tail2) - sub $4, %rsi - jb L(return_start_len) - lea 3(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_8): - test $0x10, %dl - jnz L(strnlen_exit_tail4) - test $0x20, %dl - jnz L(strnlen_exit_tail5) - test $0x40, %dl - jnz L(strnlen_exit_tail6) - sub $8, %rsi - jb L(return_start_len) - lea 7(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_high): - mov %dh, %ch - and $15, %ch - jz L(strnlen_exit_high_8) - test $0x01, %dh - jnz L(strnlen_exit_tail8) - test $0x02, %dh - jnz L(strnlen_exit_tail9) - test $0x04, %dh - jnz L(strnlen_exit_tail10) - sub $12, %rsi - jb L(return_start_len) - lea 11(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_high_8): - test $0x10, %dh - jnz L(strnlen_exit_tail12) - test $0x20, %dh - jnz L(strnlen_exit_tail13) - test $0x40, %dh - jnz L(strnlen_exit_tail14) - sub $16, %rsi - jb L(return_start_len) - lea 15(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail1): - sub $2, %rsi - jb L(return_start_len) - lea 1(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail2): - sub $3, %rsi - jb L(return_start_len) - lea 2(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail4): - sub $5, %rsi - jb L(return_start_len) - lea 4(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail5): - sub $6, %rsi - jb L(return_start_len) - lea 5(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail6): - sub $7, %rsi - jb L(return_start_len) - lea 6(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail8): - sub $9, %rsi - jb L(return_start_len) - lea 8(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail9): - sub $10, %rsi - jb L(return_start_len) - lea 9(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail10): - sub $11, %rsi - jb L(return_start_len) - lea 10(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail12): - sub $13, %rsi - jb L(return_start_len) - lea 12(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail13): - sub $14, %rsi - jb L(return_start_len) - lea 13(%eax), %eax - ret - - .p2align 4 -L(strnlen_exit_tail14): - sub $15, %rsi - jb L(return_start_len) - lea 14(%eax), %eax - ret - - .p2align 4 -L(return_start_len): - mov %r8, %rax - ret - -/* for prolog only */ - - .p2align 4 -L(len_less4_prolog): - add $4, %rsi - jz L(exit_tail0) - - cmpb $0, (%rdi) - jz L(exit_tail0) - cmp $1, %esi - je L(exit_tail1) - - cmpb $0, 1(%rdi) - jz L(exit_tail1) - cmp $2, %esi - je L(exit_tail2) - - cmpb $0, 2(%rdi) - jz L(exit_tail2) - cmp $3, %esi - je L(exit_tail3) - - cmpb $0, 3(%rdi) - jz L(exit_tail3) - mov $4, %eax - ret - - .p2align 4 -L(len_less8_prolog): - add $4, %rsi - - cmpb $0, 4(%rdi) - jz L(exit_tail4) - cmp $1, %esi - je L(exit_tail5) - - cmpb $0, 5(%rdi) - jz L(exit_tail5) - cmp $2, %esi - je L(exit_tail6) - - cmpb $0, 6(%rdi) - jz L(exit_tail6) - cmp $3, %esi - je L(exit_tail7) - - cmpb $0, 7(%rdi) - jz L(exit_tail7) - mov $8, %eax - ret - - .p2align 4 -L(len_less12_prolog): - add $4, %rsi - - cmpb $0, 8(%rdi) - jz L(exit_tail8) - cmp $1, %esi - je L(exit_tail9) - - cmpb $0, 9(%rdi) - jz L(exit_tail9) - cmp $2, %esi - je L(exit_tail10) - - cmpb $0, 10(%rdi) - jz L(exit_tail10) - cmp $3, %esi - je L(exit_tail11) - - cmpb $0, 11(%rdi) - jz L(exit_tail11) - mov $12, %eax - ret - - .p2align 4 -L(len_less16_prolog): - add $4, %rsi - - cmpb $0, 12(%rdi) - jz L(exit_tail12) - cmp $1, %esi - je L(exit_tail13) - - cmpb $0, 13(%rdi) - jz L(exit_tail13) - cmp $2, %esi - je L(exit_tail14) - - cmpb $0, 14(%rdi) - jz L(exit_tail14) - cmp $3, %esi - je L(exit_tail15) - - cmpb $0, 15(%rdi) - jz L(exit_tail15) - mov $16, %eax - ret -# endif - - .p2align 4 -L(exit_tail1): - add $1, %eax - RETURN - - .p2align 4 -L(exit_tail2): - add $2, %eax - RETURN - - .p2align 4 -L(exit_tail3): - add $3, %eax - RETURN - - .p2align 4 -L(exit_tail4): - add $4, %eax - RETURN - - .p2align 4 -L(exit_tail5): - add $5, %eax - RETURN - - .p2align 4 -L(exit_tail6): - add $6, %eax - RETURN - - .p2align 4 -L(exit_tail7): - add $7, %eax - RETURN - - .p2align 4 -L(exit_tail8): - add $8, %eax - RETURN - - .p2align 4 -L(exit_tail9): - add $9, %eax - RETURN - - .p2align 4 -L(exit_tail10): - add $10, %eax - RETURN - - .p2align 4 -L(exit_tail11): - add $11, %eax - RETURN - - .p2align 4 -L(exit_tail12): - add $12, %eax - RETURN - - .p2align 4 -L(exit_tail13): - add $13, %eax - RETURN - - .p2align 4 -L(exit_tail14): - add $14, %eax - RETURN - - .p2align 4 -L(exit_tail15): - add $15, %eax -# ifndef USE_AS_STRCAT - RETURN -END (STRLEN) -# endif -#endif diff --git a/sysdeps/x86_64/multiarch/strlen-sse2-pminub.S b/sysdeps/x86_64/multiarch/strlen-sse2-pminub.S deleted file mode 100644 index cc4bb57e97..0000000000 --- a/sysdeps/x86_64/multiarch/strlen-sse2-pminub.S +++ /dev/null @@ -1,259 +0,0 @@ -/* strlen SSE2 - Copyright (C) 2011-2013 Free Software Foundation, Inc. - Contributed by Intel Corporation. - 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/>. */ - -#if !defined NOT_IN_libc && (defined SHARED || defined USE_AS_STRCAT) - -# ifndef USE_AS_STRCAT - -# include <sysdep.h> - -# define RETURN ret - - .section .text.sse2,"ax",@progbits -ENTRY (__strlen_sse2_pminub) - -# endif - xor %rax, %rax - mov %edi, %ecx - and $0x3f, %ecx - pxor %xmm0, %xmm0 - cmp $0x30, %ecx - ja L(next) - movdqu (%rdi), %xmm1 - pcmpeqb %xmm1, %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit_less16) - mov %rdi, %rax - and $-16, %rax - jmp L(align16_start) -L(next): - mov %rdi, %rax - and $-16, %rax - pcmpeqb (%rax), %xmm0 - mov $-1, %r10d - sub %rax, %rcx - shl %cl, %r10d - pmovmskb %xmm0, %edx - and %r10d, %edx - jnz L(exit) -L(align16_start): - pxor %xmm0, %xmm0 - pxor %xmm1, %xmm1 - pxor %xmm2, %xmm2 - pxor %xmm3, %xmm3 - pcmpeqb 16(%rax), %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit16) - - pcmpeqb 32(%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit32) - - pcmpeqb 48(%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit48) - - pcmpeqb 64(%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - jnz L(exit64) - - pcmpeqb 80(%rax), %xmm0 - add $64, %rax - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit16) - - pcmpeqb 32(%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit32) - - pcmpeqb 48(%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit48) - - pcmpeqb 64(%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - jnz L(exit64) - - pcmpeqb 80(%rax), %xmm0 - add $64, %rax - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit16) - - pcmpeqb 32(%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit32) - - pcmpeqb 48(%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit48) - - pcmpeqb 64(%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - jnz L(exit64) - - pcmpeqb 80(%rax), %xmm0 - add $64, %rax - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit16) - - pcmpeqb 32(%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit32) - - pcmpeqb 48(%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit48) - - pcmpeqb 64(%rax), %xmm3 - pmovmskb %xmm3, %edx - test %edx, %edx - jnz L(exit64) - - - test $0x3f, %rax - jz L(align64_loop) - - pcmpeqb 80(%rax), %xmm0 - add $80, %rax - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit) - - test $0x3f, %rax - jz L(align64_loop) - - pcmpeqb 16(%rax), %xmm1 - add $16, %rax - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit) - - test $0x3f, %rax - jz L(align64_loop) - - pcmpeqb 16(%rax), %xmm2 - add $16, %rax - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit) - - test $0x3f, %rax - jz L(align64_loop) - - pcmpeqb 16(%rax), %xmm3 - add $16, %rax - pmovmskb %xmm3, %edx - test %edx, %edx - jnz L(exit) - - add $16, %rax - .p2align 4 - L(align64_loop): - movaps (%rax), %xmm4 - pminub 16(%rax), %xmm4 - movaps 32(%rax), %xmm5 - pminub 48(%rax), %xmm5 - add $64, %rax - pminub %xmm4, %xmm5 - pcmpeqb %xmm0, %xmm5 - pmovmskb %xmm5, %edx - test %edx, %edx - jz L(align64_loop) - - - pcmpeqb -64(%rax), %xmm0 - sub $80, %rax - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit16) - - pcmpeqb 32(%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit32) - - pcmpeqb 48(%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit48) - - pcmpeqb 64(%rax), %xmm3 - pmovmskb %xmm3, %edx - sub %rdi, %rax - bsf %rdx, %rdx - add %rdx, %rax - add $64, %rax - RETURN - - .p2align 4 -L(exit): - sub %rdi, %rax -L(exit_less16): - bsf %rdx, %rdx - add %rdx, %rax - RETURN - .p2align 4 -L(exit16): - sub %rdi, %rax - bsf %rdx, %rdx - add %rdx, %rax - add $16, %rax - RETURN - .p2align 4 -L(exit32): - sub %rdi, %rax - bsf %rdx, %rdx - add %rdx, %rax - add $32, %rax - RETURN - .p2align 4 -L(exit48): - sub %rdi, %rax - bsf %rdx, %rdx - add %rdx, %rax - add $48, %rax - RETURN - .p2align 4 -L(exit64): - sub %rdi, %rax - bsf %rdx, %rdx - add %rdx, %rax - add $64, %rax -# ifndef USE_AS_STRCAT - RETURN - -END (__strlen_sse2_pminub) -# endif -#endif diff --git a/sysdeps/x86_64/multiarch/strlen-sse4.S b/sysdeps/x86_64/multiarch/strlen-sse4.S deleted file mode 100644 index 8d685df0cf..0000000000 --- a/sysdeps/x86_64/multiarch/strlen-sse4.S +++ /dev/null @@ -1,84 +0,0 @@ -/* strlen with SSE4 - Copyright (C) 2009-2013 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@redhat.com>. - 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/>. */ - -#if defined SHARED && !defined NOT_IN_libc - -#include <sysdep.h> - - .section .text.sse4.2,"ax",@progbits -ENTRY (__strlen_sse42) - pxor %xmm1, %xmm1 - movl %edi, %ecx - movq %rdi, %r8 - andq $~15, %rdi - xor %edi, %ecx - pcmpeqb (%rdi), %xmm1 - pmovmskb %xmm1, %edx - shrl %cl, %edx - shll %cl, %edx - andl %edx, %edx - jnz L(less16bytes) - pxor %xmm1, %xmm1 - - .p2align 4 -L(more64bytes_loop): - pcmpistri $0x08, 16(%rdi), %xmm1 - jz L(more32bytes) - - pcmpistri $0x08, 32(%rdi), %xmm1 - jz L(more48bytes) - - pcmpistri $0x08, 48(%rdi), %xmm1 - jz L(more64bytes) - - add $64, %rdi - pcmpistri $0x08, (%rdi), %xmm1 - jnz L(more64bytes_loop) - leaq (%rdi,%rcx), %rax - subq %r8, %rax - ret - - .p2align 4 -L(more32bytes): - leaq 16(%rdi,%rcx, 1), %rax - subq %r8, %rax - ret - - .p2align 4 -L(more48bytes): - leaq 32(%rdi,%rcx, 1), %rax - subq %r8, %rax - ret - - .p2align 4 -L(more64bytes): - leaq 48(%rdi,%rcx, 1), %rax - subq %r8, %rax - ret - - .p2align 4 -L(less16bytes): - subq %r8, %rdi - bsfl %edx, %eax - addq %rdi, %rax - ret - -END (__strlen_sse42) - -#endif diff --git a/sysdeps/x86_64/multiarch/strlen.S b/sysdeps/x86_64/multiarch/strlen.S deleted file mode 100644 index ab29ceff21..0000000000 --- a/sysdeps/x86_64/multiarch/strlen.S +++ /dev/null @@ -1,68 +0,0 @@ -/* Multiple versions of strlen(str) -- determine the length of the string STR. - All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2009-2013 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@redhat.com>. - 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 <init-arch.h> - - -/* Define multiple versions only for the definition in libc and for - the DSO. In static binaries we need strlen before the initialization - happened. */ -#if defined SHARED && !defined NOT_IN_libc - .text -ENTRY(strlen) - .type strlen, @gnu_indirect_function - cmpl $0, __cpu_features+KIND_OFFSET(%rip) - jne 1f - call __init_cpu_features -1: leaq __strlen_sse2_pminub(%rip), %rax - testl $bit_Prefer_PMINUB_for_stringop, __cpu_features+FEATURE_OFFSET+index_Prefer_PMINUB_for_stringop(%rip) - jnz 2f - leaq __strlen_sse2(%rip), %rax - testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip) - jz 2f - leaq __strlen_sse42(%rip), %rax - ret -2: testl $bit_Slow_BSF, __cpu_features+FEATURE_OFFSET+index_Slow_BSF(%rip) - jz 3f - leaq __strlen_sse2_no_bsf(%rip), %rax -3: ret -END(strlen) - -# undef ENTRY -# define ENTRY(name) \ - .type __strlen_sse2, @function; \ - .align 16; \ - .globl __strlen_sse2; \ - .hidden __strlen_sse2; \ - __strlen_sse2: cfi_startproc; \ - CALL_MCOUNT -# undef END -# define END(name) \ - cfi_endproc; .size __strlen_sse2, .-__strlen_sse2 -# undef libc_hidden_builtin_def -/* It doesn't make sense to send libc-internal strlen calls through a PLT. - The speedup we get from using SSE4.2 instruction is likely eaten away - by the indirect call in the PLT. */ -# define libc_hidden_builtin_def(name) \ - .globl __GI_strlen; __GI_strlen = __strlen_sse2 -#endif - -#include "../strlen.S" diff --git a/sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S b/sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S deleted file mode 100644 index 248328d999..0000000000 --- a/sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S +++ /dev/null @@ -1,3 +0,0 @@ -#define USE_AS_STRNLEN -#define STRLEN __strnlen_sse2_no_bsf -#include "strlen-sse2-no-bsf.S" diff --git a/sysdeps/x86_64/multiarch/strnlen.S b/sysdeps/x86_64/multiarch/strnlen.S deleted file mode 100644 index 124f8458a3..0000000000 --- a/sysdeps/x86_64/multiarch/strnlen.S +++ /dev/null @@ -1,57 +0,0 @@ -/* multiple version of strnlen - All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2011-2013 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 <init-arch.h> - - -/* Define multiple versions only for the definition in libc. */ -#ifndef NOT_IN_libc - - .text -ENTRY(__strnlen) - .type __strnlen, @gnu_indirect_function - cmpl $0, __cpu_features+KIND_OFFSET(%rip) - jne 1f - call __init_cpu_features -1: leaq __strnlen_sse2(%rip), %rax - testl $bit_Slow_BSF, __cpu_features+FEATURE_OFFSET+index_Slow_BSF(%rip) - jz 2f - leaq __strnlen_sse2_no_bsf(%rip), %rax -2: ret -END(__strnlen) - -# undef ENTRY -# define ENTRY(name) \ - .type __strnlen_sse2, @function; \ - .align 16; \ - .globl __strnlen_sse2; \ - .hidden __strnlen_sse2; \ - __strnlen_sse2: cfi_startproc; \ - CALL_MCOUNT -# undef END -# define END(name) \ - cfi_endproc; .size __strnlen_sse2, .-__strnlen_sse2 - -# undef libc_hidden_def -# define libc_hidden_def(name) \ - .globl __GI_strnlen; __GI_strnlen = __strnlen_sse2 -#endif - -#include "../strnlen.S" diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c index 1cc015d0c1..cd63b68c01 100644 --- a/sysdeps/x86_64/multiarch/strstr.c +++ b/sysdeps/x86_64/multiarch/strstr.c @@ -82,11 +82,11 @@ 5. failed string compare, go back to scanning */ +#if !(defined USE_AS_STRCASESTR && defined STRCASESTR_NONASCII) /* Simple replacement of movdqu to address 4KB boundary cross issue. If EOS occurs within less than 16B before 4KB boundary, we don't cross to next page. */ - -static inline __m128i +static __m128i __m128i_strloadu (const unsigned char * p, __m128i zero) { if (__builtin_expect ((int) ((size_t) p & 0xfff) > 0xff0, 0)) @@ -99,13 +99,14 @@ __m128i_strloadu (const unsigned char * p, __m128i zero) } return _mm_loadu_si128 ((__m128i *) p); } +#endif #if defined USE_AS_STRCASESTR && !defined STRCASESTR_NONASCII /* Similar to __m128i_strloadu. Convert to lower case for POSIX/C locale and other which have single-byte letters only in the ASCII range. */ -static inline __m128i +static __m128i __m128i_strloadu_tolower (const unsigned char *p, __m128i zero, __m128i uclow, __m128i uchigh, __m128i lcqword) { diff --git a/sysdeps/x86_64/preconfigure b/sysdeps/x86_64/preconfigure index ca9de75843..d5abba8824 100644 --- a/sysdeps/x86_64/preconfigure +++ b/sysdeps/x86_64/preconfigure @@ -1,123 +1,3 @@ - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile # This file is generated from configure.in by Autoconf. DO NOT EDIT! # Local preconfigure fragment for sysdeps/x86_64 diff --git a/sysdeps/x86_64/rtld-strchr.S b/sysdeps/x86_64/rtld-strchr.S index 37858d1a47..323da67429 100644 --- a/sysdeps/x86_64/rtld-strchr.S +++ b/sysdeps/x86_64/rtld-strchr.S @@ -19,12 +19,10 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" .text -ENTRY (BP_SYM (strchr)) +ENTRY (strchr) /* Before we start with the main loop we process single bytes until the source pointer is aligned. This has two reasons: @@ -284,7 +282,7 @@ ENTRY (BP_SYM (strchr)) 6: nop retq -END (BP_SYM (strchr)) +END (strchr) -weak_alias (BP_SYM (strchr), BP_SYM (index)) +weak_alias (strchr, index) libc_hidden_builtin_def (strchr) diff --git a/sysdeps/x86_64/rtld-strlen.S b/sysdeps/x86_64/rtld-strlen.S index bb23b55086..c459057d15 100644 --- a/sysdeps/x86_64/rtld-strlen.S +++ b/sysdeps/x86_64/rtld-strlen.S @@ -19,8 +19,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" .text diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S index ecb4cc5bb8..71788d1e47 100644 --- a/sysdeps/x86_64/setjmp.S +++ b/sysdeps/x86_64/setjmp.S @@ -61,10 +61,10 @@ ENTRY (__sigsetjmp) #else /* Make a tail call to __sigjmp_save; it takes the same args. */ # ifdef PIC - jmp C_SYMBOL_NAME (BP_SYM (__sigjmp_save))@PLT + jmp C_SYMBOL_NAME (__sigjmp_save)@PLT # else - jmp BP_SYM (__sigjmp_save) + jmp __sigjmp_save # endif #endif -END (BP_SYM (__sigsetjmp)) +END (__sigsetjmp) hidden_def (__sigsetjmp) diff --git a/sysdeps/x86_64/start.S b/sysdeps/x86_64/start.S index c4d25d0614..7cbc157662 100644 --- a/sysdeps/x86_64/start.S +++ b/sysdeps/x86_64/start.S @@ -54,7 +54,6 @@ */ #include <sysdep.h> -#include "bp-sym.h" .text .globl _start @@ -106,21 +105,21 @@ _start: mov __libc_csu_fini@GOTPCREL(%rip), %R8_LP mov __libc_csu_init@GOTPCREL(%rip), %RCX_LP - mov BP_SYM (main)@GOTPCREL(%rip), %RDI_LP + mov main@GOTPCREL(%rip), %RDI_LP /* Call the user's main function, and exit with its value. But let the libc call main. */ - call BP_SYM (__libc_start_main)@PLT + call __libc_start_main@PLT #else /* Pass address of our own entry points to .fini and .init. */ mov $__libc_csu_fini, %R8_LP mov $__libc_csu_init, %RCX_LP - mov $BP_SYM (main), %RDI_LP + mov $main, %RDI_LP /* Call the user's main function, and exit with its value. But let the libc call main. */ - call BP_SYM (__libc_start_main) + call __libc_start_main #endif hlt /* Crash if somehow `exit' does return. */ diff --git a/sysdeps/x86_64/strcat.S b/sysdeps/x86_64/strcat.S index d108750ce3..8bea6fb5db 100644 --- a/sysdeps/x86_64/strcat.S +++ b/sysdeps/x86_64/strcat.S @@ -20,12 +20,11 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" +/* Will be removed when new strcpy implementation gets merged. */ .text -ENTRY (BP_SYM (strcat)) +ENTRY (strcat) movq %rdi, %rcx /* Dest. register. */ andl $7, %ecx /* mask alignment bits */ movq %rdi, %rax /* Duplicate destination pointer. */ @@ -255,5 +254,5 @@ ENTRY (BP_SYM (strcat)) 24: movq %rdi, %rax /* Source is return value. */ retq -END (BP_SYM (strcat)) +END (strcat) libc_hidden_builtin_def (strcat) diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S index 843c9e29f0..76809373e8 100644 --- a/sysdeps/x86_64/strcmp.S +++ b/sysdeps/x86_64/strcmp.S @@ -21,8 +21,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" #undef UPDATE_STRNCMP_COUNTER @@ -34,7 +32,7 @@ /* The simplified code below is not set up to handle strncmp() so far. Should this become necessary it has to be implemented. For now just report the problem. */ -# ifdef NOT_IN_lib +# ifdef NOT_IN_libc # error "strncmp not implemented so far" # endif @@ -53,7 +51,7 @@ # include "locale-defines.h" /* No support for strcasecmp outside libc so far since it is not needed. */ -# ifdef NOT_IN_lib +# ifdef NOT_IN_libc # error "strcasecmp_l not implemented so far" # endif @@ -62,7 +60,7 @@ # include "locale-defines.h" /* No support for strncasecmp outside libc so far since it is not needed. */ -# ifdef NOT_IN_lib +# ifdef NOT_IN_libc # error "strncasecmp_l not implemented so far" # endif @@ -127,7 +125,7 @@ libc_hidden_def (__strncasecmp) /* FALLTHROUGH to strncasecmp_l. */ #endif -ENTRY (BP_SYM (STRCMP)) +ENTRY (STRCMP) #ifdef NOT_IN_libc /* Simple version since we can't use SSE registers in ld.so. */ L(oop): movb (%rdi), %al @@ -145,7 +143,7 @@ L(neq): movl $1, %eax movl $-1, %ecx cmovbl %ecx, %eax ret -END (BP_SYM (STRCMP)) +END (STRCMP) #else /* NOT_IN_libc */ # ifdef USE_AS_STRCASECMP_L /* We have to fall back on the C implementation for locales @@ -2281,7 +2279,7 @@ LABEL(Byte0): sub %ecx, %eax ret -END (BP_SYM (STRCMP)) +END (STRCMP) .section .rodata,"a",@progbits .p2align 3 diff --git a/sysdeps/x86_64/strcpy.S b/sysdeps/x86_64/strcpy.S index 812248c0ba..612824700a 100644 --- a/sysdeps/x86_64/strcpy.S +++ b/sysdeps/x86_64/strcpy.S @@ -19,15 +19,13 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" #ifndef USE_AS_STPCPY # define STRCPY strcpy #endif .text -ENTRY (BP_SYM (STRCPY)) +ENTRY (STRCPY) movq %rsi, %rcx /* Source register. */ andl $7, %ecx /* mask alignment bits */ movq %rdi, %rdx /* Duplicate destination pointer. */ @@ -152,7 +150,7 @@ ENTRY (BP_SYM (STRCPY)) movq %rdi, %rax /* Source is return value. */ #endif retq -END (BP_SYM (STRCPY)) +END (STRCPY) #ifndef USE_AS_STPCPY libc_hidden_builtin_def (strcpy) #endif diff --git a/sysdeps/x86_64/strcpy_chk.S b/sysdeps/x86_64/strcpy_chk.S index a053c6bb5f..7e171deefc 100644 --- a/sysdeps/x86_64/strcpy_chk.S +++ b/sysdeps/x86_64/strcpy_chk.S @@ -20,8 +20,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" #ifndef USE_AS_STPCPY_CHK # define STRCPY_CHK __strcpy_chk diff --git a/sysdeps/x86_64/strlen.S b/sysdeps/x86_64/strlen.S index 4bdca0a452..eeb1092218 100644 --- a/sysdeps/x86_64/strlen.S +++ b/sysdeps/x86_64/strlen.S @@ -1,6 +1,5 @@ -/* strlen(str) -- determine the length of the string STR. - Copyright (C) 2009-2013 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@redhat.com>. +/* SSE2 version of strlen. + Copyright (C) 2012-2013 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 @@ -19,83 +18,222 @@ #include <sysdep.h> +/* Long lived register in strlen(s), strnlen(s, n) are: - .text + %xmm11 - zero + %rdi - s + %r10 (s+n) & (~(64-1)) + %r11 s+n +*/ + + +.text ENTRY(strlen) + +/* Test 64 bytes from %rax for zero. Save result as bitmask in %rdx. */ +#define FIND_ZERO \ + pcmpeqb (%rax), %xmm8; \ + pcmpeqb 16(%rax), %xmm9; \ + pcmpeqb 32(%rax), %xmm10; \ + pcmpeqb 48(%rax), %xmm11; \ + pmovmskb %xmm8, %esi; \ + pmovmskb %xmm9, %edx; \ + pmovmskb %xmm10, %r8d; \ + pmovmskb %xmm11, %ecx; \ + salq $16, %rdx; \ + salq $16, %rcx; \ + orq %rsi, %rdx; \ + orq %r8, %rcx; \ + salq $32, %rcx; \ + orq %rcx, %rdx; + +#ifdef AS_STRNLEN +/* Do not read anything when n==0. */ + test %rsi, %rsi + jne L(n_nonzero) xor %rax, %rax - mov %edi, %ecx - and $0x3f, %ecx - pxor %xmm0, %xmm0 - cmp $0x30, %ecx - ja L(next) - movdqu (%rdi), %xmm1 - pcmpeqb %xmm1, %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit_less16) - mov %rdi, %rax - and $-16, %rax - jmp L(align16_start) -L(next): - mov %rdi, %rax - and $-16, %rax - pcmpeqb (%rax), %xmm0 - mov $-1, %esi - sub %rax, %rcx - shl %cl, %esi - pmovmskb %xmm0, %edx - and %esi, %edx - jnz L(exit) -L(align16_start): - pxor %xmm0, %xmm0 - pxor %xmm1, %xmm1 - pxor %xmm2, %xmm2 - pxor %xmm3, %xmm3 - .p2align 4 -L(align16_loop): - pcmpeqb 16(%rax), %xmm0 - pmovmskb %xmm0, %edx - test %edx, %edx - jnz L(exit16) + ret +L(n_nonzero): - pcmpeqb 32(%rax), %xmm1 - pmovmskb %xmm1, %edx - test %edx, %edx - jnz L(exit32) +/* Initialize long lived registers. */ - pcmpeqb 48(%rax), %xmm2 - pmovmskb %xmm2, %edx - test %edx, %edx - jnz L(exit48) + add %rdi, %rsi + mov %rsi, %r10 + and $-64, %r10 + mov %rsi, %r11 +#endif - pcmpeqb 64(%rax), %xmm3 - pmovmskb %xmm3, %edx - lea 64(%rax), %rax + pxor %xmm8, %xmm8 + pxor %xmm9, %xmm9 + pxor %xmm10, %xmm10 + pxor %xmm11, %xmm11 + movq %rdi, %rax + movq %rdi, %rcx + andq $4095, %rcx +/* Offsets 4032-4047 will be aligned into 4032 thus fit into page. */ + cmpq $4047, %rcx +/* We cannot unify this branching as it would be ~6 cycles slower. */ + ja L(cross_page) + +#ifdef AS_STRNLEN +/* Test if end is among first 64 bytes. */ +# define STRNLEN_PROLOG \ + mov %r11, %rsi; \ + subq %rax, %rsi; \ + andq $-64, %rax; \ + testq $-64, %rsi; \ + je L(strnlen_ret) +#else +# define STRNLEN_PROLOG andq $-64, %rax; +#endif + +/* Ignore bits in mask that come before start of string. */ +#define PROLOG(lab) \ + movq %rdi, %rcx; \ + xorq %rax, %rcx; \ + STRNLEN_PROLOG; \ + sarq %cl, %rdx; \ + test %rdx, %rdx; \ + je L(lab); \ + bsfq %rdx, %rax; \ + ret + +#ifdef AS_STRNLEN + andq $-16, %rax + FIND_ZERO +#else + /* Test first 16 bytes unaligned. */ + movdqu (%rax), %xmm12 + pcmpeqb %xmm8, %xmm12 + pmovmskb %xmm12, %edx test %edx, %edx - jz L(align16_loop) -L(exit): - sub %rdi, %rax -L(exit_less16): - bsf %rdx, %rdx - add %rdx, %rax + je L(next48_bytes) + bsf %edx, %eax /* If eax is zeroed 16bit bsf can be used. */ + ret + +L(next48_bytes): +/* Same as FIND_ZERO except we do not check first 16 bytes. */ + andq $-16, %rax + pcmpeqb 16(%rax), %xmm9 + pcmpeqb 32(%rax), %xmm10 + pcmpeqb 48(%rax), %xmm11 + pmovmskb %xmm9, %edx + pmovmskb %xmm10, %r8d + pmovmskb %xmm11, %ecx + salq $16, %rdx + salq $16, %rcx + orq %r8, %rcx + salq $32, %rcx + orq %rcx, %rdx +#endif + + /* When no zero byte is found xmm9-11 are zero so we do not have to + zero them. */ + PROLOG(loop) + + .p2align 4 +L(cross_page): + andq $-64, %rax + FIND_ZERO + PROLOG(loop_init) + +#ifdef AS_STRNLEN +/* We must do this check to correctly handle strnlen (s, -1). */ +L(strnlen_ret): + bts %rsi, %rdx + sarq %cl, %rdx + test %rdx, %rdx + je L(loop_init) + bsfq %rdx, %rax ret +#endif + .p2align 4 +L(loop_init): + pxor %xmm9, %xmm9 + pxor %xmm10, %xmm10 + pxor %xmm11, %xmm11 +#ifdef AS_STRNLEN + .p2align 4 +L(loop): + + addq $64, %rax + cmpq %rax, %r10 + je L(exit_end) + + movdqa (%rax), %xmm8 + pminub 16(%rax), %xmm8 + pminub 32(%rax), %xmm8 + pminub 48(%rax), %xmm8 + pcmpeqb %xmm11, %xmm8 + pmovmskb %xmm8, %edx + testl %edx, %edx + jne L(exit) + jmp L(loop) + .p2align 4 -L(exit16): - sub %rdi, %rax - bsf %rdx, %rdx - lea 16(%rdx,%rax), %rax +L(exit_end): + cmp %rax, %r11 + je L(first) /* Do not read when end is at page boundary. */ + pxor %xmm8, %xmm8 + FIND_ZERO + +L(first): + bts %r11, %rdx + bsfq %rdx, %rdx + addq %rdx, %rax + subq %rdi, %rax ret + .p2align 4 -L(exit32): - sub %rdi, %rax - bsf %rdx, %rdx - lea 32(%rdx,%rax), %rax +L(exit): + pxor %xmm8, %xmm8 + FIND_ZERO + + bsfq %rdx, %rdx + addq %rdx, %rax + subq %rdi, %rax ret + +#else + + /* Main loop. Unrolled twice to improve L2 cache performance on core2. */ + .p2align 4 +L(loop): + + movdqa 64(%rax), %xmm8 + pminub 80(%rax), %xmm8 + pminub 96(%rax), %xmm8 + pminub 112(%rax), %xmm8 + pcmpeqb %xmm11, %xmm8 + pmovmskb %xmm8, %edx + testl %edx, %edx + jne L(exit64) + + subq $-128, %rax + + movdqa (%rax), %xmm8 + pminub 16(%rax), %xmm8 + pminub 32(%rax), %xmm8 + pminub 48(%rax), %xmm8 + pcmpeqb %xmm11, %xmm8 + pmovmskb %xmm8, %edx + testl %edx, %edx + jne L(exit0) + jmp L(loop) + .p2align 4 -L(exit48): - sub %rdi, %rax - bsf %rdx, %rdx - lea 48(%rdx,%rax), %rax +L(exit64): + addq $64, %rax +L(exit0): + pxor %xmm8, %xmm8 + FIND_ZERO + + bsfq %rdx, %rdx + addq %rdx, %rax + subq %rdi, %rax ret + +#endif + END(strlen) libc_hidden_builtin_def (strlen) diff --git a/sysdeps/x86_64/strnlen.S b/sysdeps/x86_64/strnlen.S index 6e53503060..d3c43ac482 100644 --- a/sysdeps/x86_64/strnlen.S +++ b/sysdeps/x86_64/strnlen.S @@ -1,63 +1,6 @@ -/* strnlen(str,maxlen) -- determine the length of the string STR up to MAXLEN. - Copyright (C) 2010-2013 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@redhat.com>. - This file is part of the GNU C Library. +#define AS_STRNLEN +#define strlen __strnlen +#include "strlen.S" - 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> - - - .text -ENTRY(__strnlen) - movq %rsi, %rax - testq %rsi, %rsi - jz 3f - pxor %xmm2, %xmm2 - movq %rdi, %rcx - movq %rdi, %r8 - movq $16, %r9 - andq $~15, %rdi - movdqa %xmm2, %xmm1 - pcmpeqb (%rdi), %xmm2 - orl $0xffffffff, %r10d - subq %rdi, %rcx - shll %cl, %r10d - subq %rcx, %r9 - pmovmskb %xmm2, %edx - andl %r10d, %edx - jnz 1f - subq %r9, %rsi - jbe 3f - -2: movdqa 16(%rdi), %xmm0 - leaq 16(%rdi), %rdi - pcmpeqb %xmm1, %xmm0 - pmovmskb %xmm0, %edx - testl %edx, %edx - jnz 1f - subq $16, %rsi - jnbe 2b -3: ret - -1: subq %r8, %rdi - bsfl %edx, %edx - addq %rdi, %rdx - cmpq %rdx, %rax - cmovnbq %rdx, %rax - ret -END(__strnlen) -weak_alias (__strnlen, strnlen) -libc_hidden_def (strnlen) +weak_alias (__strnlen, strnlen); +libc_hidden_builtin_def (strnlen) diff --git a/sysdeps/x86_64/strtok.S b/sysdeps/x86_64/strtok.S index 48c12cf0c3..5636d9a625 100644 --- a/sysdeps/x86_64/strtok.S +++ b/sysdeps/x86_64/strtok.S @@ -21,8 +21,6 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" /* This file can be used for the strtok and strtok_r functions: @@ -59,7 +57,7 @@ save_ptr: #endif .text -ENTRY (BP_SYM (FUNCTION)) +ENTRY (FUNCTION) /* First we create a table with flags for all possible characters. For the ASCII (7bit/8bit) or ISO-8859-X character sets which are supported by the C string functions we have 256 characters. @@ -207,4 +205,4 @@ L(returnNULL): mov %RDX_LP, SAVE_PTR jmp L(epilogue) -END (BP_SYM (FUNCTION)) +END (FUNCTION) diff --git a/sysdeps/x86_64/strtok_r.S b/sysdeps/x86_64/strtok_r.S index 8ce0089c7b..f0db78c67a 100644 --- a/sysdeps/x86_64/strtok_r.S +++ b/sysdeps/x86_64/strtok_r.S @@ -1,5 +1,5 @@ #define FUNCTION __strtok_r #define USE_AS_STRTOK_R 1 #include <sysdeps/x86_64/strtok.S> -weak_alias (BP_SYM (__strtok_r), BP_SYM (strtok_r)) -strong_alias (BP_SYM (__strtok_r), BP_SYM (__GI___strtok_r)) +weak_alias (__strtok_r, strtok_r) +strong_alias (__strtok_r, __GI___strtok_r) diff --git a/time/Versions b/time/Versions index a7c263008c..fd838181e4 100644 --- a/time/Versions +++ b/time/Versions @@ -1,7 +1,7 @@ libc { GLIBC_2.0 { # global variables - __timezone; __daylight; __tzname; + __daylight; __timezone; __tzname; # functions with special/multiple interfaces __adjtimex; @@ -51,13 +51,13 @@ libc { wcsftime; } GLIBC_2.3 { + # these internal names are used by libstdc++ + __strftime_l; __wcsftime_l; + # s* strftime_l; # w* wcsftime_l; - - # these internal names are used by libstdc++ - __strftime_l; __wcsftime_l; } GLIBC_2.3.2 { strptime_l; diff --git a/time/mktime.c b/time/mktime.c index 688969be87..e75132c2e4 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -196,7 +196,7 @@ isdst_differ (int a, int b) The result may overflow. It is the caller's responsibility to detect overflow. */ -static inline time_t +static time_t ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1, int year0, int yday0, int hour0, int min0, int sec0) { diff --git a/timezone/zic.c b/timezone/zic.c index a5202a1ac3..91f0d20cc1 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -1748,7 +1748,7 @@ stringoffset(char *result, long offset) minutes = offset % MINSPERHOUR; offset /= MINSPERHOUR; hours = offset; - if (hours >= HOURSPERDAY) { + if (hours > HOURSPERDAY) { result[0] = '\0'; return -1; } @@ -1851,7 +1851,9 @@ stringzone(char *result, const struct zone *const zpfirst, const int zonecount) rp = &zp->z_rules[i]; if (stdrp == NULL || rp->r_hiyear > stdrp->r_hiyear || (rp->r_hiyear == stdrp->r_hiyear && - rp->r_month > stdrp->r_month)) + (rp->r_month > stdrp->r_month || + (rp->r_month == stdrp->r_month && + rp->r_dayofmonth > stdrp->r_dayofmonth)))) stdrp = rp; } if (stdrp != NULL && stdrp->r_stdoff != 0) diff --git a/wcsmbs/Versions b/wcsmbs/Versions index 10bccc9539..1ff5ff3057 100644 --- a/wcsmbs/Versions +++ b/wcsmbs/Versions @@ -1,7 +1,7 @@ libc { GLIBC_2.0 { # functions used in inline functions or macros - __wcsto*_internal; __mbrlen; __mbrtowc; + __mbrlen; __mbrtowc; __wcsto*_internal; # b* btowc; @@ -25,10 +25,10 @@ libc { wcschrnul; wmempcpy; } GLIBC_2.7 { - __isoc99_wscanf; __isoc99_vwscanf; __isoc99_fwscanf; __isoc99_vfwscanf; - __isoc99_swscanf; __isoc99_vswscanf; + __isoc99_fwscanf; __isoc99_swscanf; __isoc99_vfwscanf; __isoc99_vswscanf; + __isoc99_vwscanf; __isoc99_wscanf; } GLIBC_2.16 { - mbrtoc16; c16rtomb; mbrtoc32; c32rtomb; + c16rtomb; c32rtomb; mbrtoc16; mbrtoc32; } } |