summaryrefslogtreecommitdiff
path: root/package/aboot/src/lib/memcpy.c
blob: 38fd642ab61fa07adbb41e570b360b5f09c6e0cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 *  aboot/lib/memcpy.c
 *
 *  Copyright (c) 1995  David Mosberger (davidm@cs.arizona.edu)
 */
#include <linux/types.h>
#include <stddef.h>

/*
 * Booting is I/O bound so rather than a time-optimized, we want
 * a space-optimized memcpy.  Not that the rest of the loader
 * were particularly small, though...
 */
void *__memcpy(void *dest, const void *source, size_t n)
{
	char *dst = dest;
	const char *src = source;

	while (n--) {
		*dst++ = *src++;
	}
	return dest;
}