diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-08-30 18:58:26 +0300 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-08-31 06:35:01 +0000 |
commit | d8be1bc0193f45d3900f8466f26d1411b7f919c3 (patch) | |
tree | 41385dc00baf7bf6b1516e35d089f0ac43648dcc /arch/arm | |
parent | d18cf76d73df8f9cc751d4b4ba5a635c70c0c645 (diff) | |
download | musl-d8be1bc0193f45d3900f8466f26d1411b7f919c3.tar.gz musl-d8be1bc0193f45d3900f8466f26d1411b7f919c3.tar.bz2 musl-d8be1bc0193f45d3900f8466f26d1411b7f919c3.tar.xz musl-d8be1bc0193f45d3900f8466f26d1411b7f919c3.zip |
implement arm eabi mem* functions
these functions are part of the ARM EABI, meaning compilers may
generate references to them. known versions of gcc do not use them,
but llvm does. they are not provided by libgcc, and the de facto
standard seems to be that libc provides them.
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/src/__aeabi_memclr.c | 9 | ||||
-rw-r--r-- | arch/arm/src/__aeabi_memcpy.c | 9 | ||||
-rw-r--r-- | arch/arm/src/__aeabi_memmove.c | 9 | ||||
-rw-r--r-- | arch/arm/src/__aeabi_memset.c | 9 |
4 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/src/__aeabi_memclr.c b/arch/arm/src/__aeabi_memclr.c new file mode 100644 index 00000000..a25306d7 --- /dev/null +++ b/arch/arm/src/__aeabi_memclr.c @@ -0,0 +1,9 @@ +#include <string.h> +#include "libc.h" + +void __aeabi_memclr(void *dest, size_t n) +{ + memset(dest, 0, n); +} +weak_alias(__aeabi_memclr, __aeabi_memclr4); +weak_alias(__aeabi_memclr, __aeabi_memclr8); diff --git a/arch/arm/src/__aeabi_memcpy.c b/arch/arm/src/__aeabi_memcpy.c new file mode 100644 index 00000000..4ae5c777 --- /dev/null +++ b/arch/arm/src/__aeabi_memcpy.c @@ -0,0 +1,9 @@ +#include <string.h> +#include "libc.h" + +void __aeabi_memcpy(void *restrict dest, const void *restrict src, size_t n) +{ + memcpy(dest, src, n); +} +weak_alias(__aeabi_memcpy, __aeabi_memcpy4); +weak_alias(__aeabi_memcpy, __aeabi_memcpy8); diff --git a/arch/arm/src/__aeabi_memmove.c b/arch/arm/src/__aeabi_memmove.c new file mode 100644 index 00000000..951e7d39 --- /dev/null +++ b/arch/arm/src/__aeabi_memmove.c @@ -0,0 +1,9 @@ +#include <string.h> +#include "libc.h" + +void __aeabi_memmove(void *dest, const void *src, size_t n) +{ + memmove(dest, src, n); +} +weak_alias(__aeabi_memmove, __aeabi_memmove4); +weak_alias(__aeabi_memmove, __aeabi_memmove8); diff --git a/arch/arm/src/__aeabi_memset.c b/arch/arm/src/__aeabi_memset.c new file mode 100644 index 00000000..89299757 --- /dev/null +++ b/arch/arm/src/__aeabi_memset.c @@ -0,0 +1,9 @@ +#include <string.h> +#include "libc.h" + +void __aeabi_memset(void *dest, size_t n, int c) +{ + memset(dest, c, n); +} +weak_alias(__aeabi_memset, __aeabi_memset4); +weak_alias(__aeabi_memset, __aeabi_memset8); |