]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - arch/x86_64/lib/memmove_64.c
x86_64: move kernel/cpufreq
[mirror_ubuntu-zesty-kernel.git] / arch / x86_64 / lib / memmove_64.c
CommitLineData
1da177e4
LT
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>
2ee60e17 6#include <linux/module.h>
1da177e4
LT
7
8#undef memmove
9void *memmove(void * dest,const void *src,size_t count)
10{
11 if (dest < src) {
6bfa9bb5 12 return memcpy(dest,src,count);
1da177e4
LT
13 } else {
14 char *p = (char *) dest + count;
15 char *s = (char *) src + count;
16 while (count--)
17 *--p = *--s;
18 }
19 return dest;
20}
2ee60e17 21EXPORT_SYMBOL(memmove);