aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/wait.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-26 11:51:27 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-26 11:51:27 +0200
commit12a287a2e885b8e4f1968b21a56ee76d9bd33eb9 (patch)
treea3a1729a5a2c5f3a1f81f738e0efb99e5bf9a96f /xen/common/wait.c
parentd55c5eefe190e5b0e571b8e9d54616376697ce7e (diff)
downloadxen-12a287a2e885b8e4f1968b21a56ee76d9bd33eb9.tar.gz
xen-12a287a2e885b8e4f1968b21a56ee76d9bd33eb9.tar.bz2
xen-12a287a2e885b8e4f1968b21a56ee76d9bd33eb9.zip
x86: slightly streamline __prepare_to_wait() inline assembly
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/wait.c')
-rw-r--r--xen/common/wait.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xen/common/wait.c b/xen/common/wait.c
index aaeabc9bcc..26de48cede 100644
--- a/xen/common/wait.c
+++ b/xen/common/wait.c
@@ -143,15 +143,13 @@ static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
"push %%rax; push %%rbx; push %%rdx; "
"push %%rbp; push %%r8; push %%r9; push %%r10; push %%r11; "
"push %%r12; push %%r13; push %%r14; push %%r15; call 1f; "
- "1: mov %%rsp,%%rsi; addq $2f-1b,(%%rsp); "
- "sub %%rsi,%%rcx; cmp %3,%%rcx; jbe 2f; "
- "xor %%esi,%%esi; jmp 3f; "
- "2: rep movsb; mov %%rsp,%%rsi; 3: pop %%rax; "
+ "1: addq $2f-1b,(%%rsp); sub %%esp,%%ecx; cmp %3,%%ecx; jbe 3f; "
+ "mov %%rsp,%%rsi; 2: rep movsb; mov %%rsp,%%rsi; 3: pop %%rax; "
"pop %%r15; pop %%r14; pop %%r13; pop %%r12; "
"pop %%r11; pop %%r10; pop %%r9; pop %%r8; "
"pop %%rbp; pop %%rdx; pop %%rbx; pop %%rax"
: "=&S" (wqv->esp), "=&c" (dummy), "=&D" (dummy)
- : "i" (PAGE_SIZE), "1" (cpu_info), "2" (wqv->stack)
+ : "i" (PAGE_SIZE), "0" (0), "1" (cpu_info), "2" (wqv->stack)
: "memory" );
if ( unlikely(wqv->esp == 0) )