summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/proc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/proc')
-rw-r--r--arch/x86_64/proc/switch.s45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/x86_64/proc/switch.s b/arch/x86_64/proc/switch.s
index d571c66..16b2198 100644
--- a/arch/x86_64/proc/switch.s
+++ b/arch/x86_64/proc/switch.s
@@ -7,3 +7,48 @@ scheduler_switch:
retq
.size scheduler_switch, . - scheduler_switch
+
+.global scheduler_savestate
+.type scheduler_savestate @function
+
+scheduler_savestate:
+ pushq %r15
+ pushq %r14
+ pushq %r13
+ pushq %r12
+ pushq %r11
+ pushq %r10
+ pushq %r9
+ pushq %r8
+ pushq %rbp
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ pushq %rcx
+ pushq %rbx
+ pushq %rax
+
+.size scheduler_savestate, . - scheduler_savestate
+
+.global scheduler_restorestate
+.type scheduler_restorestate @function
+
+scheduler_restorestate:
+ popq %rax
+ popq %rbx
+ popq %rcx
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ popq %rbp
+ popq %r8
+ popq %r9
+ popq %r10
+ popq %r11
+ popq %r12
+ popq %r13
+ popq %r14
+ popq %r15
+
+.size scheduler_restorestate, . - scheduler_restorestate
+