about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* elf: Remove prelink supportAdhemerval Zanella2022-02-1025-885/+117
| | | | | | | | | | | | | Prelinked binaries and libraries still work, the dynamic tags DT_GNU_PRELINKED, DT_GNU_LIBLIST, DT_GNU_CONFLICT just ignored (meaning the process is reallocated as default). The loader environment variable TRACE_PRELINKING is also removed, since it used solely on prelink. Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Linux: Consolidate auxiliary vector parsingFlorian Weimer2022-02-106-181/+107
| | | | | | | | | | | | | | | | | | | | And optimize it slightly. The large switch statement in _dl_sysdep_start can be replaced with a large array. This reduces source code and binary size. On i686-linux-gnu: Before: text data bss dec hex filename 7791 12 0 7803 1e7b elf/dl-sysdep.os After: text data bss dec hex filename 7135 12 0 7147 1beb elf/dl-sysdep.os Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: Assume that NEED_DL_SYSINFO_DSO is always definedFlorian Weimer2022-02-102-9/+3
| | | | | | The definition itself is still needed for generic code. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: Remove DL_FIND_ARG_COMPONENTSFlorian Weimer2022-02-101-15/+10
| | | | | | | The generic definition is always used since the Native Client port has been removed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: Remove HAVE_AUX_SECURE, HAVE_AUX_XID, HAVE_AUX_PAGESIZEFlorian Weimer2022-02-102-66/+1
| | | | | | They are always defined. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf: Merge dl-sysdep.c into the Linux versionFlorian Weimer2022-02-102-362/+337
| | | | | | | The generic version is the de-facto Linux implementation. It requires an auxiliary vector, so Hurd does not use it. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* hppa: Fix bind-now audit (BZ #28857)Adhemerval Zanella2022-02-096-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | On hppa, a function pointer returned by la_symbind is actually a function descriptor has the plabel bit set (bit 30). This must be cleared to get the actual address of the descriptor. If the descriptor has been bound, the first word of the descriptor is the physical address of theA function, otherwise, the first word of the descriptor points to a trampoline in the PLT. This patch also adds a workaround on tests because on hppa (and it seems to be the only ABI I have see it), some shared library adds a dynamic PLT relocation to am empty symbol name: $ readelf -r elf/tst-audit25mod1.so [...] Relocation section '.rela.plt' at offset 0x464 contains 6 entries: Offset Info Type Sym.Value Sym. Name + Addend 00002008 00000081 R_PARISC_IPLT 508 [...] It breaks some assumptions on the test, where a symbol with an empty name ("") is passed on la_symbind. Checked on x86_64-linux-gnu and hppa-linux-gnu.
* x86-64: Optimize bzeroH.J. Lu2022-02-0810-25/+256
| | | | | | | | | | memset with zero as the value to set is by far the majority value (99%+ for Python3 and GCC). bzero can be slightly more optimized for this case by using a zero-idiom xor for broadcasting the set value to a register (vector or GPR). Co-developed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* benchtests: Add benches for bzeroH.J. Lu2022-02-084-0/+372
| | | | Add bench-bzero-large.c, bench-bzero-walk.c and bench-bzero.c.
* linux: fix accuracy of get_nprocs and get_nprocs_conf [BZ #28865]Dmitry V. Levin2022-02-071-31/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | get_nprocs() and get_nprocs_conf() use various methods to obtain an accurate number of processors. Re-introduce __get_nprocs_sched() as a source of information, and fix the order in which these methods are used to return the most accurate information. The primary source of information used in both functions remains unchanged. This also changes __get_nprocs_sched() error return value from 2 to 0, but all its users are already prepared to handle that. Old fallback order: get_nprocs: /sys/devices/system/cpu/online -> /proc/stat -> 2 get_nprocs_conf: /sys/devices/system/cpu/ -> /proc/stat -> 2 New fallback order: get_nprocs: /sys/devices/system/cpu/online -> /proc/stat -> sched_getaffinity -> 2 get_nprocs_conf: /sys/devices/system/cpu/ -> /proc/stat -> sched_getaffinity -> 2 Fixes: 342298278e ("linux: Revert the use of sched_getaffinity on get_nproc") Closes: BZ #28865 Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only)Noah Goldstein2022-02-071-3/+4
| | | | | | | | | | | commit b62ace2740a106222e124cc86956448fa07abf4d Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Sun Feb 6 00:54:18 2022 -0600 x86: Improve vec generation in memset-vec-unaligned-erms.S Revert usage of 'pshufb' in broadcast logic as it is an SSSE3 instruction and memset.S is restricted to only SSE2 instructions.
* benchtests: Sort benches in MakefileH.J. Lu2022-02-071-19/+110
| | | | Put one bench per line and sort them.
* Benchtests: Add length zero benchmark for memset in bench-memset.cNoah Goldstein2022-02-061-1/+1
| | | | | | Zero is a relevant size for some workloads (roughly 5% of uses for GCC) so we should be testing it's performance as well. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86: Improve vec generation in memset-vec-unaligned-erms.SNoah Goldstein2022-02-065-87/+152
| | | | | | | | | | | | | | | | | | | | | | | | | No bug. Split vec generation into multiple steps. This allows the broadcast in AVX2 to use 'xmm' registers for the L(less_vec) case. This saves an expensive lane-cross instruction and removes the need for 'vzeroupper'. For SSE2 replace 2x 'punpck' instructions with zero-idiom 'pxor' for byte broadcast. Results for memset-avx2 small (geomean of N = 20 benchset runs). size, New Time, Old Time, New / Old 0, 4.100, 3.831, 0.934 1, 5.074, 4.399, 0.867 2, 4.433, 4.411, 0.995 4, 4.487, 4.415, 0.984 8, 4.454, 4.396, 0.987 16, 4.502, 4.443, 0.987 All relevant string/wcsmbs tests are passing. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector tan/tanf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector tan/tanf and input files to libmvec microbenchmark. libmvec-tan-inputs: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 5.0 10% uniform random distribution in range (-1000.0, 1000.0) libmvec-tanf-inputs: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 5.0f 10% uniform random distribution in range (-1000.0f, 1000.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector erfc/erfcf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector erfc/erfcf and input files to libmvec microbenchmark. libmvec-erfc-inputs: 90% Normal random distribution range: (-6.0, 6.0) mean: 0.0 sigma: 1.0 10% uniform random distribution in range (-5.9, 5.9) libmvec-erfcf-inputs: 90% Normal random distribution range: (-4.0f, 4.0f) mean: 0.0f sigma: 1.0f 10% uniform random distribution in range (-3.9f, 3.9f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector asinh/asinhf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector asinh/asinhf and input files to libmvec microbenchmark. libmvec-asinh-inputs: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 2.0 10% uniform random distribution in range (-1.0e6, 1.0e6) libmvec-asinhf-inputs: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 2.0f 10% uniform random distribution in range (-1.0e6f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector tanh/tanhf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector tanh/tanhf and input files to libmvec microbenchmark. libmvec-tanh-inputs: 90% Normal random distribution range: (-19.0, 19.0) mean: 0.0 sigma: 2.0 10% uniform random distribution in range (-16.0, 16.0) libmvec-tanhf-inputs: 90% Normal random distribution range: (-10.0f, 10.0f) mean: 0.0f sigma: 2.0f 10% uniform random distribution in range (-8.0f, 8.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector erf/erff to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector erf/erff and input files to libmvec microbenchmark. libmvec-erf-inputs: 90% Normal random distribution range: (-6.0, 6.0) mean: 0.0 sigma: 1.0 10% uniform random distribution in range (-5.9, 5.9) libmvec-erff-inputs: 90% Normal random distribution range: (-4.0f, 4.0f) mean: 0.0f sigma: 1.0f 10% uniform random distribution in range (-3.9f, 3.9f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector acosh/acoshf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector acosh/acoshf and input files to libmvec microbenchmark. libmvec-acosh-inputs: 90% Normal random distribution range: (1.0, DBL_MAX) mean: 1.0 sigma: 8.0 10% uniform random distribution in range (1.0, 1.0e6) libmvec-acoshf-inputs: 90% Normal random distribution range: (1.0f, FLT_MAX) mean: 1.0f sigma: 4.0f 10% uniform random distribution in range (1.0f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector atanh/atanhf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector atanh/atanhf and input files to libmvec microbenchmark. libmvec-atanh-inputs: 90% Normal random distribution range: (-1.0, 1.0) mean: 0.0 sigma: 1.0 10% uniform random distribution in range (-1.0, 1.0) libmvec-atanhf-inputs: 90% Normal random distribution range: (-1.0f, 1.0f) mean: 0.0f sigma: 1.0f 10% uniform random distribution in range (-1.0f, 1.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector log1p/log1pf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector log1p/log1pf and input files to libmvec microbenchmark. libmvec-log1p-inputs: 70% Normal random distribution range: (-1.0, DBL_MAX) mean: 0.0 sigma: 50.0 30% uniform random distribution in range (-1.0, 1.0e6) libmvec-log1pf-inputs: 70% Normal random distribution range: (-1.0f, FLT_MAX) mean: 0.0f sigma: 50.0f 30% uniform random distribution in range (-1.0f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector log2/log2f to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector log2/log2f and input files to libmvec microbenchmark. libmvec-log2-inputs: 70% Normal random distribution range: (0.0, DBL_MAX) mean: 1.0 sigma: 50.0 30% uniform random distribution in range (0.0, 1.0e6) libmvec-log2f-inputs: 70% Normal random distribution range: (0.0f, FLT_MAX) mean: 1.0f sigma: 50.0f 30% uniform random distribution in range (0.0f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector log10/log10f to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector log10/log10f and input files to libmvec microbenchmark. libmvec-log10-inputs: 70% Normal random distribution range: (0.0, DBL_MAX) mean: 1.0 sigma: 50.0 30% uniform random distribution in range (0.0, 1.0e6) libmvec-log10f-inputs: 70% Normal random distribution range: (0.0f, FLT_MAX) mean: 1.0f sigma: 50.0f 30% uniform random distribution in range (0.0f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector atan2/atan2f to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add vector atan2/atan2f and input files to libmvec microbenchmark. libmvec-atan2-inputs: arg1: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 4.0 10% uniform random distribution in range (-1.0e6, 1.0e6) arg2: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 4.0 10% uniform random distribution in range (-1.0e6, 1.0e6) libmvec-atan2f-inputs: arg1: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 4.0f 10% uniform random distribution in range (-1.0e6f, 1.0e6f) arg2: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 4.0f 10% uniform random distribution in range (-1.0e6f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector cbrt/cbrtf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector cbrt/cbrtf and input files to libmvec microbenchmark. libmvec-cbrt-inputs: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 10.0 10% uniform random distribution in range (-1000.0, 1000.0) libmvec-cbrtf-inputs: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 10.0f 10% uniform random distribution in range (-1000.0f, 1000.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector sinh/sinhf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector sinh/sinhf and input files to libmvec microbenchmark. libmvec-sinh-inputs: 90% Normal random distribution range: (-710.0, 710.0) mean: 0.0 sigma: 32.0 10% uniform random distribution in range (-500.0, 500.0) libmvec-sinhf-inputs: 90% Normal random distribution range: (-89.0f, 89.0f) mean: 0.0f sigma: 16.0f 10% uniform random distribution in range (-50.0f, 50.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector expm1/expm1f to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector expm1/expm1f and input files to libmvec microbenchmark. libmvec-expm1-inputs: 90% Normal random distribution range: (-708.0, 709.0) mean: 0.0 sigma: 16.0 10% uniform random distribution in range (-500.0, 500.0) libmvec-expm1f-inputs: 90% Normal random distribution range: (-87.0f, 88.0f) mean: 0.0f sigma: 8.0f 10% uniform random distribution in range (-50.0f, 50.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector cosh/coshf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector cosh/coshf and input files to libmvec microbenchmark. libmvec-cosh-inputs: 90% Normal random distribution range: (-710.0, 710.0) mean: 0.0 sigma: 32.0 10% uniform random distribution in range (-500.0, 500.0) libmvec-coshf-inputs: 90% Normal random distribution range: (-89.0f, 89.0f) mean: 0.0f sigma: 16.0f 10% uniform random distribution in range (-50.0f, 50.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector exp10/exp10f to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector exp10/exp10f and input files to libmvec microbenchmark. libmvec-exp10-inputs: 90% Normal random distribution range: (-307.0, 308.0) mean: 0.0 sigma: 16.0 10% uniform random distribution in range (-250.0, 250.0) libmvec-exp10f-inputs: 90% Normal random distribution range: (-37.0f, 38.0f) mean: 0.0f sigma: 8.0f 10% uniform random distribution in range (-25.0f, 25.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector exp2/exp2f to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector exp2/exp2f and input files to libmvec microbenchmark. libmvec-exp2-inputs: 90% Normal random distribution range: (-1022.0, 1024.0) mean: 0.0 sigma: 16.0 10% uniform random distribution in range (-1000.0, 1000.0) libmvec-exp2f-inputs: 90% Normal random distribution range: (-126.0f, 128.0f) mean: 0.0f sigma: 8.0f 10% uniform random distribution in range (-100.0f, 100.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector hypot/hypotf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add vector hypot/hypotf and input files to libmvec microbenchmark. libmvec-hypot-inputs: arg1: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 10.0 10% uniform random distribution in range (-1000.0, 1000.0) arg1: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 10.0 10% uniform random distribution in range (-1000.0, 1000.0) libmvec-hypotf-inputs: arg1: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 10.0f 10% uniform random distribution in range (-1000.0f, 1000.0f) arg2: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 10.0f 10% uniform random distribution in range (-1000.0f, 1000.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector asin/asinf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector asin/asinf and input files to libmvec microbenchmark. libmvec-asin-inputs: 90% Normal random distribution range: (-1.0, 1.0) mean: 0.0 sigma: 1.0 10% uniform random distribution in range (-1.0, 1.0) libmvec-asinf-inputs: 90% Normal random distribution range: (-1.0f, 1.0f) mean: 0.0f sigma: 1.0f 10% uniform random distribution in range (-1.0f, 1.0f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Add vector atan/atanf to libmvec microbenchmarkSunil K Pandey2022-02-063-0/+8201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add vector atan/atanf and input files to libmvec microbenchmark. libmvec-atan-inputs: arg1: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 4.0 10% uniform random distribution in range (-1.0e6, 1.0e6) arg2: 90% Normal random distribution range: (-DBL_MAX, DBL_MAX) mean: 0.0 sigma: 4.0 10% uniform random distribution in range (-1.0e6, 1.0e6) libmvec-atanf-inputs: arg1: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 4.0f 10% uniform random distribution in range (-1.0e6f, 1.0e6f) arg2: 90% Normal random distribution range: (-FLT_MAX, FLT_MAX) mean: 0.0f sigma: 4.0f 10% uniform random distribution in range (-1.0e6f, 1.0e6f) Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* elf: Replace tst-audit24bmod2.so with tst-audit24bmod2H.J. Lu2022-02-061-1/+1
| | | | | | | | Replace tst-audit24bmod2.so with tst-audit24bmod2 to silence: make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/elf' Makefile:2201: warning: overriding recipe for target '/export/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/tst-audit24bmod2.so' ../Makerules:765: warning: ignoring old recipe for target '/export/build/gnu/tools-build/glibc-gitlab/build-x86_64-linux/elf/tst-audit24bmod2.so'
* x86_64/multiarch: Sort sysdep_routines and put one entry per lineH.J. Lu2022-02-051-114/+176
|
* string: Sort headers, routines, tests and tests-translationH.J. Lu2022-02-051-44/+166
| | | | | Sort headers, routines, tests and tests-translation. Put one entry per line.
* x86: Improve L to support L(XXX_SYMBOL (YYY, ZZZ))H.J. Lu2022-02-051-1/+2
|
* Benchtests: move 'alloc_bufs' from loop in bench-memset.cNoah Goldstein2022-02-051-2/+2
| | | | | | One buf allocation is sufficient. Calling `alloc_bufs' in the loop just adds unnecessary syscall overhead. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86-64: Fix strcmp-evex.SH.J. Lu2022-02-041-1/+1
| | | | | | | | | | Change "movl %edx, %rdx" to "movl %edx, %edx" in: commit 8418eb3ff4b781d31c4ed5dc6c0bd7356bc45db9 Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Mon Jan 10 15:35:39 2022 -0600 x86: Optimize strcmp-evex.S
* x86-64: Fix strcmp-avx2.SH.J. Lu2022-02-041-1/+1
| | | | | | | | | | Change "movl %edx, %rdx" to "movl %edx, %edx" in: commit b77b06e0e296f1a2276c27a67e1d44f2cfa38d45 Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Mon Jan 10 15:35:38 2022 -0600 x86: Optimize strcmp-avx2.S
* x86-64: Add vector acos/acosf to libmvec microbenchmarkSunil K Pandey2022-02-033-0/+8201
| | | | | | | | | | | | | | | | | | | | Add vector acos/acosf and input files to libmvec microbenchmark. libmvec-acos-inputs: 90% Normal random distribution range: (-1.0, 1.0) mean: 0.0 sigma: 1.0 10% uniform random distribution in range (-1.0, 1.0) libmvec-acosf-inputs: 90% Normal random distribution range: (-1.0f, 1.0f) mean: 0.0f sigma: 1.0f 10% uniform random distribution in range (-1.0f, 1.0f) Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* benchtests: Add more coverage for strcmp and strncmp benchmarksNoah Goldstein2022-02-032-69/+183
| | | | | | | | | | | Add more small and medium sized tests for strcmp and strncmp. As well for strcmp add option for more direct control of alignment. Previously alignment was being pushed to the end of the page. While this is the most difficult case to implement, it is far from the common case and so shouldn't be the only benchmark. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86: Optimize strcmp-evex.SNoah Goldstein2022-02-031-793/+919
| | | | | | | | | | | | | | | | | | Optimization are primarily to the loop logic and how the page cross logic interacts with the loop. The page cross logic is at times more expensive for short strings near the end of a page but not crossing the page. This is done to retest the page cross conditions with a non-faulty check and to improve the logic for entering the loop afterwards. This is only particular cases, however, and is general made up for by more than 10x improvements on the transition from the page cross -> loop case. The non-page cross cases as well are nearly universally improved. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86: Optimize strcmp-avx2.SNoah Goldstein2022-02-031-651/+939
| | | | | | | | | | | | | | | | | | | | Optimization are primarily to the loop logic and how the page cross logic interacts with the loop. The page cross logic is at times more expensive for short strings near the end of a page but not crossing the page. This is done to retest the page cross conditions with a non-faulty check and to improve the logic for entering the loop afterwards. This is only particular cases, however, and is general made up for by more than 10x improvements on the transition from the page cross -> loop case. The non-page cross cases are improved most for smaller sizes [0, 128] and go about even for (128, 4096]. The loop page cross logic is improved so some more significant speedup is seen there as well. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* string: Improve coverage in test-strcmp.c and test-strncmp.cNoah Goldstein2022-02-032-21/+306
| | | | | | | | | Add additional test cases for small / medium sizes. Add tests in test-strncmp.c where `n` is near ULONG_MAX or LONG_MIN to test for overflow bugs in length handling. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* string/test-str*cmp: remove stupid_[strcmp, strncmp, wcscmp, wcsncmp].Noah Goldstein2022-02-032-69/+0
| | | | | | | | These implementations just add to test duration. Since we have simple_* implementations we already have a safe reference implementation. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* linux: Fix missing __convert_scm_timestamps (BZ #28860)Adhemerval Zanella2022-02-031-2/+2
| | | | | | | | | Commit 948ce73b31 made recvmsg/recvmmsg to always call __convert_scm_timestamps for 64 bit time_t symbol, so adjust it to always build it for __TIMESIZE != 64. It fixes build for architecture with 32 bit time_t support when configured with minimum kernel of 5.1.
* linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850]Gleb Fotengauer-Malinovskiy2022-02-031-1/+1
| | | | | | | Pass the actual number of bytes returned by the kernel. Fixes: 33099d72e41c ("linux: Simplify get_nprocs") Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
* posix: Fix tst-spawn6 terminal handling (BZ #28853)Adhemerval Zanella2022-02-031-11/+51
| | | | | | | | | | | | | | | | | | | | | | The test changes the current foreground process group, which might break testing depending of how the make check is issued. For instance: nohup make -j1 test t=posix/tst-spawn6 | less Will set 'make' and 'less' to be in the foreground process group in the current session. When tst-spawn6 new child takes over it becomes the foreground process and 'less' is stopped and backgrounded which interrupts the 'make check' command. To fix it a pseudo-terminal is allocated, the test starts in new session (so there is no controlling terminal associated), and the pseudo-terminal is set as the controlling one (similar to what login_tty does). Checked on x86_64-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>