Commit Graph

153 Commits

Author SHA1 Message Date
Will Newton
47590bce28 ARM: Fix clone build for ARMv4
ARMv4 does not have the blx instruction, so use the BLX macro which
handles abstracting this for us.

Build tested for armv7, armv4t and armv4.

ports/ChangeLog.arm:

2014-01-24  Will Newton  <will.newton@linaro.org>

	[BZ #16499]
	* sysdeps/unix/sysv/linux/arm/clone.S: Use BLX macro instead
	of blx instruction directly.
2014-01-24 13:15:46 +00:00
Will Newton
2f10c4d690 ARM: Don't apply pointer encryption to the frame pointer
The frame pointer register is rarely used for that purpose on ARM and
applications that look at the contents of the jmp_buf may be relying
on reading an unencrypted value. For example, Ruby uses the contents
of jmp_buf to find the root set for garbage collection so relies on
this pointer value being unencrypted. Without this patch the Ruby
testsuite fails with a segmentation fault.

ports/ChangeLog.arm:

2013-01-14  Will Newton  <will.newton@linaro.org>

	* sysdeps/arm/__longjmp.S: Don't apply pointer encryption
	to fp register.
	* sysdeps/arm/setjmp.S: Likewise.
	* sysdeps/arm/include/bits/setjmp.h (JMP_BUF_REGLIST): Add
	fp to register list, remove a4.
	* sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE_LOAD):
	New macro.
2014-01-14 14:02:34 +00:00
Roland McGrath
bc2ba20ae8 ARM: Disable compat mcount code when unneeded. 2014-01-10 13:32:35 -08:00
Joseph Myers
b06ece6aec Regenerate ARM ulps. 2014-01-01 16:46:17 +00:00
Joseph Myers
3c1c46a64a Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271). 2013-11-28 16:50:38 +00:00
Ondřej Bílka
d1d9eaf478 Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
Roland McGrath
068dcfd675 ARM: Fix memcpy computed-jump calculations for ARM_ALWAYS_BX case. 2013-11-22 11:39:20 -08:00
Mike Frysinger
cb8a6dbd17 rename configure.in to configure.ac
Autoconf has been deprecating configure.in for quite a long time.
Rename all our configure.in and preconfigure.in files to .ac.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-30 17:32:08 +10:00
Will Newton
41bc5e0935 ARM: Allow building __sigsetjmp as Thumb.
Convert __sigsetjmp code to allow building as Thumb.

ports/ChangeLog.arm:

2013-10-04  Will Newton  <will.newton@linaro.org>

	* sysdeps/arm/setjmp.S (NO_THUMB): Remove define.
	(__sigsetjmp): Use Thumb supported instructions.
2013-10-04 10:54:58 +01:00
Will Newton
6d9b9a67af ARM: Allow building __longjmp as Thumb.
Convert __longjmp code to allow building as Thumb.

ports/ChangeLog.arm:

2013-10-04  Will Newton  <will.newton@linaro.org>

	* sysdeps/arm/__longjmp.S (NO_THUMB): Remove define.
	(__longjmp): Use Thumb supported instructions.
	* sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (NO_THUMB):
	Remove define.
2013-10-04 10:53:43 +01:00
Will Newton
b7f2d27dbd ARM: Add pointer encryption support.
Add support for pointer encryption in glibc internal structures in C
and assembler code. Pointer encryption is a glibc security feature
described here:

https://sourceware.org/glibc/wiki/PointerEncryption

The ARM implementation uses global variables instead of thread pointer
relative accesses to get the value of the pointer encryption guard
because accessing the thread pointer can be very expensive on older
ARM cores.

ports/ChangeLog.arm:

