Révision | 8d3e670a0d1a4ca21fa99f4ff366ac166e45a723 (tree) |
---|---|
l'heure | 2019-01-13 22:57:43 |
Auteur | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
bnot fix
@@ -1926,15 +1926,6 @@ DEFINE_INSN(bnot1) | ||
1926 | 1926 | dc->pc += 3; |
1927 | 1927 | } |
1928 | 1928 | |
1929 | -DEFINE_INSN(bnot3) | |
1930 | -{ | |
1931 | - int imm, rd; | |
1932 | - imm = (insn >> 16) & 31; | |
1933 | - rd = (insn >> 8) & 15; | |
1934 | - tcg_gen_xori_i32(cpu_regs[rd], cpu_regs[rd], 1 << imm); | |
1935 | - dc->pc += 3; | |
1936 | -} | |
1937 | - | |
1938 | 1929 | DEFINE_INSN(bmcnd1) |
1939 | 1930 | { |
1940 | 1931 | int imm, id, rd; |
@@ -1975,17 +1966,22 @@ DEFINE_INSN(bmcnd2) | ||
1975 | 1966 | imm = (insn >> 16) & 31; |
1976 | 1967 | cd = tcg_const_local_i32((insn >> 12) & 15); |
1977 | 1968 | rd = (insn >> 8) & 15; |
1978 | - result = tcg_temp_local_new(); | |
1979 | - gen_helper_cond(result, cpu_env, cd); | |
1980 | - tcg_gen_brcondi_i32(TCG_COND_NE, result, 0, l1); | |
1981 | - tcg_gen_andi_i32(cpu_regs[rd], cpu_regs[rd], ~(1 << imm)); | |
1982 | - tcg_gen_br(l2); | |
1983 | - gen_set_label(l1); | |
1984 | - tcg_gen_ori_i32(cpu_regs[rd], cpu_regs[rd], 1 << imm); | |
1985 | - gen_set_label(l2); | |
1986 | - dc->pc += 3; | |
1969 | + if (((insn >> 12) & 15) == 15) { | |
1970 | + /* special case bnot #imm, reg */ | |
1971 | + tcg_gen_xori_i32(cpu_regs[rd], cpu_regs[rd], 1 << imm); | |
1972 | + } else { | |
1973 | + result = tcg_temp_local_new(); | |
1974 | + gen_helper_cond(result, cpu_env, cd); | |
1975 | + tcg_gen_brcondi_i32(TCG_COND_NE, result, 0, l1); | |
1976 | + tcg_gen_andi_i32(cpu_regs[rd], cpu_regs[rd], ~(1 << imm)); | |
1977 | + tcg_gen_br(l2); | |
1978 | + gen_set_label(l1); | |
1979 | + tcg_gen_ori_i32(cpu_regs[rd], cpu_regs[rd], 1 << imm); | |
1980 | + gen_set_label(l2); | |
1981 | + tcg_temp_free(result); | |
1982 | + } | |
1987 | 1983 | tcg_temp_free(cd); |
1988 | - tcg_temp_free(result); | |
1984 | + dc->pc += 3; | |
1989 | 1985 | } |
1990 | 1986 | |
1991 | 1987 | DEFINE_INSN(scmpu) |
@@ -2745,7 +2741,6 @@ struct op { | ||
2745 | 2741 | OPTABLE(0x7a00, 0xfe00, bop3) |
2746 | 2742 | OPTABLE(0xfce0, 0xffe0, bnot1) |
2747 | 2743 | OPTABLE(0xfc6c, 0xfffc, bop2) |
2748 | - OPTABLE(0xfde0, 0xffe0, bnot3) | |
2749 | 2744 | OPTABLE(0xf000, 0xfc08, bop1) |
2750 | 2745 | OPTABLE(0xfc60, 0xfffc, bop2) |
2751 | 2746 | OPTABLE(0x7800, 0xfe00, bop3) |