src/libc/memcopy.h File Reference

Definitions for memory copy functions. More...

#include <sys/cdefs.h>
#include <endian.h>
#include "libc_internal.h"

Go to the source code of this file.

Defines

#define op_t   unsigned long int
#define OPSIZ   (sizeof(op_t))
#define reg_char   char
#define MERGE(w0, sh_1, w1, sh_2)   (((w0) >> (sh_1)) | ((w1) << (sh_2)))
#define MERGE(w0, sh_1, w1, sh_2)   (((w0) << (sh_1)) | ((w1) >> (sh_2)))
#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes)
#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes)
#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes)
#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes)
#define OP_T_THRES   16

Typedefs

typedef unsigned char byte


Detailed Description

Definitions for memory copy functions.

Definition in file memcopy.h.


Define Documentation

#define BYTE_COPY_BWD ( dst_ep,
src_ep,
nbytes   ) 

Value:

do                                                                            \
    {                                                                         \
      size_t __nbytes = (nbytes);                                             \
      while (__nbytes > 0)                                                    \
        {                                                                     \
          byte __x;                                                           \
          src_ep -= 1;                                                        \
          __x = ((byte *) src_ep)[0];                                         \
          dst_ep -= 1;                                                        \
          __nbytes -= 1;                                                      \
          ((byte *) dst_ep)[0] = __x;                                         \
        }                                                                     \
    } while (0)

Definition at line 102 of file memcopy.h.

#define BYTE_COPY_FWD ( dst_bp,
src_bp,
nbytes   ) 

Value:

do                                                                            \
    {                                                                         \
      size_t __nbytes = (nbytes);                                             \
      while (__nbytes > 0)                                                    \
        {                                                                     \
          byte __x = ((byte *) src_bp)[0];                                    \
          src_bp += 1;                                                        \
          __nbytes -= 1;                                                      \
          ((byte *) dst_bp)[0] = __x;                                         \
          dst_bp += 1;                                                        \
        }                                                                     \
    } while (0)

Definition at line 84 of file memcopy.h.

#define WORD_COPY_BWD ( dst_ep,
src_ep,
nbytes_left,
nbytes   ) 

Value:

do                                                                            \
    {                                                                         \
      if (src_ep % OPSIZ == 0)                                                \
        txc_libc_wordcopy_bwd_aligned (dst_ep, src_ep, (nbytes) / OPSIZ);             \
      else                                                                    \
        txc_libc_wordcopy_bwd_dest_aligned (dst_ep, src_ep, (nbytes) / OPSIZ);        \
      src_ep -= (nbytes) & -OPSIZ;                                            \
      dst_ep -= (nbytes) & -OPSIZ;                                            \
      (nbytes_left) = (nbytes) % OPSIZ;                                       \
    } while (0)

Definition at line 139 of file memcopy.h.

#define WORD_COPY_FWD ( dst_bp,
src_bp,
nbytes_left,
nbytes   ) 

Value:

do                                                                            \
    {                                                                         \
      if (src_bp % OPSIZ == 0)                                                \
        txc_libc_wordcopy_fwd_aligned (dst_bp, src_bp, (nbytes) / OPSIZ);             \
      else                                                                    \
        txc_libc_wordcopy_fwd_dest_aligned (dst_bp, src_bp, (nbytes) / OPSIZ);        \
      src_bp += (nbytes) & -OPSIZ;                                            \
      dst_bp += (nbytes) & -OPSIZ;                                            \
      (nbytes_left) = (nbytes) % OPSIZ;                                       \
    } while (0)

Definition at line 121 of file memcopy.h.


Generated on Wed Dec 9 20:32:40 2009 for xCalls by  doxygen 1.4.7