OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [memmove.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Public domain.  */
2
#include <stddef.h>
3
 
4
void *
5
memmove (void *dest, const void *src, size_t len)
6
{
7
  char *d = dest;
8
  const char *s = src;
9
  if (d < s)
10
    while (len--)
11
      *d++ = *s++;
12
  else
13
    {
14
      char *lasts = s + (len-1);
15
      char *lastd = d + (len-1);
16
      while (len--)
17
        *lastd-- = *lasts--;
18
    }
19
  return dest;
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.