diff mbox

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

Message ID 1359237364-17823-1-git-send-email-avi.kivity@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Avi Kivity Jan. 26, 2013, 9:56 p.m. UTC
'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>
---
 arch/x86/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gleb Natapov Jan. 27, 2013, 9:20 a.m. UTC | #1
On Sat, Jan 26, 2013 at 11:56:04PM +0200, Avi Kivity wrote:
> '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>
Applied, thanks.

> ---
>  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

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 }