diff options
author | Michal Simek <monstr@monstr.eu> | 2010-10-09 13:58:24 +1000 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-10-21 15:52:01 +1000 |
commit | 93e2e85139509338c68279c7260ebb68177b23a9 (patch) | |
tree | 64171deb6d2f046da3cf7c5111f73e419be1d460 /arch/microblaze/lib/memcpy.c | |
parent | ccea0e6e49e4db8ee7968c183ecddb3e399c5f54 (diff) |
microblaze: Separate library optimized functions
memcpy/memmove/memset
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/lib/memcpy.c')
-rw-r--r-- | arch/microblaze/lib/memcpy.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/microblaze/lib/memcpy.c b/arch/microblaze/lib/memcpy.c index 014bac92bdff..ab2d115f9ee5 100644 --- a/arch/microblaze/lib/memcpy.c +++ b/arch/microblaze/lib/memcpy.c @@ -33,17 +33,24 @@ #include <asm/system.h> #ifdef __HAVE_ARCH_MEMCPY +#ifndef CONFIG_OPT_LIB_FUNCTION void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) { const char *src = v_src; char *dst = v_dst; -#ifndef CONFIG_OPT_LIB_FUNCTION + /* Simple, byte oriented memcpy. */ while (c--) *dst++ = *src++; return v_dst; -#else +} +#else /* CONFIG_OPT_LIB_FUNCTION */ +void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) +{ + const char *src = v_src; + char *dst = v_dst; + /* The following code tries to optimize the copy by using unsigned * alignment. This will work fine if both source and destination are * aligned on the same boundary. However, if they are aligned on @@ -150,7 +157,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) } return v_dst; -#endif } +#endif /* CONFIG_OPT_LIB_FUNCTION */ EXPORT_SYMBOL(memcpy); #endif /* __HAVE_ARCH_MEMCPY */ |