summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/cpu_switch.S
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2014-03-04 19:41:16 +0000
committerjkim <jkim@FreeBSD.org>2014-03-04 19:41:16 +0000
commit373cea9476ea8bc27aaa8ba5e1f54abb066c079b (patch)
tree9741dcbcc5c3890841791d13ad65b623160972f4 /sys/amd64/amd64/cpu_switch.S
parent0e398a79d243a32c58f993075807b35e297c94b2 (diff)
downloadFreeBSD-src-373cea9476ea8bc27aaa8ba5e1f54abb066c079b.zip
FreeBSD-src-373cea9476ea8bc27aaa8ba5e1f54abb066c079b.tar.gz
Remove dead code since r230426, fix a comment, and tidy up.
Reported by: jhb MFC after: 3 days
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