Age | Commit message (Collapse) | Author |
|
Define FEATURE_INDEX_1 and FEATURE_INDEX_MAX as macros
for use by both assembly and C code. This fixes the
-Wundef error for cases where FEATURE_INDEX_1 was not
defined but used the correct value of 0 for an undefined
macro.
|
|
[BZ #16885]
* sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when
multiple zero bytes exist at the end of a string.
Reported by Aurelien Jarno <aurelien@aurel32.net>
* string/test-strcmp.c (check): Add explicit test for situations where
there are multiple zero bytes after the first.
|
|
lowlevellock.c for arm differs from the generic lowlevellock.c only in
insignificant ways, so can be removed. Happily, this fixes BZ 15119
(unnecessary busy loop in __lll_timedlock_wait on arm).
The notable differences between the arm and generic implementations are:
1) arm __lll_timedlock_wait has a fast path out if futex has been set
to 0 between since the function was called. This seems unlikely to
happen very often, so it seems at worst harmless to lose this fast
path.
2) Some function in arm's lowlevellock.c set futex to 2 if it was 1.
The generic version always sets the futex to 2. As futex can only be
0, 1 or 2 on entry into these functions, the behaviour is equivalent.
(If the futex manages to be 0 on entry then we've just lost another
unlikely fast path out.)
There are no test suite regressions.
Note that hppa and sparc also have their own lowlevellock.c. I believe
hppa can also be removed, so I'll send a separate patch for that
shortly. sparc's seems to be genuinely needed as it uses a different
locking structure.
Also note that the analysis at
https://sourceware.org/ml/libc-ports/2013-02/msg00021.html indicates a
further locking performance bug to fix - I've got a partial patch for
that which I can submit once I've finished testing.
2014-05-01 Bernard Ogden <bernie.ogden@linaro.org>
[BZ #15119]
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c: Remove file.
|
|
* sysdeps/sparc/fpu/fenv_private.h (HAVE_RM_CTX): Define.
(libc_feholdexcept_setround_sparc_ctx): New function.
(libc_fesetenv_sparc_ctx): Likewise.
(libc_feupdateenv_sparc_ctx): Likewise.
(libc_feholdsetround_sparc_ctx): Likewise.
(libc_feholdexcept_setround_ctx): Define.
(libc_feholdexcept_setroundf_ctx): Likewise.
(libc_feholdexcept_setroundl_ctx): Likewise.
(libc_fesetenv_ctx): Likewise.
(libc_fesetenvf_ctx): Likewise.
(libc_fesetenvl_ctx): Likewise.
(libc_feupdateenv_ctx): Likewise.
(libc_feupdateenvf_ctx): Likewise.
(libc_feupdateenvl_ctx): Likewise.
(libc_feresetround_ctx): Likewise.
(libc_feresetroundf_ctx): Likewise.
(libc_feresetroundl_ctx): Likewise.
(libc_feholdsetround_ctx): Likewise.
(libc_feholdsetroundf_ctx): Likewise.
(libc_feholdsetroundl_ctx): Likewise.
|
|
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (EMT_TAGOVF): Protect
with __USE_GNU instead of XOPEN cpp guards.
|
|
* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Define to
0.
|
|
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (EMT_TAGOVF): Protect
with XOPEN cpp guards.
|
|
This patch fixes what I believe to be a bug in the handling of
R_ARM_IRELATIVE RELA relocations. At present, these are handled the
same as REL relocations: i.e. the addend is loaded from the relocation
address. Most of the time this isn't a problem because RELA relocations
aren't used on ARM (GNU/Linux at least) anyway, but it causes problems
with prelink, which uses RELA on all targets for its conflict table.
(Support for ifunc prelinking requires a prelink patch, not yet posted.)
Anyway, this patch works, though I'm not 100% sure if it is correct: I
notice that this code path received attention last year:
https://sourceware.org/ml/libc-ports/2013-07/msg00000.html
I'm not sure under what circumstances that patch would have had an
effect, nor if my patch conflicts with that case.
No regressions using Mentor's usual glibc cross-testing infrastructure.
[BZ #16888]
* sysdeps/arm/dl-machine.h (elf_machine_rela): Fix R_ARM_IRELATIVE
handling.
|
|
This patch increases the minimum Linux kernel version for glibc to
2.6.32, as discussed in the thread starting at
<https://sourceware.org/ml/libc-alpha/2014-01/msg00511.html>.
This patch just does the minimal change to arch_minimum_kernel
settings (and LIBC_LINUX_VERSION, which determines the minimum kernel
headers version, as it doesn't make sense for that to be older than
the minimum kernel that can be used at runtime). Followups would be
expected to do, roughly and not necessarily precisely in this order:
* Remove __LINUX_KERNEL_VERSION checks in kernel-features.h files
where those checks are always true / always false for kernels 2.6.32
and above.
* Otherwise simplify/improve conditionals in those files (for example,
where defining once in the main file then undefining in
architecture-specific files makes things clearer than having lots of
separate definitions of the same macro), possibly fixing in the
process cases where a macro should optimally have been defined for a
given architecture but wasn't. (In the review in preparation for
this version increase I checked what the right conditions should be
for all macros in the main kernel-features.h whose definitions there
would have been affected by the increase - but I only fixed that
subset of the issues found where --enable-kernel=2.6.32 would have
caused a kernel feature to be wrongly assumed to be present, not any
cases where a feature is not assumed but could be assumed.)
* Remove conditionals on __ASSUME_* where they can now be taken to be
always-true, and the definitions when the macros are only used in
Linux-specific files.
* Split more architectures out of the main kernel-features.h (like
ex-ports architectures), once various of the architecture
conditionals there have been eliminated so the new
architecture-specific files are no larger than actually necessary.
Tested x86_64.
2014-03-27 Joseph Myers <joseph@codesourcery.com>
[BZ #9894]
* sysdeps/unix/sysv/linux/configure.ac (LIBC_LINUX_VERSION):
Change to 2.6.32.
(arch_minimum_kernel): Change all 2.6.16 settings to 2.6.32.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/unix/sysv/linux/microblaze/configure.ac: Remove file.
* sysdeps/unix/sysv/linux/microblaze/configure: Likewise.
* sysdeps/unix/sysv/linux/tile/configure.ac: Likewise.
* sysdeps/unix/sysv/linux/tile/configure: Likewise.
* README: Update reference to required Linux kernel version.
* manual/install.texi (Linux): Update reference to required Linux
kernel headers version.
* INSTALL: Regenerated.
|
|
GCC 4.9 -ftree-loop-distribute-patterns now may transform loops in
memcpy. Add the alias to internal GLIBC symbol to avoid PLT creation.
|
|
|
|
|
|
This patch optimizes the FPSCR update on exception and rounding change
functions by just updating its value if new value if different from
current one. It also optimizes fedisableexcept and feenableexcept by
removing an unecessary FPSCR read.
|
|
|
|
|
|
__int128 was added in GCC 4.6 and __int128_t was added before x86-64
was supported. This patch replaces __int128 with __int128_t so that
the installed bits/link.h can be used with older GCC.
* sysdeps/x86/bits/link.h (La_x86_64_regs): Replace __int128
with __int128_t.
(La_x86_64_retval): Likewise.
|
|
|
|
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
(struct sigaction): New struct member __glibc_reserved0, change
type of sa_flags to int.
|
|
Add setjmp, longjmp and longjmp_target SystemTap probes.
ChangeLog:
2014-04-22 Will Newton <will.newton@linaro.org>
Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
* sysdeps/aarch64/__longjmp.S: Include stap-probe.h.
(__longjmp): Add longjmp and longjmp_target SystemTap
probes.
* sysdeps/aarch64/setjmp.S: Include stap-probe.h.
(__sigsetjmp): Add setjmp SystemTap probe.
|
|
This patch add the missing libc_<function>l_ctx macros for long
double. Similar for float, they point to default double versions.
|
|
|
|
This patch checks and sets bit_AVX2_Usable in __cpu_features.feature.
* sysdeps/x86_64/multiarch/ifunc-defines.sym (COMMON_CPUID_INDEX_7):
New.
* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
Check and set bit_AVX2_Usable.
* sysdeps/x86_64/multiarch/init-arch.h (bit_AVX2_Usable): New
macro.
(bit_AVX2): Likewise.
(index_AVX2_Usable): Likewise.
(CPUID_AVX2): Likewise.
(HAS_AVX2): Likewise.
|
|
The current implementation of setcontext uses rt_sigreturn to restore
the contents of registers. This contrasts with the way most other
architectures implement setcontext:
powerpc64, mips, tile:
Call rt_sigreturn if context was created by a call to a signal handler,
otherwise restore in user code.
powerpc32:
Call swapcontext system call and don't call sigreturn or rt_sigreturn.
x86_64, sparc, hppa, sh, ia64, m68k, s390, arm:
Only support restoring "synchronous" contexts, that is contexts
created by getcontext, and restoring in user code and don't call
sigreturn or rt_sigreturn.
alpha:
Call sigreturn (but not rt_sigreturn) in all cases to do the restore.
The text of the setcontext manpage suggests that the requirement to be
able to restore a signal handler created context has been dropped from
SUSv2:
If the context was obtained by a call to a signal handler, then old
standard text says that "program execution continues with the program
instruction following the instruction interrupted by the signal".
However, this sentence was removed in SUSv2, and the present verdict
is "the result is unspecified".
Implementing setcontext by calling rt_sigreturn unconditionally causes
problems when used with sigaltstack as in BZ #16629. On this basis it
seems that aarch64 is broken and that new ports should only support
restoring contexts created with getcontext and do not need to call
rt_sigreturn at all.
This patch re-implements the aarch64 setcontext function to restore
the context in user code in a similar manner to x86_64 and other ports.
ChangeLog:
2014-04-17 Will Newton <will.newton@linaro.org>
[BZ #16629]
* sysdeps/unix/sysv/linux/aarch64/setcontext.S (__setcontext):
Re-implement to restore registers in user code and avoid
rt_sigreturn system call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This patch saves and restores bound registers in x86-64 PLT for
ld.so profile and LD_AUDIT:
* sysdeps/x86_64/bits/link.h (La_x86_64_regs): Add lr_bnd.
(La_x86_64_retval): Add lrv_bnd0 and lrv_bnd1.
* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Save
Intel MPX bound registers before _dl_profile_fixup.
* sysdeps/x86_64/dl-trampoline.h: Restore Intel MPX bound
registers after _dl_profile_fixup. Save and restore bound
registers bnd0/bnd1 when calling _dl_call_pltexit.
* sysdeps/x86_64/link-defines.sym (BND_SIZE): New.
(LR_BND_OFFSET): Likewise.
(LRV_BND0_OFFSET): Likewise.
(LRV_BND1_OFFSET): Likewise.
|
|
* sysdeps/mach/hurd/i386/tls.h (tcbhead_t): Add multiple_threads,
sysinfo, stack_guard, pointer_guard, gscope_flag, private_futex,
__private_tm, __private_ss fields.
|
|
|
|
* sysdeps/mach/munmap.c (__munmap): Return EINVAL if `addr' is 0.
|
|
|
|
|
|
mode.
|
|
Besides fixing the bugzilla, this also fixes corner-cases where the high
and low double differ greatly in magnitude, and handles a denormal
input without resorting to a fp rescale.
[BZ #16740]
[BZ #16619]
* sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Rewrite.
* math/libm-test.inc (frexp_test_data): Add tests.
|
|
* sysdeps/sparc/fpu/libm-test-ulps: Update.
|
|
[BZ #15215] This unifies various pthread_once architecture-specific
implementations which were using the same algorithm with slightly different
implementations. It also adds missing memory barriers that are required for
correctness.
|
|
|
|
This patch saves and restores bound registers in symbol lookup for x86-64:
1. Branches without BND prefix clear bound registers.
2. x86-64 pass bounds in bound registers as specified in MPX psABI
extension on hjl/mpx/master branch at
https://github.com/hjl-tools/x86-64-psABI
https://groups.google.com/forum/#!topic/x86-64-abi/KFsB0XTgWYc
Binutils has been updated to create an alternate PLT to add BND prefix
when branching to ld.so.
* config.h.in (HAVE_MPX_SUPPORT): New #undef.
* sysdeps/x86_64/configure.ac: Set HAVE_MPX_SUPPORT.
* sysdeps/x86_64/configure: Regenerated.
* sysdeps/x86_64/dl-trampoline.S (REGISTER_SAVE_AREA): New
macro.
(REGISTER_SAVE_RAX): Likewise.
(REGISTER_SAVE_RCX): Likewise.
(REGISTER_SAVE_RDX): Likewise.
(REGISTER_SAVE_RSI): Likewise.
(REGISTER_SAVE_RDI): Likewise.
(REGISTER_SAVE_R8): Likewise.
(REGISTER_SAVE_R9): Likewise.
(REGISTER_SAVE_BND0): Likewise.
(REGISTER_SAVE_BND1): Likewise.
(REGISTER_SAVE_BND2): Likewise.
(_dl_runtime_resolve): Use them. Save and restore Intel MPX
bound registers when calling _dl_fixup.
|
|
pathconf(_PC_NAME_MAX) was implemented on top of statfs(). The 32bit
version therefore fails EOVERFLOW if the filesystem blockcount is
sufficiently large.
Most pathconf() queries use statvfs64(), which avoids this issue. This
patch modifies pathconf(_PC_NAME_MAX) to do likewise.
|
|
This patch moves the __PTHREAD_SPINS definition to arch specific header
since pthread_mutex_t layout is also arch specific. This leads to no
need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the
undefined compiler warning.
|
|
This patch fixes some powerpc32 and powerpc64 builds with
--disable-multi-arch option along with different --with-cpu=powerN.
It cleanups the Implies directories by removing the multiarch
folder for non multiarch config and also fixing two assembly
implementations: powerpc64/power7/strncat.S that is calling the
wrong strlen; and power8/fpu/s_isnan.S that misses the hidden_def and
weak_alias directives.
|
|
This patch makes the configure adds -D_CALL_ELF=1 when compiler does
not define _CALL_ELF (versions before powerpc64le support). It cleans
up compiler warnings on old compiler where _CALL_ELF is not defined
on powerpc64(be) builds.
It does by add a new config.make variable for configure-deduced
CPPFLAGS and accumulate into that (confix-extra-cppflags). It also
generalizes libc_extra_cflags so it accumulates in sysdeps configure
fragmenets.
|
|
This patch fixes the powerpc32 optimized nearbyint/nearbyintf bogus
results for FE_DOWNWARD rounding mode. This is due wrong instructions
sequence used in the rounding calculation (two subtractions instead of
adition and a subtraction).
Fixes BZ#16815.
|
|
|
|
|