qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] i386 ROR r8/r16 instruction fix


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH] i386 ROR r8/r16 instruction fix
Date: Mon, 15 Apr 2013 17:42:12 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Apr 15, 2013 at 10:59:15AM +0400, Pavel Dovgaluk wrote:
> Fixed EFLAGS corruption by ROR r8/r16 instruction located at the end of the 
> TB.
> 
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> ---
>  target-i386/translate.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/target-i386/translate.c b/target-i386/translate.c
> index 233f24f..40f891d 100644
> --- a/target-i386/translate.c
> +++ b/target-i386/translate.c
> @@ -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);

This looks correct to me, though I haven't tested.

Reviewed-by: Aurelien Jarno <address@hidden>

The corresponding code seems to have been changed in commit
34d80a55ff8517fd37bcfea5063b9797e2bd9132. I therefore added
Richard in Cc: for him to comment.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]