From: Richard Henderson Date: Thu, 14 Feb 2013 04:32:14 +0000 (-0800) Subject: arm: Mark assembly files that will not use thumb mode X-Git-Tag: glibc-2.18~628 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=365261c37ff9156372a32f4ab3f07dcfbd72217e;p=thirdparty%2Fglibc.git arm: Mark assembly files that will not use thumb mode Some routines are written with complex LDM/STM insns that cannot be used in thumb mode, or are highly conditional requiring excessive IT insns. When a future patch goes in to enable thumb2 by default, this marker will be used to override that default. --- diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm index 33a1f57f71d..28ec8f96a14 100644 --- a/ports/ChangeLog.arm +++ b/ports/ChangeLog.arm @@ -37,6 +37,17 @@ * sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET): Likewise. * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Likewise. + * ports/sysdeps/arm/__longjmp.S: Define NO_THUMB before + * sysdeps/arm/crti.S, sysdeps/arm/crtn.S: Likewise. + * sysdeps/arm/dl-trampoline.S: Likewise. + * sysdeps/arm/memcpy.S: Likewise. + * sysdeps/arm/memmove.S: Likewise. + * sysdeps/arm/memset.S: Likewise. + * sysdeps/arm/setjmp.S: Likewise. + * sysdeps/arm/strlen.S: Likewise. + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: Likewise. + * sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise. + 2013-02-27 Roland McGrath * sysdeps/arm/sysdep.h (CFI_SECTIONS): New macro. diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S index 3d6e114c88c..a3a2a8aecb4 100644 --- a/ports/sysdeps/arm/__longjmp.S +++ b/ports/sysdeps/arm/__longjmp.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see . */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include #define _SETJMP_H #define _ASM diff --git a/ports/sysdeps/arm/crti.S b/ports/sysdeps/arm/crti.S index 44e20f0c110..1d55ae27adb 100644 --- a/ports/sysdeps/arm/crti.S +++ b/ports/sysdeps/arm/crti.S @@ -38,6 +38,8 @@ they can be called as functions. The symbols _init and _fini are magic and cause the linker to emit DT_INIT and DT_FINI. */ +/* Always build .init and .fini sections in ARM mode. */ +#define NO_THUMB #include #include diff --git a/ports/sysdeps/arm/crtn.S b/ports/sysdeps/arm/crtn.S index 5ff3661f187..a01eb013979 100644 --- a/ports/sysdeps/arm/crtn.S +++ b/ports/sysdeps/arm/crtn.S @@ -33,6 +33,8 @@ License along with the GNU C Library. If not, see . */ +/* Always build .init and .fini sections in ARM mode. */ +#define NO_THUMB #include /* crtn.S puts function epilogues in the .init and .fini sections diff --git a/ports/sysdeps/arm/dl-trampoline.S b/ports/sysdeps/arm/dl-trampoline.S index 6d41ebd88fb..561d8ae6fd9 100644 --- a/ports/sysdeps/arm/dl-trampoline.S +++ b/ports/sysdeps/arm/dl-trampoline.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see . */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include #include diff --git a/ports/sysdeps/arm/memcpy.S b/ports/sysdeps/arm/memcpy.S index d8164b4d709..98b9b47e397 100644 --- a/ports/sysdeps/arm/memcpy.S +++ b/ports/sysdeps/arm/memcpy.S @@ -17,6 +17,8 @@ License along with the GNU C Library. If not, see . */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include /* diff --git a/ports/sysdeps/arm/memmove.S b/ports/sysdeps/arm/memmove.S index d33c1cef844..059ca7ac317 100644 --- a/ports/sysdeps/arm/memmove.S +++ b/ports/sysdeps/arm/memmove.S @@ -17,6 +17,8 @@ License along with the GNU C Library. If not, see . */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include /* diff --git a/ports/sysdeps/arm/memset.S b/ports/sysdeps/arm/memset.S index 3152a84e804..9924cb9115c 100644 --- a/ports/sysdeps/arm/memset.S +++ b/ports/sysdeps/arm/memset.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see . */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include /* void *memset (dstpp, c, len) */ diff --git a/ports/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S index baa02be39d6..6776cab3842 100644 --- a/ports/sysdeps/arm/setjmp.S +++ b/ports/sysdeps/arm/setjmp.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see . */ +/* ??? Needs more rearrangement for the STM to handle thumb mode. */ +#define NO_THUMB #include #define _SETJMP_H #define _ASM diff --git a/ports/sysdeps/arm/strlen.S b/ports/sysdeps/arm/strlen.S index 15e922118af..2b947e240e0 100644 --- a/ports/sysdeps/arm/strlen.S +++ b/ports/sysdeps/arm/strlen.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see . */ +/* Thumb requires excessive IT insns here. */ +#define NO_THUMB #include /* size_t strlen(const char *S) diff --git a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index bdcfa206ec2..29edec69d28 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S @@ -15,6 +15,8 @@ License along with the GNU C Library. If not, see . */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include .section .rodata.str1.1,"aMS",%progbits,1 diff --git a/ports/sysdeps/unix/sysv/linux/arm/setcontext.S b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S index edd17bcd40d..b3148c89432 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/setcontext.S +++ b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see . */ +/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ +#define NO_THUMB #include #include