From efce79f09ae6daa77cd322df0d532beec3f445f5 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 26 Mar 2008 13:40:36 +0000 Subject: Paul Brook writes: The attached patch adds support for compiling arm uClibc as pure Thumb code. This is needed because some recent ARM codes do not implement traditional ARM mode. Specifically: * Cortex-M1 - An extremely minimal FPGA based core that only implements Thumb-1 (aka ARMv6-M). * Cortex-M3 - A Thumb-2 only ARMv7-M core. Most of uClibc already builds in Thumb mode, all that is left are a handful of assembly bits. Tested on arm-uclinuxeabi. --- libc/string/arm/memmove.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libc/string/arm/memmove.S') diff --git a/libc/string/arm/memmove.S b/libc/string/arm/memmove.S index 45cd9b4d4..c11b98dd4 100644 --- a/libc/string/arm/memmove.S +++ b/libc/string/arm/memmove.S @@ -38,16 +38,23 @@ */ #include +#include .text .global memmove .type memmove,%function .align 4 +#if defined(__thumb__) && !defined(__thumb2__) +.thumb_func memmove: - stmfd sp!, {r0, lr} + push {r2, lr} bl _memcpy - ldmfd sp!, {r0, pc} + POP_RET +#else +memmove: + b _memcpy +#endif .size memmove,.-memmove -- cgit v1.2.3