Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/context.S

    r3b0f1b9a r1a5eca4  
    2929#include <abi/asmtool.h>
    3030#include <arch/context_struct.h>
     31#include <arch/vreg.h>
    3132
    3233.text
     
    5051        movq %r14, CONTEXT_OFFSET_R14(%rdi)
    5152        movq %r15, CONTEXT_OFFSET_R15(%rdi)
     53
     54        movq vreg_ptr, %rsi
     55        movq %fs:VREG_TP(%rsi), %rsi
     56        movq %rsi, CONTEXT_OFFSET_TP(%rdi)
    5257       
    5358        xorl %eax, %eax       # context_save returns 1
     
    7277        movq CONTEXT_OFFSET_SP(%rdi), %rsp   # ctx->sp -> %rsp
    7378       
    74         movq CONTEXT_OFFSET_PC(%rdi), %rdx
    75        
     79        movq CONTEXT_OFFSET_PC(%rdi), %rdx
    7680        movq %rdx, (%rsp)
     81
     82        movq CONTEXT_OFFSET_TP(%rdi), %rcx
     83        movq vreg_ptr, %rsi
     84        movq %rcx, %fs:VREG_TP(%rsi)
    7785       
    7886        xorl %eax, %eax       # context_restore returns 0
Note: See TracChangeset for help on using the changeset viewer.