• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión39f099ec9d6d420b6fe6f7f4f8ed80ae29c65ff2 (tree)
Tiempo2017-01-18 05:02:08
AutorRichard Henderson <rth@twid...>
CommiterRichard Henderson

Log Message

tcg/i386: Always use TZCNT when available

I think this is cleaner than sometimes using BSF.

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

Cambiar Resumen

Diferencia incremental

--- a/tcg/i386/tcg-target.inc.c
+++ b/tcg/i386/tcg-target.inc.c
@@ -1143,10 +1143,14 @@ static void tcg_out_movcond64(TCGContext *s, TCGCond cond, TCGReg dest,
11431143 static void tcg_out_ctz(TCGContext *s, int rexw, TCGReg dest, TCGReg arg1,
11441144 TCGArg arg2, bool const_a2)
11451145 {
1146- if (const_a2) {
1147- tcg_debug_assert(have_bmi1);
1148- tcg_debug_assert(arg2 == (rexw ? 64 : 32));
1146+ if (have_bmi1) {
11491147 tcg_out_modrm(s, OPC_TZCNT + rexw, dest, arg1);
1148+ if (const_a2) {
1149+ tcg_debug_assert(arg2 == (rexw ? 64 : 32));
1150+ } else {
1151+ tcg_debug_assert(dest != arg2);
1152+ tcg_out_cmov(s, TCG_COND_LTU, rexw, dest, arg2);
1153+ }
11501154 } else {
11511155 tcg_debug_assert(dest != arg2);
11521156 tcg_out_modrm(s, OPC_BSF + rexw, dest, arg1);