Changeset 271 for soft/giet_vm/giet_libs/stdio.c
- Timestamp:
- Jan 17, 2014, 11:49:27 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/stdio.c
r267 r271 13 13 #include <stdio.h> 14 14 #include <giet_config.h> 15 16 15 17 16 //////////////////////////////////////////////////////////////////////////////////// … … 823 822 } 824 823 } 825 ///////////////////////////////////////////////////////////////////////////////////826 // memcpy()827 ///////////////////////////////////////////////////////////////////////////////////828 inline void* memcpy( void* dest,829 const void* source,830 unsigned int size )831 {832 unsigned int* dst = dest;833 const unsigned int* src = source;834 835 // word-by-word copy836 if (!((unsigned int) dst & 3) && !((unsigned int) src & 3))837 {838 while (size > 3)839 {840 *dst++ = *src++;841 size -= 4;842 }843 }844 845 unsigned char * cdst = (unsigned char *) dst;846 unsigned char * csrc = (unsigned char *) src;847 848 /* byte-by-byte copy */849 while (size--)850 {851 *cdst++ = *csrc++;852 }853 return dest;854 }855 824 856 825 // Local Variables:
Note: See TracChangeset
for help on using the changeset viewer.