aboutsummaryrefslogtreecommitdiff
path: root/target/mips/translate.c
diff options
context:
space:
mode:
authorAleksandar Markovic <amarkovic@wavecomp.com>2019-10-23 12:23:44 +0200
committerAleksandar Markovic <amarkovic@wavecomp.com>2019-10-25 18:37:01 +0200
commitb24b9aec96d655710f3f862d412208e938fa0618 (patch)
treeccc059de5f00e5885ed9cb1f78b3606bda959e4b /target/mips/translate.c
parent8a0ee3802f47365a8c2e3a80a21c2f0b40e1173a (diff)
target/mips: msa: Split helpers for HSUB_<S|U>.<H|W|D>
Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Message-Id: <1571826227-10583-12-git-send-email-aleksandar.markovic@rt-rk.com>
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r--target/mips/translate.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c
index a57e0daeff..4c68c5b980 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -29107,6 +29107,32 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)
break;
}
break;
+ case OPC_HSUB_S_df:
+ switch (df) {
+ case DF_HALF:
+ gen_helper_msa_hsub_s_h(cpu_env, twd, tws, twt);
+ break;
+ case DF_WORD:
+ gen_helper_msa_hsub_s_w(cpu_env, twd, tws, twt);
+ break;
+ case DF_DOUBLE:
+ gen_helper_msa_hsub_s_d(cpu_env, twd, tws, twt);
+ break;
+ }
+ break;
+ case OPC_HSUB_U_df:
+ switch (df) {
+ case DF_HALF:
+ gen_helper_msa_hsub_u_h(cpu_env, twd, tws, twt);
+ break;
+ case DF_WORD:
+ gen_helper_msa_hsub_u_w(cpu_env, twd, tws, twt);
+ break;
+ case DF_DOUBLE:
+ gen_helper_msa_hsub_u_d(cpu_env, twd, tws, twt);
+ break;
+ }
+ break;
case OPC_DOTP_S_df:
gen_helper_msa_dotp_s_df(cpu_env, tdf, twd, tws, twt);
break;
@@ -29125,12 +29151,6 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)
case OPC_DPSUB_U_df:
gen_helper_msa_dpsub_u_df(cpu_env, tdf, twd, tws, twt);
break;
- case OPC_HSUB_S_df:
- gen_helper_msa_hsub_s_df(cpu_env, tdf, twd, tws, twt);
- break;
- case OPC_HSUB_U_df:
- gen_helper_msa_hsub_u_df(cpu_env, tdf, twd, tws, twt);
- break;
}
break;
default: