aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_64/entry.S
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-26 11:48:21 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-26 11:48:21 +0200
commitf430ebef51f16767ec5e127131cdb3115aa1ae1b (patch)
treec8b773123e62b3066cf0b157c0f86dfc2eba456a /xen/arch/x86/x86_64/entry.S
parentd9de3dbee34504651572b07d90950902a47b7919 (diff)
downloadxen-f430ebef51f16767ec5e127131cdb3115aa1ae1b.tar.gz
xen-f430ebef51f16767ec5e127131cdb3115aa1ae1b.tar.bz2
xen-f430ebef51f16767ec5e127131cdb3115aa1ae1b.zip
x86: enhance rsp-relative calculations
The use of "or" in GET_CPUINFO_FIELD so far wasn't ideal, as it doesn't lend itself to folding this operation with a possibly subsequent one (e.g. the well known mov+add=lea conversion). Split out the sub- operations, and shorten assembly code slightly with this. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/x86_64/entry.S')
-rw-r--r--xen/arch/x86/x86_64/entry.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 8156827d41..74a40758b2 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -445,10 +445,10 @@ domain_crash_synchronous_string:
ENTRY(domain_crash_synchronous)
# Get out of the guest-save area of the stack.
- GET_CPUINFO_FIELD(CPUINFO_guest_cpu_user_regs,%rax)
- movq %rax,%rsp
+ GET_STACK_BASE(%rax)
+ leaq STACK_CPUINFO_FIELD(guest_cpu_user_regs)(%rax),%rsp
# create_bounce_frame() temporarily clobbers CS.RPL. Fix up.
- GET_CURRENT(%rax)
+ __GET_CURRENT(%rax)
movq VCPU_domain(%rax),%rax
testb $1,DOMAIN_is_32bit_pv(%rax)
setz %al
@@ -622,7 +622,7 @@ handle_ist_exception:
testb $3,UREGS_cs(%rsp)
jz 1f
/* Interrupted guest context. Copy the context to stack bottom. */
- GET_CPUINFO_FIELD(CPUINFO_guest_cpu_user_regs,%rdi)
+ GET_CPUINFO_FIELD(guest_cpu_user_regs,%rdi)
movq %rsp,%rsi
movl $UREGS_kernel_sizeof/8,%ecx
movq %rdi,%rsp