Changeset a35a3d8 in mainline for uspace/lib/c/arch/ia32/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/ia32/src/fibril.S
rf3d47c97 ra35a3d8 35 35 # 36 36 # Save CPU context to the context_t variable 37 # pointed by the 1st argument. Returns 1in EAX.37 # pointed by the 1st argument. Returns 0 in EAX. 38 38 # 39 FUNCTION_BEGIN( context_save)39 FUNCTION_BEGIN(__setjmp) 40 40 movl 0(%esp), %eax # the caller's return %eip 41 41 movl 4(%esp), %edx # address of the context variable to save context to … … 53 53 movl %eax, CONTEXT_OFFSET_TLS(%edx) # tls -> ctx->tls 54 54 55 xorl %eax, %eax # context_save returns 1 56 incl %eax 55 xorl %eax, %eax # __setjmp returns 0 57 56 ret 58 FUNCTION_END( context_save)57 FUNCTION_END(__setjmp) 59 58 60 59 ## Restore saved CPU context 61 60 # 62 61 # Restore CPU context from context_t variable 63 # pointed by the 1st argument. Returns 0in EAX.62 # pointed by the 1st argument. Returns second argument in EAX. 64 63 # 65 FUNCTION_BEGIN( context_restore)64 FUNCTION_BEGIN(__longjmp) 66 65 movl 4(%esp), %eax # address of the context variable to restore context from 66 movl 8(%esp), %ecx # return value 67 67 68 68 # restore registers from the context structure … … 80 80 movl %edx, %gs:0 81 81 82 xorl %eax, %eax # context_restore returns 082 movl %ecx, %eax 83 83 ret 84 FUNCTION_END( context_restore)84 FUNCTION_END(__longjmp) 85 85
Note:
See TracChangeset
for help on using the changeset viewer.