root/include/asm/memory.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  *  NOTE!!! memcpy(dest,src,n) assumes ds=es=normal data segment. This
   3  *  goes for all kernel functions (ds=es=kernel space, fs=local data,
   4  *  gs=null), as well as for all well-behaving user programs (ds=es=
   5  *  user data space). This is NOT a bug, as any user program that changes
   6  *  es deserves to die if it isn't careful.
   7  */
   8 #define memcpy(dest,src,n) ({ \
   9 void * _res = dest; \
  10 __asm__ __volatile__ ("cld;rep;movsb" \
  11         ::"D" ((long)(_res)),"S" ((long)(src)),"c" ((long) (n)) \
  12         :"di","si","cx"); \
  13 _res; \
  14 })

/* [previous][next][first][last][top][bottom][index][help] */