Commit 17f6c363 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

asm: Move builtin_memcpy helper into asm/string.h

There will be a couple of more builtin helpers needed
in pie code soon. Thus to unify approach do

 - rename asm/memcpy_64.h to asm/string.h

 - introduce include/asm-generic/string.h file
   where all helpers are implemented if optimized
   variant is not  yet provided
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 54b32cb1
#ifndef __CR_ASM_STRING_H__
#define __CR_ASM_STRING_H__
#include "compiler.h"
#include "asm-generic/string.h"
#endif /* __CR_ASM_STRING_H__ */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "restorer.h" #include "restorer.h"
#include "asm/restorer.h" #include "asm/restorer.h"
#include "asm/memcpy_64.h" #include "asm/string.h"
#include "syscall.h" #include "syscall.h"
#include "log.h" #include "log.h"
......
#ifndef __CR_MEMCPY_64_H__ #ifndef __CR_ASM_STRING_H__
#define __CR_MEMCPY_64_H__ #define __CR_ASM_STRING_H__
#define HAS_BUILTIN_MEMCPY
#include "compiler.h" #include "compiler.h"
#include "asm/types.h" #include "asm-generic/string.h"
static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n) static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n)
{ {
...@@ -19,4 +21,4 @@ static always_inline void *builtin_memcpy(void *to, const void *from, unsigned i ...@@ -19,4 +21,4 @@ static always_inline void *builtin_memcpy(void *to, const void *from, unsigned i
return to; return to;
} }
#endif /* __CR_MEMCPY_64_H__ */ #endif /* __CR_ASM_STRING_H__ */
#ifndef __MEMCPY_ARM_H__ #ifndef __CR_ASM_GENERIC_STRING_H__
#define __MEMCPY_ARM_H__ #define __CR_ASM_GENERIC_STRING_H__
#include "compiler.h" #include "compiler.h"
#include "types.h"
#ifndef HAS_BUILTIN_MEMCPY
static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n) static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n)
{ {
int i; int i;
...@@ -16,5 +16,6 @@ static always_inline void *builtin_memcpy(void *to, const void *from, unsigned i ...@@ -16,5 +16,6 @@ static always_inline void *builtin_memcpy(void *to, const void *from, unsigned i
return to; return to;
} }
#endif #endif
#endif /* __CR_ASM_GENERIC_STRING_H__ */
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <errno.h> #include <errno.h>
#include "compiler.h" #include "compiler.h"
#include "asm/memcpy_64.h" #include "asm/string.h"
#include "asm/types.h" #include "asm/types.h"
#include "syscall.h" #include "syscall.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment