qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 1.5] target-i386 ROR r8/r16 imm instruction fix
@ 2013-05-09 17:40 Aurelien Jarno
  2013-05-09 17:41 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2013-05-09 17:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hervé Poussineau, Aurelien Jarno, Richard Henderson

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 <hpoussin@reactos.org>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-i386/translate.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/target-i386/translate.c b/target-i386/translate.c
index 524a0b4..0aeccdb 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);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH for 1.5] target-i386 ROR r8/r16 imm instruction fix
  2013-05-09 17:40 [Qemu-devel] [PATCH for 1.5] target-i386 ROR r8/r16 imm instruction fix Aurelien Jarno
@ 2013-05-09 17:41 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2013-05-09 17:41 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Hervé Poussineau, qemu-devel

On 05/09/2013 10:40 AM, Aurelien Jarno wrote:
> 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 <hpoussin@reactos.org>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  target-i386/translate.c |    1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-09 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 17:40 [Qemu-devel] [PATCH for 1.5] target-i386 ROR r8/r16 imm instruction fix Aurelien Jarno
2013-05-09 17:41 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).