- Timestamp:
- 2016-04-12T05:57:00Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0f792c28, d84398a7
- Parents:
- 8844e70
- Location:
- uspace/lib
- Files:
-
- 7 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/amd64/Makefile.inc
r8844e70 r3b0f1b9a 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/amd64/src/entry.S
r8844e70 r3b0f1b9a 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 # %rdi contains the PCB pointer 38 38 # 39 __entry: 39 SYMBOL(__entry) 40 40 # 41 41 # Create the first stack frame. -
uspace/lib/c/arch/amd64/src/entryjmp.S
r8844e70 r3b0f1b9a 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 # use standard amd32 prologue not to confuse anybody 39 39 push %rbp -
uspace/lib/c/arch/amd64/src/fibril.S
r8844e70 r3b0f1b9a 27 27 # 28 28 29 #include <abi/asmtool.h> 30 #include <libarch/fibril_context.h> 31 29 32 .text 30 31 .global context_save32 .global context_restore33 34 #include <libarch/fibril_context.h>35 33 36 34 ## Save current CPU context … … 39 37 # pointed by the 1st argument. Returns 1 in EAX. 40 38 # 41 context_save: 39 FUNCTION_BEGIN(context_save) 42 40 movq (%rsp), %rdx # the caller's return %eip 43 41 … … 60 58 incl %eax 61 59 ret 60 FUNCTION_END(context_save) 62 61 63 62 ## Restore current CPU context … … 66 65 # pointed by the 1st argument. Returns 0 in EAX. 67 66 # 68 context_restore: 69 67 FUNCTION_BEGIN(context_restore) 70 68 movq CONTEXT_OFFSET_R15(%rdi), %r15 71 69 movq CONTEXT_OFFSET_R14(%rdi), %r14 … … 88 86 xorl %eax, %eax # context_restore returns 0 89 87 ret 88 FUNCTION_END(context_restore) 90 89 -
uspace/lib/c/arch/amd64/src/stacktrace_asm.S
r8844e70 r3b0f1b9a 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global stacktrace_prepare 32 .global stacktrace_fp_get33 .global stacktrace_pc_get 33 FUNCTION_BEGIN(stacktrace_prepare) 34 ret 35 FUNCTION_END(stacktrace_prepare) 34 36 35 stacktrace_prepare: 36 ret 37 38 stacktrace_fp_get: 37 FUNCTION_BEGIN(stacktrace_fp_get) 39 38 movq %rbp, %rax 40 39 ret 40 FUNCTION_END(stacktrace_fp_get) 41 41 42 stacktrace_pc_get: 42 FUNCTION_BEGIN(stacktrace_pc_get) 43 43 movq (%rsp), %rax 44 44 ret 45 FUNCTION_END(stacktrace_pc_get) 46 -
uspace/lib/c/arch/amd64/src/syscall.S
r8844e70 r3b0f1b9a 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 31 .global __syscall32 32 33 33 ## Make a system call. … … 43 43 # @return The return value will be stored in RAX. 44 44 # 45 __syscall: 45 FUNCTION_BEGIN(__syscall) 46 46 # 47 47 # Move the syscall number into RAX. … … 55 55 syscall 56 56 ret 57 FUNCTION_END(__syscall) 57 58 -
uspace/lib/c/arch/amd64/src/thread_entry.S
r8844e70 r3b0f1b9a 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_BEGIN(__thread_entry) 37 37 # 38 38 # Create the first stack frame. … … 47 47 movq %rax, %rdi 48 48 call __thread_main 49 50 .end __thread_entry 49 SYMBOL_END(__thread_entry) -
uspace/lib/math/arch/amd64/src/cos.S
r8844e70 r3b0f1b9a 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/x87.h> 30 31 31 32 .text 32 33 33 .global cos_f64 34 35 cos_f64: 34 FUNCTION_BEGIN(cos_f64) 36 35 pushq %rbp 37 36 movq %rsp, %rbp … … 77 76 leave 78 77 retq 78 FUNCTION_END(cos_f64) -
uspace/lib/math/arch/amd64/src/sin.S
r8844e70 r3b0f1b9a 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/x87.h> 30 31 31 32 .text 32 33 33 .global sin_f64 34 35 sin_f64: 34 FUNCTION_BEGIN(sin_f64) 36 35 pushq %rbp 37 36 movq %rsp, %rbp … … 77 76 leave 78 77 retq 78 FUNCTION_END(sin_f64) 79 -
uspace/lib/math/arch/amd64/src/trunc.S
r8844e70 r3b0f1b9a 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <libarch/x87.h> 30 31 31 32 .text 32 33 33 .global trunc_f64 34 35 trunc_f64: 34 FUNCTION_BEGIN(trunc_f64) 36 35 pushq %rbp 37 36 movq %rsp, %rbp … … 63 62 leave 64 63 retq 64 FUNCTION_END(trunc_f64)
Note:
See TracChangeset
for help on using the changeset viewer.