summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/cpu_switch.S
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/amd64/cpu_switch.S')
-rw-r--r--sys/amd64/amd64/cpu_switch.S12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index ac30990..bbd85fb 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -345,8 +345,8 @@ ENTRY(savectx)
movq %r14,PCB_R14(%rdi)
movq %r15,PCB_R15(%rdi)
- movq %cr0,%rsi
- movq %rsi,PCB_CR0(%rdi)
+ movq %cr0,%rax
+ movq %rax,PCB_CR0(%rdi)
movq %cr2,%rax
movq %rax,PCB_CR2(%rdi)
movq %cr3,%rax
@@ -409,8 +409,6 @@ ENTRY(savectx)
sldt PCB_LDT(%rdi)
str PCB_TR(%rdi)
-2: movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */
-
movl $1,%eax
ret
END(savectx)
@@ -550,12 +548,12 @@ ENTRY(resumectx)
END(resumectx)
/*
- * Wrapper around fpusave to care about TS0_CR.
+ * Wrapper around fpusave to care about CR0_TS.
*/
ENTRY(ctx_fpusave)
- movq %cr0,%rsi
+ movq %cr0,%rax
clts
call fpusave
- movq %rsi,%cr0
+ movq %rax,%cr0
ret
END(ctx_fpusave)
OpenPOWER on IntegriCloud