summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/cpu_switch.S
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-08-30 21:19:42 +0000
committerjkim <jkim@FreeBSD.org>2010-08-30 21:19:42 +0000
commit4c2b72a3c08750e3315eb7ff87458700e757b7dd (patch)
tree2f2c5b9e82e7737b24d1f8da4061066bc8161e16 /sys/amd64/amd64/cpu_switch.S
parentbab48ae23a4c49f2df3097e9c0e2cca68d8ebe0b (diff)
downloadFreeBSD-src-4c2b72a3c08750e3315eb7ff87458700e757b7dd.zip
FreeBSD-src-4c2b72a3c08750e3315eb7ff87458700e757b7dd.tar.gz
Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.
Diffstat (limited to 'sys/amd64/amd64/cpu_switch.S')
-rw-r--r--sys/amd64/amd64/cpu_switch.S15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index b294864..952a70b 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -338,19 +338,16 @@ ENTRY(savectx)
movl $MSR_FSBASE,%ecx
rdmsr
- shlq $32,%rdx
- leaq (%rax,%rdx),%rax
- movq %rax,PCB_FSBASE(%rdi)
+ movl %eax,PCB_FSBASE(%rdi)
+ movl %edx,PCB_FSBASE+4(%rdi)
movl $MSR_GSBASE,%ecx
rdmsr
- shlq $32,%rdx
- leaq (%rax,%rdx),%rax
- movq %rax,PCB_GSBASE(%rdi)
+ movl %eax,PCB_GSBASE(%rdi)
+ movl %edx,PCB_GSBASE+4(%rdi)
movl $MSR_KGSBASE,%ecx
rdmsr
- shlq $32,%rdx
- leaq (%rax,%rdx),%rax
- movq %rax,PCB_KGSBASE(%rdi)
+ movl %eax,PCB_KGSBASE(%rdi)
+ movl %edx,PCB_KGSBASE+4(%rdi)
sgdt PCB_GDT(%rdi)
sidt PCB_IDT(%rdi)
OpenPOWER on IntegriCloud