On 3/9/21 8:56 AM, Philippe Mathieu-Daudé wrote:
+    tcg_gen_mov_i64(ax, cpu_gpr[a->rt]);
+    if (a->rd != a->rt) {
+        tcg_gen_mov_i64(cpu_gpr[a->rd], cpu_gpr[a->rt]);
+    }

tcg_gen_mov will perform this test.


+    if (a->rt == 0) {
+        tcg_gen_movi_i64(cpu_gpr[a->rd], 0);
+        tcg_gen_movi_i64(cpu_gpr_hi[a->rd], 0);
+        return true;
+    }

Why not let gen_load_gpr handle this?
It'll all fold away...


r~

Reply via email to