From: Avi Kivity <[email protected]>

'pop esp' destroys the stack, avoid it

Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>

diff --git a/kvm/test/x86/realmode.c b/kvm/test/x86/realmode.c
index bd79348..d0cc3dc 100644
--- a/kvm/test/x86/realmode.c
+++ b/kvm/test/x86/realmode.c
@@ -828,12 +828,11 @@ void test_pusha_popa()
                       "pop %edi\n\t"
                       "pop %esi\n\t"
                       "pop %ebp\n\t"
-                      "pop %eax\n\t"
+                      "add $4, %esp\n\t"
                       "pop %ebx\n\t"
                       "pop %edx\n\t"
                       "pop %ecx\n\t"
-                      "pop %esp\n\t"
-                      "xchg %esp, %eax\n\t"
+                      "pop %eax\n\t"
                       );
 
        MK_INSN(popa, "push %eax\n\t"
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to