Skip to content

Commit

Permalink
KVM: x86 emulator: fix test_cc() build failure on i386
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Avi Kivity authored and Gleb Natapov committed Jan 27, 2013
1 parent 1416878 commit 3f0c3d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3f0c3d0

Please sign in to comment.