Patchwork target-i386: Fix flags computation for ADOX

login
register
mail settings
Submitter Richard Henderson
Date March 19, 2013, 4:40 p.m.
Message ID <1363711253-6377-1-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/229139/
State New
Headers show

Comments

Richard Henderson - March 19, 2013, 4:40 p.m.
When starting from CC_OP_DYNAMIC, and issuing adox before adcx,
a typo used the wrong value for the resulting CC_OP.

Cc: Blue Swirl <blauwirbel@gmail.com>
Reported-by: Torbjorn Granlund <tg@gmplib.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-i386/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Blue Swirl - March 23, 2013, 6:23 p.m.
Thanks, applied.

On Tue, Mar 19, 2013 at 4:40 PM, Richard Henderson <rth@twiddle.net> wrote:
> When starting from CC_OP_DYNAMIC, and issuing adox before adcx,
> a typo used the wrong value for the resulting CC_OP.
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Reported-by: Torbjorn Granlund <tg@gmplib.org>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  target-i386/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-i386/translate.c b/target-i386/translate.c
> index 705147a..4b2a3e3 100644
> --- a/target-i386/translate.c
> +++ b/target-i386/translate.c
> @@ -4200,7 +4200,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
>                          carry_in = carry_out;
>                          break;
>                      default:
> -                        end_op = (b == 0x1f6 ? CC_OP_ADCX : CC_OP_ADCOX);
> +                        end_op = (b == 0x1f6 ? CC_OP_ADCX : CC_OP_ADOX);
>                          break;
>                      }
>                      /* If we can't reuse carry-out, get it out of EFLAGS.  */
> --
> 1.8.1.4
>

Patch

diff --git a/target-i386/translate.c b/target-i386/translate.c
index 705147a..4b2a3e3 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -4200,7 +4200,7 @@  static void gen_sse(CPUX86State *env, DisasContext *s, int b,
                         carry_in = carry_out;
                         break;
                     default:
-                        end_op = (b == 0x1f6 ? CC_OP_ADCX : CC_OP_ADCOX);
+                        end_op = (b == 0x1f6 ? CC_OP_ADCX : CC_OP_ADOX);
                         break;
                     }
                     /* If we can't reuse carry-out, get it out of EFLAGS.  */