Changeset 8565a42 in mainline for uspace/lib/c/arch/ia32/src/fibril.S
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1a81f69, d5e5fd1
- Parents:
- 3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
- git-committer:
- GitHub <noreply@…> (2018-03-02 20:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/fibril.S
r3061bc1 r8565a42 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 42 42 43 43 # save registers to the context structure 44 44 movl %esp, CONTEXT_OFFSET_SP(%edx) # %esp -> ctx->sp … … 48 48 movl %edi, CONTEXT_OFFSET_EDI(%edx) # %edi -> ctx->edi 49 49 movl %ebp, CONTEXT_OFFSET_EBP(%edx) # %ebp -> ctx->ebp 50 50 51 51 # save TLS 52 52 movl %gs:0, %eax 53 53 movl %eax, CONTEXT_OFFSET_TLS(%edx) # tls -> ctx->tls 54 54 55 55 xorl %eax, %eax # context_save returns 1 56 56 incl %eax … … 65 65 FUNCTION_BEGIN(context_restore) 66 66 movl 4(%esp), %eax # address of the context variable to restore context from 67 67 68 68 # restore registers from the context structure 69 69 movl CONTEXT_OFFSET_SP(%eax),%esp # ctx->sp -> %esp … … 73 73 movl CONTEXT_OFFSET_EDI(%eax),%edi # ctx->edi -> %edi 74 74 movl CONTEXT_OFFSET_EBP(%eax),%ebp # ctx->ebp -> %ebp 75 75 76 76 movl %edx, 0(%esp) # ctx->pc -> saver's return %eip 77 77 78 78 # set thread local storage 79 79 movl CONTEXT_OFFSET_TLS(%eax), %edx # Set arg1 to TLS addr 80 80 movl %edx, %gs:0 81 81 82 82 xorl %eax, %eax # context_restore returns 0 83 83 ret
Note:
See TracChangeset
for help on using the changeset viewer.