public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86 emulator: fix test_cc() build failure on i386
@ 2013-01-26 21:56 Avi Kivity
  2013-01-27  9:20 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2013-01-26 21:56 UTC (permalink / raw)
  To: Gleb Natapov, Marcelo Tosatti; +Cc: kvm

'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(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: x86 emulator: fix test_cc() build failure on i386
  2013-01-26 21:56 [PATCH] KVM: x86 emulator: fix test_cc() build failure on i386 Avi Kivity
@ 2013-01-27  9:20 ` Gleb Natapov
  0 siblings, 0 replies; 2+ messages in thread
From: Gleb Natapov @ 2013-01-27  9:20 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Marcelo Tosatti, kvm

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-27  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26 21:56 [PATCH] KVM: x86 emulator: fix test_cc() build failure on i386 Avi Kivity
2013-01-27  9:20 ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox