From: Avi Kivity <avi.kivity@gmail.com>
Date: Sat, 26 Jan 2013 21:56:04 +0000 (+0200)
Subject: KVM: x86 emulator: fix test_cc() build failure on i386
X-Git-Tag: v3.9-rc1~97^2~7^2~21
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3f0c3d0bb2bcc4b88b22452a7cf0073ee9a0f1e6;p=linux.git

KVM: x86 emulator: fix test_cc() build failure on i386

'pushq' doesn't exist on i386.  Replace with 'push', which should work
since the operand is a register.

Signed-off-by: Avi Kivity <avi.kivity@gmail.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index e99fb72cd4c5..2b11318151a4 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;
 }