summaryrefslogtreecommitdiff
path: root/sys/lib/libkern
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-06-15 18:43:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-06-15 18:43:16 +0000
commit61e3acb3cc42e6ec3e34d4d55cc01c7f2648ad72 (patch)
tree7034f2499aff407ef4a8a8283481f5b3f9b46f2f /sys/lib/libkern
parent684918b0633c921a8b93e1d43ee47527a84ee2cb (diff)
Don't return garbage in memcpy() but the original destination pointer.
Diffstat (limited to 'sys/lib/libkern')
-rw-r--r--sys/lib/libkern/arch/sh/memmove.S1
1 files changed, 1 insertions, 0 deletions
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