Changes in uspace/lib/c/arch/ia32/src/fibril.S [a35a3d8:a35b458] in mainline
- File:
-
- 1 edited
-
uspace/lib/c/arch/ia32/src/fibril.S (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/fibril.S
ra35a3d8 ra35b458 35 35 # 36 36 # Save CPU context to the context_t variable 37 # pointed by the 1st argument. Returns 0in EAX.37 # pointed by the 1st argument. Returns 1 in EAX. 38 38 # 39 FUNCTION_BEGIN( __setjmp)39 FUNCTION_BEGIN(context_save) 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 # __setjmp returns 0 55 xorl %eax, %eax # context_save returns 1 56 incl %eax 56 57 ret 57 FUNCTION_END( __setjmp)58 FUNCTION_END(context_save) 58 59 59 60 ## Restore saved CPU context 60 61 # 61 62 # Restore CPU context from context_t variable 62 # pointed by the 1st argument. Returns second argumentin EAX.63 # pointed by the 1st argument. Returns 0 in EAX. 63 64 # 64 FUNCTION_BEGIN( __longjmp)65 FUNCTION_BEGIN(context_restore) 65 66 movl 4(%esp), %eax # address of the context variable to restore context from 66 movl 8(%esp), %ecx # return value67 67 68 68 # restore registers from the context structure … … 80 80 movl %edx, %gs:0 81 81 82 movl %ecx, %eax82 xorl %eax, %eax # context_restore returns 0 83 83 ret 84 FUNCTION_END( __longjmp)84 FUNCTION_END(context_restore) 85 85
Note:
See TracChangeset
for help on using the changeset viewer.
