Changeset 3fcea34 in mainline for uspace/lib/c/arch/arm64
- Timestamp:
- 2024-09-20T12:16:28Z (10 months ago)
- Branches:
- master
- Children:
- d3109ff
- Parents:
- 2cf8f994
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-09-20 11:42:13)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-09-20 12:16:28)
- Location:
- uspace/lib/c/arch/arm64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/arm64/include/libarch/thread.h
r2cf8f994 r3fcea34 36 36 #define _LIBC_arm64_THREAD_H_ 37 37 38 #include <align.h> 39 40 static inline uintptr_t arch_thread_prepare(void *stack, size_t stack_size, 41 void (*main)(void *), void *arg) 42 { 43 uintptr_t *sp = (uintptr_t *) ALIGN_DOWN((uintptr_t) stack + stack_size, 16); 44 45 *--sp = (uintptr_t) arg; 46 *--sp = (uintptr_t) main; 47 48 return (uintptr_t) sp; 49 } 50 38 51 #endif 39 52 -
uspace/lib/c/arch/arm64/src/thread_entry.S
r2cf8f994 r3fcea34 35 35 # 36 36 SYMBOL(__thread_entry) 37 # 37 # Load entry function and argument from stack. 38 ldp x1, x0, [sp], #16 39 38 40 # Create the first stack frame. 39 #40 41 mov x29, #0 41 42 stp x29, x30, [sp, #-16]! 42 43 mov x29, sp 43 44 44 b __thread_main45 br x1
Note:
See TracChangeset
for help on using the changeset viewer.