mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[liba] Add aeabi-memclr4
Change-Id: I9ce3282773e2d1ada2f731e5c5c7ee07e7706612
This commit is contained in:
@@ -7,4 +7,7 @@ tests += $(addprefix liba/test/, stdint.c)
|
||||
|
||||
# The use of aeabi-rt could be made conditional to an AEABI target.
|
||||
# In practice we're always using liba on such a target.
|
||||
objs += $(addprefix liba/src/aeabi-rt/, memcpy.o)
|
||||
objs += $(addprefix liba/src/aeabi-rt/, \
|
||||
memclr.o \
|
||||
memcpy.o \
|
||||
)
|
||||
|
||||
@@ -9,6 +9,7 @@ memory copying/clearing/setting, etc...
|
||||
Since we're telling our compiler to build an AEABI binary, it may decide to use
|
||||
those symbols, and so we have to provide an implementation for them. Refer to
|
||||
the "Run-time ABI for the ARM Architecture" for a full list of functions.
|
||||
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf
|
||||
|
||||
Note that this is not formally the job of a libc implementation. Similar code is
|
||||
often shipped alongside a compiler (LLVM calls it compiler-rt, GCC libgcc). But
|
||||
|
||||
8
liba/src/aeabi-rt/memclr.c
Normal file
8
liba/src/aeabi-rt/memclr.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
/* See the "Run-time ABI for the ARM Architecture", Section 4.3.3 */
|
||||
|
||||
void __aeabi_memclr4(void * dest, size_t n) {
|
||||
memset(dest, 0, n);
|
||||
}
|
||||
Reference in New Issue
Block a user