From 37cbc3e8ae6b75e9b7e79996d30fe8ed0beb9704 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 29 Jan 2015 06:36:53 -0600 Subject: Backport memcpy fix --- nuttx/arch/arm/src/armv7-m/up_memcpy.S | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nuttx/arch/arm/src/armv7-m/up_memcpy.S b/nuttx/arch/arm/src/armv7-m/up_memcpy.S index ea267f78f..84877b040 100644 --- a/nuttx/arch/arm/src/armv7-m/up_memcpy.S +++ b/nuttx/arch/arm/src/armv7-m/up_memcpy.S @@ -142,11 +142,26 @@ MEM_LongCopyTable: * Input Parameters: * r0 = destination, r1 = source, r2 = length * + * Returned Value: + * r0 = destination r1-r3 burned + * ************************************************************************************/ + .align 4 .thumb_func + memcpy: push {r14} + push {r0} + bl _do_memcpy + pop {r0} + pop {pc} + + .align 4 + + .thumb_func +_do_memcpy: + push {r14} /* This allows the inner workings to "assume" a minimum amount of bytes */ /* Quickly check for very short copies */ -- cgit v1.2.3