LCOV - code coverage report
Current view: top level - crtools/include - memcpy_64.h (source / functions) Hit Total Coverage
Test: crtools.info Lines: 2 2 100.0 %
Date: 2012-12-28 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #ifndef __CR_MEMCPY_64_H__
       2                 :            : #define __CR_MEMCPY_64_H__
       3                 :            : 
       4                 :            : #include "compiler.h"
       5                 :            : #include "types.h"
       6                 :            : 
       7                 :            : static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n)
       8                 :            : {
       9                 :            :         int d0, d1, d2;
      10                 :       2524 :         asm volatile("rep ; movsl          \n"
      11                 :            :                      "movl %4,%%ecx                \n"
      12                 :            :                      "andl $3,%%ecx                \n"
      13                 :            :                      "jz 1f                        \n"
      14                 :            :                      "rep ; movsb          \n"
      15                 :            :                      "1:"
      16                 :            :                      : "=&c" (d0), "=&D" (d1), "=&S" (d2)
      17                 :       2524 :                      : "0" (n / 4), "g" (n), "1" ((long)to), "2" ((long)from)
      18                 :            :                      : "memory");
      19                 :            :         return to;
      20                 :            : }
      21                 :            : 
      22                 :            : #endif /* __CR_MEMCPY_64_H__ */

Generated by: LCOV version 1.9