Changeset 178 for soft/giet_vm/libs/stdio.h
- Timestamp:
- Jul 22, 2012, 12:06:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/stdio.h
r165 r178 10 10 11 11 #include <mapping_info.h> 12 #include <common.h> 12 13 13 14 /* MIPS32 related functions */ … … 66 67 unsigned int giet_procnumber(); 67 68 68 /*69 * memcpy function70 * This function is required because it can be gnerated by GCC71 * 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 }96 69 97 70 #endif 98
Note: See TracChangeset
for help on using the changeset viewer.