summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Update timezone code from tzcode 2018i.Joseph Myers2018-12-313-5/+12
| | | | | | | | | | This patch updates files coming from tzcode to the versions in tzcode 2018i. No changes elsewhere in glibc were needed. Tested for x86_64. * timezone/zdump.c: Update from tzcode 2018i. * timezone/zic.c: Likewise.
* regex: improve Gnulib port to AIXPaul Eggert2018-12-312-12/+10
| | | | | | | | | From the glibc point of view, this removes duplicate macro definitions and is obviously safe. From the Gnulib point of view, this pacifies xlc 12.01 on AIX 7.1. * posix/regex_internal.h: (__attribute__, __attribute_warn_unused_result__): Remove; already defined elsewhere.
* malloc: Always call memcpy in _int_realloc [BZ #24027]Florian Weimer2018-12-312-42/+8
| | | | | | | | This commit removes the custom memcpy implementation from _int_realloc for small chunk sizes. The ncopies variable has the wrong type, and an integer wraparound could cause the existing code to copy too few elements (leaving the new memory region mostly uninitialized). Therefore, removing this code fixes bug 24027.
* riscv: Use __has_include__ to include <asm/syscalls.h> [BZ #24022]H.J. Lu2018-12-312-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <asm/syscalls.h> has been removed by commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25 Author: David Abdurachmanov <david.abdurachmanov@gmail.com> Date: Thu Nov 8 20:02:39 2018 +0100 riscv: add asm/unistd.h UAPI header Marcin Juszkiewicz reported issues while generating syscall table for riscv using 4.20-rc1. The patch refactors our unistd.h files to match some other architectures. - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h - Adjust kernel asm/unistd.h So now asm/unistd.h UAPI header should show all syscalls for riscv. <asm/syscalls.h> may be restored by Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header Date: Tue, 11 Dec 2018 09:09:35 +0100 UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header, which did resolve issue with missing syscalls macros resulting in glibc (2.28) build failure. It also broke glibc in a different way: asm/syscalls.h is being used by glibc. I noticed this while doing Fedora 30/Rawhide mass rebuild. The patch returns asm/syscalls.h header and incl. it into asm/unistd.h. I plan to send a patch to glibc to use asm/unistd.h instead of asm/syscalls.h In the meantime, we use __has_include__, which was added to GCC 5, to check if <asm/syscalls.h> exists before including it. Tested with build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7. [BZ #24022] * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if <asm/syscalls.h> exists with __has_include__ before including it.
* Use Linux 4.20 in build-many-glibcs.py.Joseph Myers2018-12-312-1/+6
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default Linux version to 4.20.
* hurd: Handle "pid" magical lookup retryJustus Winter2018-12-282-13/+71
| | | | | | * hurd/lookup-retry: Include <unistd.h>. (__hurd_file_name_lookup_retry): Keep a ref on last result in `lastdir'. Release it on return. Handle "pid" magical lookup retry.
* Multiple locales: Use the correct 12-hour time formats (bug 10496).Rafal Luzynski2018-12-2880-112/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been discovered that some locales use the 12-hour time formats but do not use any AM/PM indicator thus making the time ambiguous. This commit adds "%p" wherever it was missing. In some cases it has been identified that a locale should use 24-hour time format rather than 12-hour. All time formats come from CLDR but this commit introduces as few changes as possible (for example, it tries not to change the time zone display). For the locales which are not supported by CLDR the consistency with similar locales (which means the same language or the same country) has been preserved: if the time formats were the same before the change then they are still the same after the change. The time format updates can be roughly summarized as follows: * Most of the locales of Djibouti, Eritrea, and Ethiopia now use "%l:%M:%S %p". * Most of the locales of India and some surrounding countries (Bangladesh, Nepal etc.) now use "%I:%M:%S %p %Z". * Most of the Arabic locales now use "%Z %I:%M:%S %p". * Ge'ez language (Eritrea and Ethiopia) now uses "%l:%M:%S፡%p" (note the consistent use of Ethiopic wordspace character). * Tamil (India) now uses "%p %I:%M:%S %Z". * Chinese (Hong Kong) t_fmt now uses "%p %I<U6642>%M<U5206>%S<U79D2> %Z". * Additionally, the following locales have been switched from 12-hour time formats to 24-hour, according to CLDR: Arabic (Morocco), Maltese, Somali (Kenya), and Tamil (Sri Lanka). * Finally, the Bulgarian, Czech, and Slovak locales used 24-hour time format correctly but their t_fmt_ampm field was not empty containing 12-hour time format which was incorrect so it is now replaced with an empty string. [BZ #10496] * localedata/locales/aa_DJ (t_fmt): Set to "%l:%M:%S %p". (t_fmt_ampm): Likewise. * localedata/locales/aa_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/aa_ER@saaho (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/aa_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/am_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/byn_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/om_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/sid_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/so_DJ (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/so_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/so_SO (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/ti_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/ti_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/tig_ER (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/wal_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/anp_IN (t_fmt): Set to "%I:%M:%S %p %Z". * localedata/locales/ar_IN (t_fmt): Likewise. * localedata/locales/bhb_IN (t_fmt): Likewise. * localedata/locales/bho_IN (t_fmt): Likewise. * localedata/locales/bi_VU (t_fmt): Likewise. * localedata/locales/bn_BD (t_fmt): Likewise. * localedata/locales/bn_IN (t_fmt): Likewise. * localedata/locales/brx_IN (t_fmt): Likewise. * localedata/locales/doi_IN (t_fmt): Likewise. * localedata/locales/en_HK (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/en_IN (t_fmt): Likewise. * localedata/locales/en_PH (t_fmt): Likewise. * localedata/locales/gu_IN (t_fmt): Likewise. * localedata/locales/hi_IN (t_fmt): Likewise. * localedata/locales/hif_FJ (t_fmt): Likewise. * localedata/locales/hne_IN (t_fmt): Likewise. * localedata/locales/kn_IN (t_fmt): Likewise. * localedata/locales/kok_IN (t_fmt): Likewise. * localedata/locales/ks_IN (t_fmt): Likewise. * localedata/locales/ks_IN@devanagari (t_fmt): Likewise. * localedata/locales/mag_IN (t_fmt): Likewise. * localedata/locales/mai_IN (t_fmt): Likewise. * localedata/locales/mjw_IN (t_fmt): Likewise. * localedata/locales/ml_IN (t_fmt): Likewise. * localedata/locales/mni_IN (t_fmt): Likewise. * localedata/locales/mr_IN (t_fmt): Likewise. * localedata/locales/ms_MY (t_fmt): Likewise. * localedata/locales/pa_IN (t_fmt): Likewise. * localedata/locales/raj_IN (t_fmt): Likewise. * localedata/locales/sa_IN (t_fmt): Likewise. * localedata/locales/sat_IN (t_fmt): Likewise. * localedata/locales/sd_IN (t_fmt): Likewise. * localedata/locales/sd_IN@devanagari (t_fmt): Likewise. * localedata/locales/tcy_IN (t_fmt): Likewise. * localedata/locales/the_NP (t_fmt): Likewise. * localedata/locales/to_TO (t_fmt): Likewise. * localedata/locales/ur_IN (t_fmt): Likewise. * localedata/locales/hif_FJ (d_t_fmt): Set to "%A %d %b %Y %I:%M:%S %p". (date_fmt): Add, set to "%A %d %b %Y %I:%M:%S %p %Z". * localedata/locales/ar_AE (t_fmt): Set to "%Z %I:%M:%S %p". * localedata/locales/ar_BH (t_fmt): Likewise. * localedata/locales/ar_DZ (t_fmt): Likewise. * localedata/locales/ar_EG (t_fmt): Likewise. * localedata/locales/ar_IQ (t_fmt): Likewise. * localedata/locales/ar_JO (t_fmt): Likewise. * localedata/locales/ar_KW (t_fmt): Likewise. * localedata/locales/ar_LB (t_fmt): Likewise. * localedata/locales/ar_LY (t_fmt): Likewise. * localedata/locales/ar_OM (t_fmt): Likewise. * localedata/locales/ar_QA (t_fmt): Likewise. * localedata/locales/ar_SD (t_fmt): Likewise. * localedata/locales/ar_SS (t_fmt): Likewise. * localedata/locales/ar_SY (t_fmt): Likewise. * localedata/locales/ar_TN (t_fmt): Likewise. * localedata/locales/ar_YE (t_fmt): Likewise. * localedata/locales/gez_ER (t_fmt): Set to "%l:%M:%S<U1361>%p". (t_fmt_ampm): Likewise. * localedata/locales/gez_ET (t_fmt): Likewise. (t_fmt_ampm): Likewise. * localedata/locales/ta_IN (t_fmt): Set to "%p %I:%M:%S %Z". (t_fmt_ampm): Likewise. (d_t_fmt): Set to "%A %d %B %Y %p %I:%M:%S %Z". * localedata/locales/zh_HK (t_fmt): Set to "%p %I<U6642>%M<U5206>%S<U79D2> %Z". * localedata/locales/ar_MA (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%Z %H:%M:%S". (d_t_fmt): Set to "%d %b, %Y %Z %H:%M:%S". * localedata/locales/mt_MT (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%H:%M:%S %Z". (d_t_fmt): Set to "%A, %d ta %b, %Y %H:%M:%S %Z". * localedata/locales/so_KE (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%T". (d_t_fmt): Set to "%A, %B %e, %Y %X %Z". (date_fmt): Set to "%A, %B %e, %X %Z %Y". * localedata/locales/ta_LK (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. (t_fmt): Set to "%H:%M:%S %Z". (d_t_fmt): Set to "%A %d %B %Y %H:%M:%S %Z". * localedata/locales/bg_BG (t_fmt_ampm): Set to "" (empty string) because this locale does not use the 12-hour clock. * localedata/locales/cs_CZ (t_fmt_ampm): Likewise. * localedata/locales/sk_SK (t_fmt_ampm): Likewise.
* sq_AL: Use the correct date and time formats (bug 10496, 23724).Rafal Luzynski2018-12-282-4/+17
| | | | | | | | | | | | | | | | | | | | | Albanian locale uses the 12-hour clock but some time formats did not use any AM/PM indicator making the time ambiguous. This commit adds "%p" wherever it was missing. It also sets the correct date format because the old "%Y-%b-%d" produced rather weird results like "2018-Sht-28". All time formats come from CLDR but as few changes have been introduced by this commit as possible. Some articles from MSDN and other available online sources have been also taken into account. [BZ #10496] [BZ #23724] * localedata/locales/sq_AL (t_fmt): Set to "%I:%M:%S.%p %Z". (t_fmt_ampm): Likewise. (d_t_fmt): Set to "%a %-d %b %Y %I:%M:%S.%p". (date_fmt): Add, set to "%a %-d %b %Y %I:%M:%S.%p %Z". (d_fmt): Set to "%-d.%-m.%y".
* NEWS: Fix another typo ("multithread..." -> "multi-threaded...").Rafal Luzynski2018-12-281-1/+1
| | | | Thank you Florian Weimer and Paul Eggert for proofreading this.
* Replace check_mul_overflow_size_t with __builtin_mul_overflowAdhemerval Zanella2018-12-287-53/+21
| | | | | | | | | | | | | | | Checked on x86_64-linux-gnu and i686-linux-gnu. * malloc/alloc_buffer_alloc_array.c (__libc_alloc_buffer_alloc_array): Use __builtin_mul_overflow in place of check_mul_overflow_size_t. * malloc/dynarray_emplace_enlarge.c (__libc_dynarray_emplace_enlarge): Likewise. * malloc/dynarray_resize.c (__libc_dynarray_resize): Likewise. * malloc/reallocarray.c (__libc_reallocarray): Likewise. * malloc/malloc-internal.h (check_mul_overflow_size_t): Remove function. * support/blob_repeat.c (check_mul_overflow_size_t, (minimum_stride_size, support_blob_repeat_allocate): Likewise.
* Update Alpha libm-test-ulpsAurelien Jarno2018-12-282-40/+52
| | | | | Changelog: * sysdeps/alpha/fpu/libm-test-ulps: Regenerated.
* NEWS: Fix a minor typo ("incosistent" -> "inconsistent").Rafal Luzynski2018-12-281-1/+1
|
* regex: simplify Gnulib portPaul Eggert2018-12-275-30/+23
| | | | | | | | | | | | | | This simplifies the code, by removing stuff intended for porting to Gnulib but no longer needed there. * posix/regcomp.c [!_LIBC]: No need to put #ifdef _LIBC around uses of libc_hidden_def, weak_alias. * posix/regcomp.c, posix/regexec.c: Use __restrict rather than _Restrict_ except for public-facing headers. * posix/regex_internal.h (attribute_hidden) [!_LIBC]: Remove; already defined elsewhere. * posix/regex.c, posix/regex_internal.h: Use __GNUC_PREREQ instead of rolling our own. * posix/regex_internal.h (__GNUC_PREREQ): Remove duplicate defn.
* Improve bench-strlenWilco Dijkstra2018-12-272-14/+25
| | | | | | | | | The current bench-strlen compares against a slow byte-oriented strlen which is not useful given it's too easy to beat. Remove it and compare against the generic C strlen version and memchr. * benchtests/bench-strlen.c (generic_strlen): New function. (memchr_strlen): New function.
* x86-64: Remove s_sincosf-sse2.SH.J. Lu2018-12-264-568/+8
| | | | | | | | | | | | | | The current s_sincosf.c is faster than s_sincosf-sse2.S. On Broadwell with FMA disabled, bench-sincosf shows: Before After Improvement max 154.032 114.517 34% min 6.25 5.609 11% mean 14.8728 12.8589 15% * sysdeps/x86_64/fpu/s_sincosf.S: Removed. * sysdeps/x86_64/fpu/multiarch/s_sincosf-sse2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sincosf-sse2.c: New file.
* Regenerate sysdeps/x86_64/fpu/libm-test-ulpsH.J. Lu2018-12-262-0/+10
| | | | * sysdeps/x86_64/fpu/libm-test-ulps: Regenerated.
* x86-64: Vectorize sincosf_poly and update s_sincosf-fma.cH.J. Lu2018-12-266-340/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add <sincosf_poly.h> and include it in s_sincosf.h to allow vectorized sincosf_poly. Add x86 sincosf_poly.h to vectorize sincosf_poly. On Broadwell, bench-sincosf shows: Before After Improvement max 160.273 114.198 40% min 6.25 5.625 11% mean 13.0325 10.6462 22% Vectorized sincosf_poly shows Before After Improvement max 138.653 114.198 21% min 5.004 5.625 -11% mean 11.5934 10.6462 9% Tested on x86-64 and i686 as well as with build-many-glibcs.py. * sysdeps/ieee754/flt-32/s_sincosf.h: Include <sincosf_poly.h>. (sincos_t, sincosf_poly, sinf_poly): Moved to ... * sysdeps/ieee754/flt-32/sincosf_poly.h: Here. New file. * sysdeps/x86/fpu/s_sincosf_data.c: New file. * sysdeps/x86/fpu/sincosf_poly.h: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c: Just include <sysdeps/ieee754/flt-32/s_sincosf.c>.
* Update nios2, sparc32 localplt.data for difftime changes (bug 24023).Joseph Myers2018-12-213-0/+11
| | | | | | | | | | | | | | | | | | | | | | The recent difftime changes introduced localplt test failures on nios2 and sparc32, two configurations where some soft-fp functions are defined in / exported from libc.so, and where the difftime changes affected the particular set of floating-point operations used in libc.so. This patch adds those functions to localplt.data, alongside other such functions already there. (In the sparc32 case, and more generally on any platform where long double is a software floating-point type, it would probably be more efficient to avoid using long double at all in difftime, but that's a pre-existing issue.) Tested with build-many-glibcs.py for its nios2 and sparcv9 configurations. [BZ #24023] * sysdeps/unix/sysv/linux/nios2/localplt.data: Allow __floatundidf PLT reference in libc.so. * sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Allow _Q_lltoq and _Q_qtod PLT references in libc.so.
* Refactor string benchtestsWilco Dijkstra2018-12-2122-207/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor string benchtests by moving duplicated defines into bench-string.h. * benchtests/bench-memchr.c: Cleanup defines. * benchtests/bench-memcmp.c: Likewise. * benchtests/bench-memset.c: Likewise. * benchtests/bench-memset-large.c: Likewise. * benchtests/bench-memset-walk.c: Likewise. * benchtests/bench-stpcpy.c: Likewise. * benchtests/bench-stpncpy.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-strcmp.c: Likewise. * benchtests/bench-strcpy.c: Likewise. * benchtests/bench-strcspn.c: Likewise. * benchtests/bench-string.h: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncat.c: Likewise. * benchtests/bench-strncmp.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise. * benchtests/bench-strpbrk.c: Likewise. * benchtests/bench-strrchr.c: Likewise. * benchtests/bench-strspn.c: Likewise.
* Update longlong.h.Joseph Myers2018-12-212-58/+59
| | | | | | | | | | | | | This patch updates longlong.h from GCC. There were no local changes in glibc (the previous version was identical to the r232143 GCC version, apart from copyright dates which had been updated in both places), so this patch makes it identical to the version in GCC again. Tested for x86_64 and x86. Also tested with build-many-glibcs.py for its RISC-V configurations, as the glibc architecture with the most substantial changes in longlong.h in this patch. * stdlib/longlong.h: Update from GCC.
* Require GCC 5 or later to build glibc (bug 23993).Joseph Myers2018-12-216-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | We know that building glibc with GCC 4.9 is broken on various platforms (bug 23993). As it's more than a year since we last increased the minimum GCC version to build glibc, this patch changes the requirement to be GCC 5 or later (indeed, based on 4.9 having been required for building 2.26, it would be consistent in terms of timing to require GCC 6 or later from the 2.30 release onwards). It deliberately just updates the configure test and corresponding documentation, leaving removal of no-longer-needed __GNUC_PREREQ tests for a separate patch. In the NEWS entry, the requirement for a newer GCC version for powerpc64le is reiterated (as in the entry for the 4.9 requirement in 2.26) to avoid suggesting the version requirement there has gone down. (If that version goes up further as part of support for binary128 long double, of course the wording would change at that time.) Tested for x86_64. [BZ #23993] * configure.ac (libc_cv_compiler_ok): Require GCC 5 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Update minimum GCC version. * INSTALL: Regenerated.
* malloc: Check the alignment of mmapped chunks before unmapping.Istvan Kurucsai2018-12-212-1/+8
| | | | * malloc/malloc.c (munmap_chunk): Verify chunk alignment.
* malloc: Add more integrity checks to mremap_chunk.Istvan Kurucsai2018-12-202-3/+13
| | | | * malloc/malloc.c (mremap_chunk): Additional checks.
* Add C-SKY portMao Han2018-12-21126-0/+12799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add two abi combinations support for C-SKY ABIV2: soft-float little endian, hard float little endian. C-SKY ABI manual and architecture user guide are available from: https://github.com/c-sky/csky-doc * config.h.in (CSKYABI, CSKY_HARD_FLOAT): New Define. * scripts/build-many-glibcs.py: Add C-SKY targets. * sysdeps/csky/Implies: New file. * sysdeps/csky/Makefile: Likewise. * sysdeps/csky/abiv2/__longjmp.S: Likewise. * sysdeps/csky/abiv2/csky-mcount.S: Likewise. * sysdeps/csky/abiv2/dl-trampoline.S: Likewise. * sysdeps/csky/abiv2/memcmp.S: Likewise. * sysdeps/csky/abiv2/memcpy.S: Likewise. * sysdeps/csky/abiv2/memmove.S: Likewise. * sysdeps/csky/abiv2/memset.S: Likewise. * sysdeps/csky/abiv2/setjmp.S: Likewise. * sysdeps/csky/abiv2/start.S: Likewise. * sysdeps/csky/abiv2/strcmp.S: Likewise. * sysdeps/csky/abiv2/strcpy.S: Likewise. * sysdeps/csky/abiv2/strlen.S: Likewise. * sysdeps/csky/abiv2/tls-macros.h: Likewise. * sysdeps/csky/abort-instr.h: Likewise. * sysdeps/csky/atomic-machine.h: Likewise. * sysdeps/csky/bits/endian.h: Likewise. * sysdeps/csky/bits/fenv.h: Likewise. * sysdeps/csky/bits/link.h: Likewise. * sysdeps/csky/bits/setjmp.h: Likewise. * sysdeps/csky/bsd-_setjmp.S: Likewise. * sysdeps/csky/bsd-setjmp.S: Likewise. * sysdeps/csky/configure: Likewise. * sysdeps/csky/configure.ac: Likewise. * sysdeps/csky/dl-machine.h: Likewise. * sysdeps/csky/dl-procinfo.c: Likewise. * sysdeps/csky/dl-procinfo.h: Likewise. * sysdeps/csky/dl-sysdep.h: Likewise. * sysdeps/csky/dl-tls.h: Likewise. * sysdeps/csky/fpu/fclrexcpt.c: Likewise. * sysdeps/csky/fpu/fedisblxcpt.c: Likewise. * sysdeps/csky/fpu/feenablxcpt.c: Likewise. * sysdeps/csky/fpu/fegetenv.c: Likewise. * sysdeps/csky/fpu/fegetexcept.c: Likewise. * sysdeps/csky/fpu/fegetmode.c: Likewise. * sysdeps/csky/fpu/fegetround.c: Likewise. * sysdeps/csky/fpu/feholdexcpt.c: Likewise. * sysdeps/csky/fpu/fenv_libc.h: Likewise. * sysdeps/csky/fpu/fenv_private.h: Likewise. * sysdeps/csky/fpu/fesetenv.c: Likewise. * sysdeps/csky/fpu/fesetexcept.c: Likewise. * sysdeps/csky/fpu/fesetmode.c: Likewise. * sysdeps/csky/fpu/fesetround.c: Likewise. * sysdeps/csky/fpu/feupdateenv.c: Likewise. * sysdeps/csky/fpu/fgetexcptflg.c: Likewise. * sysdeps/csky/fpu/fix-fp-int-convert-overflow.h: Likewise. * sysdeps/csky/fpu/fraiseexcpt.c: Likewise. * sysdeps/csky/fpu/fsetexcptflg.c: Likewise. * sysdeps/csky/fpu/ftestexcept.c: Likewise. * sysdeps/csky/fpu/libm-test-ulps: Likewise. * sysdeps/csky/fpu/libm-test-ulps-name: Likewise. * sysdeps/csky/fpu_control.h: Likewise. * sysdeps/csky/gccframe.h: Likewise. * sysdeps/csky/jmpbuf-unwind.h: Likewise. * sysdeps/csky/ldsodefs.h: Likewise. * sysdeps/csky/libc-tls.c: Likewise. * sysdeps/csky/linkmap.h: Likewise. * sysdeps/csky/machine-gmon.h: Likewise. * sysdeps/csky/memusage.h: Likewise. * sysdeps/csky/nofpu/Implies: Likewise. * sysdeps/csky/nofpu/libm-test-ulps: Likewise. * sysdeps/csky/nofpu/libm-test-ulps-name: Likewise. * sysdeps/csky/nptl/Makefile: Likewise. * sysdeps/csky/nptl/bits/pthreadtypes-arch.h: Likewise. * sysdeps/csky/nptl/bits/semaphore.h: Likewise. * sysdeps/csky/nptl/pthread-offsets.h: Likewise. * sysdeps/csky/nptl/pthreaddef.h: Likewise. * sysdeps/csky/nptl/tcb-offsets.sym: Likewise. * sysdeps/csky/nptl/tls.h: Likewise. * sysdeps/csky/preconfigure: Likewise. * sysdeps/csky/sfp-machine.h: Likewise. * sysdeps/csky/sotruss-lib.c: Likewise. * sysdeps/csky/stackinfo.h: Likewise. * sysdeps/csky/sysdep.h: Likewise. * sysdeps/csky/tininess.h: Likewise. * sysdeps/csky/tst-audit.h: Likewise. * sysdeps/unix/sysv/linux/csky/Implies: Likewise. * sysdeps/unix/sysv/linux/csky/Makefile: Likewise. * sysdeps/unix/sysv/linux/csky/Versions: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/clone.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/syscall.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym: Likewise. * sysdeps/unix/sysv/linux/csky/bits/procfs.h: Likewise. * sysdeps/unix/sysv/linux/csky/bits/shmlba.h: Likewise. * sysdeps/unix/sysv/linux/csky/c++-types.data: Likewise. * sysdeps/unix/sysv/linux/csky/configure: Likewise. * sysdeps/unix/sysv/linux/csky/configure.ac: Likewise. * sysdeps/unix/sysv/linux/csky/ipc_priv.h: Likewise. * sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/csky/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/csky/ld.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/ldconfig.h: Likewise. * sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libanl.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libcrypt.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libdl.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libpthread.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libresolv.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/librt.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libthread_db.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/libutil.abilist: Likewise. * sysdeps/unix/sysv/linux/csky/localplt.data: Likewise. * sysdeps/unix/sysv/linux/csky/makecontext.c: Likewise. * sysdeps/unix/sysv/linux/csky/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/csky/pt-vfork.S: Likewise. * sysdeps/unix/sysv/linux/csky/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/csky/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/csky/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/csky/sys/cachectl.h: Likewise. * sysdeps/unix/sysv/linux/csky/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/csky/sys/user.h: Likewise. * sysdeps/unix/sysv/linux/csky/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/csky/sysdep.h: Likewise.
* Y2038: make __difftime compatible with 64-bit timeAlbert ARIBAUD (3ADEV)2018-12-203-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a 64-bit-time version of __difftime (but do not assume __time64_t is a signed int so that Gnulib can reuse the code) and make the 32-bit version a wrapper of it. Current difftime expects two time_t arguments and returns a double. To preserve source-code compatibility, its 64-bit-time equivalent expects two __time64_t arguments but still returns a double. This patch was tested by running 'make check' on branch master then applying this patch and its two predecessors and running 'make check' again, and checking that both 'make check' yield identical results. This was done on x86_64-linux-gnu and i686-linux-gnu. This patch was also functionally tested with an ad hoc userland C program which checks the result of difftime for various pairs of 32-bit and, for 64-bit builds, of 64-bit time_t values too. The program was built and run against a glibc with and without the patch, and the results compared to ensure the patch does not change the behavior of difftime. * include/time.h (__difftime64): Add. * time/difftime.c (subtract): convert to 64-bit time. * time/difftime.c (__difftime64): Add. * time/difftime.c (__difftime): Wrap around __difftime64.
* manual/examples: Remove redundant "if not"H.J. Lu2018-12-2042-41/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "if not, if not," with "if not,". * manual/examples/add.c: Remove redundant "if not". * manual/examples/argp-ex1.c: Likewise. * manual/examples/argp-ex2.c: Likewise. * manual/examples/argp-ex3.c: Likewise. * manual/examples/argp-ex4.c: Likewise. * manual/examples/atexit.c: Likewise. * manual/examples/db.c: Likewise. * manual/examples/dir.c: Likewise. * manual/examples/dir2.c: Likewise. * manual/examples/execinfo.c: Likewise. * manual/examples/filecli.c: Likewise. * manual/examples/filesrv.c: Likewise. * manual/examples/fmtmsgexpl.c: Likewise. * manual/examples/genpass.c: Likewise. * manual/examples/inetcli.c: Likewise. * manual/examples/inetsrv.c: Likewise. * manual/examples/isockad.c: Likewise. * manual/examples/longopt.c: Likewise. * manual/examples/memopen.c: Likewise. * manual/examples/memstrm.c: Likewise. * manual/examples/mkdirent.c: Likewise. * manual/examples/mkfsock.c: Likewise. * manual/examples/mkisock.c: Likewise. * manual/examples/mygetpass.c: Likewise. * manual/examples/pipe.c: Likewise. * manual/examples/popen.c: Likewise. * manual/examples/rprintf.c: Likewise. * manual/examples/search.c: Likewise. * manual/examples/select.c: Likewise. * manual/examples/setjmp.c: Likewise. * manual/examples/sigh1.c: Likewise. * manual/examples/sigusr.c: Likewise. * manual/examples/stpcpy.c: Likewise. * manual/examples/strdupa.c: Likewise. * manual/examples/strftim.c: Likewise. * manual/examples/subopt.c: Likewise. * manual/examples/swapcontext.c: Likewise. * manual/examples/termios.c: Likewise. * manual/examples/testopt.c: Likewise. * manual/examples/testpass.c: Likewise. * manual/examples/timeval_subtract.c: Likewise.
* Remove x86 mathinline.h.Joseph Myers2018-12-193-295/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | After previous cleanups, the only code in the x86 bits/mathinline.h that is relevant with current compilers is the inline of __ieee754_atan2l that is conditional on __LIBC_INTERNAL_MATH_INLINES (i.e. for when libm itself is being built). This inline is something that does belong in glibc not GCC, since __ieee754_atan2l is a purely internal function name. This patch moves that inline to a new sysdeps/x86/fpu/math_private.h, removing the bits/mathinline.h header. Note that previously the inline was only for non-SSE 32-bit x86. That condition does not make sense, however, for a long double function; if it's not inlined, exactly the same x87 instruction will end up getting used by the out-of-line function, for both 32-bit and 64-bit. So that condition is not retained in the new version. Tested for x86_64 and x86. As expected, installed stripped shared libraries are unchanged for 32-bit x86, but installed stripped libm.so is changed for x86_64 because calls to __ieee754_atan2l start being inlined where previously they were out of line calls. (The same change to start inlining the function would presumably also apply for 32-bit built with -mfpmath=sse, but that's not a configuration I've tested.) * sysdeps/x86/fpu/math_private.h: New file. * sysdeps/x86/fpu/bits/mathinline.h: Remove.
* Remove x86 mathinline.h sinh, cosh, tanh inlines.Joseph Myers2018-12-192-16/+7
| | | | | | | | | | | | | | | | | | | | | | Continuing the removal of bits/mathinline.h inlines that would better be done by the compiler, this patch removes x86 inlines for sinh, cosh and tanh functions (inlines only previously present for fast-math, non-SSE 32-bit x86). I've filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88556> for adding such inlines as an optimization in GCC. I believe the only remaining part of the x86 bits/mathinline.h that does anything useful with current compilers after this patch is the __LIBC_INTERNAL_MATH_INLINES inline of __ieee754_atan2l; I intend to remove the whole header and move that inline to a sysdeps math_private.h header in a subsequent patch. Tested for x86_64 and x86. * sysdeps/x86/fpu/bits/mathinline.h (sinh): Remove inline definition. (cosh): Likewise. (tanh): Likewise.
* Print cache size and geometry auxv types on LD_SHOW_AUXV=1Tulio Magno Quites Machado Filho2018-12-193-31/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY, AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE, AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE and AT_L3_CACHEGEOMETRY when LD_SHOW_AUXV=1. AT_L*_CACHESIZE is printed as decimal and represent the number of bytes of the cache. AT_L*_CACHEGEOMETRY is treated in order to specify the cache line size and its associativity. Example output from a POWER8: AT_L1I_CACHESIZE: 32768 AT_L1I_CACHEGEOMETRY: 128B line size, 8-way set associative AT_L1D_CACHESIZE: 65536 AT_L1D_CACHEGEOMETRY: 128B line size, 8-way set associative AT_L2_CACHESIZE: 524288 AT_L2_CACHEGEOMETRY: 128B line size, 8-way set associative AT_L3_CACHESIZE: 8388608 AT_L3_CACHEGEOMETRY: 128B line size, 8-way set associative Some of the new types are longer than the previous ones, requiring to increase the indentation in order to keep the values aligned. * elf/dl-sysdep.c (auxvars): Add AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY, AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE, AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE and AT_L3_CACHEGEOMETRY. Fix indentation when printing the other fields. (_dl_show_auxv): Give a special treatment to AT_L1I_CACHEGEOMETRY, AT_L1D_CACHEGEOMETRY, AT_L2_CACHEGEOMETRY and AT_L3_CACHEGEOMETRY. * sysdeps/powerpc/dl-procinfo.h (cache_geometry): New function. (_dl_procinfo): Fix indentation when printing AT_HWCAP and AT_HWCAP2. Add support for AT_L1I_CACHEGEOMETRY, AT_L1D_CACHEGEOMETRY, AT_L2_CACHEGEOMETRY and AT_L3_CACHEGEOMETRY. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* nscd: avoid assertion failure during persistent db checkAndreas Schwab2018-12-192-1/+6
| | | | nscd should not abort when it finds inconsistencies in the persistent db.
* hurd: Fix 64bit fcntl lock implementationSamuel Thibault2018-12-192-3/+8
| | | | | * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Test against 64bit `cmd' values in the 64bit value cases.
* Fix BZ number for 43a45c2d82Adhemerval Zanella2018-12-181-1/+1
|
* Y2038: add function __ctime64_rAlbert ARIBAUD (3ADEV)2018-12-183-2/+31
| | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__ctime64_r): Add. * time/ctime_r.c (__ctime64_r): Add. [__TIMESIZE != 64] (__ctime_r): Turn into a wrapper.
* Y2038: add function __ctime64Albert ARIBAUD (3ADEV)2018-12-183-2/+30
| | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__ctime64): Add. * time/gmtime.c (__ctime64): Add. [__TIMESIZE != 64] (ctime): Turn into a wrapper.
* Y2038: add function __gmtime64_rAlbert ARIBAUD (3ADEV)2018-12-183-1/+31
| | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__gmtime64_r): Add. * time/gmtime.c (__gmtime64_r): Add. [__TIMESIZE != 64] (__gmtime): Turn into a wrapper.
* Y2038: add function __gmtime64Albert ARIBAUD (3ADEV)2018-12-183-2/+29
| | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__gmtime64): Add. * time/gmtime.c (__gmtime64): Add. [__TIMESIZE != 64] (__gmtime): Turn into a wrapper.
* Y2038: add function __localtime64_rAlbert ARIBAUD (3ADEV)2018-12-183-1/+32
| | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__localtime64_r): Add. * time/localtime.c (__localtime64_r): Add. [__TIMESIZE != 64] (__localtime_r): Turn into a wrapper.
* s390: Use generic kernel_sigaction.hAdhemerval Zanella2018-12-182-26/+6
| | | | | | | | | S390 kernel sigaction is the same as the Linux generic one. Checked with a s390-linux-gnu and s390x-linux-gnu build. * sysdeps/unix/sysv/linux/s390/kernel_sigaction.h: Use Linux generic kernel_sigction definition.
* ia64: Remove kernel_sigaction.hAdhemerval Zanella2018-12-182-7/+2
| | | | | | | | | IA64 kernel_sigaction.h definition is the sama as the Linux generic one. Checked on ia64-linux-gnu. * sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h: Remove file.
* hppa: Remove kernel_sigaction.hAdhemerval Zanella2018-12-182-18/+2
| | | | | | | | | HPPA kernel_sigaction.h definition is the sama as the Linux generic one and old_kernel_sigaction is not used. Checked on hppa-linux-gnu. * sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h: Remove file.
* alpha: Use Linux generic sigaction implementationAdhemerval Zanella2018-12-189-115/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alpha rt_sigaction syscall uses a slight different kernel ABI than generic one: arch/alpha/kernel/signal.c 90 SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act, 91 struct sigaction __user *, oact, 92 size_t, sigsetsize, void __user *, restorer) Similar as sparc, the syscall expects a restorer function. However different than sparc, alpha defines the restorer as the 5th argument (sparc defines as the 4th). This patch removes the arch-specific alpha sigaction implementation, adapt the Linux generic one to different restore placements (through STUB macro), and make alpha use the Linux generic kernel_sigaction definition. Checked on alpha-linux-gnu and x86_64-linux-gnu (for sanity). * sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about __syscall_rt_sigaction. * sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h (kernel_sigaction): Use Linux generic defintion. (STUB): Define. (__syscall_rt_sigreturn, __syscall_sigreturn): Add prototype. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S (__syscall_rt_sigaction): Remove implementation. (__syscall_sigreturn, __syscall_rt_sigreturn): Define as global and hidden. * sysdeps/unix/sysv/linux/alpha/sigaction.c: Remove file. * sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL, INTERNAL_SYSCALL): Remove definitions. * sysdeps/unix/sysv/linux/sigaction.c: Define STUB to accept both the action and signal set size. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (STUB): Redefine. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (STUB): Likewise.
* m68k: Fix sigaction kernel definition (BZ #23960)Adhemerval Zanella2018-12-188-34/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b4a5d26d883 (linux: Consolidate sigaction implementation) added a wrong kernel_sigaction definition for m68k, meant for __NR_sigaction instead of __NR_rt_sigaction as used on generic Linux sigaction implementation. This patch fixes it by using the Linux generic definition meant for the RT kernel ABI. Checked the signal tests on emulated m68-linux-gnu (Aranym). It fixes the faulty signal/tst-sigaction and man works as expected. Adhemerval Zanella <adhemerval.zanella@linaro.org> James Clarke <jrtc27@jrtc27.com> [BZ #23960] * sysdeps/unix/sysv/linux/kernel_sigaction.h (HAS_SA_RESTORER): Define if SA_RESTORER is defined. (kernel_sigaction): Define sa_restorer if HAS_SA_RESTORER is defined. (SET_SA_RESTORER, RESET_SA_RESTORER): Define iff the macro are not already defined. * sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h (SA_RESTORER, kernel_sigaction, SET_SA_RESTORER, RESET_SA_RESTORER): Remove definitions. (HAS_SA_RESTORER): Define. * sysdeps/unix/sysv/linux/sparc/kernel_sigaction.h (SA_RESTORER, SET_SA_RESTORER, RESET_SA_RESTORER): Remove definition. (HAS_SA_RESTORER): Define. * sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h: Include generic kernel_sigaction after define SET_SA_RESTORER and RESET_SA_RESTORER. * sysdeps/unix/sysv/linux/powerpc/kernel_sigaction.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
* Remove __ASSUME_ST_INO_64_BIT.Joseph Myers2018-12-188-43/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel-features.h has a macro __ASSUME_ST_INO_64_BIT, with a comment "However, SH is lame, and still does not have a 64-bit inode field.". The macro is, in fact, defined to 0 by Alpha as well as SH. The Alpha case is, however, trivially useless: none of the files that test __ASSUME_ST_INO_64_BIT are built for Alpha (which gained kernel support for stat64 syscalls, with a 64-bit st_ino field, in Linux 2.6.4; the define to 0 for Alpha in glibc predates that). The SH kernel gained support for a 64-bit st_ino in struct stat64 in commit 760bcb1deec13c50e20399c84cb6a8ea41cc2820 ("sh: Fix fstatat64() syscall."), which is in Linux 2.6.22 and later. So the redefinition of __ASSUME_ST_INO_64_BIT to 0 is of no use for SH either; three of the files testing it do so immediately after a stat64-family syscall has been used, which will always have set the 64-bit st_ino correctly (in addition to the 32-bit __st_ino), while the relevant code __xstat32_conv executes only after such a syscall in the function calling __xstat32_conv. Thus this patch removes __ASSUME_ST_INO_64_BIT and code testing it. Removing the useless [!__ASSUME_ST_INO_64_BIT] code in __xstat32_conv renders the [_HAVE_STAT64___ST_INO] and [!_HAVE_STAT64___ST_INO] cases around it identical, so that conditional is also removed. Tested compilation with build-many-glibcs.py for its Alpha and SH configurations; also ran the glibc testsuite for x86_64 and x86. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_ST_INO_64_BIT): Remove macro definition. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_ST_INO_64_BIT): Do not undefine and define. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_ST_INO_64_BIT): Likewise. * sysdeps/unix/sysv/linux/fxstat64.c: Do not include <kernel-features.h>. (___fxstat64) [_HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT]: Remove conditional code. * sysdeps/unix/sysv/linux/lxstat64.c: Do not include <kernel-features.h>. (___lxstat64) [_HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT]: Remove conditional code. * sysdeps/unix/sysv/linux/xstat64.c: Do not include <kernel-features.h>. (___xstat64) [_HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT]: Remove conditional code. * sysdeps/unix/sysv/linux/xstatconv.c: Do not include <kernel-features.h>. (__xstat32_conv) [_HAVE_STAT64___ST_INO]: Remove conditional code. [!_HAVE_STAT64___ST_INO]: Make code unconditional.
* S390: Cleanup ifunc-resolve.h.Stefan Liebler2018-12-187-41/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The ifunc macros s390_vx_libc* are no longer used and can be removed as all users are now relying on s390_libc_ifunc_expr. The same applies to s390_libc_ifunc. The macro s390_libc_ifunc_init is now renamed to s390_libc_ifunc_expr_stfle_init and the users are adjusted accordingly. ChangeLog: * sysdeps/s390/multiarch/ifunc-resolve.h (s390_vx_libc_ifunc, s390_vx_libc_ifunc_redirected, s390_vx_libc_ifunc2, s390_vx_libc_ifunc_init, s390_vx_libc_ifunc2_redirected, s390_libc_ifunc): Delete macro definition. (s390_libc_ifunc_init): Rename to s390_libc_ifunc_expr_stfle_init. * sysdeps/s390/bzero: Use s390_libc_ifunc_expr_stfle_init instead of s390_libc_ifunc_init. * sysdeps/s390/memcmp.c: Likewise. * sysdeps/s390/memcpy.c: Likewise. * sysdeps/s390/mempcpy.c: Likewise. * sysdeps/s390/memset.c: Likewise.
* S390: Refactor gconv_simple ifunc handling.Stefan Liebler2018-12-182-11/+17
| | | | | | | | | | | | | | | The ifunc handling for various __gconv_transform_* functions which are using IFUNC on s390x are adjusted in order to omit ifunc if the minimum architecture level already supports newer CPUs by default. Instead those functions are just an alias to the vector variants. Furthermore the ifunc-macro s390_libc_ifunc_expr is now used instead of s390_vx_libc_ifunc. ChangeLog: * sysdeps/s390/multiarch/gconv_simple.c (ICONV_VX_IFUNC): Define macro dependent on HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT.
* S390: Refactor wmemcmp ifunc handling.Stefan Liebler2018-12-188-29/+111
| | | | | | | | | | | | | | | | | | | | | The ifunc handling for wmemcmp is adjusted in order to omit ifunc variants if those will never be used as the minimum architecture level already supports newer CPUs by default. ChangeLog: * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove wmemcmp variants. * sysdeps/s390/Makefile (sysdep_routines): Add wmemcmp variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Refactor ifunc handling for wmemcmp. * sysdeps/s390/multiarch/wmemcmp-c.c: Move to ... * sysdeps/s390/wmemcmp-c.c: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wmemcmp-vx.S: Move to ... * sysdeps/s390/wmemcmp-vx.S: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wmemcmp.c: Move to ... * sysdeps/s390/wmemcmp.c: ... here and adjust ifunc handling. * sysdeps/s390/ifunc-wmemcmp.h: New file.
* S390: Refactor wmemset ifunc handling.Stefan Liebler2018-12-188-32/+141
| | | | | | | | | | | | | | | | | | | | | | | The ifunc handling for wmemset is adjusted in order to omit ifunc if the minimum architecture level already supports newer CPUs by default. Unfortunately the c ifunc variant can't be omitted at all as it is used by the z13 ifunc variant as fallback if the pointers are not 4-byte aligned. Glibc internal calls will use the "newer" ifunc variant. ChangeLog: * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove wmemset variants. * sysdeps/s390/Makefile (sysdep_routines): Add wmemset variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Refactor ifunc handling for wmemset. * sysdeps/s390/multiarch/wmemset-c.c: Move to ... * sysdeps/s390/wmemset-c.c: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wmemset-vx.S: Move to ... * sysdeps/s390/wmemset-vx.S: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wmemset.c: Move to ... * sysdeps/s390/wmemset.c: ... here and adjust ifunc handling. * sysdeps/s390/ifunc-wmemset.h: New file.
* S390: Refactor wmemchr ifunc handling.Stefan Liebler2018-12-188-32/+141
| | | | | | | | | | | | | | | | | | | | | | | The ifunc handling for wmemchr is adjusted in order to omit ifunc if the minimum architecture level already supports newer CPUs by default. Unfortunately the c ifunc variant can't be omitted at all as it is used by the z13 ifunc variant as fallback if the pointers are not 4-byte aligned. Glibc internal calls will use the "newer" ifunc variant. ChangeLog: * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove wmemchr variants. * sysdeps/s390/Makefile (sysdep_routines): Add wmemchr variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Refactor ifunc handling for wmemchr. * sysdeps/s390/multiarch/wmemchr-c.c: Move to ... * sysdeps/s390/wmemchr-c.c: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wmemchr-vx.S: Move to ... * sysdeps/s390/wmemchr-vx.S: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wmemchr.c: Move to ... * sysdeps/s390/wmemchr.c: ... here and adjust ifunc handling. * sysdeps/s390/ifunc-wmemchr.h: New file.
* S390: Refactor wcscspn ifunc handling.Stefan Liebler2018-12-188-19/+115
| | | | | | | | | | | | | | | | | | | | | | The ifunc handling for wcscspn is adjusted in order to omit ifunc if the minimum architecture level already supports newer CPUs by default. Unfortunately the c ifunc variant can't be omitted at all as it is used by the z13 ifunc variant as fallback if the pointers are not 4-byte aligned. ChangeLog: * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove wcscspn variants. * sysdeps/s390/Makefile (sysdep_routines): Add wcscspn variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Refactor ifunc handling for wcscspn. * sysdeps/s390/multiarch/wcscspn-c.c: Move to ... * sysdeps/s390/wcscspn-c.c: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wcscspn-vx.S: Move to ... * sysdeps/s390/wcscspn-vx.S: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wcscspn.c: Move to ... * sysdeps/s390/wcscspn.c: ... here and adjust ifunc handling. * sysdeps/s390/ifunc-wcscspn.h: New file.
* S390: Refactor wcspbrk ifunc handling.Stefan Liebler2018-12-188-24/+129
| | | | | | | | | | | | | | | | | | | | | | | The ifunc handling for wcspbrk is adjusted in order to omit ifunc if the minimum architecture level already supports newer CPUs by default. Unfortunately the c ifunc variant can't be omitted at all as it is used by the z13 ifunc variant as fallback if the pointers are not 4-byte aligned. Glibc internal calls will use the "newer" ifunc variant. ChangeLog: * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove wcspbrk variants. * sysdeps/s390/Makefile (sysdep_routines): Add wcspbrk variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Refactor ifunc handling for wcspbrk. * sysdeps/s390/multiarch/wcspbrk-c.c: Move to ... * sysdeps/s390/wcspbrk-c.c: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wcspbrk-vx.S: Move to ... * sysdeps/s390/wcspbrk-vx.S: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/wcspbrk.c: Move to ... * sysdeps/s390/wcspbrk.c: ... here and adjust ifunc handling. * sysdeps/s390/ifunc-wcspbrk.h: New file.