source: rtems/c/src/lib/libcpu/nios2/shared/misc/memcpy.c @ 1e2c611

4.104.114.84.9
Last change on this file since 1e2c611 was 1e2c611, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 9, 2006 at 9:01:16 PM

2006-08-09 Kolja Waschk <waschk@…>

  • nios2/Makefile.am, nios2/configure.ac, nios2/preinstall.am, nios2/shared/cache/cache.c, nios2/shared/cache/cache_.h, nios2/shared/misc/memcpy.c: New files.
  • Property mode set to 100644
File size: 403 bytes
Line 
1/*
2 *  C library memcpy routine
3 *
4 *  This routine shall get code to optimize performance on NIOS II
5 *
6 *  The routine is placed in this source directory to ensure that it
7 *  is picked up by all applications.
8 */
9
10#include <string.h>
11
12void *
13memcpy(void *s1, const void *s2, size_t n)
14{
15        char *p1 = s1;
16        const char *p2 = s2;
17    size_t left = n;
18
19    while(left > 0) *(p1++) = *(p2++);
20        return s1;
21}
Note: See TracBrowser for help on using the repository browser.