2013-10-03  Will Newton  <will.newton@linaro.org>

	* sysdeps/arm/__longjmp.S (__longjmp): Demangle fp, sp
	and lr when restoring register values.
	* sysdeps/arm/include/bits/setjmp.h (JMP_BUF_REGLIST): Remove
	sp and lr from list and replace fp with a4.
	* sysdeps/arm/jmpbuf-unwind.h (_jmpbuf_sp): New function.
	(_JMPBUF_UNWINDS_ADJ): Call _jmpbuf_sp.
	* sysdeps/arm/setjmp.S (__sigsetjmp): Mangle fp, sp and lr
	before storing register values.
	* sysdeps/arm/sysdep.h (LDST_GLOBAL): New macro.
	* sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE): New macro.
	(PTR_DEMANGLE): Likewise. (PTR_MANGLE2): Likewise.
	(PTR_DEMANGLE2): Likewise.
2013-10-03 11:35:50 +01:00
Will Newton
82c93a0ffe ports/sysdeps/arm/nptl/tls.h: Remove TLS_INIT_TP_EXPENSIVE.
This define was removed from the rest of the tree eight years ago.

ports/ChangeLog.arm:

2013-09-24  Will Newton  <will.newton@linaro.org>

	* ports/sysdeps/arm/nptl/tls.h (TLS_INIT_TP_EXPENSIVE): Remove
	macro.
