Revisão | 557af48673fee4b0874a479c1bbf4077c58214e1 (tree) |
---|---|
Hora | 2019-01-19 01:20:04 |
Autor | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
fix bnot
@@ -1936,13 +1936,18 @@ DEFINE_INSN(bmcnd1) | ||
1936 | 1936 | result = tcg_temp_local_new(); |
1937 | 1937 | mem = rx_index_addr(id, RX_MEMORY_BYTE, 2, rd, dc, env); |
1938 | 1938 | rx_gen_ldst(RX_MEMORY_BYTE, RX_MEMORY_LD, val, mem); |
1939 | - gen_helper_cond(result, cpu_env, cd); | |
1940 | - tcg_gen_brcondi_i32(TCG_COND_NE, result, 0, l1); | |
1941 | - tcg_gen_andi_i32(val, val, ~(1 << imm)); | |
1942 | - tcg_gen_br(l2); | |
1943 | - gen_set_label(l1); | |
1944 | - tcg_gen_ori_i32(val, val, 1 << imm); | |
1945 | - gen_set_label(l2); | |
1939 | + if (((insn >> 8) & 15) == 15) { | |
1940 | + /* special case bnot #imm, mem */ | |
1941 | + tcg_gen_xori_i32(val, val, 1 << imm); | |
1942 | + } else { | |
1943 | + gen_helper_cond(result, cpu_env, cd); | |
1944 | + tcg_gen_brcondi_i32(TCG_COND_NE, result, 0, l1); | |
1945 | + tcg_gen_andi_i32(val, val, ~(1 << imm)); | |
1946 | + tcg_gen_br(l2); | |
1947 | + gen_set_label(l1); | |
1948 | + tcg_gen_ori_i32(val, val, 1 << imm); | |
1949 | + gen_set_label(l2); | |
1950 | + } | |
1946 | 1951 | rx_gen_ldst(RX_MEMORY_BYTE, RX_MEMORY_ST, val, mem); |
1947 | 1952 | tcg_temp_free(mem); |
1948 | 1953 | tcg_temp_free(val); |
@@ -2694,7 +2699,7 @@ struct op { | ||
2694 | 2699 | OPTABLE(0x4400, 0xfc00, cmp4) |
2695 | 2700 | OPTABLE(0x0604, 0xff3c, cmp5) |
2696 | 2701 | |
2697 | - OPTABLE(0xfc00, 0xfff4, adc2sbb1) | |
2702 | + OPTABLE(0xfc00, 0xfff8, adc2sbb1) | |
2698 | 2703 | |
2699 | 2704 | OPTABLE(0x7e00, 0xffc0, absnegnot1) |
2700 | 2705 | OPTABLE(0xfc03, 0xffc3, absnegnot2) |