diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-09-29 04:31:51 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-09-29 04:31:51 +0200 |
commit | 533a9e57de8cb74594499f625810ad812359d3fb (patch) | |
tree | 8e8eed62ab86416170b4c9716b36bae736d6b3a8 /lib/arch/arm64/thread_create.s | |
parent | 48142327c37f716da307bd4a9b22576ad0a67c22 (diff) | |
download | matcha-threads-533a9e57de8cb74594499f625810ad812359d3fb.tar.gz matcha-threads-533a9e57de8cb74594499f625810ad812359d3fb.zip |
added basic arm64 support
Diffstat (limited to 'lib/arch/arm64/thread_create.s')
-rw-r--r-- | lib/arch/arm64/thread_create.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/arch/arm64/thread_create.s b/lib/arch/arm64/thread_create.s new file mode 100644 index 0000000..dc6fae2 --- /dev/null +++ b/lib/arch/arm64/thread_create.s @@ -0,0 +1,20 @@ +# Copyright (c) 2020 Johannes Stoelp + + .arch armv8-a + .section .text, "ax", @progbits + + # extern "C" void thread_create(); + .global thread_create + .type thread_create, @function +thread_create: + .cfi_startproc + ldr x0, [sp, 0x8] + ldr x1, [sp] + + blr x1 + + # FIXME: no return from thread after user fn finished. +1: + b 1b + .cfi_endproc + .size thread_create, .-thread_create |