Changeset 15d0046 in mainline for kernel/arch/amd64/src/context.S
- Timestamp:
- 2014-09-12T13:22:33Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b20126
- Parents:
- 8db09e4 (diff), 105d8d6 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/context.S
r8db09e4 r15d0046 32 32 .global context_restore_arch 33 33 34 #include <arch/context_ offset.h>34 #include <arch/context_struct.h> 35 35 36 36 ## Save current CPU context … … 43 43 44 44 # 1st argument passed in %edi 45 CONTEXT_SAVE_ARCH_CORE %rdi %rdx 45 movq %rdx, CONTEXT_OFFSET_PC(%rdi) 46 movq %rsp, CONTEXT_OFFSET_SP(%rdi) 47 48 movq %rbx, CONTEXT_OFFSET_RBX(%rdi) 49 movq %rbp, CONTEXT_OFFSET_RBP(%rdi) 50 movq %r12, CONTEXT_OFFSET_R12(%rdi) 51 movq %r13, CONTEXT_OFFSET_R13(%rdi) 52 movq %r14, CONTEXT_OFFSET_R14(%rdi) 53 movq %r15, CONTEXT_OFFSET_R15(%rdi) 46 54 47 55 xorl %eax, %eax # context_save returns 1 … … 56 64 # 57 65 context_restore_arch: 58 CONTEXT_RESTORE_ARCH_CORE %rdi %rdx 66 movq CONTEXT_OFFSET_R15(%rdi), %r15 67 movq CONTEXT_OFFSET_R14(%rdi), %r14 68 movq CONTEXT_OFFSET_R13(%rdi), %r13 69 movq CONTEXT_OFFSET_R12(%rdi), %r12 70 movq CONTEXT_OFFSET_RBP(%rdi), %rbp 71 movq CONTEXT_OFFSET_RBX(%rdi), %rbx 72 73 movq CONTEXT_OFFSET_SP(%rdi), %rsp # ctx->sp -> %rsp 74 75 movq CONTEXT_OFFSET_PC(%rdi), %rdx 59 76 60 77 movq %rdx, (%rsp) … … 62 79 xorl %eax, %eax # context_restore returns 0 63 80 ret 81
Note:
See TracChangeset
for help on using the changeset viewer.