summaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:14:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:14:56 +0200
commitf76453c31593957fec1a99b986bfa5506618b79c (patch)
treeda353c882fb9b2261c9871bcb9e3876a3e6ed7f6 /sysdeps/sparc/sparc32
parent58695b88a9deaecbcf7794760cc333177edaa2b4 (diff)
parent78bd7499af46d739ce94410eaeea006e874ca9e5 (diff)
Merge tag 'glibc-2.22' into baseline
The GNU C Library ================= The GNU C Library version 2.22 is now available. The GNU C Library is used as *the* C library in the GNU system and in GNU/Linux systems, as well as many other systems that use Linux as the kernel. The GNU C Library is primarily designed to be a portable and high performance C library. It follows all relevant standards including ISO C11 and POSIX.1-2008. It is also internationalized and has one of the most complete internationalization interfaces known. The GNU C Library webpage is at http://www.gnu.org/software/libc/ Packages for the 2.22 release may be downloaded from: http://ftpmirror.gnu.org/libc/ http://ftp.gnu.org/gnu/libc/ The mirror list is at http://www.gnu.org/order/ftp.html NEWS for version 2.22 ===================== * The following bugs are resolved with this release: 438, 4719, 6544, 6792, 11216, 12836, 13028, 13064, 13151, 13152, 14094, 14292, 14841, 14906, 14958, 15319, 15467, 15790, 15969, 16159, 16339, 16350, 16351, 16352, 16353, 16361, 16512, 16526, 16538, 16559, 16560, 16704, 16783, 16850, 17053, 17090, 17195, 17269, 17293, 17322, 17403, 17475, 17523, 17542, 17569, 17581, 17588, 17596, 17620, 17621, 17628, 17631, 17692, 17711, 17715, 17776, 17779, 17792, 17833, 17836, 17841, 17912, 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967, 17969, 17977, 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020, 18029, 18030, 18032, 18034, 18036, 18038, 18039, 18042, 18043, 18046, 18047, 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116, 18125, 18128, 18134, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18219, 18220, 18221, 18234, 18244, 18245, 18247, 18287, 18319, 18324, 18333, 18346, 18371, 18383, 18397, 18400, 18409, 18410, 18412, 18418, 18422, 18434, 18444, 18457, 18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498, 18502, 18507, 18508, 18512, 18513, 18519, 18520, 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, 18539, 18540, 18542, 18544, 18545, 18546, 18547, 18549, 18553, 18557, 18558, 18569, 18583, 18585, 18586, 18592, 18593, 18594, 18602, 18612, 18613, 18619, 18633, 18641, 18643, 18648, 18657, 18676, 18694, 18696. * Cache information can be queried via sysconf() function on s390 e.g. with _SC_LEVEL1_ICACHE_SIZE as argument. * A buffer overflow in gethostbyname_r and related functions performing DNS requests has been fixed. If the NSS functions were called with a misaligned buffer, the buffer length change due to pointer alignment was not taken into account. This could result in application crashes or, potentially arbitrary code execution, using crafted, but syntactically valid DNS responses. (CVE-2015-1781) * The time zone file parser has been made more robust against crafted time zone files, avoiding heap buffer overflows related to the processing of the tzh_ttisstdcnt and tzh_ttisgmtcnt fields, and a stack overflow due to large time zone data files. Overly long time zone specifiers in the TZ variable no longer result in stack overflows and crashes. * A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors for LD and GD on x86 and x86-64, has been implemented. You will need binutils-2.24 or later to enable this optimization. * Character encoding and ctype tables were updated to Unicode 7.0.0, using new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red Hat). These updates cause user visible changes, such as the fix for bug 17998. * CVE-2014-8121 The NSS backends shared internal state between the getXXent and getXXbyYY NSS calls for the same database, causing a denial-of-service condition in some applications. * Added vector math library named libmvec with the following vectorized x86_64 implementations: cos, cosf, sin, sinf, sincos, sincosf, log, logf, exp, expf, pow, powf. The library can be disabled with --disable-mathvec. Use of the functions is enabled with -fopenmp -ffast-math starting from -O1 for GCC version >= 4.9.0. Shared library libmvec.so is linked in as needed when using -lm (no need to specify -lmvec explicitly for not static builds). Visit <https://sourceware.org/glibc/wiki/libmvec> for detailed information. * A new fmemopen implementation has been added with the goal of POSIX compliance. The new implementation fixes the following long-standing issues: BZ#6544, BZ#11216, BZ#12836, BZ#13151, BZ#13152, and BZ#14292. The old implementation is still present for use be by existing binaries. * The 32-bit sparc sigaction ABI was inadvertently broken in the 2.20 and 2.21 releases. It has been fixed to match 2.19 and older, but binaries built against 2.20 and 2.21 might need to be recompiled. See BZ#18694. * Port to Native Client running on ARMv7-A (--host=arm-nacl). Contributed by Roland McGrath (Google). Contributors ============ This release was made possible by the contributions of many people. The maintainers are grateful to everyone who has contributed changes or bug reports. These include: Adhemerval Zanella Alan Modra Alexandre Oliva Andreas Schwab Andrew Senkevich Andriy Rysin Arjun Shankar Aurelien Jarno Benno Schulenberg Brad Hubbard Carlos O'Donell Chris Metcalf Christian Schmidt Chung-Lin Tang Cong Wang Cyril Hrubis Daniel Marjamäki David S. Miller Dmitry V. Levin Eric Rannaud Evangelos Foutras Feng Gao Florian Weimer Gleb Fotengauer-Malinovskiy H.J. Lu Igor Zamyatin J William Piggott James Cowgill James Lemke John David Anglin Joseph Myers Kevin Easton Khem Raj Leonhard Holz Mark Wielaard Marko Myllynen Martin Galvan Martin Sebor Matthew Fortune Mel Gorman Mike Frysinger Miroslav Lichvar Nathan Lynch Ondřej Bílka Paul Eggert Paul Pluzhnikov Pavel Kopyl Pravin Satpute Rajalakshmi Srinivasaraghavan Rical Jasan Richard Henderson Roland McGrath Rüdiger Sonderfeld Samuel Thibault Siddhesh Poyarekar Stefan Liebler Steve Ellcey Szabolcs Nagy Torvald Riegel Tulio Magno Quites Machado Filho Vincent Bernat Wilco Dijkstra Yaakov Selkowitz Zack Weinberg
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/Makefile2
-rw-r--r--sysdeps/sparc/sparc32/__longjmp.S2
-rw-r--r--sysdeps/sparc/sparc32/add_n.S2
-rw-r--r--sysdeps/sparc/sparc32/addmul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/alloca.S2
-rw-r--r--sysdeps/sparc/sparc32/bits/atomic.h24
-rw-r--r--sysdeps/sparc/sparc32/bits/setjmp.h2
-rw-r--r--sysdeps/sparc/sparc32/dl-irel.h6
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h17
-rw-r--r--sysdeps/sparc/sparc32/dl-plt.h2
-rw-r--r--sysdeps/sparc/sparc32/dl-trampoline.S2
-rw-r--r--sysdeps/sparc/sparc32/e_sqrt.c2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_copysign.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_copysignf.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_fabs.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_fabsf.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_fdim.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_fdimf.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_signbit.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/s_signbitl.S4
-rw-r--r--sysdeps/sparc/sparc32/fpu/w_sqrt.S2
-rw-r--r--sysdeps/sparc/sparc32/fpu/w_sqrtf.S2
-rw-r--r--sysdeps/sparc/sparc32/ieee754.h2
-rw-r--r--sysdeps/sparc/sparc32/jmpbuf-offsets.h2
-rw-r--r--sysdeps/sparc/sparc32/jmpbuf-unwind.h2
-rw-r--r--sysdeps/sparc/sparc32/lll_timedlock_wait.c1
-rw-r--r--sysdeps/sparc/sparc32/lll_timedwait_tid.c1
-rw-r--r--sysdeps/sparc/sparc32/lowlevellock.c131
-rw-r--r--sysdeps/sparc/sparc32/lshift.S2
-rw-r--r--sysdeps/sparc/sparc32/memchr.S2
-rw-r--r--sysdeps/sparc/sparc32/memcpy.S2
-rw-r--r--sysdeps/sparc/sparc32/memset.S2
-rw-r--r--sysdeps/sparc/sparc32/mul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/pthread_barrier_wait.c97
-rw-r--r--sysdeps/sparc/sparc32/pthread_spin_lock.S (renamed from sysdeps/sparc/sparc32/sparcv9/hp-timing.c)21
-rw-r--r--sysdeps/sparc/sparc32/pthread_spin_trylock.S29
-rw-r--r--sysdeps/sparc/sparc32/pthreaddef.h33
-rw-r--r--sysdeps/sparc/sparc32/rshift.S2
-rw-r--r--sysdeps/sparc/sparc32/sem_init.c88
-rw-r--r--sysdeps/sparc/sparc32/sem_open.c299
-rw-r--r--sysdeps/sparc/sparc32/sem_post.c82
-rw-r--r--sysdeps/sparc/sparc32/sem_wait.c93
-rw-r--r--sysdeps/sparc/sparc32/sem_waitcommon.c146
-rw-r--r--sysdeps/sparc/sparc32/setjmp.S2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/Makefile2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_add.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_cmp.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_cmpe.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_div.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_dtoq.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_feq.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_fge.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_fgt.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_fle.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_flt.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_fne.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_itoq.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_lltoq.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_mul.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_neg.c19
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtod.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoi.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoll.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtos.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtou.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoull.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_sqrt.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_stoq.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_sub.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_util.c2
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_utoq.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/sfp-machine.h4
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/addmul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/mul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/submul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/Makefile14
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/addmul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/bits/atomic.h10
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/cpu_relax.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/hp-timing.h56
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/mul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/sem_init.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/sem_open.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/sem_post.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/sem_wait.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/sem_waitcommon.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/submul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/start.S2
-rw-r--r--sysdeps/sparc/sparc32/stpcpy.S2
-rw-r--r--sysdeps/sparc/sparc32/strcat.S2
-rw-r--r--sysdeps/sparc/sparc32/strchr.S2
-rw-r--r--sysdeps/sparc/sparc32/strcmp.S2
-rw-r--r--sysdeps/sparc/sparc32/strcpy.S2
-rw-r--r--sysdeps/sparc/sparc32/strlen.S2
-rw-r--r--sysdeps/sparc/sparc32/sub_n.S2
-rw-r--r--sysdeps/sparc/sparc32/submul_1.S2
-rw-r--r--sysdeps/sparc/sparc32/tst-audit.h2
157 files changed, 1227 insertions, 259 deletions
diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile
index 59edf2b616..308fc318b3 100644
--- a/sysdeps/sparc/sparc32/Makefile
+++ b/sysdeps/sparc/sparc32/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2014 Free Software Foundation, Inc.
+# Copyright (C) 1991-2015 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/__longjmp.S b/sysdeps/sparc/sparc32/__longjmp.S
index c8d6328063..fbf575e9cb 100644
--- a/sysdeps/sparc/sparc32/__longjmp.S
+++ b/sysdeps/sparc/sparc32/__longjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/add_n.S b/sysdeps/sparc/sparc32/add_n.S
index 63291cc301..ca2448ea50 100644
--- a/sysdeps/sparc/sparc32/add_n.S
+++ b/sysdeps/sparc/sparc32/add_n.S
@@ -1,7 +1,7 @@
! SPARC __mpn_add_n -- Add two limb vectors of the same length > 0 and store
! sum in a third limb vector.
!
-! Copyright (C) 1995-2014 Free Software Foundation, Inc.
+! Copyright (C) 1995-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/addmul_1.S b/sysdeps/sparc/sparc32/addmul_1.S
index 66630efb6b..a44d4ed70e 100644
--- a/sysdeps/sparc/sparc32/addmul_1.S
+++ b/sysdeps/sparc/sparc32/addmul_1.S
@@ -1,7 +1,7 @@
! SPARC __mpn_addmul_1 -- Multiply a limb vector with a limb and add
! the result to a second limb vector.
!
-! Copyright (C) 1992-2014 Free Software Foundation, Inc.
+! Copyright (C) 1992-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/alloca.S b/sysdeps/sparc/sparc32/alloca.S
index 2536d97422..f4e9daffcb 100644
--- a/sysdeps/sparc/sparc32/alloca.S
+++ b/sysdeps/sparc/sparc32/alloca.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/bits/atomic.h b/sysdeps/sparc/sparc32/bits/atomic.h
index 39c2b37655..4242ba831a 100644
--- a/sysdeps/sparc/sparc32/bits/atomic.h
+++ b/sysdeps/sparc/sparc32/bits/atomic.h
@@ -1,5 +1,5 @@
/* Atomic operations. sparc32 version.
- Copyright (C) 2003-2014 Free Software Foundation, Inc.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -47,6 +47,9 @@ typedef uintptr_t uatomicptr_t;
typedef intmax_t atomic_max_t;
typedef uintmax_t uatomic_max_t;
+#define __HAVE_64B_ATOMICS 0
+#define USE_ATOMIC_COMPILER_BUILTINS 0
+
/* We have no compare and swap, just test and set.
The following implementation contends on 64 global locks
@@ -102,27 +105,28 @@ volatile unsigned char __sparc32_atomic_locks[64]
#define __sparc32_atomic_do_unlock24(addr) \
do \
{ \
- *(char *) (addr) = 0; \
__asm __volatile ("" ::: "memory"); \
+ *(char *) (addr) = 0; \
} \
while (0)
#ifndef SHARED
# define __v9_compare_and_exchange_val_32_acq(mem, newval, oldval) \
-({ \
- register __typeof (*(mem)) __acev_tmp __asm ("%g6"); \
+({union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) }; \
+ union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) }; \
+ register uint32_t __acev_tmp __asm ("%g6"); \
register __typeof (mem) __acev_mem __asm ("%g1") = (mem); \
- register __typeof (*(mem)) __acev_oldval __asm ("%g5"); \
- __acev_tmp = (newval); \
- __acev_oldval = (oldval); \
+ register uint32_t __acev_oldval __asm ("%g5"); \
+ __acev_tmp = newval_arg.v; \
+ __acev_oldval = oldval_arg.v; \
/* .word 0xcde05005 is cas [%g1], %g5, %g6. Can't use cas here though, \
because as will then mark the object file as V8+ arch. */ \
__asm __volatile (".word 0xcde05005" \
: "+r" (__acev_tmp), "=m" (*__acev_mem) \
: "r" (__acev_oldval), "m" (*__acev_mem), \
"r" (__acev_mem) : "memory"); \
- __acev_tmp; })
+ (__typeof (oldval)) __acev_tmp; })
#endif
/* The only basic operation needed is compare and exchange. */
@@ -343,8 +347,8 @@ extern uint64_t _dl_hwcap __attribute__((weak));
#define atomic_write_barrier() \
do { \
if (__atomic_is_v9) \
- /* membar #StoreLoad | #StoreStore */ \
- __asm __volatile (".word 0x8143e00a" : : : "memory"); \
+ /* membar #LoadStore | #StoreStore */ \
+ __asm __volatile (".word 0x8143e00c" : : : "memory"); \
else \
__asm __volatile ("" : : : "memory"); \
} while (0)
diff --git a/sysdeps/sparc/sparc32/bits/setjmp.h b/sysdeps/sparc/sparc32/bits/setjmp.h
index 1608199f3a..287b9db38f 100644
--- a/sysdeps/sparc/sparc32/bits/setjmp.h
+++ b/sysdeps/sparc/sparc32/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/dl-irel.h b/sysdeps/sparc/sparc32/dl-irel.h
index 03441ec4a5..ac3e88ecb2 100644
--- a/sysdeps/sparc/sparc32/dl-irel.h
+++ b/sysdeps/sparc/sparc32/dl-irel.h
@@ -1,6 +1,6 @@
/* Machine-dependent ELF indirect relocation inline functions.
SPARC 32-bit version.
- Copyright (C) 2010-2014 Free Software Foundation, Inc.
+ Copyright (C) 2010-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,13 +40,13 @@ elf_irela (const Elf32_Rela *reloc)
{
unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
- if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
+ if (__glibc_likely (r_type == R_SPARC_IRELATIVE))
{
Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend);
*reloc_addr = value;
}
- else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
+ else if (__glibc_likely (r_type == R_SPARC_JMP_IREL))
{
Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend);
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 91b125dd7a..b9c5ddc778 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. SPARC version.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -184,7 +184,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ ELF_RTYPE_CLASS_COPY iff TYPE should not be allowed to resolve to one
of the main executable's symbols, as for a COPY reloc. */
#define elf_machine_type_class(type) \
((((type) == R_SPARC_JMP_SLOT \
@@ -197,6 +197,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The SPARC never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
/* Undo the sub %sp, 6*4, %sp; add %sp, 22*4, %o0 below to get at the
value we want in __libc_stack_end. */
@@ -281,7 +282,7 @@ _dl_start_user:\n\
add %o3, 4, %o3\n\
mov %i5, %o1\n\
add %o2, %o3, %o3\n\
- call _dl_init_internal\n\
+ call _dl_init\n\
ld [%o0], %o0\n\
/* Pass our finalizer function to the user in %g1. */\n\
" RTLD_GOT_ADDRESS(%l7, %g1, _dl_fini) "\n\
@@ -350,17 +351,17 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
weak_extern (_dl_rtld_map);
#endif
- if (__builtin_expect (r_type == R_SPARC_NONE, 0))
+ if (__glibc_unlikely (r_type == R_SPARC_NONE))
return;
- if (__builtin_expect (r_type == R_SPARC_SIZE32, 0))
+ if (__glibc_unlikely (r_type == R_SPARC_SIZE32))
{
*reloc_addr = sym->st_size + reloc->r_addend;
return;
}
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
- if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
+ if (__glibc_unlikely (r_type == R_SPARC_RELATIVE))
{
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
@@ -549,12 +550,12 @@ elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
- if (__builtin_expect (r_type == R_SPARC_JMP_SLOT, 1))
+ if (__glibc_likely (r_type == R_SPARC_JMP_SLOT))
;
else if (r_type == R_SPARC_JMP_IREL)
{
Elf32_Addr value = map->l_addr + reloc->r_addend;
- if (__builtin_expect (!skip_ifunc, 1))
+ if (__glibc_likely (!skip_ifunc))
value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
sparc_fixup_plt (reloc, reloc_addr, value, 1, 1);
}
diff --git a/sysdeps/sparc/sparc32/dl-plt.h b/sysdeps/sparc/sparc32/dl-plt.h
index 4466f41382..7e09ae5de8 100644
--- a/sysdeps/sparc/sparc32/dl-plt.h
+++ b/sysdeps/sparc/sparc32/dl-plt.h
@@ -1,5 +1,5 @@
/* PLT fixups. Sparc 32-bit version.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/dl-trampoline.S b/sysdeps/sparc/sparc32/dl-trampoline.S
index 2aa2bf1c83..0ac2309a91 100644
--- a/sysdeps/sparc/sparc32/dl-trampoline.S
+++ b/sysdeps/sparc/sparc32/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. Sparc 32-bit version.
- Copyright (C) 2005-2014 Free Software Foundation, Inc.
+ Copyright (C) 2005-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/e_sqrt.c b/sysdeps/sparc/sparc32/e_sqrt.c
index c13f6fd9e5..587fd1ee6a 100644
--- a/sysdeps/sparc/sparc32/e_sqrt.c
+++ b/sysdeps/sparc/sparc32/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/fpu/s_copysign.S b/sysdeps/sparc/sparc32/fpu/s_copysign.S
index e371bdd770..322ede68eb 100644
--- a/sysdeps/sparc/sparc32/fpu/s_copysign.S
+++ b/sysdeps/sparc/sparc32/fpu/s_copysign.S
@@ -1,5 +1,5 @@
/* copysign function, sparc32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/fpu/s_copysignf.S b/sysdeps/sparc/sparc32/fpu/s_copysignf.S
index dbf7897b53..fd12674527 100644
--- a/sysdeps/sparc/sparc32/fpu/s_copysignf.S
+++ b/sysdeps/sparc/sparc32/fpu/s_copysignf.S
@@ -1,5 +1,5 @@
/* float copysign function, sparc32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/fpu/s_fabs.S b/sysdeps/sparc/sparc32/fpu/s_fabs.S
index 28331120f6..8c4873d5bb 100644
--- a/sysdeps/sparc/sparc32/fpu/s_fabs.S
+++ b/sysdeps/sparc/sparc32/fpu/s_fabs.S
@@ -1,5 +1,5 @@
/* Float absolute value, sparc32 version.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
+ Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/fpu/s_fabsf.S b/sysdeps/sparc/sparc32/fpu/s_fabsf.S
index a8b6fcff27..6648d61c87 100644
--- a/sysdeps/sparc/sparc32/fpu/s_fabsf.S
+++ b/sysdeps/sparc/sparc32/fpu/s_fabsf.S
@@ -1,5 +1,5 @@
/* Float absolute value, sparc32 version.
- Copyright (C) 2006-2014 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
diff --git a/sysdeps/sparc/sparc32/fpu/s_fdim.S b/sysdeps/sparc/sparc32/fpu/s_fdim.S
index 04a410ea61..3a77b85419 100644
--- a/sysdeps/sparc/sparc32/fpu/s_fdim.S
+++ b/sysdeps/sparc/sparc32/fpu/s_fdim.S
@@ -1,5 +1,5 @@
/* Compute positive difference, sparc 32-bit.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/fpu/s_fdimf.S b/sysdeps/sparc/sparc32/fpu/s_fdimf.S
index a29ed84bae..1721372ae9 100644
--- a/sysdeps/sparc/sparc32/fpu/s_fdimf.S
+++ b/sysdeps/sparc/sparc32/fpu/s_fdimf.S
@@ -1,5 +1,5 @@
/* Compute positive difference, sparc 32-bit.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/fpu/s_signbit.S b/sysdeps/sparc/sparc32/fpu/s_signbit.S
index 94403c0c94..dfaae00e3d 100644
--- a/sysdeps/sparc/sparc32/fpu/s_signbit.S
+++ b/sysdeps/sparc/sparc32/fpu/s_signbit.S
@@ -1,5 +1,5 @@
/* signbit(). sparc32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/fpu/s_signbitl.S b/sysdeps/sparc/sparc32/fpu/s_signbitl.S
index 64813f1913..b6b030de77 100644
--- a/sysdeps/sparc/sparc32/fpu/s_signbitl.S
+++ b/sysdeps/sparc/sparc32/fpu/s_signbitl.S
@@ -1,5 +1,5 @@
/* signbitl(). sparc32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ ENTRY (___signbitl)
srl %o1, 31, %o0
END (___signbitl)
-#ifdef IS_IN_libm
+#if IS_IN (libm)
long_double_symbol (libm, ___signbitl, __signbitl);
#else
long_double_symbol (libc, ___signbitl, __signbitl);
diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/fpu/w_sqrt.S
index 786308a57b..ed5eac5944 100644
--- a/sysdeps/sparc/sparc32/fpu/w_sqrt.S
+++ b/sysdeps/sparc/sparc32/fpu/w_sqrt.S
@@ -1,5 +1,5 @@
/* sqrt function. sparc32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S
index e8930a55c5..6dd25dab43 100644
--- a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S
+++ b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S
@@ -1,5 +1,5 @@
/* sqrtf function. sparc32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/ieee754.h b/sysdeps/sparc/sparc32/ieee754.h
index d77b83592f..d8d7aa69a2 100644
--- a/sysdeps/sparc/sparc32/ieee754.h
+++ b/sysdeps/sparc/sparc32/ieee754.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/jmpbuf-offsets.h b/sysdeps/sparc/sparc32/jmpbuf-offsets.h
index 14c45551c7..4301077c54 100644
--- a/sysdeps/sparc/sparc32/jmpbuf-offsets.h
+++ b/sysdeps/sparc/sparc32/jmpbuf-offsets.h
@@ -1,5 +1,5 @@
/* Private macros for accessing __jmp_buf contents. SPARC version.
- Copyright (C) 2006-2014 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/jmpbuf-unwind.h b/sysdeps/sparc/sparc32/jmpbuf-unwind.h
index 3ec444a62f..813010bfe6 100644
--- a/sysdeps/sparc/sparc32/jmpbuf-unwind.h
+++ b/sysdeps/sparc/sparc32/jmpbuf-unwind.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/sysdeps/sparc/sparc32/lll_timedlock_wait.c b/sysdeps/sparc/sparc32/lll_timedlock_wait.c
new file mode 100644
index 0000000000..c2c93faf1b
--- /dev/null
+++ b/sysdeps/sparc/sparc32/lll_timedlock_wait.c
@@ -0,0 +1 @@
+/* __lll_timedlock_wait is in lowlevellock.c. */
diff --git a/sysdeps/sparc/sparc32/lll_timedwait_tid.c b/sysdeps/sparc/sparc32/lll_timedwait_tid.c
new file mode 100644
index 0000000000..511608ead9
--- /dev/null
+++ b/sysdeps/sparc/sparc32/lll_timedwait_tid.c
@@ -0,0 +1 @@
+/* __lll_timedwait_tid is in lowlevellock.c. */
diff --git a/sysdeps/sparc/sparc32/lowlevellock.c b/sysdeps/sparc/sparc32/lowlevellock.c
new file mode 100644
index 0000000000..a2c6ca7dfd
--- /dev/null
+++ b/sysdeps/sparc/sparc32/lowlevellock.c
@@ -0,0 +1,131 @@
+/* low level locking for pthread library. SPARC version.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
+
+ 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 <errno.h>
+#include <sysdep.h>
+#include <lowlevellock.h>
+#include <sys/time.h>
+
+
+void
+__lll_lock_wait_private (int *futex)
+{
+ do
+ {
+ int oldval = atomic_compare_and_exchange_val_24_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_wait (futex, 2, LLL_PRIVATE);
+ }
+ while (atomic_compare_and_exchange_val_24_acq (futex, 2, 0) != 0);
+}
+
+
+/* These functions don't get included in libc.so */
+#if IS_IN (libpthread)
+void
+__lll_lock_wait (int *futex, int private)
+{
+ do
+ {
+ int oldval = atomic_compare_and_exchange_val_24_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_wait (futex, 2, private);
+ }
+ while (atomic_compare_and_exchange_val_24_acq (futex, 2, 0) != 0);
+}
+
+
+int
+__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private)
+{
+ /* Reject invalid timeouts. */
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return EINVAL;
+
+ do
+ {
+ struct timeval tv;
+ struct timespec rt;
+
+ /* Get the current time. */
+ (void) __gettimeofday (&tv, NULL);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)
+ {
+ rt.tv_nsec += 1000000000;
+ --rt.tv_sec;
+ }
+
+ /* Already timed out? */
+ if (rt.tv_sec < 0)
+ return ETIMEDOUT;
+
+ /* Wait. */
+ int oldval = atomic_compare_and_exchange_val_24_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_timed_wait (futex, 2, &rt, private);
+ }
+ while (atomic_compare_and_exchange_val_24_acq (futex, 2, 0) != 0);
+
+ return 0;
+}
+
+
+int
+__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
+{
+ int tid;
+
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return EINVAL;
+
+ /* Repeat until thread terminated. */
+ while ((tid = *tidp) != 0)
+ {
+ struct timeval tv;
+ struct timespec rt;
+
+ /* Get the current time. */
+ (void) __gettimeofday (&tv, NULL);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)
+ {
+ rt.tv_nsec += 1000000000;
+ --rt.tv_sec;
+ }
+
+ /* Already timed out? */
+ if (rt.tv_sec < 0)
+ return ETIMEDOUT;
+
+ /* Wait until thread terminates. The kernel so far does not use
+ the private futex operations for this. */
+ if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT)
+ return ETIMEDOUT;
+ }
+
+ return 0;
+}
+#endif
diff --git a/sysdeps/sparc/sparc32/lshift.S b/sysdeps/sparc/sparc32/lshift.S
index be319b1a17..aa531afa61 100644
--- a/sysdeps/sparc/sparc32/lshift.S
+++ b/sysdeps/sparc/sparc32/lshift.S
@@ -1,6 +1,6 @@
! Sparc __mpn_lshift --
!
-! Copyright (C) 1995-2014 Free Software Foundation, Inc.
+! Copyright (C) 1995-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/memchr.S b/sysdeps/sparc/sparc32/memchr.S
index 088e538d77..1fa0f82863 100644
--- a/sysdeps/sparc/sparc32/memchr.S
+++ b/sysdeps/sparc/sparc32/memchr.S
@@ -1,7 +1,7 @@
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less
than N.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz> and
David S. Miller <davem@caip.rutgers.edu>.
diff --git a/sysdeps/sparc/sparc32/memcpy.S b/sysdeps/sparc/sparc32/memcpy.S
index 643add8900..63b7ea3820 100644
--- a/sysdeps/sparc/sparc32/memcpy.S
+++ b/sysdeps/sparc/sparc32/memcpy.S
@@ -1,6 +1,6 @@
/* Copy SIZE bytes from SRC to DEST.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@caip.rutgers.edu>,
Eddie C. Dost <ecd@skynet.be> and
diff --git a/sysdeps/sparc/sparc32/memset.S b/sysdeps/sparc/sparc32/memset.S
index 9120a1c657..7021ce44fe 100644
--- a/sysdeps/sparc/sparc32/memset.S
+++ b/sysdeps/sparc/sparc32/memset.S
@@ -1,6 +1,6 @@
/* Set a block of memory to some byte value.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@caip.rutgers.edu> and
Jakub Jelinek <jj@ultra.linux.cz>.
diff --git a/sysdeps/sparc/sparc32/mul_1.S b/sysdeps/sparc/sparc32/mul_1.S
index 08431ef496..709a3a073d 100644
--- a/sysdeps/sparc/sparc32/mul_1.S
+++ b/sysdeps/sparc/sparc32/mul_1.S
@@ -1,7 +1,7 @@
! SPARC __mpn_mul_1 -- Multiply a limb vector with a limb and store
! the result in a second limb vector.
!
-! Copyright (C) 1992-2014 Free Software Foundation, Inc.
+! Copyright (C) 1992-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/pthread_barrier_wait.c b/sysdeps/sparc/sparc32/pthread_barrier_wait.c
new file mode 100644
index 0000000000..5e1aa1159c
--- /dev/null
+++ b/sysdeps/sparc/sparc32/pthread_barrier_wait.c
@@ -0,0 +1,97 @@
+/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
+
+ 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 <errno.h>
+#include <sysdep.h>
+#include <lowlevellock.h>
+#include <pthreadP.h>
+#include <sparc-nptl.h>
+#include <futex-internal.h>
+
+/* Wait on barrier. */
+int
+__pthread_barrier_wait (barrier)
+ pthread_barrier_t *barrier;
+{
+ union sparc_pthread_barrier *ibarrier
+ = (union sparc_pthread_barrier *) barrier;
+ int result = 0;
+ int private = ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE;
+ int futex_private = ibarrier->s.pshared ? FUTEX_SHARED : FUTEX_PRIVATE;
+
+ /* Make sure we are alone. */
+ lll_lock (ibarrier->b.lock, private);
+
+ /* One more arrival. */
+ --ibarrier->b.left;
+
+ /* Are these all? */
+ if (ibarrier->b.left == 0)
+ {
+ /* Yes. Increment the event counter to avoid invalid wake-ups and
+ tell the current waiters that it is their turn. */
+ ++ibarrier->b.curr_event;
+
+ /* Wake up everybody. */
+ futex_wake (&ibarrier->b.curr_event, INT_MAX, futex_private);
+
+ /* This is the thread which finished the serialization. */
+ result = PTHREAD_BARRIER_SERIAL_THREAD;
+ }
+ else
+ {
+ /* The number of the event we are waiting for. The barrier's event
+ number must be bumped before we continue. */
+ unsigned int event = ibarrier->b.curr_event;
+
+ /* Before suspending, make the barrier available to others. */
+ lll_unlock (ibarrier->b.lock, private);
+
+ /* Wait for the event counter of the barrier to change. */
+ do
+ futex_wait_simple (&ibarrier->b.curr_event, event, futex_private);
+ while (event == ibarrier->b.curr_event);
+ }
+
+ /* Make sure the init_count is stored locally or in a register. */
+ unsigned int init_count = ibarrier->b.init_count;
+
+ /* If this was the last woken thread, unlock. */
+ if (__atomic_is_v9 || ibarrier->s.pshared == 0)
+ {
+ if (atomic_increment_val (&ibarrier->b.left) == init_count)
+ /* We are done. */
+ lll_unlock (ibarrier->b.lock, private);
+ }
+ else
+ {
+ unsigned int left;
+ /* Slightly more complicated. On pre-v9 CPUs, atomic_increment_val
+ is only atomic for threads within the same process, not for
+ multiple processes. */
+ __sparc32_atomic_do_lock24 (&ibarrier->s.left_lock);
+ left = ++ibarrier->b.left;
+ __sparc32_atomic_do_unlock24 (&ibarrier->s.left_lock);
+ if (left == init_count)
+ /* We are done. */
+ lll_unlock (ibarrier->b.lock, private);
+ }
+
+ return result;
+}
+weak_alias (__pthread_barrier_wait, pthread_barrier_wait)
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.c b/sysdeps/sparc/sparc32/pthread_spin_lock.S
index 2224099940..9ed3122aa3 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.c
+++ b/sysdeps/sparc/sparc32/pthread_spin_lock.S
@@ -1,7 +1,5 @@
-/* Support for high precision, low overhead timing functions. sparcv9 version.
- Copyright (C) 2001-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by David S. Miller <davem@redhat.com>, 2001.
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,7 +15,18 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <hp-timing.h>
+#include <sysdep.h>
-/* We have to define the variable for the overhead. */
-hp_timing_t _dl_hp_timing_overhead;
+ .text
+ENTRY(pthread_spin_lock)
+1: ldstub [%o0], %g1
+ orcc %g1, 0x0, %g0
+ bne,a 2f
+ ldub [%o0], %g1
+ retl
+ mov 0, %o0
+2: orcc %g1, 0x0, %g0
+ bne,a 2b
+ ldub [%o0], %g1
+ ba,a 1b
+END(pthread_spin_lock)
diff --git a/sysdeps/sparc/sparc32/pthread_spin_trylock.S b/sysdeps/sparc/sparc32/pthread_spin_trylock.S
new file mode 100644
index 0000000000..4223d5577b
--- /dev/null
+++ b/sysdeps/sparc/sparc32/pthread_spin_trylock.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#include <pthread-errnos.h>
+
+ .text
+ENTRY(pthread_spin_trylock)
+ ldstub [%o0], %o0
+ cmp %o0, 0
+ bne,a 1f
+ mov EBUSY, %o0
+1: retl
+ nop
+END(pthread_spin_trylock)
diff --git a/sysdeps/sparc/sparc32/pthreaddef.h b/sysdeps/sparc/sparc32/pthreaddef.h
new file mode 100644
index 0000000000..6dcde37894
--- /dev/null
+++ b/sysdeps/sparc/sparc32/pthreaddef.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Default stack size. */
+#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning. */
+#define STACK_ALIGN 16
+
+/* Minimal stack size after allocating thread descriptor and guard size. */
+#define MINIMAL_REST_STACK 2048
+
+/* Alignment requirement for TCB. */
+#define TCB_ALIGNMENT 16
+
+
+/* Location of current stack frame. */
+#define CURRENT_STACK_FRAME (stack_pointer + (2 * 64))
+register char *stack_pointer __asm__("%sp");
diff --git a/sysdeps/sparc/sparc32/rshift.S b/sysdeps/sparc/sparc32/rshift.S
index 3cc1e72f71..422ebfbbc0 100644
--- a/sysdeps/sparc/sparc32/rshift.S
+++ b/sysdeps/sparc/sparc32/rshift.S
@@ -1,6 +1,6 @@
! sparc __mpn_rshift --
!
-! Copyright (C) 1995-2014 Free Software Foundation, Inc.
+! Copyright (C) 1995-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/sem_init.c b/sysdeps/sparc/sparc32/sem_init.c
new file mode 100644
index 0000000000..1c7c455617
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sem_init.c
@@ -0,0 +1,88 @@
+/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ 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 <errno.h>
+#include <semaphore.h>
+#include <shlib-compat.h>
+#include "semaphoreP.h"
+#include <futex-internal.h>
+
+
+int
+__new_sem_init (sem_t *sem, int pshared, unsigned int value)
+{
+ /* Parameter sanity check. */
+ if (__glibc_unlikely (value > SEM_VALUE_MAX))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ pshared = pshared != 0 ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE;
+ int err = futex_supports_pshared (pshared);
+ if (err != 0)
+ {
+ __set_errno (err);
+ return -1;
+ }
+
+ /* Map to the internal type. */
+ struct new_sem *isem = (struct new_sem *) sem;
+
+ /* Use the values the caller provided. */
+ isem->value = value << SEM_VALUE_SHIFT;
+ isem->pad = 0;
+ isem->nwaiters = 0;
+
+ isem->private = (pshared == PTHREAD_PROCESS_PRIVATE
+ ? FUTEX_PRIVATE : FUTEX_SHARED);
+
+ return 0;
+}
+versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1);
+
+
+
+#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
+int
+attribute_compat_text_section
+__old_sem_init (sem, pshared, value)
+ sem_t *sem;
+ int pshared;
+ unsigned int value;
+{
+ /* Parameter sanity check. */
+ if (__glibc_unlikely (value > SEM_VALUE_MAX))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* Map to the internal type. */
+ struct old_sem *isem = (struct old_sem *) sem;
+
+ /* Use the value the user provided. */
+ isem->value = value;
+
+ /* We cannot store the PSHARED attribute. So we always use the
+ operations needed for shared semaphores. */
+
+ return 0;
+}
+compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0);
+#endif
diff --git a/sysdeps/sparc/sparc32/sem_open.c b/sysdeps/sparc/sparc32/sem_open.c
new file mode 100644
index 0000000000..16cb9ad591
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sem_open.c
@@ -0,0 +1,299 @@
+/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ 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 <errno.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include <search.h>
+#include <semaphore.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include "semaphoreP.h"
+#include <shm-directory.h>
+
+
+/* Comparison function for search of existing mapping. */
+int
+attribute_hidden
+__sem_search (const void *a, const void *b)
+{
+ const struct inuse_sem *as = (const struct inuse_sem *) a;
+ const struct inuse_sem *bs = (const struct inuse_sem *) b;
+
+ if (as->ino != bs->ino)
+ /* Cannot return the difference the type is larger than int. */
+ return as->ino < bs->ino ? -1 : (as->ino == bs->ino ? 0 : 1);
+
+ if (as->dev != bs->dev)
+ /* Cannot return the difference the type is larger than int. */
+ return as->dev < bs->dev ? -1 : (as->dev == bs->dev ? 0 : 1);
+
+ return strcmp (as->name, bs->name);
+}
+
+
+/* The search tree for existing mappings. */
+void *__sem_mappings attribute_hidden;
+
+/* Lock to protect the search tree. */
+int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
+
+
+/* Search for existing mapping and if possible add the one provided. */
+static sem_t *
+check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing)
+{
+ sem_t *result = SEM_FAILED;
+
+ /* Get the information about the file. */
+ struct stat64 st;
+ if (__fxstat64 (_STAT_VER, fd, &st) == 0)
+ {
+ /* Get the lock. */
+ lll_lock (__sem_mappings_lock, LLL_PRIVATE);
+
+ /* Search for an existing mapping given the information we have. */
+ struct inuse_sem *fake;
+ fake = (struct inuse_sem *) alloca (sizeof (*fake) + namelen);
+ memcpy (fake->name, name, namelen);
+ fake->dev = st.st_dev;
+ fake->ino = st.st_ino;
+
+ struct inuse_sem **foundp = __tfind (fake, &__sem_mappings,
+ __sem_search);
+ if (foundp != NULL)
+ {
+ /* There is already a mapping. Use it. */
+ result = (*foundp)->sem;
+ ++(*foundp)->refcnt;
+ }
+ else
+ {
+ /* We haven't found a mapping. Install ione. */
+ struct inuse_sem *newp;
+
+ newp = (struct inuse_sem *) malloc (sizeof (*newp) + namelen);
+ if (newp != NULL)
+ {
+ /* If the caller hasn't provided any map it now. */
+ if (existing == SEM_FAILED)
+ existing = (sem_t *) mmap (NULL, sizeof (sem_t),
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, 0);
+
+ newp->dev = st.st_dev;
+ newp->ino = st.st_ino;
+ newp->refcnt = 1;
+ newp->sem = existing;
+ memcpy (newp->name, name, namelen);
+
+ /* Insert the new value. */
+ if (existing != MAP_FAILED
+ && __tsearch (newp, &__sem_mappings, __sem_search) != NULL)
+ /* Successful. */
+ result = existing;
+ else
+ /* Something went wrong while inserting the new
+ value. We fail completely. */
+ free (newp);
+ }
+ }
+
+ /* Release the lock. */
+ lll_unlock (__sem_mappings_lock, LLL_PRIVATE);
+ }
+
+ if (result != existing && existing != SEM_FAILED && existing != MAP_FAILED)
+ {
+ /* Do not disturb errno. */
+ int save = errno;
+ munmap (existing, sizeof (sem_t));
+ errno = save;
+ }
+
+ return result;
+}
+
+
+sem_t *
+sem_open (const char *name, int oflag, ...)
+{
+ int fd;
+ sem_t *result;
+
+ /* Create the name of the final file in local variable SHM_NAME. */
+ SHM_GET_NAME (EINVAL, SEM_FAILED, SEM_SHM_PREFIX);
+
+ /* If the semaphore object has to exist simply open it. */
+ if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0)
+ {
+ try_again:
+ fd = __libc_open (shm_name,
+ (oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR);
+
+ if (fd == -1)
+ {
+ /* If we are supposed to create the file try this next. */
+ if ((oflag & O_CREAT) != 0 && errno == ENOENT)
+ goto try_create;
+
+ /* Return. errno is already set. */
+ }
+ else
+ /* Check whether we already have this semaphore mapped and
+ create one if necessary. */
+ result = check_add_mapping (name, namelen, fd, SEM_FAILED);
+ }
+ else
+ {
+ /* We have to open a temporary file first since it must have the
+ correct form before we can start using it. */
+ char *tmpfname;
+ mode_t mode;
+ unsigned int value;
+ va_list ap;
+
+ try_create:
+ va_start (ap, oflag);
+
+ mode = va_arg (ap, mode_t);
+ value = va_arg (ap, unsigned int);
+
+ va_end (ap);
+
+ if (value > SEM_VALUE_MAX)
+ {
+ __set_errno (EINVAL);
+ return SEM_FAILED;
+ }
+
+ /* Create the initial file content. */
+ union
+ {
+ sem_t initsem;
+ struct new_sem newsem;
+ } sem;
+
+ sem.newsem.value = value << SEM_VALUE_SHIFT;
+ sem.newsem.pad = 0;
+ sem.newsem.nwaiters = 0;
+
+ /* This always is a shared semaphore. */
+ sem.newsem.private = FUTEX_SHARED;
+
+ /* Initialize the remaining bytes as well. */
+ memset ((char *) &sem.initsem + sizeof (struct new_sem), '\0',
+ sizeof (sem_t) - sizeof (struct new_sem));
+
+ tmpfname = __alloca (shm_dirlen + sizeof SEM_SHM_PREFIX + 6);
+ char *xxxxxx = __mempcpy (tmpfname, shm_dir, shm_dirlen);
+
+ int retries = 0;
+#define NRETRIES 50
+ while (1)
+ {
+ /* Add the suffix for mktemp. */
+ strcpy (xxxxxx, "XXXXXX");
+
+ /* We really want to use mktemp here. We cannot use mkstemp
+ since the file must be opened with a specific mode. The
+ mode cannot later be set since then we cannot apply the
+ file create mask. */
+ if (__mktemp (tmpfname) == NULL)
+ return SEM_FAILED;
+
+ /* Open the file. Make sure we do not overwrite anything. */
+ fd = __libc_open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode);
+ if (fd == -1)
+ {
+ if (errno == EEXIST)
+ {
+ if (++retries < NRETRIES)
+ continue;
+
+ __set_errno (EAGAIN);
+ }
+
+ return SEM_FAILED;
+ }
+
+ /* We got a file. */
+ break;
+ }
+
+ if (TEMP_FAILURE_RETRY (__libc_write (fd, &sem.initsem, sizeof (sem_t)))
+ == sizeof (sem_t)
+ /* Map the sem_t structure from the file. */
+ && (result = (sem_t *) mmap (NULL, sizeof (sem_t),
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, 0)) != MAP_FAILED)
+ {
+ /* Create the file. Don't overwrite an existing file. */
+ if (link (tmpfname, shm_name) != 0)
+ {
+ /* Undo the mapping. */
+ (void) munmap (result, sizeof (sem_t));
+
+ /* Reinitialize 'result'. */
+ result = SEM_FAILED;
+
+ /* This failed. If O_EXCL is not set and the problem was
+ that the file exists, try again. */
+ if ((oflag & O_EXCL) == 0 && errno == EEXIST)
+ {
+ /* Remove the file. */
+ (void) unlink (tmpfname);
+
+ /* Close the file. */
+ (void) __libc_close (fd);
+
+ goto try_again;
+ }
+ }
+ else
+ /* Insert the mapping into the search tree. This also
+ determines whether another thread sneaked by and already
+ added such a mapping despite the fact that we created it. */
+ result = check_add_mapping (name, namelen, fd, result);
+ }
+
+ /* Now remove the temporary name. This should never fail. If
+ it fails we leak a file name. Better fix the kernel. */
+ (void) unlink (tmpfname);
+ }
+
+ /* Map the mmap error to the error we need. */
+ if (MAP_FAILED != (void *) SEM_FAILED && result == MAP_FAILED)
+ result = SEM_FAILED;
+
+ /* We don't need the file descriptor anymore. */
+ if (fd != -1)
+ {
+ /* Do not disturb errno. */
+ int save = errno;
+ __libc_close (fd);
+ errno = save;
+ }
+
+ return result;
+}
diff --git a/sysdeps/sparc/sparc32/sem_post.c b/sysdeps/sparc/sparc32/sem_post.c
new file mode 100644
index 0000000000..fd1a2fe910
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sem_post.c
@@ -0,0 +1,82 @@
+/* sem_post -- post to a POSIX semaphore. Generic futex-using version.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+ 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 <atomic.h>
+#include <errno.h>
+#include <sysdep.h>
+#include <lowlevellock.h>
+#include <internaltypes.h>
+#include <semaphore.h>
+#include <futex-internal.h>
+
+#include <shlib-compat.h>
+
+
+/* See sem_wait for an explanation of the algorithm. */
+int
+__new_sem_post (sem_t *sem)
+{
+ struct new_sem *isem = (struct new_sem *) sem;
+ int private = isem->private;
+ unsigned int v;
+
+ __sparc32_atomic_do_lock24 (&isem->pad);
+
+ v = isem->value;
+ if ((v >> SEM_VALUE_SHIFT) == SEM_VALUE_MAX)
+ {
+ __sparc32_atomic_do_unlock24 (&isem->pad);
+
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ isem->value = v + (1 << SEM_VALUE_SHIFT);
+
+ __sparc32_atomic_do_unlock24 (&isem->pad);
+
+ if ((v & SEM_NWAITERS_MASK) != 0)
+ futex_wake (&isem->value, 1, private);
+
+ return 0;
+}
+versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1);
+
+
+#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+int
+attribute_compat_text_section
+__old_sem_post (sem_t *sem)
+{
+ int *futex = (int *) sem;
+
+ /* We must need to synchronize with consumers of this token, so the atomic
+ increment must have release MO semantics. */
+ atomic_write_barrier ();
+ (void) atomic_increment_val (futex);
+ /* We always have to assume it is a shared semaphore. */
+ int err = lll_futex_wake (futex, 1, LLL_SHARED);
+ if (__builtin_expect (err, 0) < 0)
+ {
+ __set_errno (-err);
+ return -1;
+ }
+ return 0;
+}
+compat_symbol (libpthread, __old_sem_post, sem_post, GLIBC_2_0);
+#endif
diff --git a/sysdeps/sparc/sparc32/sem_wait.c b/sysdeps/sparc/sparc32/sem_wait.c
new file mode 100644
index 0000000000..fce7ed43ee
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sem_wait.c
@@ -0,0 +1,93 @@
+/* sem_wait -- wait on a semaphore. Generic futex-using version.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
+
+ 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 <lowlevellock.h> /* lll_futex* used by the old code. */
+#include "sem_waitcommon.c"
+
+int
+__new_sem_wait (sem_t *sem)
+{
+ if (__new_sem_wait_fast ((struct new_sem *) sem, 0) == 0)
+ return 0;
+ else
+ return __new_sem_wait_slow((struct new_sem *) sem, NULL);
+}
+versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
+
+#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+int
+attribute_compat_text_section
+__old_sem_wait (sem_t *sem)
+{
+ int *futex = (int *) sem;
+ int err;
+
+ do
+ {
+ if (atomic_decrement_if_positive (futex) > 0)
+ return 0;
+
+ /* Enable asynchronous cancellation. Required by the standard. */
+ int oldtype = __pthread_enable_asynccancel ();
+
+ /* Always assume the semaphore is shared. */
+ err = lll_futex_wait (futex, 0, LLL_SHARED);
+
+ /* Disable asynchronous cancellation. */
+ __pthread_disable_asynccancel (oldtype);
+ }
+ while (err == 0 || err == -EWOULDBLOCK);
+
+ __set_errno (-err);
+ return -1;
+}
+
+compat_symbol (libpthread, __old_sem_wait, sem_wait, GLIBC_2_0);
+#endif
+
+int
+__new_sem_trywait (sem_t *sem)
+{
+ /* We must not fail spuriously, so require a definitive result even if this
+ may lead to a long execution time. */
+ if (__new_sem_wait_fast ((struct new_sem *) sem, 1) == 0)
+ return 0;
+ __set_errno (EAGAIN);
+ return -1;
+}
+versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1);
+#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
+int
+__old_sem_trywait (sem_t *sem)
+{
+ int *futex = (int *) sem;
+ int val;
+
+ if (*futex > 0)
+ {
+ val = atomic_decrement_if_positive (futex);
+ if (val > 0)
+ return 0;
+ }
+
+ __set_errno (EAGAIN);
+ return -1;
+}
+compat_symbol (libpthread, __old_sem_trywait, sem_trywait, GLIBC_2_0);
+#endif
diff --git a/sysdeps/sparc/sparc32/sem_waitcommon.c b/sysdeps/sparc/sparc32/sem_waitcommon.c
new file mode 100644
index 0000000000..9e43d45431
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sem_waitcommon.c
@@ -0,0 +1,146 @@
+/* sem_waitcommon -- wait on a semaphore, shared code.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
+
+ 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 <errno.h>
+#include <sysdep.h>
+#include <futex-internal.h>
+#include <internaltypes.h>
+#include <semaphore.h>
+#include <sys/time.h>
+
+#include <pthreadP.h>
+#include <shlib-compat.h>
+#include <atomic.h>
+
+
+static void
+__sem_wait_32_finish (struct new_sem *sem);
+
+static void
+__sem_wait_cleanup (void *arg)
+{
+ struct new_sem *sem = (struct new_sem *) arg;
+
+ __sem_wait_32_finish (sem);
+}
+
+/* Wait until at least one token is available, possibly with a timeout.
+ This is in a separate function in order to make sure gcc
+ puts the call site into an exception region, and thus the
+ cleanups get properly run. TODO still necessary? Other futex_wait
+ users don't seem to need it. */
+static int
+__attribute__ ((noinline))
+do_futex_wait (struct new_sem *sem, const struct timespec *abstime)
+{
+ int err;
+
+ err = futex_abstimed_wait_cancelable (&sem->value, SEM_NWAITERS_MASK,
+ abstime, sem->private);
+
+ return err;
+}
+
+/* Fast path: Try to grab a token without blocking. */
+static int
+__new_sem_wait_fast (struct new_sem *sem, int definitive_result)
+{
+ unsigned int v;
+ int ret = 0;
+
+ __sparc32_atomic_do_lock24(&sem->pad);
+
+ v = sem->value;
+ if ((v >> SEM_VALUE_SHIFT) == 0)
+ ret = -1;
+ else
+ sem->value = v - (1 << SEM_VALUE_SHIFT);
+
+ __sparc32_atomic_do_unlock24(&sem->pad);
+
+ return ret;
+}
+
+/* Slow path that blocks. */
+static int
+__attribute__ ((noinline))
+__new_sem_wait_slow (struct new_sem *sem, const struct timespec *abstime)
+{
+ unsigned int v;
+ int err = 0;
+
+ __sparc32_atomic_do_lock24(&sem->pad);
+
+ sem->nwaiters++;
+
+ pthread_cleanup_push (__sem_wait_cleanup, sem);
+
+ /* Wait for a token to be available. Retry until we can grab one. */
+ v = sem->value;
+ do
+ {
+ if (!(v & SEM_NWAITERS_MASK))
+ sem->value = v | SEM_NWAITERS_MASK;
+
+ /* If there is no token, wait. */
+ if ((v >> SEM_VALUE_SHIFT) == 0)
+ {
+ __sparc32_atomic_do_unlock24(&sem->pad);
+
+ err = do_futex_wait(sem, abstime);
+ if (err == ETIMEDOUT || err == EINTR)
+ {
+ __set_errno (err);
+ err = -1;
+ goto error;
+ }
+ err = 0;
+
+ __sparc32_atomic_do_lock24(&sem->pad);
+
+ /* We blocked, so there might be a token now. */
+ v = sem->value;
+ }
+ }
+ /* If there is no token, we must not try to grab one. */
+ while ((v >> SEM_VALUE_SHIFT) == 0);
+
+ sem->value = v - (1 << SEM_VALUE_SHIFT);
+
+ __sparc32_atomic_do_unlock24(&sem->pad);
+
+error:
+ pthread_cleanup_pop (0);
+
+ __sem_wait_32_finish (sem);
+
+ return err;
+}
+
+/* Stop being a registered waiter (non-64b-atomics code only). */
+static void
+__sem_wait_32_finish (struct new_sem *sem)
+{
+ __sparc32_atomic_do_lock24(&sem->pad);
+
+ if (--sem->nwaiters == 0)
+ sem->value &= ~SEM_NWAITERS_MASK;
+
+ __sparc32_atomic_do_unlock24(&sem->pad);
+}
diff --git a/sysdeps/sparc/sparc32/setjmp.S b/sysdeps/sparc/sparc32/setjmp.S
index 64dccdecb5..2a7ed2b8f5 100644
--- a/sysdeps/sparc/sparc32/setjmp.S
+++ b/sysdeps/sparc/sparc32/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/soft-fp/Makefile b/sysdeps/sparc/sparc32/soft-fp/Makefile
index 38d14e714b..323773afd2 100644
--- a/sysdeps/sparc/sparc32/soft-fp/Makefile
+++ b/sysdeps/sparc/sparc32/soft-fp/Makefile
@@ -1,6 +1,6 @@
# Software floating-point emulation.
# Makefile for SPARC v8 long double utility functions (_Q_*).
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2015 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jakub Jelinek (jj@ultra.linux.cz).
#
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_add.c b/sysdeps/sparc/sparc32/soft-fp/q_add.c
index ec8c1c2e9c..0e0723cc85 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_add.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_add.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_cmp.c b/sysdeps/sparc/sparc32/soft-fp/q_cmp.c
index 837b3dd091..36dfe95348 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_cmp.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_cmp.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Compare a and b, return float condition code.
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,10 +30,8 @@ int _Q_cmp(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_Q(r, B, A, 3);
+ FP_CMP_Q(r, B, A, 3, 1);
if (r == -1) r = 2;
- if (r == 3 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
- FP_SET_EXCEPTION(FP_EX_INVALID);
FP_HANDLE_EXCEPTIONS;
return r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c b/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c
index d4ac7bd67c..d05db4e160 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c
@@ -1,7 +1,7 @@
/* Software floating-point emulation.
Compare a and b, return float condition code.
Signal exception (unless masked) if unordered.
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -31,10 +31,8 @@ int _Q_cmpe(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_Q(r, B, A, 3);
+ FP_CMP_Q(r, B, A, 3, 2);
if (r == -1) r = 2;
- if (r == 3)
- FP_SET_EXCEPTION(FP_EX_INVALID);
FP_HANDLE_EXCEPTIONS;
return r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_div.c b/sysdeps/sparc/sparc32/soft-fp/q_div.c
index 39105d1975..3e86a97394 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_div.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_div.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
index 8f20594029..915734f5c9 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)(a)
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_feq.c b/sysdeps/sparc/sparc32/soft-fp/q_feq.c
index 61a8ff1b18..eb462247d6 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_feq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_feq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 if a == b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_feq(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_EQ_Q(r, A, B);
- if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
- FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_CMP_EQ_Q(r, A, B, 1);
FP_HANDLE_EXCEPTIONS;
return !r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fge.c b/sysdeps/sparc/sparc32/soft-fp/q_fge.c
index 7fca34926a..bc20230bbb 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_fge.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_fge.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 if a >= b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_fge(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_Q(r, B, A, 3);
- if (r == 3)
- FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_CMP_Q(r, B, A, 3, 2);
FP_HANDLE_EXCEPTIONS;
return (r <= 0);
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fgt.c b/sysdeps/sparc/sparc32/soft-fp/q_fgt.c
index f5b2acf4c4..5a767ff180 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_fgt.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_fgt.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 if a > b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_fgt(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_Q(r, B, A, 3);
- if (r == 3)
- FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_CMP_Q(r, B, A, 3, 2);
FP_HANDLE_EXCEPTIONS;
return (r == -1);
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fle.c b/sysdeps/sparc/sparc32/soft-fp/q_fle.c
index c108fb9e3f..bdd1b85078 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_fle.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_fle.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 if a <= b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_fle(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_Q(r, B, A, -2);
- if (r == -2)
- FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_CMP_Q(r, B, A, -2, 2);
FP_HANDLE_EXCEPTIONS;
return (r >= 0);
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_flt.c b/sysdeps/sparc/sparc32/soft-fp/q_flt.c
index 56d140e6e9..b6ffca5082 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_flt.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_flt.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 if a < b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_flt(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_Q(r, B, A, 3);
- if (r == 3)
- FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_CMP_Q(r, B, A, 3, 2);
FP_HANDLE_EXCEPTIONS;
return (r == 1);
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fne.c b/sysdeps/sparc/sparc32/soft-fp/q_fne.c
index 78c2d6f971..7d4806f8a3 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_fne.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_fne.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 if a != b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,9 +30,7 @@ int _Q_fne(const long double a, const long double b)
FP_UNPACK_RAW_Q(A, a);
FP_UNPACK_RAW_Q(B, b);
- FP_CMP_EQ_Q(r, A, B);
- if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
- FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_CMP_EQ_Q(r, A, B, 1);
FP_HANDLE_EXCEPTIONS;
return r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
index 3640506973..47c4a925bc 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)(a)
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -19,19 +19,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define FP_NO_EXCEPTIONS
#include "soft-fp.h"
#include "quad.h"
long double _Q_itoq(const int a)
{
- FP_DECL_EX;
FP_DECL_Q(C);
int b = a;
long double c;
FP_FROM_INT_Q(C, b, 32, unsigned int);
FP_PACK_RAW_Q(c, C);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
index 52b2712161..785caa8e87 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -19,19 +19,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define FP_NO_EXCEPTIONS
#include "soft-fp.h"
#include "quad.h"
long double _Q_lltoq(const long long a)
{
- FP_DECL_EX;
FP_DECL_Q(C);
long double c;
long long b = a;
FP_FROM_INT_Q(C, b, 64, unsigned long long);
FP_PACK_RAW_Q(c, C);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_mul.c b/sysdeps/sparc/sparc32/soft-fp/q_mul.c
index e4845ab1f3..2fb16095c6 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_mul.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_mul.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_neg.c b/sysdeps/sparc/sparc32/soft-fp/q_neg.c
index b5049cd6df..2fd7e9478f 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_neg.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_neg.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return !a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -24,20 +24,25 @@
long double _Q_neg(const long double a)
{
- long double c = a;
+ union {
+ long double ldbl;
+ UWtype words[4];
+ } c;
+
+ c.ldbl = a;
#if (__BYTE_ORDER == __BIG_ENDIAN)
- ((UWtype *)&c)[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
+ c.words[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
#elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 64)
- ((UWtype *)&c)[1] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
+ c.words[1] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
#elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 32)
- ((UWtype *)&c)[3] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
+ c.words[3] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
#else
FP_DECL_Q(A); FP_DECL_Q(C);
FP_UNPACK_RAW_Q(A, a);
FP_NEG_Q(C, A);
- FP_PACK_RAW_Q(c, C);
+ FP_PACK_RAW_Q(c.ldbl, C);
#endif
- return c;
+ return c.ldbl;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtod.c b/sysdeps/sparc/sparc32/soft-fp/q_qtod.c
index 41527e7275..351c28b273 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtod.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtod.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (double)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c
index 4f116cbc8c..967e784e58 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (int)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c
index 77530964f6..5d15dff9bb 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long long)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtos.c b/sysdeps/sparc/sparc32/soft-fp/q_qtos.c
index c8c2fd89c1..bdc96d9550 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtos.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtos.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (float)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtou.c b/sysdeps/sparc/sparc32/soft-fp/q_qtou.c
index 7b75902996..65a50a6b5b 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtou.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtou.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (unsigned int)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c
index 4980de8ccf..07f50afb9a 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (unsigned long long)a
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c b/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c
index 3b411ff9ac..520e468820 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return sqrtl(a)
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_stoq.c b/sysdeps/sparc/sparc32/soft-fp/q_stoq.c
index bf6c5cd046..c8baa19ec7 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_stoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_stoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
c = (long double)(a)
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_sub.c b/sysdeps/sparc/sparc32/soft-fp/q_sub.c
index f186ead4d4..ca408b6bb7 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_sub.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_sub.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
c = a - b
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
index 7512557f9a..85d1db8ca5 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)(a)
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -19,19 +19,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define FP_NO_EXCEPTIONS
#include "soft-fp.h"
#include "quad.h"
long double _Q_ulltoq(const unsigned long long a)
{
- FP_DECL_EX;
FP_DECL_Q(C);
long double c;
unsigned long long b = a;
FP_FROM_INT_Q(C, b, 64, unsigned long long);
FP_PACK_RAW_Q(c, C);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_util.c b/sysdeps/sparc/sparc32/soft-fp/q_util.c
index eb9b6259bb..39fcaed657 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_util.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_util.c
@@ -1,7 +1,7 @@
/* Software floating-point emulation.
Helper routine for _Q_* routines.
Simulate exceptions using double arithmetics.
- Copyright (C) 1999-2014 Free Software Foundation, Inc.
+ Copyright (C) 1999-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
index 0fb645c5de..81ab91b465 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
c = (long double)(a)
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -19,19 +19,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define FP_NO_EXCEPTIONS
#include "soft-fp.h"
#include "quad.h"
long double _Q_utoq(const unsigned int a)
{
- FP_DECL_EX;
FP_DECL_Q(C);
long double c;
unsigned int b = a;
FP_FROM_INT_Q(C, b, 32, unsigned int);
FP_PACK_RAW_Q(c, C);
- FP_CLEAR_EXCEPTIONS;
- FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
index 025b3ab196..19b471d6a9 100644
--- a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
+++ b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent software floating-point definitions.
Sparc userland (_Q_*) version.
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
@@ -185,6 +185,8 @@
#define FP_EX_DIVZERO (1 << 1)
#define FP_EX_INEXACT (1 << 0)
+#define _FP_TININESS_AFTER_ROUNDING 0
+
#define _FP_DECL_EX \
fpu_control_t _fcw __attribute__ ((unused)) = (FP_RND_NEAREST << 30)
diff --git a/sysdeps/sparc/sparc32/sparcv8/addmul_1.S b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S
index bb81915397..8b0fc3da64 100644
--- a/sysdeps/sparc/sparc32/sparcv8/addmul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S
@@ -1,7 +1,7 @@
! SPARC v8 __mpn_addmul_1 -- Multiply a limb vector with a limb and
! add the result to a second limb vector.
-! Copyright (C) 1992-2014 Free Software Foundation, Inc.
+! Copyright (C) 1992-2015 Free Software Foundation, Inc.
! This file is part of the GNU MP Library.
diff --git a/sysdeps/sparc/sparc32/sparcv8/mul_1.S b/sysdeps/sparc/sparc32/sparcv8/mul_1.S
index 4532eb1789..1a98338b50 100644
--- a/sysdeps/sparc/sparc32/sparcv8/mul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv8/mul_1.S
@@ -1,7 +1,7 @@
! SPARC v8 __mpn_mul_1 -- Multiply a limb vector with a single limb and
! store the product in a second limb vector.
-! Copyright (C) 1992-2014 Free Software Foundation, Inc.
+! Copyright (C) 1992-2015 Free Software Foundation, Inc.
! This file is part of the GNU MP Library.
diff --git a/sysdeps/sparc/sparc32/sparcv8/submul_1.S b/sysdeps/sparc/sparc32/sparcv8/submul_1.S
index 7f3b0492d8..da72e60745 100644
--- a/sysdeps/sparc/sparc32/sparcv8/submul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv8/submul_1.S
@@ -1,7 +1,7 @@
! SPARC v8 __mpn_submul_1 -- Multiply a limb vector with a limb and
! subtract the result from a second limb vector.
-! Copyright (C) 1992-2014 Free Software Foundation, Inc.
+! Copyright (C) 1992-2015 Free Software Foundation, Inc.
! This file is part of the GNU MP Library.
diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile
index 7d475b0897..fefc742478 100644
--- a/sysdeps/sparc/sparc32/sparcv9/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/Makefile
@@ -1,10 +1,5 @@
sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
-ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
-endif
-
ifeq ($(have-as-vis3),yes)
ASFLAGS-.o += -Wa,-Av9d
ASFLAGS-.os += -Wa,-Av9d
@@ -18,3 +13,12 @@ ASFLAGS-.op += -Wa,-Av9a
ASFLAGS-.og += -Wa,-Av9a
ASFLAGS-.oS += -Wa,-Av9a
endif
+
+# nscd uses atomic_spin_nop which in turn requires cpu_relax
+ifeq ($(subdir),nscd)
+routines += cpu_relax
+endif
+
+ifeq ($(subdir), nptl)
+libpthread-routines += cpu_relax
+endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/addmul_1.S b/sysdeps/sparc/sparc32/sparcv9/addmul_1.S
index a96a9a2db7..ad8623e0dc 100644
--- a/sysdeps/sparc/sparc32/sparcv9/addmul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv9/addmul_1.S
@@ -1,7 +1,7 @@
! SPARC v9 32-bit __mpn_addmul_1 -- Multiply a limb vector with a limb
! and add the result to a second limb vector.
!
-! Copyright (C) 2013-2014 Free Software Foundation, Inc.
+! Copyright (C) 2013-2015 Free Software Foundation, Inc.
! This file is part of the GNU C Library.
! Contributed by David S. Miller <davem@davemloft.net>
!
diff --git a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
index 4835019202..0ff5dcd69d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
+++ b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
@@ -1,5 +1,5 @@
/* Atomic operations. sparcv9 version.
- Copyright (C) 2003-2014 Free Software Foundation, Inc.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -44,6 +44,9 @@ typedef uintptr_t uatomicptr_t;
typedef intmax_t atomic_max_t;
typedef uintmax_t uatomic_max_t;
+#define __HAVE_64B_ATOMICS 0
+#define USE_ATOMIC_COMPILER_BUILTINS 0
+
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
(abort (), (__typeof (*mem)) 0)
@@ -96,4 +99,7 @@ typedef uintmax_t uatomic_max_t;
#define atomic_read_barrier() \
__asm __volatile ("membar #LoadLoad | #LoadStore" : : : "memory")
#define atomic_write_barrier() \
- __asm __volatile ("membar #StoreLoad | #StoreStore" : : : "memory")
+ __asm __volatile ("membar #LoadStore | #StoreStore" : : : "memory")
+
+extern void __cpu_relax (void);
+#define atomic_spin_nop() __cpu_relax ()
diff --git a/sysdeps/sparc/sparc32/sparcv9/cpu_relax.S b/sysdeps/sparc/sparc32/sparcv9/cpu_relax.S
new file mode 100644
index 0000000000..41a5e72b25
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/cpu_relax.S
@@ -0,0 +1 @@
+#include <sysdeps/sparc/sparc64/cpu_relax.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S
index 98b5f59bf6..f9624507b7 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S
@@ -1,5 +1,5 @@
/* ceil function, sparc32 v9 vis2 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S
index 7759736e3f..fe9be20aa1 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S
@@ -1,5 +1,5 @@
/* ceil function, sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S
index f51a083c99..3beee4fc26 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S
@@ -1,5 +1,5 @@
/* Float ceil function, sparc32 v9 vis2 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S
index 46023a1218..c85ec0c63c 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S
@@ -1,5 +1,5 @@
/* Float ceil function, sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S
index ac6843cfb7..ea3a8db114 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S
@@ -1,5 +1,5 @@
/* copysign function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S
index e738c83499..ecb889d25a 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S
@@ -1,5 +1,5 @@
/* float copysign function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S
index 7a32b6962d..b47c31a384 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S
@@ -1,5 +1,5 @@
/* Float absolute value, sparc32+v9 vis3 version.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
+ Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S
index a5ec9299df..15ffcf96a1 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S
@@ -1,5 +1,5 @@
/* Float absolute value, sparc32 vis3 version.
- Copyright (C) 2006-2014 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S
index 3a90730ab5..936017ac5b 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S
@@ -1,5 +1,5 @@
/* Compute positive difference, sparc 32-bit+v9+vis3.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S
index 04ba613f2d..c236548785 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S
@@ -1,5 +1,5 @@
/* Compute positive difference, sparc 32-bit+v9+vis3.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S
index 7b3f954132..8cc2b29978 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S
@@ -1,5 +1,5 @@
/* floor function, sparc32 v9 vis2 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S
index 20b41a7841..f2c83f6667 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S
@@ -1,5 +1,5 @@
/* floor function, sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S
index 6040164dc2..b7cb081e2f 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S
@@ -1,5 +1,5 @@
/* Float floor function, sparc32 v9 vis2 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S
index 66fa964f25..ecfee15e85 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S
@@ -1,5 +1,5 @@
/* Float floor function, sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
index a168f25f6f..998965bbbc 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
@@ -1,5 +1,5 @@
/* fma function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
index e356723600..70e18accfa 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
@@ -1,5 +1,5 @@
/* fmaf function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
index 7dc6b3113e..3ceeb8d7b6 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
@@ -1,5 +1,5 @@
/* fmax function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
index 0488c5bebd..50f22c8080 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
@@ -1,5 +1,5 @@
/* fmaxf function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
index 719a82617d..7fc4e1c5f2 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
@@ -1,5 +1,5 @@
/* fmin function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
index 9f8d1c5e83..1c6bb4a25f 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
@@ -1,5 +1,5 @@
/* fminf function, sparc32 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S
index 09140b8701..ddb75f8e20 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S
@@ -1,5 +1,5 @@
/* llrint(), sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S
index 2f6c5719fd..670037c534 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S
@@ -1,5 +1,5 @@
/* llrintf(), sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S
index 07548c3a1f..bad595f2f2 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S
@@ -1,7 +1,7 @@
/* Round float to int floating-point values without generating
an inexact exception, sparc32 v9 vis3 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S
index c69df92c35..ce93969533 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S
@@ -1,7 +1,7 @@
/* Round float to int floating-point values without generating
an inexact exception, sparc32 v9 vis3 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S
index f6e431c923..c57308ae22 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S
@@ -1,5 +1,5 @@
/* Round float to int floating-point values, sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S
index ec79df65aa..fd0f9ac4bb 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S
@@ -1,5 +1,5 @@
/* Round float to int floating-point values, sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S
index d66e847afb..36d57fdc66 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S
@@ -1,7 +1,7 @@
/* Truncate argument to nearest integral value not larger than
the argument, sparc32 v9 vis3 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S
index c4f0c7a12e..1c7769d30a 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S
@@ -1,7 +1,7 @@
/* Truncate argument to nearest integral value not larger than
the argument, sparc32 v9 vis3 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S
index 6fe920f68a..b675f6a606 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S
@@ -1,5 +1,5 @@
/* sqrt function. sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S
index f0affc44e9..11f1b29ece 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S
@@ -1,5 +1,5 @@
/* sqrtf function. sparc32 v9 vis3 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
index 6eafb51681..32b1ac6352 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S
@@ -1,5 +1,5 @@
/* ceil function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S
index 9673664493..dcfeefebab 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S
@@ -1,5 +1,5 @@
/* Float ceil function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
index a3b44804ed..df8eb8ef83 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S
@@ -1,5 +1,5 @@
/* Float absolute value, sparc32+v9 version.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
+ Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S
index 51535d9331..8aaeb1ab5d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S
@@ -1,5 +1,5 @@
/* Compute positive difference, sparc 32-bit+v9.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S
index fab345c62a..d5e244934a 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S
@@ -1,5 +1,5 @@
/* Compute positive difference, sparc 32-bit+v9.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S
index f3dd4e4d46..140706ced3 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S
@@ -1,5 +1,5 @@
/* floor function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S
index f9922781c2..5f2d4af59a 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S
@@ -1,5 +1,5 @@
/* Float floor function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
index 1928c78012..f5fec80c5b 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
@@ -1,5 +1,5 @@
/* fmax function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S
index 8325b09e40..fa9b4fba10 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S
@@ -1,5 +1,5 @@
/* fmaxf function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
index 17b89aac23..0fad72367b 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
@@ -1,5 +1,5 @@
/* fmin function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S
index 5830ce4ef4..d59e175f7d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S
@@ -1,5 +1,5 @@
/* fminf function, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
index f2e40b1249..941e7c8be2 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S
@@ -1,5 +1,5 @@
/* isnan(). sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ END (__isnan)
hidden_def (__isnan)
weak_alias (__isnan, isnan)
-#ifndef IS_IN_libm
+#if !IS_IN (libm)
# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
index fda7efc429..e079a69610 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S
@@ -1,5 +1,5 @@
/* llrint(), sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S
index 66e153e960..289b85f608 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S
@@ -1,5 +1,5 @@
/* llrintf(), sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S
index 0336660cdc..2aa6b196f8 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S
@@ -1,5 +1,5 @@
/* lrint(), sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S
index 3b48cc4359..fbf9cf1e98 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S
@@ -1,5 +1,5 @@
/* lrintf(), sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
index 4904878aca..6be01a4f65 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S
@@ -1,7 +1,7 @@
/* Round float to int floating-point values without generating
an inexact exception, sparc32 v9 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S
index aec04a0218..4b77241e4e 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S
@@ -1,7 +1,7 @@
/* Round float to int floating-point values without generating
an inexact exception, sparc32 v9 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
index e7db7989ca..7f535defc5 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S
@@ -1,5 +1,5 @@
/* Round float to int floating-point values, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S
index 008ac26f6b..757ce1aeed 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S
@@ -1,5 +1,5 @@
/* Round float to int floating-point values, sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2012.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S
index 5cb70ee743..ee0af47a09 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S
@@ -1,7 +1,7 @@
/* Truncate argument to nearest integral value not larger than
the argument, sparc32 v9 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S
index 8f34d182c8..cc751878c7 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S
@@ -1,7 +1,7 @@
/* Truncate argument to nearest integral value not larger than
the argument, sparc32 v9 version.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@davemloft.net>, 2013.
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S
index abfd5df765..44b6b26089 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S
@@ -1,5 +1,5 @@
/* sqrt function. sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S
index cc38b5777d..6232289915 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S
@@ -1,5 +1,5 @@
/* sqrtf function. sparc32 v9 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index fd7e76ecae..f0c39204ed 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -1,5 +1,5 @@
/* High precision, low overhead timing functions. sparcv9 version.
- Copyright (C) 2001-2014 Free Software Foundation, Inc.
+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@redhat.com>, 2001.
@@ -20,67 +20,17 @@
#ifndef _HP_TIMING_H
#define _HP_TIMING_H 1
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-
#define HP_TIMING_AVAIL (1)
+#define HP_SMALL_TIMING_AVAIL (1)
#define HP_TIMING_INLINE (1)
typedef unsigned long long int hp_timing_t;
-#define HP_TIMING_ZERO(Var) (Var) = (0)
-
#define HP_TIMING_NOW(Var) \
__asm__ __volatile__ ("rd %%tick, %L0\n\t" \
"srlx %L0, 32, %H0" \
: "=r" (Var))
-#define HP_TIMING_DIFF_INIT() \
- do { \
- int __cnt = 5; \
- GLRO(dl_hp_timing_overhead) = ~0ull; \
- do \
- { \
- hp_timing_t __t1, __t2; \
- HP_TIMING_NOW (__t1); \
- HP_TIMING_NOW (__t2); \
- if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
- GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
- } \
- while (--__cnt > 0); \
- } while (0)
-
-#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM(Sum, Diff) \
-do { \
- hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead); \
- __asm__ __volatile__("srl %L0, 0, %%g1\n\t" \
- "sllx %H0, 32, %%g6\n\t" \
- "or %%g1, %%g6, %%g1\n\t" \
- "1: ldx [%1], %%g5\n\t" \
- "add %%g5, %%g1, %%g6\n\t" \
- "casx [%1], %%g5, %%g6\n\t" \
- "cmp %%g5, %%g6\n\t" \
- "bne,pn %%xcc, 1b\n\t" \
- " nop" \
- : /* no outputs */ \
- : "r" (__diff), "r" (&(Sum)) \
- : "memory", "g1", "g5", "g6"); \
-} while(0)
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
-
-#define HP_TIMING_PRINT(Buf, Len, Val) \
- do { \
- char __buf[20]; \
- char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0); \
- int __len = (Len); \
- char *__dest = (Buf); \
- while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \
- *__dest++ = *__cp++; \
- memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles"))); \
- } while (0)
+#include <hp-timing-common.h>
#endif /* hp-timing.h */
diff --git a/sysdeps/sparc/sparc32/sparcv9/mul_1.S b/sysdeps/sparc/sparc32/sparcv9/mul_1.S
index 992d61b052..8de1afd5b7 100644
--- a/sysdeps/sparc/sparc32/sparcv9/mul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv9/mul_1.S
@@ -1,7 +1,7 @@
! SPARC v9 32-bit __mpn_mul_1 -- Multiply a limb vector with a single
! limb and store the product in a second limb vector.
!
-! Copyright (C) 2013-2014 Free Software Foundation, Inc.
+! Copyright (C) 2013-2015 Free Software Foundation, Inc.
! This file is part of the GNU C Library.
! Contributed by David S. Miller <davem@davemloft.net>
!
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c b/sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c
new file mode 100644
index 0000000000..8336f5e00c
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_barrier_wait.c
@@ -0,0 +1 @@
+#include <sysdeps/sparc/nptl/pthread_barrier_wait.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c
new file mode 100644
index 0000000000..1eede86abd
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c
@@ -0,0 +1 @@
+#include <sysdeps/sparc/sparc64/pthread_spin_init.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S
new file mode 100644
index 0000000000..ce53dfa396
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S
@@ -0,0 +1 @@
+#include <sysdeps/sparc/sparc64/pthread_spin_lock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S
new file mode 100644
index 0000000000..ffd632da0a
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S
@@ -0,0 +1 @@
+#include <sysdeps/sparc/sparc64/pthread_spin_trylock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S
new file mode 100644
index 0000000000..983c80377a
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S
@@ -0,0 +1 @@
+#include <sysdeps/sparc/sparc64/pthread_spin_unlock.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/sem_init.c b/sysdeps/sparc/sparc32/sparcv9/sem_init.c
new file mode 100644
index 0000000000..c90d1b599a
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/sem_init.c
@@ -0,0 +1 @@
+#include <nptl/sem_init.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/sem_open.c b/sysdeps/sparc/sparc32/sparcv9/sem_open.c
new file mode 100644
index 0000000000..bff2d2db6a
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/sem_open.c
@@ -0,0 +1 @@
+#include <nptl/sem_open.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/sem_post.c b/sysdeps/sparc/sparc32/sparcv9/sem_post.c
new file mode 100644
index 0000000000..6a2813caee
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/sem_post.c
@@ -0,0 +1 @@
+#include <nptl/sem_post.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/sem_wait.c b/sysdeps/sparc/sparc32/sparcv9/sem_wait.c
new file mode 100644
index 0000000000..bccdaed92e
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/sem_wait.c
@@ -0,0 +1 @@
+#include <nptl/sem_wait.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/sem_waitcommon.c b/sysdeps/sparc/sparc32/sparcv9/sem_waitcommon.c
new file mode 100644
index 0000000000..d4a139572b
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/sem_waitcommon.c
@@ -0,0 +1 @@
+#include <nptl/sem_waitcommon.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/submul_1.S b/sysdeps/sparc/sparc32/sparcv9/submul_1.S
index afd9a3b24c..688383f5dc 100644
--- a/sysdeps/sparc/sparc32/sparcv9/submul_1.S
+++ b/sysdeps/sparc/sparc32/sparcv9/submul_1.S
@@ -1,7 +1,7 @@
! SPARC v9 32-bit __mpn_submul_1 -- Multiply a limb vector with a limb
! and subtract the result from a second limb vector.
!
-! Copyright (C) 2013-2014 Free Software Foundation, Inc.
+! Copyright (C) 2013-2015 Free Software Foundation, Inc.
! This file is part of the GNU C Library.
! Contributed by David S. Miller <davem@davemloft.net>
!
diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S
index 5c5490c8d6..a3a09ba7b4 100644
--- a/sysdeps/sparc/sparc32/start.S
+++ b/sysdeps/sparc/sparc32/start.S
@@ -1,5 +1,5 @@
/* Startup code for elf32-sparc
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
diff --git a/sysdeps/sparc/sparc32/stpcpy.S b/sysdeps/sparc/sparc32/stpcpy.S
index c7e649d507..ac5a814cfd 100644
--- a/sysdeps/sparc/sparc32/stpcpy.S
+++ b/sysdeps/sparc/sparc32/stpcpy.S
@@ -1,6 +1,6 @@
/* Copy SRC to DEST returning the address of the terminating '\0' in DEST.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
diff --git a/sysdeps/sparc/sparc32/strcat.S b/sysdeps/sparc/sparc32/strcat.S
index aef7a908c6..fafd9db152 100644
--- a/sysdeps/sparc/sparc32/strcat.S
+++ b/sysdeps/sparc/sparc32/strcat.S
@@ -1,6 +1,6 @@
/* strcat (dest, src) -- Append SRC on the end of DEST.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
diff --git a/sysdeps/sparc/sparc32/strchr.S b/sysdeps/sparc/sparc32/strchr.S
index a8467f9d82..742a7ae82b 100644
--- a/sysdeps/sparc/sparc32/strchr.S
+++ b/sysdeps/sparc/sparc32/strchr.S
@@ -1,6 +1,6 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz> and
David S. Miller <davem@caip.rutgers.edu>.
diff --git a/sysdeps/sparc/sparc32/strcmp.S b/sysdeps/sparc/sparc32/strcmp.S
index 8373f45aba..765daed26c 100644
--- a/sysdeps/sparc/sparc32/strcmp.S
+++ b/sysdeps/sparc/sparc32/strcmp.S
@@ -1,6 +1,6 @@
/* Compare two strings for differences.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
diff --git a/sysdeps/sparc/sparc32/strcpy.S b/sysdeps/sparc/sparc32/strcpy.S
index 3cd2395fba..3be45725d7 100644
--- a/sysdeps/sparc/sparc32/strcpy.S
+++ b/sysdeps/sparc/sparc32/strcpy.S
@@ -1,6 +1,6 @@
/* Copy SRC to DEST returning DEST.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
diff --git a/sysdeps/sparc/sparc32/strlen.S b/sysdeps/sparc/sparc32/strlen.S
index 75a246072f..908b7e794c 100644
--- a/sysdeps/sparc/sparc32/strlen.S
+++ b/sysdeps/sparc/sparc32/strlen.S
@@ -1,6 +1,6 @@
/* Determine the length of a string.
For SPARC v7.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz> and
David S. Miller <davem@davemloft.net>.
diff --git a/sysdeps/sparc/sparc32/sub_n.S b/sysdeps/sparc/sparc32/sub_n.S
index c9895368b7..9229302931 100644
--- a/sysdeps/sparc/sparc32/sub_n.S
+++ b/sysdeps/sparc/sparc32/sub_n.S
@@ -1,7 +1,7 @@
! SPARC __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
! store difference in a third limb vector.
!
-! Copyright (C) 1995-2014 Free Software Foundation, Inc.
+! Copyright (C) 1995-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/submul_1.S b/sysdeps/sparc/sparc32/submul_1.S
index 24812a9269..2610173a72 100644
--- a/sysdeps/sparc/sparc32/submul_1.S
+++ b/sysdeps/sparc/sparc32/submul_1.S
@@ -1,7 +1,7 @@
! SPARC __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
! the result from a second limb vector.
!
-! Copyright (C) 1992-2014 Free Software Foundation, Inc.
+! Copyright (C) 1992-2015 Free Software Foundation, Inc.
!
! This file is part of the GNU MP Library.
!
diff --git a/sysdeps/sparc/sparc32/tst-audit.h b/sysdeps/sparc/sparc32/tst-audit.h
index e95838326d..fdcaa0e61c 100644
--- a/sysdeps/sparc/sparc32/tst-audit.h
+++ b/sysdeps/sparc/sparc32/tst-audit.h
@@ -1,6 +1,6 @@
/* Definitions for testing PLT entry/exit auditing. SPARC32 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.