ia64/xen-unstable

changeset 4044:fec6466347ca

bitkeeper revision 1.1236.12.22 (422f1ddcMY-YRWMhvpqWmcER7Kb_kQ)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author kaf24@firebug.cl.cam.ac.uk
date Wed Mar 09 16:01:32 2005 +0000 (2005-03-09)
parents a1a4e6ed8109 4956720124f8
children 7b29eaf0d790 be135facb9ee
files xen/include/asm-x86/x86_64/string.h
line diff
     1.1 --- a/xen/include/asm-x86/x86_64/string.h	Wed Mar 09 11:03:38 2005 +0000
     1.2 +++ b/xen/include/asm-x86/x86_64/string.h	Wed Mar 09 16:01:32 2005 +0000
     1.3 @@ -1,69 +1,6 @@
     1.4  #ifndef _X86_64_STRING_H_
     1.5  #define _X86_64_STRING_H_
     1.6  
     1.7 -#ifdef __KERNEL__
     1.8 -
     1.9 -#define struct_cpy(x,y) (*(x)=*(y))
    1.10 -
    1.11 -/* Written 2002 by Andi Kleen */ 
    1.12 -
    1.13 -/* Only used for special circumstances. Stolen from i386/string.h */ 
    1.14 -static inline void * __inline_memcpy(void * to, const void * from, size_t n)
    1.15 -{
    1.16 -unsigned long d0, d1, d2;
    1.17 -__asm__ __volatile__(
    1.18 -	"rep ; movsl\n\t"
    1.19 -	"testb $2,%b4\n\t"
    1.20 -	"je 1f\n\t"
    1.21 -	"movsw\n"
    1.22 -	"1:\ttestb $1,%b4\n\t"
    1.23 -	"je 2f\n\t"
    1.24 -	"movsb\n"
    1.25 -	"2:"
    1.26 -	: "=&c" (d0), "=&D" (d1), "=&S" (d2)
    1.27 -	:"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
    1.28 -	: "memory");
    1.29 -return (to);
    1.30 -}
    1.31 -
    1.32 -/* Even with __builtin_ the compiler may decide to use the out of line
    1.33 -   function. */
    1.34 -
    1.35 -#define __HAVE_ARCH_MEMCPY 1
    1.36 -extern void *__memcpy(void *to, const void *from, size_t len); 
    1.37 -#define memcpy(dst,src,len) \
    1.38 -	({ size_t __len = (len);				\
    1.39 -	   void *__ret;						\
    1.40 -	   if (__builtin_constant_p(len) && __len >= 64)	\
    1.41 -		 __ret = __memcpy((dst),(src),__len);		\
    1.42 -	   else							\
    1.43 -		 __ret = __builtin_memcpy((dst),(src),__len);	\
    1.44 -	   __ret; }) 
    1.45 -
    1.46 -
    1.47 -#define __HAVE_ARCH_MEMSET
    1.48 -#define memset __builtin_memset
    1.49 -
    1.50 -#define __HAVE_ARCH_MEMMOVE
    1.51 -void * memmove(void * dest,const void *src,size_t count);
    1.52 -
    1.53 -/* Use C out of line version for memcmp */ 
    1.54 -#define memcmp __builtin_memcmp
    1.55 -int memcmp(const void * cs,const void * ct,size_t count);
    1.56 -
    1.57 -/* out of line string functions use always C versions */ 
    1.58 -#define strlen __builtin_strlen
    1.59 -size_t strlen(const char * s);
    1.60 -
    1.61 -#define strcpy __builtin_strcpy
    1.62 -char * strcpy(char * dest,const char *src);
    1.63 -
    1.64 -#define strcat __builtin_strcat
    1.65 -char * strcat(char * dest, const char * src);
    1.66 -
    1.67 -#define strcmp __builtin_strcmp
    1.68 -int strcmp(const char * cs,const char * ct);
    1.69 -
    1.70 -#endif /* __KERNEL__ */
    1.71 +/* nothing */
    1.72  
    1.73  #endif