Revision cb63669a target-i386/translate.c

b/target-i386/translate.c
703 703
{
704 704
    tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ECX]));
705 705
    gen_extu(size + 1, cpu_tmp0);
706
    tcg_gen_brcond_tl(TCG_COND_NE, cpu_tmp0, tcg_const_tl(0), label1);
706
    tcg_gen_brcondi_tl(TCG_COND_NE, cpu_tmp0, 0, label1);
707 707
}
708 708

  
709 709
static inline void gen_op_jz_ecx(int size, int label1)
710 710
{
711 711
    tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ECX]));
712 712
    gen_extu(size + 1, cpu_tmp0);
713
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_tmp0, tcg_const_tl(0), label1);
713
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1);
714 714
}
715 715

  
716 716
static void *helper_in_func[3] = {
......
1000 1000
                t0 = cpu_cc_dst;
1001 1001
                break;
1002 1002
            }
1003
            tcg_gen_brcond_tl(inv ? TCG_COND_NE : TCG_COND_EQ, t0, 
1004
                              tcg_const_tl(0), l1);
1003
            tcg_gen_brcondi_tl(inv ? TCG_COND_NE : TCG_COND_EQ, t0, 0, l1);
1005 1004
            break;
1006 1005
        case JCC_S:
1007 1006
        fast_jcc_s:
1008 1007
            switch(size) {
1009 1008
            case 0:
1010 1009
                tcg_gen_andi_tl(cpu_tmp0, cpu_cc_dst, 0x80);
1011
                tcg_gen_brcond_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 
1012
                                  tcg_const_tl(0), l1);
1010
                tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 
1011
                                   0, l1);
1013 1012
                break;
1014 1013
            case 1:
1015 1014
                tcg_gen_andi_tl(cpu_tmp0, cpu_cc_dst, 0x8000);
1016
                tcg_gen_brcond_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 
1017
                                  tcg_const_tl(0), l1);
1015
                tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 
1016
                                   0, l1);
1018 1017
                break;
1019 1018
#ifdef TARGET_X86_64
1020 1019
            case 2:
1021 1020
                tcg_gen_andi_tl(cpu_tmp0, cpu_cc_dst, 0x80000000);
1022
                tcg_gen_brcond_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 
1023
                                  tcg_const_tl(0), l1);
1021
                tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, cpu_tmp0, 
1022
                                   0, l1);
1024 1023
                break;
1025 1024
#endif
1026 1025
            default:
1027
                tcg_gen_brcond_tl(inv ? TCG_COND_GE : TCG_COND_LT, cpu_cc_dst, 
1028
                                  tcg_const_tl(0), l1);
1026
                tcg_gen_brcondi_tl(inv ? TCG_COND_GE : TCG_COND_LT, cpu_cc_dst, 
1027
                                   0, l1);
1029 1028
                break;
1030 1029
            }
1031 1030
            break;
......
1153 1152
    default:
1154 1153
    slow_jcc:
1155 1154
        gen_setcc_slow_T0(jcc_op);
1156
        tcg_gen_brcond_tl(inv ? TCG_COND_EQ : TCG_COND_NE, 
1157
                          cpu_T[0], tcg_const_tl(0), l1);
1155
        tcg_gen_brcondi_tl(inv ? TCG_COND_EQ : TCG_COND_NE, 
1156
                           cpu_T[0], 0, l1);
1158 1157
        break;
1159 1158
    }
1160 1159
}
......
1479 1478
        gen_op_set_cc_op(s->cc_op);
1480 1479

  
1481 1480
    shift_label = gen_new_label();
1482
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), shift_label);
1481
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, shift_label);
1483 1482

  
1484 1483
    tcg_gen_mov_tl(cpu_cc_src, cpu_T3);
1485 1484
    tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]);
......
1574 1573
    /* Must test zero case to avoid using undefined behaviour in TCG
1575 1574
       shifts. */
1576 1575
    label1 = gen_new_label();
1577
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), label1);
1576
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, label1);
1578 1577
    
1579 1578
    if (ot <= OT_WORD)
1580 1579
        tcg_gen_andi_tl(cpu_tmp0, cpu_T[1], (1 << (3 + ot)) - 1);
......
1610 1609
        gen_op_set_cc_op(s->cc_op);
1611 1610

  
1612 1611
    label2 = gen_new_label();
