Changeset 615e83d in mainline for uspace/lib/c/arch/ia32/src/fibril.S
- Timestamp:
- 2018-03-08T18:25:31Z (7 years ago)
- Children:
- 55f068c
- Parents:
- e0a4686
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-08 17:43:06)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-08 18:25:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/fibril.S
re0a4686 r615e83d 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.