David S. Miller [Wed, 23 Jan 2013 19:27:24 +0000 (11:27 -0800)]
Add a minor 'cas' atomic optimization on sparc.
* sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
(__arch_compare_and_exchange_val_32_acq): Use %g0 as second
argument of CAS if possible.
* sysdeps/sparc/sparc64/bits/atomic.h
(__arch_compare_and_exchange_val_32_acq): Likewise.
(__arch_compare_and_exchange_val_64_acq): Likewise.
Pino Toscano [Wed, 23 Jan 2013 16:29:35 +0000 (17:29 +0100)]
ulimit: remove buggy bsd implementation
The bsd implementation of ulimit produces wrong return values, so remove it
in favour of the posix implementation.
The only regression for non-Linux implementations using bsd sysdeps and not
providing an own ulimit is that the __UL_GETMAXBRK case (which is non-standard)
is left unimplemented (giving EINVAL).
Anton Blanchard [Tue, 15 Jan 2013 18:50:46 +0000 (12:50 -0600)]
PowerPC: Rename __kernel_vdso_get_tbfreq to __kernel_get_tbfreq.
In order for the __kernel_get_tbfreq vDSO call to work the
INTERNAL_VSYSCALL_NCS macro needed to be updated to prevent it from
assuming an integer return type (since the timebase frequency is a 64-bit
value) by specifying the type of the return type as a macro parameter. The
macro then specifically declares the return value as a 'register' (or
implied pair) of the denoted type. The compiler is then informed that this
register (or implied pair) is to be used for the return value.
Pino Toscano [Thu, 17 Jan 2013 20:08:12 +0000 (21:08 +0100)]
Add HAVE_MREMAP for mremap usage
Introduce (only on Linux) and use a HAVE_MREMAP symbol to advertize mremap
availability.
Move the malloc-sysdep.h include from arena.c to malloc.c, since what is
provided by malloc-sysdep.h is needed earlier in malloc.c, before the inclusion
of arena.c.
David S. Miller [Wed, 16 Jan 2013 07:59:02 +0000 (23:59 -0800)]
Optimize trunc{,f} on sparc.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add vis3
trunc{,f} to libm-sysdep_routes.
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Likewise.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S: New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S: New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-vis3.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-vis3.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.S: New file.
* sysdeps/sparc/sparc64/fpu/s_trunc.S: New file.
* sysdeps/sparc/sparc64/fpu/s_truncf.S: New file.
David S. Miller [Wed, 16 Jan 2013 04:59:54 +0000 (20:59 -0800)]
Optimize nearbyint{,f} on sparc.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add vis3
nearbyint{,f} to libm-sysdep_routes.
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Likewise.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S:
New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S:
New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S: New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint-vis3.S: New
file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf-vis3.S: New
file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf.S: New file.
* sysdeps/sparc/sparc64/fpu/s_nearbyint.S: New file.
* sysdeps/sparc/sparc64/fpu/s_nearbyintf.S: New file.
Mike Frysinger [Sat, 12 Jan 2013 23:52:41 +0000 (18:52 -0500)]
scsi/sg.h: include stddef.h for size_t
This header uses size_t but doesn't include stddef.h for it. So when
packages happen to include this before any header that defines size_t,
they get a build failure.
Reviewed-by: Carlos O'Donell <codonell@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
David S. Miller [Tue, 15 Jan 2013 02:15:49 +0000 (18:15 -0800)]
Optimize fdim/fdimf on sparc.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add vis3
fdim/fdimf to libm-sysdep_routines.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S: New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S: New
file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S: New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S: New file.
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S: New file.
* sysdeps/sparc/sparc32/fpu/s_fdim.S: New file.
* sysdeps/sparc/sparc32/fpu/s_fdimf.S: New file.
* sysdeps/sparc/sparc64/fpu/s_fdim.S: New file.
* sysdeps/sparc/sparc64/fpu/s_fdimf.S: New file.
Mike Frysinger [Fri, 21 Dec 2012 04:59:42 +0000 (23:59 -0500)]
manual: glob: document the gl_flags field
The More Flags for Globbing section indirectly mentions gl_flags when
talking about GLOB_MAGCHAR. Mention it explicitly when covering the
glob_t types.
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
David S. Miller [Sat, 12 Jan 2013 07:31:06 +0000 (23:31 -0800)]
Add 64-bit VIS3 optimized GMP routines for sparc.
* math/Makefile: Recognize gmp-sysdep_routines.
* sysdeps/sparc/sparc64/multiarch/Makefile: Add VIS3 optimized GMP routines
to sysdeps.
* sysdeps/sparc/sparc64/multiarch/add_n-vis3.S: New file.
* sysdeps/sparc/sparc64/multiarch/add_n.S: New file.
* sysdeps/sparc/sparc64/multiarch/addmul_1-vis3.S: New file.
* sysdeps/sparc/sparc64/multiarch/addmul_1.S: New file.
* sysdeps/sparc/sparc64/multiarch/mul_1-vis3.S: New file.
* sysdeps/sparc/sparc64/multiarch/mul_1.S: New file.
* sysdeps/sparc/sparc64/multiarch/sub_n-vis3.S: New file.
* sysdeps/sparc/sparc64/multiarch/sub_n.S: New file.
* sysdeps/sparc/sparc64/multiarch/submul_1-vis3.S: New file.
* sysdeps/sparc/sparc64/multiarch/submul_1.S: New file.
David S. Miller [Sat, 12 Jan 2013 04:53:10 +0000 (20:53 -0800)]
Redo sparc 32-bit V9 GMP optimizations with fixed copyrights.
* sysdeps/sparc/sparc32/sparcv9/mul_1.S: Properly optimize for 32-bit
sparc V9 rather than using V8 code.
* sysdeps/sparc/sparc32/sparcv9/addmul_1.S: Likewise.
* sysdeps/sparc/sparc32/sparcv9/submul_1.S: Likewise.
David S. Miller [Fri, 11 Jan 2013 00:15:32 +0000 (16:15 -0800)]
Optimize sparc 32-bit V9 GMP multiply routines.
* sysdeps/sparc/sparc32/sparcv9/mul_1.S: Properly optimize for 32-bit
sparc V9 rather than using V8 code.
* sysdeps/sparc/sparc32/sparcv9/addmul_1.S: Likewise.
* sysdeps/sparc/sparc32/sparcv9/submul_1.S: Likewise.
Andreas Schwab [Fri, 25 May 2012 21:13:00 +0000 (23:13 +0200)]
Use ieee754/dbl-64/wordsize-64 on powerpc64
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_ceil.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_finite.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_floor.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_frexp.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_isinf.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_isnan.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_llround.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_logb.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_lround.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_modf.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_nearbyint.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_remquo.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_rint.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_round.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_scalbln.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_scalbn.c: New file.
* sysdeps/ieee754/ldbl-opt/wordsize-64/s_trunc.c: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Implies: Add
ieee754/ldbl-opt/wordsize-64.
* sysdeps/powerpc/powerpc64/Implies: Add
ieee754/dbl-64/wordsize-64.
Andreas Schwab [Thu, 22 Nov 2012 11:57:37 +0000 (12:57 +0100)]
Extend i486 pthread_cond_timedwait to use futex syscall with absolute timeout
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
(__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
directly use absolute timeout.