[PATCH] ocfs2: zero_user_page conversion
[wrt350n-kernel.git] / arch / x86_64 / lib / memmove.c
blob751ebae8ec4251bf74211bbfd937bd8c5a2b09df
1 /* Normally compiler builtins are used, but sometimes the compiler calls out
2 of line code. Based on asm-i386/string.h.
3 */
4 #define _STRING_C
5 #include <linux/string.h>
6 #include <linux/module.h>
8 #undef memmove
9 void *memmove(void * dest,const void *src,size_t count)
11 if (dest < src) {
12 return memcpy(dest,src,count);
13 } else {
14 char *p = (char *) dest + count;
15 char *s = (char *) src + count;
16 while (count--)
17 *--p = *--s;
19 return dest;
21 EXPORT_SYMBOL(memmove);