On Sat, Oct 6, 2012 at 12:30 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > This is looking at EFLAGS, but it can do so more efficiently with > setcond. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
Reviewed-by: Blue Swirl <blauwir...@gmail.com> > --- > target-i386/translate.c | 7 +++---- > 1 file modificato, 3 inserzioni(+), 4 rimozioni(-) > > diff --git a/target-i386/translate.c b/target-i386/translate.c > index fb44839..342b9ec 100644 > --- a/target-i386/translate.c > +++ b/target-i386/translate.c > @@ -1031,10 +1031,9 @@ static inline void gen_setcc_slow(DisasContext *s, int > jcc_op, TCGv reg, bool in > return; > case JCC_BE: > gen_compute_eflags(s); > - tcg_gen_shri_tl(reg, cpu_cc_src, 6); > - tcg_gen_or_tl(reg, reg, cpu_cc_src); > - tcg_gen_andi_tl(reg, reg, 1); > - break; > + tcg_gen_andi_tl(reg, cpu_cc_src, 0x41); Symbolic names for the flags would be nice. > + tcg_gen_setcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, reg, reg, 0); > + return; > case JCC_S: > gen_compute_eflags_s(s, reg, inv); > return; > -- > 1.7.12.1 > > >