[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 1/3] target-i386: Fix CC_OP_CLR vs PF
From: |
Richard Henderson |
Subject: |
[Qemu-stable] [PATCH 1/3] target-i386: Fix CC_OP_CLR vs PF |
Date: |
Mon, 24 Feb 2014 23:30:30 -0800 |
Parity should be set for a zero result.
Cc: address@hidden
Signed-off-by: Richard Henderson <address@hidden>
---
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 5dd2450..aa985fa 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -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;
}
--
1.8.5.3
- [Qemu-stable] [PATCH 1/3] target-i386: Fix CC_OP_CLR vs PF,
Richard Henderson <=