Skip to contentSkip to conversation

target-i386 ROR r8/r16 imm instruction fix

PATCH In review Aurelien Jarno 2 participants 2 messages May 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-i386 ROR r8/r16 imm instruction fix

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.

---
 target-i386/translate.c |    1 +
 1 file changed, 1 insertion(+)
target-i386/translate.c +1 -0
index 524a0b4..0aeccdb 100644
@@ -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);
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Aurelien Jarno

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.

---
 target-i386/translate.c |    1 +
 1 file changed, 1 insertion(+)

r~