From 61e3acb3cc42e6ec3e34d4d55cc01c7f2648ad72 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 15 Jun 2013 18:43:16 +0000 Subject: Don't return garbage in memcpy() but the original destination pointer. --- sys/lib/libkern/arch/sh/memmove.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/lib/libkern/arch/sh/memmove.S b/sys/lib/libkern/arch/sh/memmove.S index eb82a8aa98e..d879c8a258e 100644 --- a/sys/lib/libkern/arch/sh/memmove.S +++ b/sys/lib/libkern/arch/sh/memmove.S @@ -46,6 +46,7 @@ ENTRY(memmove) bf/s bcopy_overlap ENTRY(memcpy) + mov REG_DST,REG_DST0 cmp/eq REG_DST,REG_SRC /* if ( src == dst ) return; */ bt/s bcopy_return mov REG_SRC,r0 -- cgit v1.2.3