From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Z3a-0002b1-FN for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:20:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4Z3T-0006tS-8B for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:19:54 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:59908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Z3S-0006tA-Un for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:19:47 -0400 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Jul 2014 11:19:46 -0600 From: Michael Roth Date: Tue, 8 Jul 2014 12:16:36 -0500 Message-Id: <1404839947-1086-6-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 005/156] target-i386: Fix CC_OP_CLR vs PF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Richard Henderson Parity should be set for a zero result. Cc: qemu-stable@nongnu.org Reviewed-by: Paolo Bonzini Reviewed-by: Edgar E. Iglesias Signed-off-by: Richard Henderson (cherry picked from commit d2fe51bda8adf33d07c21e034fdc13a1e1fa4e19) Signed-off-by: Michael Roth --- target-i386/cc_helper.c | 2 +- target-i386/translate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/cc_helper.c b/target-i386/cc_helper.c index ee04092..05dd12b 100644 --- a/target-i386/cc_helper.c +++ b/target-i386/cc_helper.c @@ -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); diff --git a/target-i386/translate.c b/target-i386/translate.c index 7916e5b..b19ea14 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -915,7 +915,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; } -- 1.9.1