From 38ebb396c955ceb2ef7e246248ceb7f8bfe1b774 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Thu, 9 May 2013 19:36:41 +0200 Subject: target-i386: ROR r8/r16 imm instruction fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix EFLAGS corruption by ROR r8/r16 imm instruction located at the end of the TB, similarly to commit 089305ac for the non-immediate case. Reported-by: Hervé Poussineau Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target-i386/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index 524a0b480..0aeccdbc5 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -1871,6 +1871,7 @@ static void gen_rot_rm_im(DisasContext *s, int ot, int op1, int op2, if (is_right) { tcg_gen_shri_tl(cpu_cc_src2, cpu_T[0], mask - 1); tcg_gen_shri_tl(cpu_cc_dst, cpu_T[0], mask); + tcg_gen_andi_tl(cpu_cc_dst, cpu_cc_dst, 1); } else { tcg_gen_shri_tl(cpu_cc_src2, cpu_T[0], mask); tcg_gen_andi_tl(cpu_cc_dst, cpu_T[0], 1); -- cgit v1.2.3