Ignore:
Timestamp:
Jul 22, 2012, 12:06:11 PM (12 years ago)
Author:
karaoui
Message:

updating libs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/libs/stdio.h

    r165 r178  
    1010
    1111#include <mapping_info.h>
     12#include <common.h>
    1213
    1314/* MIPS32 related functions */
     
    6667unsigned int giet_procnumber();
    6768
    68 /*
    69  * memcpy function
    70  * This function is required because it can be gnerated by GCC
    71  * during compilation so we must provide it.
    72  * Code taken from MutekH.
    73  */
    74 static inline void *memcpy(void *_dst, const void *_src, unsigned int size)
    75 {
    76     unsigned int *dst = _dst;
    77     const unsigned int *src = _src;
    78 
    79     /* if source and destination buffer are word-aligned,
    80      * then copy word-by-word */
    81     if (!((unsigned int)dst & 3) && !((unsigned int)src & 3))
    82         while (size > 3) {
    83             *dst++ = *src++;
    84             size -= 4;
    85         }
    86 
    87     unsigned char *cdst = (unsigned char*)dst;
    88     unsigned char *csrc = (unsigned char*)src;
    89 
    90     /* byte-by-byte copy */
    91     while (size--) {
    92         *cdst++ = *csrc++;
    93     }
    94     return _dst;
    95 }
    9669
    9770#endif
    98 
Note: See TracChangeset for help on using the changeset viewer.