mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-08 07:27:43 -07:00
target/i386/hvf: fix lflags_to_rflags
Clear the flags before adding in the ones computed from lflags. Cc: Wei Liu <liuwe@linux.microsoft.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f6b5f71f04
commit
94a159f3dc
1 changed files with 1 additions and 0 deletions
|
|
@ -293,6 +293,7 @@ void set_SF(CPUX86State *env, bool val)
|
|||
|
||||
void lflags_to_rflags(CPUX86State *env)
|
||||
{
|
||||
env->eflags &= ~(CC_C|CC_P|CC_A|CC_Z|CC_S|CC_O);
|
||||
env->eflags |= get_CF(env) ? CC_C : 0;
|
||||
env->eflags |= get_PF(env) ? CC_P : 0;
|
||||
env->eflags |= get_AF(env) ? CC_A : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue