On 10/3/21 1:57 PM, Philippe Mathieu-Daudé wrote:
      /* adjust df value for floating-point instruction */
-    tcg_gen_movi_i32(tdf, df + 2);
+    switch (MASK_MSA_3RF(ctx->opcode)) {
+    case OPC_MUL_Q_df:
+    case OPC_MADD_Q_df:
+    case OPC_MSUB_Q_df:
+    case OPC_MULR_Q_df:
+    case OPC_MADDR_Q_df:
+    case OPC_MSUBR_Q_df:
+        tdf = tcg_constant_i32(df + 1);
+        break;
+    default:
+        tdf = tcg_constant_i32(df + 2);
+        break;
+    }

Is a second switch really worth it, maintenance wise?
It doesn't hurt to put an unused constant into the pool...

But it looks ok,
Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to