From: Avi Kivity Subject: [PATCH 1/3] test: realmode: fix pusha test Date: Sun, 25 Jul 2010 14:39:44 +0300 Message-ID: <1280057986-6815-2-git-send-email-avi@redhat.com> References: <1280057986-6815-1-git-send-email-avi@redhat.com> To: Marcelo Tosatti , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57839 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464Ab0GYLjs (ORCPT ); Sun, 25 Jul 2010 07:39:48 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6PBdl8S019228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 25 Jul 2010 07:39:47 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6PBdk2D029396 for ; Sun, 25 Jul 2010 07:39:47 -0400 In-Reply-To: <1280057986-6815-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 'pop esp' destroys the stack, avoid it Signed-off-by: Avi Kivity --- 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