2013-09-24 09:29:04 +01:00
Andreas Schwab
5bb43a4319 Make __ffs hidden 2013-09-20 21:25:31 +02:00
Maxim Kuvyrkov
d70d6205fa Improve atomic locking for ARM.
[BZ #15640]
	* sysdeps/arm/bits/atomic.h (atomic_exchange_acq, atomic_exchange_rel)
	(atomic_compare_and_exchange_bool_acq)
	(atomic_compare_and_exchange_val_acq)
	(atomic_compare_and_exchange_bool_rel)
	(atomic_compare_and_exchange_val_rel): Use __atomic_exchange_n and
	__atomic_compare_exchange_n builtins when GCC supports them.
2013-09-19 18:50:17 +12:00
Will Newton
cd90698b54 ARM: Improve armv7 memcpy performance.
Only enter the aligned copy loop with buffers that can be 8-byte
aligned. This improves performance slightly on Cortex-A9 and
Cortex-A15 cores for large copies with buffers that are 4-byte
aligned but not 8-byte aligned.

ports/ChangeLog.arm:

2013-09-16  Will Newton  <will.newton@linaro.org>

	* sysdeps/arm/armv7/multiarch/memcpy_impl.S: Tighten check
	on entry to aligned copy loop to improve performance.
2013-09-16 17:55:28 +01:00
Roland McGrath
b0350db974 Use sfi_* macros in armv6t2 strlen. 2013-08-30 11:16:52 -07:00
Roland McGrath
21bfcecf7a Make armv6t2 strlen work in ARM mode too. 2013-08-30 10:43:39 -07:00
Will Newton
6b06ac56cd ARM: Fix clone code when built for Thumb.
The mov lr, pc instruction will lose the Thumb bit from the return address
so use blx lr instead.

ports/ChangeLog.arm:

2013-08-30  Will Newton  <will.newton@linaro.org>

	[BZ #15909]
	* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx
	instead of mov lr, pc.
2013-08-30 10:50:25 +01:00
Will Newton
2601bc1860 sysdeps/arm/armv6t2/strlen.S: strlen implementation for armv6t2.
This implementation of strlen is faster than the armv6 version for
all string lengths greater than 1 on a Cortex-A15.

ports/ChangeLog.arm:

2013-08-09  Will Newton  <will.newton@linaro.org>

	* sysdeps/arm/armv6t2/strlen.S: New file.
2013-08-30 10:04:57 +01:00
Thomas Schwinge
c54290cf08 Use ELFOSABI_GNU instead of ELFOSABI_LINUX. 2013-08-29 12:22:17 +02:00
Carlos O'Donell
d0721e703d ARM: Pass dl_hwcap to IFUNC resolver.
For REL relocs pass dl_hwcap to the IFUNC resolver
as is required by the IFUNC API (bug 15905).
2013-08-29 00:20:35 -04:00
Joseph Myers
a0d93e9b26 Condition sysdeps/arm/include/bits/setjmp.h contents on _ISOMAC. 2013-07-03 21:59:58 +00:00
Joseph Myers
b4ac1f6acb Regenerate ARM ulps. 2013-07-02 20:34:19 +00:00
Joseph Myers
6bed143eb4 Make soft-float ARM use soft-fp fma/fmaf. 2013-07-02 19:51:19 +00:00
Will Newton
1413c693d3 ARM: Pass dl_hwcap to IFUNC resolver functions. 2013-07-02 13:01:21 +00:00
Ryan S. Arnold
1ae8bfe07c Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type. 2013-06-28 16:50:48 -05:00
Roland McGrath
02a809d2cd sysdeps/arm/arm-mcount.S: Comment typo fix. 2013-06-18 15:58:48 -07:00
Roland McGrath
733edfb8ae ARM: Make armv7 memcpy implementations SFI-friendly 2013-06-18 15:42:56 -07:00
Roland McGrath
d7dffa6a55 ARM: Clean up __libc_ifunc_impl_list 2013-06-18 10:11:02 -07:00
Joseph Myers
18e5cc3a82 Fix warnings from ARM soft-float fpu_control.h. 2013-06-18 00:35:03 +00:00
Joseph Myers
c411604296 Wrap test-fpucw.c for ARM. 2013-06-18 00:30:44 +00:00
Joseph Myers
3023a72eb8 Make ARM feenableexcept detect failure (bug 14907). 2013-06-17 17:20:23 +00:00
Siddhesh Poyarekar
61dd6208fb New API to set default thread attributes
This patch introduces two new convenience functions to set the default
thread attributes used for creating threads.  This allows a programmer
to set the default thread attributes just once in a process and then
run pthread_create without additional attributes.
2013-06-15 12:24:15 +05:30
Joseph Myers
c69f6af9e5 Update ARM _FPU_RESERVED value. 2013-06-14 21:19:35 +00:00
Joseph Myers
f1d73d30df Add exception information to math-tests.h and use it in libm-test.inc. 2013-06-11 15:44:31 +00:00
Joseph Myers
0efa6f8b99 Add rounding mode information to math-tests.h and use it in libm-test.inc. 2013-06-10 12:34:49 +00:00
Richard Henderson
ecdaa7c920 BZ #15583: r7 uninitialized in strcpy.S when ARM_HAS_T2 undefined 2013-06-05 15:52:01 -07:00
Joseph Myers
5556231db2 Remove trailing whitespace in ports. 2013-06-05 20:26:40 +00:00
Joseph Myers
fab7ce3f5b Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
Siddhesh Poyarekar
b937534868 Avoid crashing in LD_DEBUG when program name is unavailable
Resolves: #15465

The program name may be unavailable if the user application tampers
with argc and argv[].  Some parts of the dynamic linker caters for
this while others don't, so this patch consolidates the check and
fallback into a single macro and updates all users.
2013-05-29 21:34:12 +05:30
Joseph Myers
b50a71810b Don't include expected results in libm-test test names. 2013-05-22 11:49:36 +00:00
Joseph Myers
db62a90753 Handle sincos with generic libm-test logic. 2013-05-19 14:45:41 +00:00
Ryan S. Arnold
e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Joseph Myers
0175558aa0 Stop ARM setjmp/longjmp saving/restoring fpscr (bug 14908). 2013-05-14 19:50:14 +00:00
Roland McGrath
5d5ef5dbfc ARM: Make multiarch memcpy always use NEON when compiler does 2013-05-13 16:13:14 -07:00
Will Newton
ae65139d14 ARM: Add Cortex-A15 optimized NEON and VFP memcpy routines, with IFUNC. 2013-05-08 12:06:34 +00:00
Roland McGrath
1a0fc08754 ARM: Rewrite elf_machine_dynamic in pure C. 2013-05-07 10:29:13 -07:00
Roland McGrath
12290c0614 ARM: Add missing sfi_breg prefix in _dl_tlsdesc_dynamic code. 2013-05-06 12:53:55 -07:00
Roland McGrath
7214d558d3 ARM: Macroize assembly use of EABI unwind directives. 2013-04-19 11:33:01 -07:00
Mans Rullgard
28831a9a67 ARM: fix preconfigure. 2013-03-26 20:53:16 +00:00