aboutsummaryrefslogtreecommitdiff
path: root/target/mips/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r--target/mips/translate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 559f8fed89..befb87f814 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -18712,10 +18712,14 @@ static void gen_msa_elm_df(CPUMIPSState *env, DisasContext *ctx, uint32_t df,
#endif
switch (MASK_MSA_ELM(ctx->opcode)) {
case OPC_COPY_S_df:
- gen_helper_msa_copy_s_df(cpu_env, tdf, twd, tws, tn);
+ if (likely(wd != 0)) {
+ gen_helper_msa_copy_s_df(cpu_env, tdf, twd, tws, tn);
+ }
break;
case OPC_COPY_U_df:
- gen_helper_msa_copy_u_df(cpu_env, tdf, twd, tws, tn);
+ if (likely(wd != 0)) {
+ gen_helper_msa_copy_u_df(cpu_env, tdf, twd, tws, tn);
+ }
break;
case OPC_INSERT_df:
gen_helper_msa_insert_df(cpu_env, tdf, twd, tws, tn);