diff options
author | Matthias Weisser | 2011-05-22 23:06:50 +0000 |
---|---|---|
committer | Albert ARIBAUD | 2011-09-03 22:40:45 +0200 |
commit | 34fe8281d7323784544e94d2f7218f52b8a2899d (patch) | |
tree | 93a4c71a8f0d447dff324a79b7221f1f47707e6a | |
parent | 2141e14428924792d5d0f1770d7c03bdc892208c (diff) |
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 <weisserm@arcor.de>
-rw-r--r-- | arch/arm/lib/memcpy.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S index 3b5aeec4cf5..f655256b5d1 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 |