]> git.proxmox.com Git - qemu.git/commitdiff
i386 ROR r8/r16 instruction fix
authorPavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>
Mon, 15 Apr 2013 06:59:15 +0000 (10:59 +0400)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 20 Apr 2013 19:27:52 +0000 (21:27 +0200)
Fixed EFLAGS corruption by ROR r8/r16 instruction located at the end of the TB.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-i386/translate.c

index 233f24ff41055ca83744543c7286441a8b56e21a..40f891da143d49330b6591d95a51553a54345662 100644 (file)
@@ -1775,6 +1775,7 @@ static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, int is_right)
     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);