diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-12 13:24:44 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-12 13:52:55 -0700 |
commit | cdf874d51e868e6c8a5632ce062f1096c8ca39ec (patch) | |
tree | cf8619638a990257fe5cf8bafffbbfa5e9889847 | |
parent | c06ecf0ffa1988fb7c831099a636cd06796aeac7 (diff) |
stack.c.gen: Fill in some TODO synthetic nodes
-rwxr-xr-x | build-aux/stack.c.gen | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/build-aux/stack.c.gen b/build-aux/stack.c.gen index 73f928d..cde6a1e 100755 --- a/build-aux/stack.c.gen +++ b/build-aux/stack.c.gen @@ -721,35 +721,49 @@ def main( # newlib ######################################################### if arg_pico_platform == "rp2040": + # This is accurate to + # /usr/arm-none-eabi/lib/thumb/v6-m/nofp/libg.a as of + # Parabola's arm-none-eabi-newlib 4.5.0.20241231-1. all_nodes += [ # malloc - synthetic_node("free", 0), # TODO - synthetic_node("malloc", 0), # TODO - synthetic_node("realloc", 0), # TODO - synthetic_node("aligned_alloc", 0), # TODO - synthetic_node("reallocarray", 0), # TODO + synthetic_node("free", 8, {"_free_r"}), + synthetic_node("malloc", 8, {"_malloc_r"}), + synthetic_node("realloc", 8, {"_realloc_r"}), + synthetic_node("aligned_alloc", 8, {"_memalign_r"}), + synthetic_node("reallocarray", 24, {"realloc", "__errno"}), + synthetic_node("_free_r", 0), # TODO + synthetic_node("_malloc_r", 0), # TODO + synthetic_node("_realloc_r", 0), # TODO + synthetic_node("_memalign_r", 0), # TODO # execution - synthetic_node("abort", 0), # TODO - synthetic_node("longjmp", 0), # TODO - synthetic_node("setjmp", 0), # TODO + synthetic_node("raise", 16, {"_getpid_r"}), + synthetic_node("abort", 8, {"raise", "_exit"}), + synthetic_node("longjmp", 0), + synthetic_node("setjmp", 0), # <strings.h> - synthetic_node("memcmp", 0), # TODO - synthetic_node("memcpy", 0), # TODO - synthetic_node("memset", 0), # TODO - synthetic_node("strcmp", 0), # TODO - synthetic_node("strlen", 0), # TODO - synthetic_node("strncpy", 0), # TODO - synthetic_node("strnlen", 0), # TODO + synthetic_node("memcmp", 12), + synthetic_node("memcpy", 28), + synthetic_node("memset", 20), + synthetic_node("strcmp", 16), + synthetic_node("strlen", 8), + synthetic_node("strncpy", 16), + synthetic_node("strnlen", 8), # other - synthetic_node("random", 0), # TODO + synthetic_node("__errno", 0), + synthetic_node("_getpid_r", 8, {"_getpid"}), + synthetic_node("random", 8), ] # libgcc ######################################################### if arg_pico_platform == "rp2040": + # This is accurate to + # /usr/lib/gcc/arm-none-eabi/14.2.0/thumb/v6-m/nofp/libgcc.a + # as of Parabola's arm-none-eabi-gcc 14.2.0-1. all_nodes += [ - synthetic_node("__aeabi_idiv0", 0), # TODO - synthetic_node("__aeabi_ldiv0", 0), # TODO + synthetic_node("__aeabi_idiv0", 0), + synthetic_node("__aeabi_ldiv0", 0), + synthetic_node("__aeabi_llsr", 0), ] # Tie it all together ############################################ |