This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch roland/arm created. glibc-2.19-878-g07fb94c
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 12 Aug 2014 21:44:50 -0000
- Subject: GNU C Library master sources branch roland/arm created. glibc-2.19-878-g07fb94c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, roland/arm has been created
at 07fb94cc35f595ce77bfc97408edfea0bcdb03bb (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=07fb94cc35f595ce77bfc97408edfea0bcdb03bb
commit 07fb94cc35f595ce77bfc97408edfea0bcdb03bb
Author: Roland McGrath <roland@hack.frob.com>
Date: Tue Aug 12 14:40:26 2014 -0700
foo
diff --git a/ChangeLog b/ChangeLog
index 279bad7..cbe3f06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-08-12 Roland McGrath <roland@hack.frob.com>
+
+ * setjmp/tst-setjmp-static.c: New file.
+ * setjmp/Makefile (tests): Add it.
+ (tests-static): New variable.
+
2014-08-12 Joseph Myers <joseph@codesourcery.com>
[BZ #17261]
diff --git a/setjmp/Makefile b/setjmp/Makefile
index 047b9ec..8006d16 100644
--- a/setjmp/Makefile
+++ b/setjmp/Makefile
@@ -28,7 +28,8 @@ routines := setjmp sigjmp bsd-setjmp bsd-_setjmp \
longjmp __longjmp jmp-unwind
tests := tst-setjmp jmpbug bug269-setjmp tst-setjmp-fp \
- tst-sigsetjmp
+ tst-sigsetjmp tst-setjmp-static
+tests-static := tst-setjmp-static
include ../Rules
diff --git a/setjmp/tst-setjmp-static.c b/setjmp/tst-setjmp-static.c
new file mode 100644
index 0000000..5ca5df8
--- /dev/null
+++ b/setjmp/tst-setjmp-static.c
@@ -0,0 +1 @@
+#include "tst-setjmp.c"
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 27d1b71..a983957 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -77,21 +77,15 @@ ENTRY (__longjmp)
#ifdef NEED_HWCAP
# ifdef IS_IN_rtld
- ldr a4, 1f
- ldr a3, .Lrtld_local_ro
-0: add a4, pc, a4
- add a4, a4, a3
- ldr a4, [a4, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ LDST_PCREL (ldr, a4, a3, \
+ C_SYMBOL_NAME(_rtld_local_ro) \
+ + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
# else
# ifdef PIC
- ldr a4, 1f
- ldr a3, .Lrtld_global_ro
-0: add a4, pc, a4
- ldr a4, [a4, a3]
- ldr a4, [a4, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ LDR_GLOBAL (a4, a3, C_SYMBOL_NAME(_rtld_global_ro), \
+ RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
# else
- ldr a4, .Lhwcap
- ldr a4, [a4, #0]
+ LDR_GLOBAL (a4, a3, C_SYMBOL_NAME(_dl_hwcap), 0)
# endif
# endif
#endif
@@ -138,21 +132,4 @@ ENTRY (__longjmp)
DO_RET(lr)
-#ifdef NEED_HWCAP
-# ifdef IS_IN_rtld
-1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
-.Lrtld_local_ro:
- .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-# else
-# ifdef PIC
-1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
-.Lrtld_global_ro:
- .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-# else
-.Lhwcap:
- .long C_SYMBOL_NAME(_dl_hwcap)
-# endif
-# endif
-#endif
-
END (__longjmp)
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 17a16c9..6f54ab3 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -58,21 +58,15 @@ ENTRY (__sigsetjmp)
#ifdef NEED_HWCAP
/* Check if we have a VFP unit. */
# ifdef IS_IN_rtld
- ldr a3, 1f
- ldr a4, .Lrtld_local_ro
-0: add a3, pc, a3
- add a3, a3, a4
- ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ LDST_PCREL (ldr, a3, a4, \
+ C_SYMBOL_NAME(_rtld_local_ro) \
+ + RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
# else
# ifdef PIC
- ldr a3, 1f
- ldr a4, .Lrtld_global_ro
-0: add a3, pc, a3
- ldr a3, [a3, a4]
- ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ LDR_GLOBAL (a3, a4, C_SYMBOL_NAME(_rtld_global_ro), \
+ RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
# else
- ldr a3, .Lhwcap
- ldr a3, [a3, #0]
+ LDR_GLOBAL (a3, a4, C_SYMBOL_NAME(_dl_hwcap), 0)
# endif
# endif
#endif
@@ -114,23 +108,6 @@ ENTRY (__sigsetjmp)
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-#ifdef NEED_HWCAP
-# ifdef IS_IN_rtld
-1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
-.Lrtld_local_ro:
- .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-# else
-# ifdef PIC
-1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
-.Lrtld_global_ro:
- .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-# else
-.Lhwcap:
- .long C_SYMBOL_NAME(_dl_hwcap)
-# endif
-# endif
-#endif
-
END (__sigsetjmp)
hidden_def (__sigsetjmp)
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 84b07e1..8aa6c69 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -21,6 +21,8 @@
#ifndef __ASSEMBLER__
# include <stdint.h>
+#else
+# include <arm-features.h>
#endif
/* The __ARM_ARCH define is provided by gcc 4.8. Construct it otherwise. */
@@ -157,6 +159,32 @@
.arm
# endif
+/* Load or store to/from address X + Y into/from R, (maybe) using T.
+ X or Y can use T freely; T can be R if OP is a load. The first
+ version eschews the two-register addressing mode, while the
+ second version uses it. */
+# define LDST_INDEXED_NOINDEX(OP, R, T, X, Y) \
+ add T, X, Y; \
+ sfi_breg T, \
+ OP R, [T]
+# define LDST_INDEXED_INDEX(OP, R, X, Y) \
+ OP R, [X, Y]
+
+# ifdef ARM_NO_INDEX_REGISTER
+/* We're never using the two-register addressing mode, so this
+ always uses an intermediate add. */
+# define LDST_INDEXED(OP, R, T, X, Y) LDST_INDEXED_NOINDEX (OP, R, T, X, Y)
+# define LDST_PC_INDEXED(OP, R, T, X) LDST_INDEXED_NOINDEX (OP, R, T, pc, X)
+# else
+/* The two-register addressing mode is OK, except on Thumb with pc. */
+# define LDST_INDEXED(OP, R, T, X, Y) LDST_INDEXED_INDEX (OP, R, X, Y)
+# ifdef __thumb2__
+# define LDST_PC_INDEXED(OP, R, T, X) LDST_INDEXED_NOINDEX (OP, R, T, pc, X)
+# else
+# define LDST_PC_INDEXED(OP, R, T, X) LDST_INDEXED_INDEX (OP, R, pc, X)
+# endif
+# endif
+
/* Load or store to/from a pc-relative EXPR into/from R, using T. */
# ifdef __thumb2__
# define LDST_PCREL(OP, R, T, EXPR) \
@@ -166,6 +194,11 @@
.previous; \
99: add T, T, pc; \
OP R, [T]
+# elif defined (ARCH_HAS_T2)
+# define LDST_PCREL(OP, R, T, EXPR) \
+ movw T, #:lower16:EXPR - 99f - PC_OFS; \
+ movt T, #:upper16:EXPR - 99f - PC_OFS; \
+99: LDST_PC_INDEXED (OP, R, T, T)
# else
# define LDST_PCREL(OP, R, T, EXPR) \
ldr T, 98f; \
@@ -175,17 +208,42 @@
99: OP R, [pc, T]
# endif
-/* Load or store to/from a global EXPR into/from R, using T. */
-# define LDST_GLOBAL(OP, R, T, EXPR) \
+/* Load from a global SYMBOL + CONSTANT into R, using T. */
+# ifdef ARCH_HAS_T2
+# ifdef PIC
+# define LDR_GLOBAL(R, T, SYMBOL, CONSTANT) \
+ movw R, #:lower16:_GLOBAL_OFFSET_TABLE_ - 97f - PC_OFS; \
+ movw T, #:lower16:99f - 98f - PC_OFS; \
+ movt R, #:upper16:_GLOBAL_OFFSET_TABLE_ - 97f - PC_OFS; \
+ movt T, #:upper16:99f - 98f - PC_OFS; \
+ .pushsection .rodata.cst4, "aM", %progbits, 4; \
+ .balign 4; \
+99: .word SYMBOL##(GOT); \
+ .popsection; \
+97: add R, R, pc; \
+98: LDST_PC_INDEXED (ldr, T, T, T); \
+.if CONSTANT; \
+ add T, T, $CONSTANT; \
+.endif; \
+ LDST_INDEXED (ldr, R, T, R, T)
+# else
+# define LDR_GLOBAL(R, T, SYMBOL, CONSTANT) \
+ movw T, #:lower16:SYMBOL; \
+ movt T, #:upper16:SYMBOL; \
+ ldr R, [T, $CONSTANT]
+# endif
+# else
+# define LDR_GLOBAL(R, T, SYMBOL, CONSTANT) \
ldr T, 99f; \
ldr R, 100f; \
98: add T, T, pc; \
ldr T, [T, R]; \
.subsection 2; \
99: .word _GLOBAL_OFFSET_TABLE_ - 98b - PC_OFS; \
-100: .word EXPR##(GOT); \
+100: .word SYMBOL##(GOT); \
.previous; \
- OP R, [T]
+ ldr R, [T, $CONSTANT]
+# endif
/* Cope with negative memory offsets, which thumb can't encode.
Use NEGOFF_ADJ_BASE to (conditionally) alter the base register,
@@ -296,7 +354,7 @@
(!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread))
# ifdef __ASSEMBLER__
# define PTR_MANGLE_LOAD(guard, tmp) \
- LDST_PCREL(ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local));
+ LDR_GLOBAL (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0)
# define PTR_MANGLE(dst, src, guard, tmp) \
PTR_MANGLE_LOAD(guard, tmp); \
PTR_MANGLE2(dst, src, guard)
@@ -316,7 +374,7 @@ extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
#else
# ifdef __ASSEMBLER__
# define PTR_MANGLE_LOAD(guard, tmp) \
- LDST_GLOBAL(ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard));
+ LDR_GLOBAL(guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard), 0);
# define PTR_MANGLE(dst, src, guard, tmp) \
PTR_MANGLE_LOAD(guard, tmp); \
PTR_MANGLE2(dst, src, guard)
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources