Back to index

glibc  2.9
Defines
memcopy.h File Reference
#include <sysdeps/generic/memcopy.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define OP_T_THRES   16
#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes)
#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes)

Define Documentation

#define BYTE_COPY_BWD (   dst_ep,
  src_ep,
  nbytes 
)
Value:
do                                                                   \
    {                                                                \
      size_t __nbytes = (nbytes);                                    \
      if (__nbytes & 1)                                                     \
        {                                                            \
         src_ep -= 1;                                                       \
         dst_ep -= 1;                                                       \
         ((byte *) dst_ep)[0] =  ((byte *) src_ep)[0];                      \
         __nbytes -= 1;                                              \
        }                                                            \
      while (__nbytes > 0)                                           \
       {                                                             \
	  byte __x, __y;                                             \
         src_ep -= 2;                                                       \
         __y = ((byte *) src_ep)[1];                                        \
         __x = ((byte *) src_ep)[0];                                        \
         dst_ep -= 2;                                                       \
         __nbytes -= 2;                                              \
         ((byte *) dst_ep)[1] = __y;                                        \
         ((byte *) dst_ep)[0] = __x;                                        \
       }                                                             \
    } while (0)

Definition at line 91 of file memcopy.h.

#define BYTE_COPY_FWD (   dst_bp,
  src_bp,
  nbytes 
)
Value:
do                                                                   \
    {                                                                \
      size_t __nbytes = (nbytes);                                    \
      if (__nbytes & 1)                                                     \
        {                                                            \
         ((byte *) dst_bp)[0] =  ((byte *) src_bp)[0];                      \
         src_bp += 1;                                                       \
         dst_bp += 1;                                                       \
         __nbytes -= 1;                                              \
        }                                                            \
      while (__nbytes > 0)                                           \
       {                                                             \
	  byte __x = ((byte *) src_bp)[0];                                  \
	  byte __y = ((byte *) src_bp)[1];                                  \
         src_bp += 2;                                                       \
         __nbytes -= 2;                                              \
         ((byte *) dst_bp)[0] = __x;                                        \
         ((byte *) dst_bp)[1] = __y;                                        \
         dst_bp += 2;                                                       \
       }                                                             \
    } while (0)

Definition at line 63 of file memcopy.h.

#define OP_T_THRES   16

Definition at line 58 of file memcopy.h.