Changeset 32573ff in mainline for uspace/lib/c/arch
- Timestamp:
- 2016-05-02T20:58:16Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c4b26c
- Parents:
- 6adb775f (diff), 5035ba05 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch
- Files:
-
- 29 edited
- 15 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/amd64/Makefile.common
r6adb775f r32573ff 27 27 # 28 28 29 GCC_CFLAGS += - fno-omit-frame-pointer29 GCC_CFLAGS += -mno-tls-direct-seg-refs -fno-omit-frame-pointer 30 30 CLANG_CFLAGS += -fno-omit-frame-pointer 31 31 -
uspace/lib/c/arch/amd64/include/libarch/tls.h
r6adb775f r32573ff 47 47 static inline void __tcb_set(tcb_t *tcb) 48 48 { 49 __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);49 asm volatile ("movq %0, %%fs:0" :: "r" (tcb)); 50 50 } 51 51 52 static inline tcb_t * 52 static inline tcb_t *__tcb_get(void) 53 53 { 54 void * 54 void *retval; 55 55 56 asm ("movq %%fs:0, %0" : "=r"(retval));56 asm volatile ("movq %%fs:0, %0" : "=r" (retval)); 57 57 return retval; 58 58 } -
uspace/lib/c/arch/amd64/src/fibril.S
r6adb775f r32573ff 51 51 movq %r15, CONTEXT_OFFSET_R15(%rdi) 52 52 53 # save TLS54 53 movq %fs:0, %rax 55 54 movq %rax, CONTEXT_OFFSET_TLS(%rdi) … … 79 78 movq %rdx,(%rsp) 80 79 81 # Set thread local storage 82 movq CONTEXT_OFFSET_TLS(%rdi), %rdi # Set arg1 to TLS addr 83 movl $1, %eax # SYS_TLS_SET 84 syscall 80 movq CONTEXT_OFFSET_TLS(%rdi), %rdi 81 movq %rdi, %fs:0 85 82 86 83 xorl %eax, %eax # context_restore returns 0 -
uspace/lib/c/arch/arm32/Makefile.inc
r6adb775f r32573ff 29 29 30 30 ARCH_SOURCES = \ 31 arch/$(UARCH)/src/entry. s\32 arch/$(UARCH)/src/entryjmp. s\33 arch/$(UARCH)/src/thread_entry. s\31 arch/$(UARCH)/src/entry.S \ 32 arch/$(UARCH)/src/entryjmp.S \ 33 arch/$(UARCH)/src/thread_entry.S \ 34 34 arch/$(UARCH)/src/syscall.c \ 35 35 arch/$(UARCH)/src/fibril.S \ -
uspace/lib/c/arch/arm32/src/eabi.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global __aeabi_read_tp 32 33 .global __aeabi_idiv 34 .global __aeabi_uidiv 35 36 .global __aeabi_idivmod 37 .global __aeabi_uidivmod 38 39 .global __aeabi_ldivmod 40 .global __aeabi_uldivmod 41 42 __aeabi_read_tp: 33 FUNCTION_BEGIN(__aeabi_read_tp) 43 34 mov r0, r9 44 35 mov pc, lr 36 FUNCTION_END(__aeabi_read_tp) 45 37 46 __aeabi_idiv: 38 FUNCTION_BEGIN(__aeabi_idiv) 47 39 push {lr} 48 40 bl __divsi3 49 41 pop {lr} 50 42 mov pc, lr 43 FUNCTION_END(__aeabi_idiv) 51 44 52 __aeabi_uidiv: 45 FUNCTION_BEGIN(__aeabi_uidiv) 53 46 push {lr} 54 47 bl __udivsi3 55 48 pop {lr} 56 49 mov pc, lr 50 FUNCTION_END(__aeabi_uidiv) 57 51 58 __aeabi_idivmod: 52 FUNCTION_BEGIN(__aeabi_idivmod) 59 53 push {lr} 60 54 sub sp, sp, #12 … … 65 59 pop {lr} 66 60 mov pc, lr 61 FUNCTION_END(__aeabi_idivmod) 67 62 68 __aeabi_uidivmod: 63 FUNCTION_BEGIN(__aeabi_uidivmod) 69 64 push {lr} 70 65 sub sp, sp, #12 … … 75 70 pop {lr} 76 71 mov pc, lr 72 FUNCTION_END(__aeabi_uidivmod) 77 73 78 __aeabi_ldivmod: 74 FUNCTION_BEGIN(__aeabi_ldivmod) 79 75 push {lr} 80 76 sub sp, sp, #24 … … 86 82 pop {lr} 87 83 mov pc, lr 84 FUNCTION_END(__aeabi_ldivmod) 88 85 89 __aeabi_uldivmod: 86 FUNCTION_BEGIN(__aeabi_uldivmod) 90 87 push {lr} 91 88 sub sp, sp, #24 … … 97 94 pop {lr} 98 95 mov pc, lr 96 FUNCTION_END(__aeabi_uldivmod) 97 -
uspace/lib/c/arch/arm32/src/entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .section .init, "ax" 30 32 31 33 .org 0 32 33 .global __entry34 34 35 35 ## User-space task entry point … … 38 38 # r2 contains the RAS page address 39 39 # 40 __entry: 40 SYMBOL(__entry) 41 41 # Store the RAS page address into the ras_page variable 42 42 ldr r0, =ras_page … … 57 57 .data 58 58 59 .global ras_page 60 ras_page: 59 SYMBOL(ras_page) 61 60 .long 0 -
uspace/lib/c/arch/arm32/src/entryjmp.S
r6adb775f r32573ff 27 27 # 28 28 29 .globl entry_point_jmp 29 #include <abi/asmtool.h> 30 30 31 31 ## void entry_point_jmp(void *entry_point, void *pcb); … … 35 35 # 36 36 # Jump to program entry point 37 entry_point_jmp: 37 SYMBOL(entry_point_jmp) 38 38 # load ras_page address to r2 39 39 ldr r2, =ras_page -
uspace/lib/c/arch/arm32/src/fibril.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global context_save 32 .global context_restore 33 34 context_save: 33 FUNCTION_BEGIN(context_save) 35 34 stmia r0!, {sp, lr} 36 35 stmia r0!, {r4-r11} … … 39 38 mov r0, #1 40 39 mov pc, lr 40 FUNCTION_END(context_save) 41 41 42 context_restore: 42 FUNCTION_BEGIN(context_restore) 43 43 ldmia r0!, {sp, lr} 44 44 ldmia r0!, {r4-r11} … … 47 47 mov r0, #0 48 48 mov pc, lr 49 FUNCTION_END(context_restore) 49 50 -
uspace/lib/c/arch/arm32/src/stacktrace_asm.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global stacktrace_prepare 32 .global stacktrace_fp_get 33 .global stacktrace_pc_get 33 FUNCTION_BEGIN(stacktrace_prepare) 34 mov pc, lr 35 FUNCTION_END(stacktrace_prepare) 34 36 35 stacktrace_prepare: 36 mov pc, lr 37 38 stacktrace_fp_get: 37 FUNCTION_BEGIN(stacktrace_fp_get) 39 38 mov r0, fp 40 39 mov pc, lr 40 FUNCTION_END(stacktrace_fp_get) 41 41 42 stacktrace_pc_get: 42 FUNCTION_BEGIN(stacktrace_pc_get) 43 43 mov r0, lr 44 44 mov pc, lr 45 FUNCTION_END(stacktrace_pc_get) 46 -
uspace/lib/c/arch/arm32/src/thread_entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 31 .global __thread_entry32 32 33 33 ## User-space thread entry point for all but the first threads. 34 34 # 35 35 # 36 __thread_entry: 36 SYMBOL(__thread_entry) 37 37 # 38 38 # Create the first stack frame. -
uspace/lib/c/arch/ia32/Makefile.common
r6adb775f r32573ff 28 28 29 29 ifeq ($(PROCESSOR),i486) 30 GCC_CFLAGS += -march=i486 - fno-omit-frame-pointer30 GCC_CFLAGS += -march=i486 -mno-tls-direct-seg-refs -fno-omit-frame-pointer 31 31 else 32 GCC_CFLAGS += -march=pentium - fno-omit-frame-pointer32 GCC_CFLAGS += -march=pentium -mno-tls-direct-seg-refs -fno-omit-frame-pointer 33 33 endif 34 34 -
uspace/lib/c/arch/ia32/include/libarch/tls.h
r6adb775f r32573ff 47 47 static inline void __tcb_set(tcb_t *tcb) 48 48 { 49 __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);49 asm volatile ("movl %0, %%gs:0" :: "r" (tcb)); 50 50 } 51 51 … … 54 54 void *retval; 55 55 56 asm ( 57 "movl %%gs:0, %0" 58 : "=r" (retval) 59 ); 56 asm volatile ("movl %%gs:0, %0" : "=r" (retval)); 60 57 61 58 return retval; -
uspace/lib/c/arch/ia32/src/fibril.S
r6adb775f r32573ff 77 77 78 78 # set thread local storage 79 pushl %edx80 79 movl CONTEXT_OFFSET_TLS(%eax), %edx # Set arg1 to TLS addr 81 movl $1, %eax # Syscall SYS_TLS_SET 82 int $0x30 83 popl %edx 80 movl %edx, %gs:0 84 81 85 82 xorl %eax, %eax # context_restore returns 0 -
uspace/lib/c/arch/ia32/src/rtld/reloc.c
r6adb775f r32573ff 144 144 145 145 sym_def = symbol_def_find(str_tab + sym->st_name, 146 m, ssf_no root, &dest);146 m, ssf_noexec, &dest); 147 147 148 148 if (sym_def) { -
uspace/lib/c/arch/ia64/Makefile.inc
r6adb775f r32573ff 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry. s\31 arch/$(UARCH)/src/entryjmp. s\32 arch/$(UARCH)/src/thread_entry. s\30 arch/$(UARCH)/src/entry.S \ 31 arch/$(UARCH)/src/entryjmp.S \ 32 arch/$(UARCH)/src/thread_entry.S \ 33 33 arch/$(UARCH)/src/syscall.S \ 34 34 arch/$(UARCH)/src/fibril.S \ -
uspace/lib/c/arch/ia64/src/entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .section .init, "ax" 30 32 31 33 .org 0 32 33 .globl __entry34 34 35 35 ## User-space task entry point … … 37 37 # r2 contains the PCB pointer 38 38 # 39 __entry: 39 SYMBOL(__entry) 40 40 alloc loc0 = ar.pfs, 0, 1, 2, 0 41 41 movl gp = __gp … … 44 44 mov out0 = r2 45 45 br.call.sptk.many b0 = __main 46 -
uspace/lib/c/arch/ia64/src/entryjmp.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 .explicit 31 .globl entry_point_jmp32 33 33 34 ## void entry_point_jmp(void *entry_point, void *pcb); … … 37 38 # 38 39 # Jump to program entry point 39 entry_point_jmp: 40 SYMBOL(entry_point_jmp) 40 41 # Pass pcb to the entry point in r2 41 42 -
uspace/lib/c/arch/ia64/src/fibril.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/fibril_context.h> 30 31 31 32 .text 32 33 33 .global context_save 34 .global context_restore 35 36 context_save: 34 FUNCTION_BEGIN(context_save) 37 35 alloc loc0 = ar.pfs, 1, 49, 0, 0 38 36 mov loc1 = ar.unat ;; … … 182 180 add r8 = r0, r0, 1 /* context_save returns 1 */ 183 181 br.ret.sptk.many b0 184 185 context_restore: 182 FUNCTION_END(context_save) 183 184 FUNCTION_BEGIN(context_restore) 186 185 alloc loc0 = ar.pfs, 1, 50, 0, 0 ;; 187 186 … … 338 337 mov r8 = r0 /* context_restore returns 0 */ 339 338 br.ret.sptk.many b0 339 FUNCTION_END(context_restore) 340 -
uspace/lib/c/arch/ia64/src/stacktrace_asm.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global stacktrace_prepare 32 .global stacktrace_fp_get 33 .global stacktrace_pc_get 33 FUNCTION_BEGIN(stacktrace_prepare) 34 br.ret.sptk.many b0 35 FUNCTION_END(stacktrace_prepare) 34 36 35 stacktrace_prepare: 36 br.ret.sptk.many b0 37 38 stacktrace_fp_get: 39 stacktrace_pc_get: 37 FUNCTION_BEGIN(stacktrace_fp_get) 38 FUNCTION_BEGIN(stacktrace_pc_get) 40 39 mov r8 = r0 41 40 br.ret.sptk.many b0 41 FUNCTION_END(stacktrace_fp_get) 42 FUNCTION_END(stacktrace_pc_get) 43 -
uspace/lib/c/arch/ia64/src/syscall.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 /** 30 32 * Immediate operand for break instruction. … … 37 39 #define SYSCALL_IMM 1 38 40 39 .global __syscall 40 __syscall: 41 FUNCTION_BEGIN(__syscall) 41 42 alloc r14 = ar.pfs, 7, 0, 0, 0 ;; 42 43 break SYSCALL_IMM 43 44 mov ar.pfs = r14 ;; 44 45 br.ret.sptk.many b0 46 FUNCTION_END(__syscall) 47 -
uspace/lib/c/arch/ia64/src/thread_entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 31 .globl __thread_entry32 32 33 33 ## User-space thread entry point for all but the first threads. 34 34 # 35 35 # 36 __thread_entry: 36 SYMBOL(__thread_entry) 37 37 alloc loc0 = ar.pfs, 0, 1, 1, 0 38 38 … … 49 49 # Not reached. 50 50 # 51 52 .end __thread_entry 51 -
uspace/lib/c/arch/mips32/src/entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 .section .init, "ax" 33 34 .global __entry35 34 36 35 .set noreorder … … 41 40 # $a0 ($4) contains the PCB pointer 42 41 # 43 .ent __entry 44 __entry: 42 FUNCTION_BEGIN(__entry) 43 .ent __entry 45 44 .frame $sp, ABI_STACK_FRAME, $ra 46 45 .cpload $t9 … … 63 62 # 64 63 addiu $sp, ABI_STACK_FRAME 65 .end __entry 64 FUNCTION_END(__entry) -
uspace/lib/c/arch/mips32/src/entryjmp.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 .section .text 33 .global entry_point_jmp34 34 .set noreorder 35 35 … … 40 40 # 41 41 # Jump to program entry point 42 .ent entry_point_jmp 43 entry_point_jmp: 42 FUNCTION_BEGIN(entry_point_jmp) 44 43 # tmp := entry_point 45 44 move $t9, $a0 … … 51 50 addiu $sp, -ABI_STACK_FRAME 52 51 addiu $sp, ABI_STACK_FRAME 53 .end entry_point_jmp 52 FUNCTION_END(entry_point_jmp) 53 -
uspace/lib/c/arch/mips32/src/fibril.S
r6adb775f r32573ff 32 32 .set noreorder 33 33 34 #include <abi/asmtool.h> 34 35 #include <libarch/fibril_context.h> 35 36 36 .global context_save 37 .global context_restore 38 39 context_save: 37 FUNCTION_BEGIN(context_save) 40 38 sw $s0, CONTEXT_OFFSET_S0($a0) 41 39 sw $s1, CONTEXT_OFFSET_S1($a0) … … 92 90 j $ra 93 91 li $v0, 1 92 FUNCTION_END(context_save) 94 93 95 context_restore: 94 FUNCTION_BEGIN(context_restore) 96 95 lw $s0, CONTEXT_OFFSET_S0($a0) 97 96 lw $s1, CONTEXT_OFFSET_S1($a0) … … 151 150 j $ra 152 151 xor $v0, $v0 152 FUNCTION_END(context_restore) -
uspace/lib/c/arch/mips32/src/stacktrace_asm.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 … … 32 34 .set noreorder 33 35 34 .global stacktrace_prepare 35 .global stacktrace_fp_get 36 .global stacktrace_pc_get 37 38 stacktrace_prepare: 39 stacktrace_fp_get: 40 stacktrace_pc_get: 36 FUNCTION_BEGIN(stacktrace_prepare) 37 FUNCTION_BEGIN(stacktrace_fp_get) 38 FUNCTION_BEGIN(stacktrace_pc_get) 41 39 j $ra 42 40 xor $v0, $v0 41 FUNCTION_END(stacktrace_prepare) 42 FUNCTION_END(stacktrace_fp_get) 43 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/mips32/src/thread_entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 … … 35 36 .option pic2 36 37 37 .globl __thread_entry38 39 38 ## User-space thread entry point for all but the first threads. 40 39 # 41 40 # 42 .ent __thread_entry 43 __thread_entry: 41 SYMBOL(__thread_entry) 42 .ent __thread_entry 44 43 .frame $sp, ABI_STACK_FRAME, $ra 45 44 .cpload $t9 … … 63 62 # 64 63 addiu $sp, ABI_STACK_FRAME 65 .end __thread_entry -
uspace/lib/c/arch/ppc32/Makefile.inc
r6adb775f r32573ff 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry. s\31 arch/$(UARCH)/src/entryjmp. s\32 arch/$(UARCH)/src/thread_entry. s\30 arch/$(UARCH)/src/entry.S \ 31 arch/$(UARCH)/src/entryjmp.S \ 32 arch/$(UARCH)/src/thread_entry.S \ 33 33 arch/$(UARCH)/src/syscall.c \ 34 34 arch/$(UARCH)/src/fibril.S \ -
uspace/lib/c/arch/ppc32/src/entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .section .init, "ax" 30 32 31 33 .org 0 32 33 .globl __entry34 34 35 35 ## User-space task entry point … … 37 37 # r6 contains the PCB pointer 38 38 # 39 __entry: 39 SYMBOL(__entry) 40 40 # 41 41 # Create the first stack frame. -
uspace/lib/c/arch/ppc32/src/entryjmp.S
r6adb775f r32573ff 27 27 # 28 28 29 .globl entry_point_jmp 29 #include <abi/asmtool.h> 30 30 31 31 ## void entry_point_jmp(void *entry_point, void *pcb); … … 35 35 # 36 36 # Jump to program entry point 37 entry_point_jmp: 37 FUNCTION_BEGIN(entry_point_jmp) 38 38 mtctr %r3 39 39 mr %r6, %r4 # Pass pcb to the entry point in %r6 40 40 bctr 41 FUNCTION_END(entry_point_jmp) -
uspace/lib/c/arch/ppc32/src/fibril.S
r6adb775f r32573ff 29 29 .text 30 30 31 .global context_save 32 .global context_restore 33 31 #include <abi/asmtool.h> 34 32 #include <libarch/regname.h> 35 33 #include <libarch/fibril_context.h> 36 34 37 context_save: 35 FUNCTION_BEGIN(context_save) 38 36 stw sp, CONTEXT_OFFSET_SP(r3) 39 37 stw r2, CONTEXT_OFFSET_TLS(r3) … … 67 65 li r3, 1 68 66 blr 67 FUNCTION_END(context_save) 69 68 70 71 context_restore: 69 FUNCTION_BEGIN(context_restore) 72 70 lwz sp, CONTEXT_OFFSET_SP(r3) 73 71 lwz r2, CONTEXT_OFFSET_TLS(r3) … … 101 99 li r3, 0 102 100 blr 101 FUNCTION_END(context_restore) -
uspace/lib/c/arch/ppc32/src/stacktrace_asm.S
r6adb775f r32573ff 29 29 .text 30 30 31 #include <abi/asmtool.h> 31 32 #include <libarch/regname.h> 32 33 33 .global stacktrace_prepare 34 .global stacktrace_fp_get 35 .global stacktrace_pc_get 34 FUNCTION_BEGIN(stacktrace_prepare) 35 blr 36 FUNCTION_END(stacktrace_prepare) 36 37 37 stacktrace_prepare: 38 blr 39 40 stacktrace_fp_get: 38 FUNCTION_BEGIN(stacktrace_fp_get) 41 39 mr r3, sp 42 40 blr 41 FUNCTION_END(stacktrace_fp_get) 43 42 44 stacktrace_pc_get: 43 FUNCTION_BEGIN(stacktrace_pc_get) 45 44 mflr r3 46 45 blr 46 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/ppc32/src/thread_entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .globl __thread_entry32 33 33 ## User-space thread entry point for all but the first threads. 34 34 # 35 35 # 36 __thread_entry: 36 SYMBOL(__thread_entry) 37 37 # 38 38 # Create the first stack frame. … … 44 44 b __thread_main 45 45 46 .end __thread_entry -
uspace/lib/c/arch/sparc32/Makefile.inc
r6adb775f r32573ff 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry. s\31 arch/$(UARCH)/src/entryjmp. s\32 arch/$(UARCH)/src/thread_entry. s\30 arch/$(UARCH)/src/entry.S \ 31 arch/$(UARCH)/src/entryjmp.S \ 32 arch/$(UARCH)/src/thread_entry.S \ 33 33 arch/$(UARCH)/src/fibril.S \ 34 34 arch/$(UARCH)/src/tls.c \ -
uspace/lib/c/arch/sparc32/src/entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .section .init, "ax" 30 32 31 33 .org 0 32 33 .globl __entry34 34 35 35 ## User-space task entry point … … 38 38 # %o1 contains pcb_ptr 39 39 # 40 __entry: 40 SYMBOL(__entry) 41 41 # 42 42 # Create the first stack frame. -
uspace/lib/c/arch/sparc32/src/entryjmp.S
r6adb775f r32573ff 27 27 # 28 28 29 .globl entry_point_jmp 29 #include <abi/asmtool.h> 30 30 31 31 ## void entry_point_jmp(void *entry_point, void *pcb); … … 35 35 # 36 36 # Jump to program entry point 37 entry_point_jmp: 37 FUNCTION_BEGIN(entry_point_jmp) 38 38 # Pass pcb pointer to entry point in %o1. As it is already 39 39 # there, no action is needed. … … 41 41 nop 42 42 # FIXME: use branch instead of call 43 FUNCTION_END(entry_point_jmp) -
uspace/lib/c/arch/sparc32/src/fibril.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/context_offset.h> 30 31 31 32 .text 32 33 33 .global flush_windows 34 .global context_save 35 .global context_restore 36 37 context_save: 34 FUNCTION_BEGIN(context_save) 38 35 # 39 36 # We rely on the kernel to flush our active register windows to memory … … 56 53 retl 57 54 mov 1, %o0 ! context_save_arch returns 1 55 FUNCTION_END(context_save) 58 56 59 context_restore: 57 FUNCTION_BEGIN(context_restore) 60 58 # 61 59 # Flush all active windows. … … 84 82 retl 85 83 xor %o0, %o0, %o0 ! context_restore_arch returns 0 84 FUNCTION_END(context_restore) -
uspace/lib/c/arch/sparc32/src/stacktrace_asm.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 33 .global stacktrace_prepare 34 .global stacktrace_fp_get 35 .global stacktrace_pc_get 36 37 stacktrace_prepare: 34 FUNCTION_BEGIN(stacktrace_prepare) 38 35 save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp 39 36 … … 53 50 ret 54 51 restore 52 FUNCTION_END(stacktrace_prepare) 55 53 56 stacktrace_fp_get: 54 FUNCTION_BEGIN(stacktrace_fp_get) 57 55 # Add the stack bias to %sp to get the actual address. 58 56 retl 59 57 mov %sp, %o0 58 FUNCTION_END(stacktrace_fp_get) 60 59 61 stacktrace_pc_get: 60 FUNCTION_BEGIN(stacktrace_pc_get) 62 61 retl 63 62 mov %o7, %o0 63 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/sparc32/src/thread_entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 31 .globl __thread_entry32 32 33 33 ## User-space thread entry point for all but the first threads. 34 34 # 35 35 # 36 __thread_entry: 36 SYMBOL(__thread_entry) 37 37 # 38 38 # Create the first stack frame. … … 66 66 67 67 ! not reached 68 69 .end __thread_entry -
uspace/lib/c/arch/sparc64/Makefile.inc
r6adb775f r32573ff 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry. s\31 arch/$(UARCH)/src/entryjmp. s\32 arch/$(UARCH)/src/thread_entry. s\30 arch/$(UARCH)/src/entry.S \ 31 arch/$(UARCH)/src/entryjmp.S \ 32 arch/$(UARCH)/src/thread_entry.S \ 33 33 arch/$(UARCH)/src/fibril.S \ 34 34 arch/$(UARCH)/src/tls.c \ -
uspace/lib/c/arch/sparc64/src/entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .section .init, "ax" 30 32 31 33 .org 0 32 33 .globl __entry34 34 35 35 ## User-space task entry point … … 38 38 # %o1 contains pcb_ptr 39 39 # 40 __entry: 40 SYMBOL(__entry) 41 41 # 42 42 # Create the first stack frame. -
uspace/lib/c/arch/sparc64/src/entryjmp.S
r6adb775f r32573ff 27 27 # 28 28 29 .globl entry_point_jmp 29 #include <abi/asmtool.h> 30 30 31 31 ## void entry_point_jmp(void *entry_point, void *pcb); … … 35 35 # 36 36 # Jump to program entry point 37 entry_point_jmp: 37 SYMBOL(entry_point_jmp) 38 38 # Pass pcb pointer to entry point in %o1. As it is already 39 39 # there, no action is needed. -
uspace/lib/c/arch/sparc64/src/fibril.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/fibril_context.h> 30 31 31 32 .text 32 33 33 .global context_save 34 .global context_restore 35 36 context_save: 34 FUNCTION_BEGIN(context_save) 37 35 # 38 36 # We rely on the kernel to flush our active register windows to memory … … 60 58 retl 61 59 mov 1, %o0 ! context_save_arch returns 1 60 FUNCTION_END(context_save) 62 61 63 context_restore: 62 FUNCTION_BEGIN(context_restore) 64 63 # 65 64 # Flush all active windows. … … 91 90 retl 92 91 xor %o0, %o0, %o0 ! context_restore_arch returns 0 92 FUNCTION_END(context_restore) -
uspace/lib/c/arch/sparc64/src/stacktrace_asm.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/stack.h> 30 31 31 32 .text 32 33 33 .global stacktrace_prepare 34 .global stacktrace_fp_get 35 .global stacktrace_pc_get 36 37 stacktrace_prepare: 34 FUNCTION_BEGIN(stacktrace_prepare) 38 35 save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp 39 36 # Flush all other windows to memory so that we can read their contents. … … 41 38 ret 42 39 restore 40 FUNCTION_END(stacktrace_prepare) 43 41 44 stacktrace_fp_get: 42 FUNCTION_BEGIN(stacktrace_fp_get) 45 43 # Add the stack bias to %sp to get the actual address. 46 44 retl 47 45 add %sp, STACK_BIAS, %o0 46 FUNCTION_END(stacktrace_fp_get) 48 47 49 stacktrace_pc_get: 48 FUNCTION_BEGIN(stacktrace_pc_get) 50 49 retl 51 50 mov %o7, %o0 51 FUNCTION_END(stacktrace_pc_get) -
uspace/lib/c/arch/sparc64/src/thread_entry.S
r6adb775f r32573ff 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .globl __thread_entry32 33 33 ## User-space thread entry point for all but the first threads. 34 34 # 35 35 # 36 __thread_entry: 36 SYMBOL(__thread_entry) 37 37 # 38 38 # Create the first stack frame. … … 52 52 53 53 ! not reached 54 55 .end __thread_entry
Note:
See TracChangeset
for help on using the changeset viewer.