Fix strlen using Thumb-2 with -Os -marm
2016-04-18 Thomas Preud'homme <thomas.preudhomme@arm.com> * libc/machine/arm/strlen-stub.c: Check capabilities of architecture to decide which Thumb implementation to use and fall back to C implementation for architecture not supporting Thumb mode. * libc/machine/arm/strlen.S: Likewise.
This commit is contained in:
parent
d1d1378d13
commit
5c02bcc086
@ -32,11 +32,14 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#if defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED
|
#if defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED
|
||||||
#if defined __thumb__ && !defined __thumb2__
|
#if __ARM_ARCH_ISA_THUMB == 2
|
||||||
|
/* Implemented in strlen.S. */
|
||||||
|
|
||||||
|
#elif defined (__ARM_ARCH_ISA_THUMB)
|
||||||
/* Implemented in strlen.S. */
|
/* Implemented in strlen.S. */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Implemented in strlen.S. */
|
#include "../../string/strlen.c"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -27,11 +27,14 @@
|
|||||||
#include "acle-compat.h"
|
#include "acle-compat.h"
|
||||||
|
|
||||||
#if defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED
|
#if defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED
|
||||||
#if defined __thumb__ && !defined __thumb2__
|
#if __ARM_ARCH_ISA_THUMB == 2
|
||||||
|
#include "strlen-thumb2-Os.S"
|
||||||
|
|
||||||
|
#elif defined (__ARM_ARCH_ISA_THUMB)
|
||||||
#include "strlen-thumb1-Os.S"
|
#include "strlen-thumb1-Os.S"
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include "strlen-thumb2-Os.S"
|
/* Implemented in strlen-stub.c. */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user