summaryrefslogtreecommitdiffstats
path: root/target/mips/translate.c
diff options
context:
space:
mode:
authorAleksandar Markovic2019-10-23 12:23:45 +0200
committerAleksandar Markovic2019-10-25 18:37:01 +0200
commitf392d1344e40840ff03a1f4c9ed135551ee28d9d (patch)
tree57f24324e463d7d10808316348bdfb75ea66e04f /target/mips/translate.c
parenttarget/mips: msa: Split helpers for HSUB_<S|U>.<H|W|D> (diff)
downloadqemu-f392d1344e40840ff03a1f4c9ed135551ee28d9d.tar.gz
qemu-f392d1344e40840ff03a1f4c9ed135551ee28d9d.tar.xz
qemu-f392d1344e40840ff03a1f4c9ed135551ee28d9d.zip
target/mips: msa: Split helpers for ASUB_<S|U>.<B|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-13-git-send-email-aleksandar.markovic@rt-rk.com>
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r--target/mips/translate.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 4c68c5b980..20c69d2802 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -28850,6 +28850,38 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)
break;
}
break;
+ case OPC_ASUB_S_df:
+ switch (df) {
+ case DF_BYTE:
+ gen_helper_msa_asub_s_b(cpu_env, twd, tws, twt);
+ break;
+ case DF_HALF:
+ gen_helper_msa_asub_s_h(cpu_env, twd, tws, twt);
+ break;
+ case DF_WORD:
+ gen_helper_msa_asub_s_w(cpu_env, twd, tws, twt);
+ break;
+ case DF_DOUBLE:
+ gen_helper_msa_asub_s_d(cpu_env, twd, tws, twt);
+ break;
+ }
+ break;
+ case OPC_ASUB_U_df:
+ switch (df) {
+ case DF_BYTE:
+ gen_helper_msa_asub_u_b(cpu_env, twd, tws, twt);
+ break;
+ case DF_HALF:
+ gen_helper_msa_asub_u_h(cpu_env, twd, tws, twt);
+ break;
+ case DF_WORD:
+ gen_helper_msa_asub_u_w(cpu_env, twd, tws, twt);
+ break;
+ case DF_DOUBLE:
+ gen_helper_msa_asub_u_d(cpu_env, twd, tws, twt);
+ break;
+ }
+ break;
case OPC_ILVEV_df:
switch (df) {
case DF_BYTE:
@@ -29059,12 +29091,6 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)
case OPC_SUBSUU_S_df:
gen_helper_msa_subsuu_s_df(cpu_env, tdf, twd, tws, twt);
break;
- case OPC_ASUB_S_df:
- gen_helper_msa_asub_s_df(cpu_env, tdf, twd, tws, twt);
- break;
- case OPC_ASUB_U_df:
- gen_helper_msa_asub_u_df(cpu_env, tdf, twd, tws, twt);
- break;
case OPC_DOTP_S_df:
case OPC_DOTP_U_df: