Changes in uspace/lib/c/arch/amd64/src/fibril.S [a35a3d8:a35b458] in mainline
- File:
-
- 1 edited
-
uspace/lib/c/arch/amd64/src/fibril.S (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/amd64/src/fibril.S
ra35a3d8 ra35b458 35 35 # 36 36 # Save CPU context to context_t variable 37 # pointed by the 1st argument. Returns 0 in RAX.37 # pointed by the 1st argument. Returns 1 in EAX. 38 38 # 39 FUNCTION_BEGIN( __setjmp)39 FUNCTION_BEGIN(context_save) 40 40 movq (%rsp), %rdx # the caller's return %eip 41 41 … … 54 54 movq %rax, CONTEXT_OFFSET_TLS(%rdi) 55 55 56 xorq %rax, %rax # __setjmp returns 0 56 xorl %eax, %eax # context_save returns 1 57 incl %eax 57 58 ret 58 FUNCTION_END( __setjmp)59 FUNCTION_END(context_save) 59 60 60 61 ## Restore current CPU context 61 62 # 62 63 # Restore CPU context from context_t variable 63 # pointed by the 1st argument. Returns second argument in RAX.64 # pointed by the 1st argument. Returns 0 in EAX. 64 65 # 65 FUNCTION_BEGIN( __longjmp)66 FUNCTION_BEGIN(context_restore) 66 67 movq CONTEXT_OFFSET_R15(%rdi), %r15 67 68 movq CONTEXT_OFFSET_R14(%rdi), %r14 … … 80 81 movq %rdi, %fs:0 81 82 82 movq %rsi, %rax # __longjmp returns second argument83 xorl %eax, %eax # context_restore returns 0 83 84 ret 84 FUNCTION_END( __longjmp)85 FUNCTION_END(context_restore) 85 86
Note:
See TracChangeset
for help on using the changeset viewer.
