On 2/25/19 8:10 AM, Mateja Marjanovic wrote: > + if (rd == 0) { > + /* nop */ > + } else if ((rt == 0) && (rs == 0)) { > + tcg_gen_movi_i64(cpu_gpr[rt], 0); > + tcg_gen_movi_i64(cpu_mmr[rt], 0); > + } else if (rt == 0) { > + tcg_gen_movi_i64(cpu_gpr[rd], 0); > + tcg_gen_mov_i64(cpu_mmr[rd], cpu_gpr[rs]); > + } else if (rs == 0) { > + tcg_gen_mov_i64(cpu_gpr[rd], cpu_gpr[rt]); > + tcg_gen_movi_i64(cpu_mmr[rd], 0); > + } else { > + tcg_gen_mov_i64(cpu_gpr[rd], cpu_gpr[rt]); > + tcg_gen_mov_i64(cpu_mmr[rd], cpu_gpr[rs]); > + }
You should avoid multiplying the cases this way. The same results can be had with if (rd != 0) { gen_load_gpr(cpu_gpr[rd], rt); gen_load_gpr(cpu_mmr[rd], rs); } r~