diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-06-15 18:43:16 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-06-15 18:43:16 +0000 |
commit | 61e3acb3cc42e6ec3e34d4d55cc01c7f2648ad72 (patch) | |
tree | 7034f2499aff407ef4a8a8283481f5b3f9b46f2f /sys/lib/libkern | |
parent | 684918b0633c921a8b93e1d43ee47527a84ee2cb (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.S | 1 |
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 |