public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: lib: memcpy: Do not copy to same address
@ 2011-05-23  9:06 Matthias Weisser
  2011-05-23  9:30 ` Alexander Holler
  2011-08-12  8:49 ` Albert ARIBAUD
  0 siblings, 2 replies; 8+ messages in thread
From: Matthias Weisser @ 2011-05-23  9:06 UTC (permalink / raw)
  To: u-boot

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 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S
index 3b5aeec..f655256 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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-12  8:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23  9:06 [U-Boot] [PATCH] arm: lib: memcpy: Do not copy to same address Matthias Weisser
2011-05-23  9:30 ` Alexander Holler
2011-05-23  9:46   ` Matthias Weißer
2011-05-23  9:51     ` Alexander Holler
2011-05-23  9:49   ` Albert ARIBAUD
2011-05-23 10:01     ` Alexander Holler
2011-07-26  6:02     ` Matthias Weißer
2011-08-12  8:49 ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox