summaryrefslogtreecommitdiffstats
path: root/target/mips/translate.c
diff options
context:
space:
mode:
authorAleksandar Markovic2019-09-25 14:46:00 +0200
committerAleksandar Markovic2019-10-01 16:58:44 +0200
commit4c5daf386fca86e64ddce8510a336551c6427cae (patch)
tree4f7ee701e1d896c90af0024539eaa80b5734b14a /target/mips/translate.c
parenttarget/mips: msa: Split helpers for <NLOC|NLZC>.<B|H|W|D> (diff)
downloadqemu-4c5daf386fca86e64ddce8510a336551c6427cae.tar.gz
qemu-4c5daf386fca86e64ddce8510a336551c6427cae.tar.xz
qemu-4c5daf386fca86e64ddce8510a336551c6427cae.zip
target/mips: msa: Split helpers for PCNT.<B|H|W|D>
Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1569415572-19635-9-git-send-email-aleksandar.markovic@rt-rk.com>
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r--target/mips/translate.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 6de4609586..0d06ba9671 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -28958,9 +28958,6 @@ static void gen_msa_2r(CPUMIPSState *env, DisasContext *ctx)
#endif
gen_helper_msa_fill_df(cpu_env, tdf, twd, tws); /* trs */
break;
- case OPC_PCNT_df:
- gen_helper_msa_pcnt_df(cpu_env, tdf, twd, tws);
- break;
case OPC_NLOC_df:
switch (df) {
case DF_BYTE:
@@ -28993,6 +28990,22 @@ static void gen_msa_2r(CPUMIPSState *env, DisasContext *ctx)
break;
}
break;
+ case OPC_PCNT_df:
+ switch (df) {
+ case DF_BYTE:
+ gen_helper_msa_pcnt_b(cpu_env, twd, tws);
+ break;
+ case DF_HALF:
+ gen_helper_msa_pcnt_h(cpu_env, twd, tws);
+ break;
+ case DF_WORD:
+ gen_helper_msa_pcnt_w(cpu_env, twd, tws);
+ break;
+ case DF_DOUBLE:
+ gen_helper_msa_pcnt_d(cpu_env, twd, tws);
+ break;
+ }
+ break;
default:
MIPS_INVAL("MSA instruction");
generate_exception_end(ctx, EXCP_RI);