target-i386: Fix CC_OP_CLR vs PF
Parity should be set for a zero result. Cc: qemu-stable@nongnu.org Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
d844a7b656
commit
d2fe51bda8
@ -103,7 +103,7 @@ target_ulong helper_cc_compute_all(target_ulong dst, target_ulong src1,
|
||||
case CC_OP_EFLAGS:
|
||||
return src1;
|
||||
case CC_OP_CLR:
|
||||
return CC_Z;
|
||||
return CC_Z | CC_P;
|
||||
|
||||
case CC_OP_MULB:
|
||||
return compute_all_mulb(dst, src1);
|
||||
|
@ -748,7 +748,7 @@ static void gen_compute_eflags(DisasContext *s)
|
||||
return;
|
||||
}
|
||||
if (s->cc_op == CC_OP_CLR) {
|
||||
tcg_gen_movi_tl(cpu_cc_src, CC_Z);
|
||||
tcg_gen_movi_tl(cpu_cc_src, CC_Z | CC_P);
|
||||
set_cc_op(s, CC_OP_EFLAGS);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user