mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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>
This commit is contained in:
parent
141687869f
commit
3f0c3d0bb2
@ -1013,7 +1013,7 @@ static u8 test_cc(unsigned int condition, unsigned long flags)
|
|||||||
void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf);
|
void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf);
|
||||||
|
|
||||||
flags = (flags & EFLAGS_MASK) | X86_EFLAGS_IF;
|
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));
|
: "=a"(rc) : [fastop]"r"(fop), [flags]"r"(flags));
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user