avr32/lib: fix unaligned memcpy where len < 4
in case of memcpy(p, unaligned, 1..3) we get 1..3 as the
return value instead of p
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
diff --git a/arch/avr32/lib/memcpy.S b/arch/avr32/lib/memcpy.S
index 93e74b6..c2ca49d 100644
--- a/arch/avr32/lib/memcpy.S
+++ b/arch/avr32/lib/memcpy.S
@@ -49,6 +49,7 @@
/* Handle unaligned "from" pointer */
1: sub r10, 4
+ movlt r9, r12
brlt 4b
add r10, r9
lsl r9, 2