diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-25 18:49:06 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-25 18:49:06 +0000 |
commit | 5cfcdfaf116351b5003d85a26f7ab490c8fd46a1 (patch) | |
tree | 995b180292ef42c5ed58fdcc868c8f8f51813f17 /tcg/x86_64 | |
parent | a2a294e267280be45642581bcbe71a6952b53255 (diff) | |
download | qemu-5cfcdfaf116351b5003d85a26f7ab490c8fd46a1.tar.gz qemu-5cfcdfaf116351b5003d85a26f7ab490c8fd46a1.tar.bz2 qemu-5cfcdfaf116351b5003d85a26f7ab490c8fd46a1.zip |
jump simplification
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4583 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/x86_64')
-rw-r--r-- | tcg/x86_64/tcg-target.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/tcg/x86_64/tcg-target.c b/tcg/x86_64/tcg-target.c index 7197f401c5..168faabeec 100644 --- a/tcg/x86_64/tcg-target.c +++ b/tcg/x86_64/tcg-target.c @@ -450,41 +450,20 @@ static void tcg_out_brcond(TCGContext *s, int cond, TCGArg arg1, TCGArg arg2, int const_arg2, int label_index, int rexw) { - int c; if (const_arg2) { if (arg2 == 0) { - /* use test */ - switch(cond) { - case TCG_COND_EQ: - c = JCC_JE; - break; - case TCG_COND_NE: - c = JCC_JNE; - break; - case TCG_COND_LT: - c = JCC_JS; - break; - case TCG_COND_GE: - c = JCC_JNS; - break; - default: - goto do_cmpi; - } /* test r, r */ tcg_out_modrm(s, 0x85 | rexw, arg1, arg1); - tcg_out_jxx(s, c, label_index); } else { - do_cmpi: if (rexw) tgen_arithi64(s, ARITH_CMP, arg1, arg2); else tgen_arithi32(s, ARITH_CMP, arg1, arg2); - tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index); } } else { tcg_out_modrm(s, 0x01 | (ARITH_CMP << 3) | rexw, arg2, arg1); - tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index); } + tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index); } #if defined(CONFIG_SOFTMMU) |