'pop esp' destroys the stack, avoid it Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- kvm/test/x86/realmode.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) 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" -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html