diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 13:54:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 13:54:38 +0000 |
commit | 8c1ab65c0f548d20b7f177bdb736daaf603340e1 (patch) | |
tree | df55b7e75bf43f2bf500845b105afe3ac3a5157e /libc-top-half/musl/src/thread/microblaze | |
parent | Initial commit. (diff) | |
download | wasi-libc-upstream/0.0_git20221206.8b7148f.tar.xz wasi-libc-upstream/0.0_git20221206.8b7148f.zip |
Adding upstream version 0.0~git20221206.8b7148f.upstream/0.0_git20221206.8b7148f
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libc-top-half/musl/src/thread/microblaze')
4 files changed, 72 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/thread/microblaze/__set_thread_area.s b/libc-top-half/musl/src/thread/microblaze/__set_thread_area.s new file mode 100644 index 0000000..9a226a9 --- /dev/null +++ b/libc-top-half/musl/src/thread/microblaze/__set_thread_area.s @@ -0,0 +1,7 @@ +.global __set_thread_area +.hidden __set_thread_area +.type __set_thread_area,@function +__set_thread_area: + ori r21, r5, 0 + rtsd r15, 8 + ori r3, r0, 0 diff --git a/libc-top-half/musl/src/thread/microblaze/__unmapself.s b/libc-top-half/musl/src/thread/microblaze/__unmapself.s new file mode 100644 index 0000000..b180de6 --- /dev/null +++ b/libc-top-half/musl/src/thread/microblaze/__unmapself.s @@ -0,0 +1,8 @@ +.global __unmapself +.type __unmapself,@function +__unmapself: + ori r12, r0, 91 + brki r14, 0x8 + ori r12, r0, 1 + brki r14, 0x8 + nop diff --git a/libc-top-half/musl/src/thread/microblaze/clone.s b/libc-top-half/musl/src/thread/microblaze/clone.s new file mode 100644 index 0000000..b68cc5f --- /dev/null +++ b/libc-top-half/musl/src/thread/microblaze/clone.s @@ -0,0 +1,30 @@ +.global __clone +.hidden __clone +.type __clone,@function + +# r5, r6, r7, r8, r9, r10, stack +# fn, st, fl, ar, pt, tl, ct +# fl, st, __, pt, ct, tl + +__clone: + andi r6, r6, -16 + addi r6, r6, -16 + swi r5, r6, 0 + swi r8, r6, 4 + + ori r5, r7, 0 + ori r8, r9, 0 + lwi r9, r1, 28 + ori r12, r0, 120 + + brki r14, 8 + beqi r3, 1f + rtsd r15, 8 + nop + +1: lwi r3, r1, 0 + lwi r5, r1, 4 + brald r15, r3 + nop + ori r12, r0, 1 + brki r14, 8 diff --git a/libc-top-half/musl/src/thread/microblaze/syscall_cp.s b/libc-top-half/musl/src/thread/microblaze/syscall_cp.s new file mode 100644 index 0000000..b0df61c --- /dev/null +++ b/libc-top-half/musl/src/thread/microblaze/syscall_cp.s @@ -0,0 +1,27 @@ +.global __cp_begin +.hidden __cp_begin +.global __cp_end +.hidden __cp_end +.global __cp_cancel +.hidden __cp_cancel +.hidden __cancel +.global __syscall_cp_asm +.hidden __syscall_cp_asm +.type __syscall_cp_asm,@function +__syscall_cp_asm: +__cp_begin: + lwi r5, r5, 0 + bnei r5, __cp_cancel + addi r12, r6, 0 + add r5, r7, r0 + add r6, r8, r0 + add r7, r9, r0 + add r8, r10, r0 + lwi r9, r1, 28 + lwi r10, r1, 32 + brki r14, 0x8 +__cp_end: + rtsd r15, 8 + nop +__cp_cancel: + bri __cancel |