Revision cb63669a target-mips/translate.c
b/target-mips/translate.c | ||
---|---|---|
679 | 679 |
int l1 = gen_new_label(); \ |
680 | 680 |
int l2 = gen_new_label(); \ |
681 | 681 |
\ |
682 |
tcg_gen_brcond_tl(cond, cpu_T[0], tcg_const_tl(val), l1); \
|
|
682 |
tcg_gen_brcondi_tl(cond, cpu_T[0], val, l1); \
|
|
683 | 683 |
tcg_gen_movi_tl(cpu_T[0], 0); \ |
684 | 684 |
tcg_gen_br(l2); \ |
685 | 685 |
gen_set_label(l1); \ |
... | ... | |
696 | 696 |
int l1 = gen_new_label(); \ |
697 | 697 |
int l2 = gen_new_label(); \ |
698 | 698 |
\ |
699 |
tcg_gen_brcond_tl(cond, cpu_T[0], tcg_const_tl(0), l1); \
|
|
699 |
tcg_gen_brcondi_tl(cond, cpu_T[0], 0, l1); \
|
|
700 | 700 |
tcg_gen_movi_tl(cpu_T[0], 0); \ |
701 | 701 |
tcg_gen_br(l2); \ |
702 | 702 |
gen_set_label(l1); \ |
... | ... | |
831 | 831 |
|
832 | 832 |
tcg_gen_ld_i32(r_tmp, cpu_env, offsetof(CPUState, hflags)); |
833 | 833 |
tcg_gen_andi_i32(r_tmp, r_tmp, MIPS_HFLAG_KSU); |
834 |
tcg_gen_brcond_i32(TCG_COND_NE, r_tmp, tcg_const_i32(MIPS_HFLAG_UM), l1);
|
|
834 |
tcg_gen_brcondi_i32(TCG_COND_NE, r_tmp, MIPS_HFLAG_UM, l1);
|
|
835 | 835 |
tcg_gen_ld_i32(r_tmp, cpu_env, offsetof(CPUState, CP0_Status)); |
836 | 836 |
tcg_gen_andi_i32(r_tmp, r_tmp, (1 << CP0St_UX)); |
837 |
tcg_gen_brcond_i32(TCG_COND_NE, r_tmp, tcg_const_i32(0), l1);
|
|
837 |
tcg_gen_brcondi_i32(TCG_COND_NE, r_tmp, 0, l1);
|
|
838 | 838 |
tcg_gen_ext32s_i64(cpu_T[0], cpu_T[0]); |
839 | 839 |
gen_set_label(l1); |
840 | 840 |
dead_tmp(r_tmp); |
... | ... | |
995 | 995 |
int l3 = gen_new_label(); \ |
996 | 996 |
\ |
997 | 997 |
tcg_gen_andi_tl(r_tmp, cpu_T[0], almask); \ |
998 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp, tcg_const_tl(0), l1); \
|
|
998 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp, 0, l1); \
|
|
999 | 999 |
tcg_gen_st_tl(cpu_T[0], cpu_env, offsetof(CPUState, CP0_BadVAddr)); \ |
1000 | 1000 |
generate_exception(ctx, EXCP_AdES); \ |
1001 | 1001 |
gen_set_label(l1); \ |
... | ... | |
1296 | 1296 |
tcg_gen_xori_tl(r_tmp2, cpu_T[0], uimm); |
1297 | 1297 |
tcg_gen_and_tl(r_tmp1, r_tmp1, r_tmp2); |
1298 | 1298 |
tcg_gen_shri_tl(r_tmp1, r_tmp1, 31); |
1299 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp1, tcg_const_tl(0), l1);
|
|
1299 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp1, 0, l1);
|
|
1300 | 1300 |
/* operands of same sign, result different sign */ |
1301 | 1301 |
generate_exception(ctx, EXCP_OVERFLOW); |
1302 | 1302 |
gen_set_label(l1); |
... | ... | |
1327 | 1327 |
tcg_gen_xori_tl(r_tmp2, cpu_T[0], uimm); |
1328 | 1328 |
tcg_gen_and_tl(r_tmp1, r_tmp1, r_tmp2); |
1329 | 1329 |
tcg_gen_shri_tl(r_tmp1, r_tmp1, 63); |
1330 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp1, tcg_const_tl(0), l1);
|
|
1330 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp1, 0, l1);
|
|
1331 | 1331 |
/* operands of same sign, result different sign */ |
1332 | 1332 |
generate_exception(ctx, EXCP_OVERFLOW); |
1333 | 1333 |
gen_set_label(l1); |
... | ... | |
1539 | 1539 |
tcg_gen_xor_tl(r_tmp2, cpu_T[0], cpu_T[1]); |
1540 | 1540 |
tcg_gen_and_tl(r_tmp1, r_tmp1, r_tmp2); |
1541 | 1541 |
tcg_gen_shri_tl(r_tmp1, r_tmp1, 31); |
1542 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp1, tcg_const_tl(0), l1);
|
|
1542 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp1, 0, l1);
|
|
1543 | 1543 |
/* operands of same sign, result different sign */ |
1544 | 1544 |
generate_exception(ctx, EXCP_OVERFLOW); |
1545 | 1545 |
gen_set_label(l1); |
... | ... | |
1570 | 1570 |
tcg_gen_xor_tl(r_tmp1, r_tmp1, cpu_T[0]); |
1571 | 1571 |
tcg_gen_and_tl(r_tmp1, r_tmp1, r_tmp2); |
1572 | 1572 |
tcg_gen_shri_tl(r_tmp1, r_tmp1, 31); |
1573 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp1, tcg_const_tl(0), l1);
|
|
1573 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp1, 0, l1);
|
|
1574 | 1574 |
/* operands of different sign, first operand and result different sign */ |
1575 | 1575 |
generate_exception(ctx, EXCP_OVERFLOW); |
1576 | 1576 |
gen_set_label(l1); |
... | ... | |
1602 | 1602 |
tcg_gen_xor_tl(r_tmp2, cpu_T[0], cpu_T[1]); |
1603 | 1603 |
tcg_gen_and_tl(r_tmp1, r_tmp1, r_tmp2); |
1604 | 1604 |
tcg_gen_shri_tl(r_tmp1, r_tmp1, 63); |
1605 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp1, tcg_const_tl(0), l1);
|
|
1605 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp1, 0, l1);
|
|
1606 | 1606 |
/* operands of same sign, result different sign */ |
1607 | 1607 |
generate_exception(ctx, EXCP_OVERFLOW); |
1608 | 1608 |
gen_set_label(l1); |
... | ... | |
1627 | 1627 |
tcg_gen_xor_tl(r_tmp1, r_tmp1, cpu_T[0]); |
1628 | 1628 |
tcg_gen_and_tl(r_tmp1, r_tmp1, r_tmp2); |
1629 | 1629 |
tcg_gen_shri_tl(r_tmp1, r_tmp1, 63); |
1630 |
tcg_gen_brcond_tl(TCG_COND_EQ, r_tmp1, tcg_const_tl(0), l1);
|
|
1630 |
tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp1, 0, l1);
|
|
1631 | 1631 |
/* operands of different sign, first operand and result different sign */ |
1632 | 1632 |
generate_exception(ctx, EXCP_OVERFLOW); |
1633 | 1633 |
gen_set_label(l1); |
... | ... | |
1675 | 1675 |
{ |
1676 | 1676 |
int l1 = gen_new_label(); |
1677 | 1677 |
|
1678 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), l1);
|
|
1678 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, l1);
|
|
1679 | 1679 |
gen_store_gpr(cpu_T[0], rd); |
1680 | 1680 |
gen_set_label(l1); |
1681 | 1681 |
} |
... | ... | |
1685 | 1685 |
{ |
1686 | 1686 |
int l1 = gen_new_label(); |
1687 | 1687 |
|
1688 |
tcg_gen_brcond_tl(TCG_COND_NE, cpu_T[1], tcg_const_tl(0), l1);
|
|
1688 |
tcg_gen_brcondi_tl(TCG_COND_NE, cpu_T[1], 0, l1);
|
|
1689 | 1689 |
gen_store_gpr(cpu_T[0], rd); |
1690 | 1690 |
gen_set_label(l1); |
1691 | 1691 |
} |
... | ... | |
1722 | 1722 |
int l2 = gen_new_label(); |
1723 | 1723 |
|
1724 | 1724 |
tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0x1f); |
1725 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[0], tcg_const_tl(0), l1);
|
|
1725 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[0], 0, l1);
|
|
1726 | 1726 |
{ |
1727 | 1727 |
TCGv r_tmp1 = new_tmp(); |
1728 | 1728 |
TCGv r_tmp2 = new_tmp(); |
... | ... | |
1784 | 1784 |
int l2 = gen_new_label(); |
1785 | 1785 |
|
1786 | 1786 |
tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0x3f); |
1787 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[0], tcg_const_tl(0), l1);
|
|
1787 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[0], 0, l1);
|
|
1788 | 1788 |
{ |
1789 | 1789 |
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_TL); |
1790 | 1790 |
|
... | ... | |
1873 | 1873 |
{ |
1874 | 1874 |
int l1 = gen_new_label(); |
1875 | 1875 |
|
1876 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), l1);
|
|
1876 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, l1);
|
|
1877 | 1877 |
{ |
1878 | 1878 |
TCGv r_tmp1 = new_tmp(); |
1879 | 1879 |
TCGv r_tmp2 = new_tmp(); |
... | ... | |
1907 | 1907 |
{ |
1908 | 1908 |
int l1 = gen_new_label(); |
1909 | 1909 |
|
1910 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), l1);
|
|
1910 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, l1);
|
|
1911 | 1911 |
{ |
1912 | 1912 |
TCGv r_tmp1 = new_tmp(); |
1913 | 1913 |
TCGv r_tmp2 = new_tmp(); |
... | ... | |
1950 | 1950 |
{ |
1951 | 1951 |
int l1 = gen_new_label(); |
1952 | 1952 |
|
1953 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), l1);
|
|
1953 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, l1);
|
|
1954 | 1954 |
{ |
1955 | 1955 |
TCGv r_tc_off = new_tmp(); |
1956 | 1956 |
TCGv r_tc_off_tl = tcg_temp_new(TCG_TYPE_TL); |
... | ... | |
1958 | 1958 |
int l2 = gen_new_label(); |
1959 | 1959 |
int l3 = gen_new_label(); |
1960 | 1960 |
|
1961 |
tcg_gen_brcond_tl(TCG_COND_NE, cpu_T[0], tcg_const_tl(1ULL << 63), l2);
|
|
1962 |
tcg_gen_brcond_tl(TCG_COND_NE, cpu_T[1], tcg_const_tl(-1ULL), l2);
|
|
1961 |
tcg_gen_brcondi_tl(TCG_COND_NE, cpu_T[0], 1ULL << 63, l2);
|
|
1962 |
tcg_gen_brcondi_tl(TCG_COND_NE, cpu_T[1], -1ULL, l2);
|
|
1963 | 1963 |
tcg_gen_div_i64(cpu_T[0], cpu_T[0], cpu_T[1]); |
1964 | 1964 |
tcg_gen_movi_tl(cpu_T[1], 0); |
1965 | 1965 |
tcg_gen_br(l3); |
... | ... | |
1984 | 1984 |
{ |
1985 | 1985 |
int l1 = gen_new_label(); |
1986 | 1986 |
|
1987 |
tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), l1);
|
|
1987 |
tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_T[1], 0, l1);
|
|
1988 | 1988 |
{ |
1989 | 1989 |
TCGv r_tmp1 = tcg_temp_new(TCG_TYPE_I64); |
1990 | 1990 |
TCGv r_tmp2 = tcg_temp_new(TCG_TYPE_I64); |
... | ... | |
5569 | 5569 |
tcg_gen_ld_ptr(r_ptr, cpu_env, offsetof(CPUState, fpu)); |
5570 | 5570 |
tcg_gen_ld_i32(r_tmp, r_ptr, offsetof(CPUMIPSFPUContext, fcr31)); |
5571 | 5571 |
tcg_gen_andi_i32(r_tmp, r_tmp, ccbit); |
5572 |
tcg_gen_brcond_i32(cond, r_tmp, tcg_const_i32(0), l1);
|
|
5572 |
tcg_gen_brcondi_i32(cond, r_tmp, 0, l1);
|
|
5573 | 5573 |
tcg_gen_mov_tl(t0, t1); |
5574 | 5574 |
gen_set_label(l1); |
5575 | 5575 |
dead_tmp(r_tmp); |
... | ... | |
6656 | 6656 |
|
6657 | 6657 |
MIPS_DEBUG("blikely condition (" TARGET_FMT_lx ")", ctx->pc + 4); |
6658 | 6658 |
tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, bcond)); |
6659 |
tcg_gen_brcond_tl(TCG_COND_NE, r_tmp, tcg_const_tl(0), l1);
|
|
6659 |
tcg_gen_brcondi_tl(TCG_COND_NE, r_tmp, 0, l1);
|
|
6660 | 6660 |
gen_op_save_state(ctx->hflags & ~MIPS_HFLAG_BMASK); |
6661 | 6661 |
gen_goto_tb(ctx, 1, ctx->pc + 4); |
6662 | 6662 |
gen_set_label(l1); |
... | ... | |
7214 | 7214 |
int l1 = gen_new_label(); |
7215 | 7215 |
|
7216 | 7216 |
tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, bcond)); |
7217 |
tcg_gen_brcond_tl(TCG_COND_NE, r_tmp, tcg_const_tl(0), l1);
|
|
7217 |
tcg_gen_brcondi_tl(TCG_COND_NE, r_tmp, 0, l1);
|
|
7218 | 7218 |
gen_goto_tb(ctx, 1, ctx->pc + 4); |
7219 | 7219 |
gen_set_label(l1); |
7220 | 7220 |
gen_goto_tb(ctx, 0, ctx->btarget); |
Also available in: Unified diff