user: implement mlibc as the libc, finally.

It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
kaguya
2026-05-02 03:31:49 -04:00
parent 2fa39ad85a
commit 9a9b91c940
2387 changed files with 152741 additions and 315 deletions
@@ -0,0 +1,24 @@
.section .text
.global __mlibc_spawn_thread
.type __mlibc_spawn_thread, "function"
/* int (int flags, void *stack, void *pid_out, void *child_tid, void *tcb); */
__mlibc_spawn_thread:
movem.l %d2-%d5, -(%sp)
move.l #120, %d0
movem.l 20(%sp), %d1-%d5
addi.l #0x7048, %d5
trap #0
tst.l %d0
beq 1f
movem.l (%sp)+, %d2-%d5
rts
1:
jbsr __mlibc_enter_thread@PLTPC
illegal
.section .note.GNU-stack,"",%progbits