Commit 560f92cc34865f1f552079240d630a524a76c084
1 parent
affa3264
jump simplification
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4583 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
22 deletions
tcg/x86_64/tcg-target.c
@@ -450,41 +450,20 @@ static void tcg_out_brcond(TCGContext *s, int cond, | @@ -450,41 +450,20 @@ static void tcg_out_brcond(TCGContext *s, int cond, | ||
450 | TCGArg arg1, TCGArg arg2, int const_arg2, | 450 | TCGArg arg1, TCGArg arg2, int const_arg2, |
451 | int label_index, int rexw) | 451 | int label_index, int rexw) |
452 | { | 452 | { |
453 | - int c; | ||
454 | if (const_arg2) { | 453 | if (const_arg2) { |
455 | if (arg2 == 0) { | 454 | if (arg2 == 0) { |
456 | - /* use test */ | ||
457 | - switch(cond) { | ||
458 | - case TCG_COND_EQ: | ||
459 | - c = JCC_JE; | ||
460 | - break; | ||
461 | - case TCG_COND_NE: | ||
462 | - c = JCC_JNE; | ||
463 | - break; | ||
464 | - case TCG_COND_LT: | ||
465 | - c = JCC_JS; | ||
466 | - break; | ||
467 | - case TCG_COND_GE: | ||
468 | - c = JCC_JNS; | ||
469 | - break; | ||
470 | - default: | ||
471 | - goto do_cmpi; | ||
472 | - } | ||
473 | /* test r, r */ | 455 | /* test r, r */ |
474 | tcg_out_modrm(s, 0x85 | rexw, arg1, arg1); | 456 | tcg_out_modrm(s, 0x85 | rexw, arg1, arg1); |
475 | - tcg_out_jxx(s, c, label_index); | ||
476 | } else { | 457 | } else { |
477 | - do_cmpi: | ||
478 | if (rexw) | 458 | if (rexw) |
479 | tgen_arithi64(s, ARITH_CMP, arg1, arg2); | 459 | tgen_arithi64(s, ARITH_CMP, arg1, arg2); |
480 | else | 460 | else |
481 | tgen_arithi32(s, ARITH_CMP, arg1, arg2); | 461 | tgen_arithi32(s, ARITH_CMP, arg1, arg2); |
482 | - tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index); | ||
483 | } | 462 | } |
484 | } else { | 463 | } else { |
485 | tcg_out_modrm(s, 0x01 | (ARITH_CMP << 3) | rexw, arg2, arg1); | 464 | tcg_out_modrm(s, 0x01 | (ARITH_CMP << 3) | rexw, arg2, arg1); |
486 | - tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index); | ||
487 | } | 465 | } |
466 | + tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index); | ||
488 | } | 467 | } |
489 | 468 | ||
490 | #if defined(CONFIG_SOFTMMU) | 469 | #if defined(CONFIG_SOFTMMU) |