Changeset a35a3d8 in mainline for uspace/lib/c/arch/amd64/src/fibril.S
- Timestamp:
- 2018-03-12T17:13:46Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b127e4af
- Parents:
- f3d47c97
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-12 17:13:46)
- git-committer:
- GitHub <noreply@…> (2018-03-12 17:13:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/amd64/src/fibril.S
rf3d47c97 ra35a3d8 35 35 # 36 36 # Save CPU context to context_t variable 37 # pointed by the 1st argument. Returns 1 in EAX.37 # pointed by the 1st argument. Returns 0 in RAX. 38 38 # 39 FUNCTION_BEGIN( context_save)39 FUNCTION_BEGIN(__setjmp) 40 40 movq (%rsp), %rdx # the caller's return %eip 41 41 … … 54 54 movq %rax, CONTEXT_OFFSET_TLS(%rdi) 55 55 56 xorl %eax, %eax # context_save returns 1 57 incl %eax 56 xorq %rax, %rax # __setjmp returns 0 58 57 ret 59 FUNCTION_END( context_save)58 FUNCTION_END(__setjmp) 60 59 61 60 ## Restore current CPU context 62 61 # 63 62 # Restore CPU context from context_t variable 64 # pointed by the 1st argument. Returns 0 in EAX.63 # pointed by the 1st argument. Returns second argument in RAX. 65 64 # 66 FUNCTION_BEGIN( context_restore)65 FUNCTION_BEGIN(__longjmp) 67 66 movq CONTEXT_OFFSET_R15(%rdi), %r15 68 67 movq CONTEXT_OFFSET_R14(%rdi), %r14 … … 81 80 movq %rdi, %fs:0 82 81 83 xorl %eax, %eax # context_restore returns 082 movq %rsi, %rax # __longjmp returns second argument 84 83 ret 85 FUNCTION_END( context_restore)84 FUNCTION_END(__longjmp) 86 85
Note:
See TracChangeset
for help on using the changeset viewer.