1613
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), label2);
1612
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, label2);
1614 1613

  
1615 1614
    gen_compute_eflags(cpu_cc_src);
1616 1615
    tcg_gen_andi_tl(cpu_cc_src, cpu_cc_src, ~(CC_O | CC_C));
......
1667 1666

  
1668 1667
    /* update eflags */
1669 1668
    label1 = gen_new_label();
1670
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T3, tcg_const_tl(-1), label1);
1669
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T3, -1, label1);
1671 1670

  
1672 1671
    tcg_gen_mov_tl(cpu_cc_src, cpu_T3);
1673 1672
    tcg_gen_discard_tl(cpu_cc_dst);
......
1699 1698
    /* Must test zero case to avoid using undefined behaviour in TCG
1700 1699
       shifts. */
1701 1700
    label1 = gen_new_label();
1702
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T3, tcg_const_tl(0), label1);
1701
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T3, 0, label1);
1703 1702
    
1704 1703
    tcg_gen_addi_tl(cpu_tmp5, cpu_T3, -1);
1705 1704
    if (ot == OT_WORD) {
......
1775 1774
        gen_op_set_cc_op(s->cc_op);
1776 1775

  
1777 1776
    label2 = gen_new_label();
1778
    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T3, tcg_const_tl(0), label2);
1777
    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T3, 0, label2);
1779 1778

  
1780 1779
    tcg_gen_mov_tl(cpu_cc_src, cpu_T[1]);
1781 1780
    tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]);
......
4375 4374
            tcg_gen_ld_tl(cpu_T3, cpu_env, offsetof(CPUState, regs[R_EAX]));
4376 4375
            tcg_gen_sub_tl(cpu_T3, cpu_T3, cpu_T[0]);
4377 4376
            gen_extu(ot, cpu_T3);
4378
            tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T3, tcg_const_tl(0), label1);
4377
            tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T3, 0, label1);
4379 4378
            if (mod == 3) {
4380 4379
                label2 = gen_new_label();
4381 4380
                gen_op_mov_reg_T0(ot, R_EAX);
......
5461 5460
                    op1 = fcmov_cc[op & 3] | ((op >> 3) & 1);
5462 5461
                    gen_setcc(s, op1);
5463 5462
                    l1 = gen_new_label();
5464
                    tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[0], tcg_const_tl(0), l1);
5463
                    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[0], 0, l1);
5465 5464
                    tcg_gen_helper_0_1(helper_fmov_ST0_STN, tcg_const_i32(opreg));
5466 5465
                    gen_set_label(l1);
5467 5466
                }
......
6047 6046
            gen_extu(ot, cpu_T[0]);
6048 6047
            label1 = gen_new_label();
6049 6048
            tcg_gen_movi_tl(cpu_cc_dst, 0);
6050
            tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[0], tcg_const_tl(0), label1);
6049
            tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[0], 0, label1);
6051 6050
            if (b & 1) {
6052 6051
                tcg_gen_helper_1_1(helper_bsr, cpu_T[0], cpu_T[0]);
6053 6052
            } else {
......
6289 6288
                gen_compute_eflags(cpu_tmp0);
6290 6289
                tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, CC_Z);
6291 6290
                if (b == 0) {
6292
                    tcg_gen_brcond_tl(TCG_COND_EQ, 
6293
                                      cpu_tmp0, tcg_const_tl(0), l1);
6291
                    tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, l1);
6294 6292
                } else {
6295
                    tcg_gen_brcond_tl(TCG_COND_NE, 
6296
                                      cpu_tmp0, tcg_const_tl(0), l1);
6293
                    tcg_gen_brcondi_tl(TCG_COND_NE, cpu_tmp0, 0, l1);
6297 6294
                }
6298 6295
                break;
6299 6296
            case 2: /* loop */
......
6782 6779
                tcg_gen_helper_1_1(helper_lsl, cpu_T[0], cpu_T[0]);
6783 6780
            tcg_gen_andi_tl(cpu_tmp0, cpu_cc_src, CC_Z);
6784 6781
            label1 = gen_new_label();
6785
            tcg_gen_brcond_tl(TCG_COND_EQ, cpu_tmp0, tcg_const_tl(0), label1);
6782
            tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1);
6786 6783
            gen_op_mov_reg_T0(ot, reg);
6787 6784
            gen_set_label(label1);
6788 6785
            s->cc_op = CC_OP_EFLAGS;

Also available in: Unified diff