mirror of
git://git.musl-libc.org/musl
synced 2024-12-14 10:45:54 +00:00
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.
This commit is contained in:
parent
d18cf76d73
commit
d8be1bc019
9
arch/arm/src/__aeabi_memclr.c
Normal file
9
arch/arm/src/__aeabi_memclr.c
Normal file
@ -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);
|
9
arch/arm/src/__aeabi_memcpy.c
Normal file
9
arch/arm/src/__aeabi_memcpy.c
Normal file
@ -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);
|
9
arch/arm/src/__aeabi_memmove.c
Normal file
9
arch/arm/src/__aeabi_memmove.c
Normal file
@ -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);
|
9
arch/arm/src/__aeabi_memset.c
Normal file
9
arch/arm/src/__aeabi_memset.c
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user