Make macro checks ARMv8-M baseline proof
libgloss: * arm/Makefile.in: Add newlib/libc/machine/arm to the include path if newlib is present. * arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macros __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * arm/crt0.S: Use THUMB1_ONLY rather than __ARM_ARCH_6M__, !__ARM_ARCH_ISA_ARM rather than THUMB_V7M_V6M for fp enabling, and PREFER_THUMB rather than THUMB_V7_V6M. Rename other occurences of THUMB_V7M_V6M to THUMB_VXM. * arm/linux-crt0.c: Likewise. * arm/redboot-crt0.S: Likewise. * arm/swi.h: Likewise. * arm/trap.S: Likewise. newlib: * libc/machine/arm/memcpy-stub.c: Use ACLE macros __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to check for Thumb-2 only targets rather than __ARM_ARCH and __ARM_ARCH_PROFILE. * libc/machine/arm/memcpy.S: Likewise. * libc/machine/arm/setjmp.S: Likewise for Thumb-1 only target and include acle-compat.h. * libc/machine/arm/strcmp.S: Likewise for Thumb-1 and Thumb-2 only target and include acle-compat.h. * libc/sys/arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macro __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * libc/sys/arm/crt0.S: Use PREFER_THUMB rather than THUMB_V7_V6M and rename THUMB_V7M_V6M into THUMB_VXM. * libc/sys/arm/swi.h: Likewise.
This commit is contained in:
committed by
Corinna Vinschen
parent
0b42ea7960
commit
69f4c40291
@ -34,7 +34,7 @@
|
||||
#elif (__ARM_ARCH >= 7 && __ARM_ARCH_PROFILE == 'A' \
|
||||
&& defined (__ARM_FEATURE_UNALIGNED))
|
||||
/* Defined in memcpy.S. */
|
||||
#elif __ARM_ARCH >= 7 && __ARM_ARCH_PROFILE == 'M'
|
||||
#elif __ARM_ARCH_ISA_THUMB == 2 && !__ARM_ARCH_ISA_ARM
|
||||
/* Defined in memcpy.S. */
|
||||
#else
|
||||
# include "../../string/memcpy.c"
|
||||
|
@ -38,7 +38,7 @@
|
||||
&& defined (__ARM_FEATURE_UNALIGNED))
|
||||
#include "memcpy-armv7a.S"
|
||||
|
||||
#elif __ARM_ARCH >= 7 && __ARM_ARCH_PROFILE == 'M'
|
||||
#elif __ARM_ARCH_ISA_THUMB == 2 && !__ARM_ARCH_ISA_ARM
|
||||
#include "memcpy-armv7m.S"
|
||||
|
||||
#else
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
Nick Clifton, Cygnus Solutions, 13 June 1997. */
|
||||
|
||||
#include "acle-compat.h"
|
||||
|
||||
/* ANSI concatenation macros. */
|
||||
#define CONCAT(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a##b
|
||||
@ -55,8 +57,8 @@
|
||||
|
||||
For Thumb-2 do everything in Thumb mode. */
|
||||
|
||||
#if defined(__ARM_ARCH_6M__)
|
||||
/* ARMv6-M has to be implemented in Thumb mode. */
|
||||
#if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM
|
||||
/* ARMv6-M-like has to be implemented in Thumb mode. */
|
||||
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
@ -29,6 +29,7 @@
|
||||
/* Wrapper for the various implementations of strcmp. */
|
||||
|
||||
#include "arm_asm.h"
|
||||
#include "acle-compat.h"
|
||||
|
||||
#ifdef __ARM_BIG_ENDIAN
|
||||
#define S2LO lsl
|
||||
@ -61,7 +62,7 @@
|
||||
.endm
|
||||
|
||||
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
|
||||
|| (__ARM_ARCH == 6 && __ARM_ARCH_PROFILE == 'M')
|
||||
|| (__ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM)
|
||||
|
||||
# if defined (__thumb__) && !defined (__thumb2__)
|
||||
/* Thumb1 only variant. If size is preferred, use strcmp-armv4t.S.
|
||||
@ -78,7 +79,7 @@
|
||||
# include "strcmp-arm-tiny.S"
|
||||
# endif
|
||||
|
||||
#elif __ARM_ARCH >= 7
|
||||
#elif __ARM_ARCH_ISA_THUMB == 2
|
||||
|
||||
# ifdef __ARM_FEATURE_SIMD32
|
||||
# include "strcmp-armv7.S"
|
||||
|
Reference in New Issue
Block a user