提交 2cb47645 编写于 作者: R Richard Henderson

target-i386: optimize setbe

This is looking at EFLAGS, but it can do so more efficiently with
setcond.
Reviewed-by: NBlue Swirl <blauwirbel@gmail.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NRichard Henderson <rth@twiddle.net>
上级 1a5c6359
...@@ -1060,10 +1060,9 @@ static void gen_setcc_slow(DisasContext *s, int jcc_op, TCGv reg, bool inv) ...@@ -1060,10 +1060,9 @@ static void gen_setcc_slow(DisasContext *s, int jcc_op, TCGv reg, bool inv)
break; break;
case JCC_BE: case JCC_BE:
gen_compute_eflags(s); gen_compute_eflags(s);
tcg_gen_shri_tl(reg, cpu_cc_src, 6); tcg_gen_andi_tl(reg, cpu_cc_src, CC_Z | CC_C);
tcg_gen_or_tl(reg, reg, cpu_cc_src); tcg_gen_setcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, reg, reg, 0);
tcg_gen_andi_tl(reg, reg, 1); return;
break;
case JCC_S: case JCC_S:
gen_compute_eflags_s(s, reg, inv); gen_compute_eflags_s(s, reg, inv);
inv = false; inv = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册