]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: lib: memcpy: Do not copy to same address
authorMatthias Weisser <weisserm@arcor.de>
Sun, 22 May 2011 23:06:50 +0000 (23:06 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 3 Sep 2011 20:40:45 +0000 (22:40 +0200)
In some cases (e.g. bootm with a elf payload which is already at the right
position) there is a in place copy of data to the same address. Catching this
saves some ms while booting.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
arch/arm/lib/memcpy.S

index 3b5aeec4cf5b373e35fa9db0918a28e7e3db3d6d..f655256b5d1514f949b880c322cb225a73cd538b 100644 (file)
@@ -60,6 +60,9 @@
 .globl memcpy
 memcpy:
 
+               cmp     r0, r1
+               moveq   pc, lr
+
                enter   r4, lr
 
                subs    r2, r2, #4