Changeset 3fcea34 in mainline for uspace/lib/c/arch/ia64
- 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/ia64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia64/include/libarch/thread.h
r2cf8f994 r3fcea34 36 36 #define _LIBC_ia64_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 / 2, 16)); 44 45 /* Store data under stack pointer */ 46 sp[-1] = (uintptr_t) arg; 47 sp[-2] = (uintptr_t) main; 48 49 return (uintptr_t) sp; 50 } 51 38 52 #endif 39 53 -
uspace/lib/c/arch/ia64/src/thread_entry.S
r2cf8f994 r3fcea34 37 37 alloc loc0 = ar.pfs, 0, 1, 1, 0 38 38 39 #ifndef CONFIG_RTLD 40 # XXX This does not work in a shared library 41 movl gp = __gp 42 #endif 39 add r8 = -8, sp ;; 40 # Entry function argument 41 ld8 out0 = [r8], -8 ;; 43 42 44 # 45 # r8 contains address of uarg structure. 46 # 43 # Entry function descriptor 44 ld8 r8 = [r8] ;; 45 # Entry function address 46 ld8 r9 = [r8], 8 ;; 47 # Entry function global pointer 48 ld8 gp = [r8] ;; 47 49 48 mov out0 = r8;;49 # XXX br.call.sptk.many b0 = FUNCTION_REF(__thread_main) 50 br.call.sptk.many b0 = __thread_main50 mov b1 = r9 ;; 51 52 br.call.sptk.many b0 = b1 ;; 51 53 52 54 #
Note:
See TracChangeset
for help on using the changeset viewer.