From: Matthias Weisser Date: Sun, 22 May 2011 23:06:50 +0000 (+0000) Subject: arm: lib: memcpy: Do not copy to same address X-Git-Tag: v2011.09-rc1~68^2~132 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=34fe8281d7323784544e94d2f7218f52b8a2899d;p=oweals%2Fu-boot.git arm: lib: memcpy: Do not copy to same address 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 --- diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S index 3b5aeec4cf..f655256b5d 100644 --- a/arch/arm/lib/memcpy.S +++ b/arch/arm/lib/memcpy.S @@ -60,6 +60,9 @@ .globl memcpy memcpy: + cmp r0, r1 + moveq pc, lr + enter r4, lr subs r2, r2, #4