From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH] KVM: x86 emulator: fix test_cc() build failure on i386 Date: Sat, 26 Jan 2013 23:56:04 +0200 Message-ID: <1359237364-17823-1-git-send-email-avi.kivity@gmail.com> Cc: kvm@vger.kernel.org To: Gleb Natapov , Marcelo Tosatti Return-path: Received: from mail-we0-f171.google.com ([74.125.82.171]:45800 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754411Ab3AZV4L (ORCPT ); Sat, 26 Jan 2013 16:56:11 -0500 Received: by mail-we0-f171.google.com with SMTP id u54so759954wey.2 for ; Sat, 26 Jan 2013 13:56:10 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: 'pushq' doesn't exist on i386. Replace with 'push', which should work since the operand is a register. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e99fb72..2b11318 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1013,7 +1013,7 @@ static u8 test_cc(unsigned int condition, unsigned long flags) void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf); flags = (flags & EFLAGS_MASK) | X86_EFLAGS_IF; - asm("pushq %[flags]; popf; call *%[fastop]" + asm("push %[flags]; popf; call *%[fastop]" : "=a"(rc) : [fastop]"r"(fop), [flags]"r"(flags)); return rc; } -- 1.8.1