diff options
author | Aleksandar Markovic | 2019-09-25 14:46:05 +0200 |
---|---|---|
committer | Aleksandar Markovic | 2019-10-01 16:58:44 +0200 |
commit | 755107e226ca0078a0d41ca06392ca253cbcd224 (patch) | |
tree | 305d4cbefe5b877bd7aa653dbf16d51604815cd8 /target/mips/translate.c | |
parent | target/mips: msa: Split helpers for AVE_<S|U>.<B|H|W|D> (diff) | |
download | qemu-755107e226ca0078a0d41ca06392ca253cbcd224.tar.gz qemu-755107e226ca0078a0d41ca06392ca253cbcd224.tar.xz qemu-755107e226ca0078a0d41ca06392ca253cbcd224.zip |
target/mips: msa: Split helpers for AVER_<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 <arikalo@wavecomp.com>
Message-Id: <1569415572-19635-14-git-send-email-aleksandar.markovic@rt-rk.com>
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r-- | target/mips/translate.c | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c index 2b0abbbe7b..9b186d3cb6 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28498,6 +28498,38 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) break; } break; + case OPC_AVER_S_df: + switch (df) { + case DF_BYTE: + gen_helper_msa_aver_s_b(cpu_env, twd, tws, twt); + break; + case DF_HALF: + gen_helper_msa_aver_s_h(cpu_env, twd, tws, twt); + break; + case DF_WORD: + gen_helper_msa_aver_s_w(cpu_env, twd, tws, twt); + break; + case DF_DOUBLE: + gen_helper_msa_aver_s_d(cpu_env, twd, tws, twt); + break; + } + break; + case OPC_AVER_U_df: + switch (df) { + case DF_BYTE: + gen_helper_msa_aver_u_b(cpu_env, twd, tws, twt); + break; + case DF_HALF: + gen_helper_msa_aver_u_h(cpu_env, twd, tws, twt); + break; + case DF_WORD: + gen_helper_msa_aver_u_w(cpu_env, twd, tws, twt); + break; + case DF_DOUBLE: + gen_helper_msa_aver_u_d(cpu_env, twd, tws, twt); + break; + } + break; case OPC_SLL_df: gen_helper_msa_sll_df(cpu_env, tdf, twd, tws, twt); break; @@ -28615,9 +28647,6 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) case OPC_MAX_A_df: gen_helper_msa_max_a_df(cpu_env, tdf, twd, tws, twt); break; - case OPC_AVER_S_df: - gen_helper_msa_aver_s_df(cpu_env, tdf, twd, tws, twt); - break; case OPC_MOD_S_df: gen_helper_msa_mod_s_df(cpu_env, tdf, twd, tws, twt); break; @@ -28627,9 +28656,6 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) case OPC_MIN_A_df: gen_helper_msa_min_a_df(cpu_env, tdf, twd, tws, twt); break; - case OPC_AVER_U_df: - gen_helper_msa_aver_u_df(cpu_env, tdf, twd, tws, twt); - break; case OPC_MOD_U_df: gen_helper_msa_mod_u_df(cpu_env, tdf, twd, tws, twt); break; |