summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/libfemto/std/memcpy.c
blob: 69209e71518625d212740ab7ef2e2942ccd422e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// See LICENSE for license details.

#include <stddef.h>

void *memcpy(void *dest, const void *src, size_t n)
{
    char *p = dest;
    while (n-- > 0) {
        *(char*)dest++ = *(char*)src++;
    }
    return p;
}