target/mips: MSA, FPU and other cleanups and improvements
v8 cover target/mips: MSA, FPU and other cleanups and improvements
This series contains some patches that split heprers in msa_helper.c. It will make easier for debugging tools to display involved source code, and also introduces some modest performance improvements gains for all involved MSA instructions.
v7->v8:
- added six new demacroing patches
v6->v7:
- excluded patches that have been already upstreamed
- added six new demacroing patches
v5->v6:
- excluded a patch that was included by mistake
v4->v5:
- corrected some spelling and style mistakes in commit messages
- added changing MAINTAINERS too while renaming files
- added two patches on splitting helpers in msa_helper.c
v3->v4:
- corrected some spelling and style mistakes in commit messages
- added a patch on renaming some files in hw/mips
v2->v3:
- changed Malta patch to perform logging
- added change of Aleksandar Rikalo's email
v1->v2:
- added more demacroing
Aleksandar Markovic (14):
target/mips: msa: Split helpers for MADDV.<B|H|W|D> target/mips: msa: Split helpers for MSUBV.<B|H|W|D> target/mips: msa: Split helpers for DPADD_S.<H|W|D> target/mips: msa: Split helpers for DPADD_U.<H|W|D> target/mips: msa: Split helpers for DPSUB_S.<H|W|D> target/mips: msa: Split helpers for DPSUB_U.<H|W|D> target/mips: msa: Split helpers for DOTP_S.<H|W|D> target/mips: msa: Split helpers for DOTP_U.<H|W|D> target/mips: msa: Split helpers for SUBS_S.<B|H|W|D> target/mips: msa: Split helpers for SUBS_U.<B|H|W|D> target/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D> target/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D> target/mips: msa: Split helpers for SUBV.<B|H|W|D> target/mips: msa: Split helpers for MULV.<B|H|W|D>
target/mips/helper.h | 73 ++- target/mips/msa_helper.c | 1296 ++++++++++++++++++++++++++++++-------- target/mips/translate.c | 200 +++++- 3 files changed, 1271 insertions(+), 298 deletions(-)
Signature · 1 line
2.20.1
PATCH v8 1/14 target/mips: msa: Split helpers for MADDV.<B|H|W|D>
Achieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 79 ++++++++++++++++++++++++++++++++++++---- target/mips/translate.c | 19 ++++++++-- 3 files changed, 92 insertions(+), 12 deletions(-)
target/mips/helper.h +5 -1
@@ -950,6 +950,11 @@ DEF_HELPER_4(msa_mod_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_mod_s_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_mod_s_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_maddv_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_maddv_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_maddv_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_maddv_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_asub_s_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_asub_s_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_asub_s_w, void, env, i32, i32, i32)
@@ -1069,7 +1074,6 @@ DEF_HELPER_5(msa_subs_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsus_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_maddv_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_msubv_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dotp_s_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_dotp_u_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +71 -8
97 lines not on this page · raw message
target/mips/translate.c +16 -3
@@ -29057,6 +29057,22 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)break ; }break ; +case OPC_MADDV_df: +switch (df) { +case DF_BYTE : +gen_helper_msa_maddv_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_maddv_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_maddv_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_maddv_d (cpu_env, twd, tws, twt); +break ; + } +break ;case OPC_ASUB_S_df:switch (df) {case DF_BYTE :
@@ -29283,9 +29299,6 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)case OPC_SUBS_U_df:gen_helper_msa_subs_u_df (cpu_env, tdf, twd, tws, twt);break ; -case OPC_MADDV_df: -gen_helper_msa_maddv_df (cpu_env, tdf, twd, tws, twt); -break ;case OPC_SPLAT_df:gen_helper_msa_splat_df (cpu_env, tdf, twd, tws, twt);break ;
Signature · 1 line
2.20.1
PATCH v8 2/14 target/mips: msa: Split helpers for MSUBV.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 79 ++++++++++++++++++++++++++++++++++++---- target/mips/translate.c | 19 ++++++++-- 3 files changed, 93 insertions(+), 11 deletions(-)
target/mips/helper.h +5 -1
@@ -955,6 +955,11 @@ DEF_HELPER_4(msa_maddv_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_maddv_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_maddv_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_msubv_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_msubv_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_msubv_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_msubv_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_asub_s_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_asub_s_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_asub_s_w, void, env, i32, i32, i32)
@@ -1074,7 +1079,6 @@ DEF_HELPER_5(msa_subs_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsus_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_msubv_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dotp_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dotp_u_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_dpadd_s_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +72 -7
97 lines not on this page · raw message
target/mips/translate.c +16 -3
@@ -29073,6 +29073,22 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)break ; }break ; +case OPC_MSUBV_df: +switch (df) { +case DF_BYTE : +gen_helper_msa_msubv_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_msubv_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_msubv_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_msubv_d (cpu_env, twd, tws, twt); +break ; + } +break ;case OPC_ASUB_S_df:switch (df) {case DF_BYTE :
@@ -29305,9 +29321,6 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)case OPC_SUBSUS_U_df:gen_helper_msa_subsus_u_df (cpu_env, tdf, twd, tws, twt);break ; -case OPC_MSUBV_df: -gen_helper_msa_msubv_df (cpu_env, tdf, twd, tws, twt); -break ;case OPC_SUBSUU_S_df:gen_helper_msa_subsuu_s_df (cpu_env, tdf, twd, tws, twt);break ;
Signature · 1 line
2.20.1
PATCH v8 3/14 target/mips: msa: Split helpers for DPADD_S.<H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 4 +- target/mips/msa_helper.c | 90 ++++++++++++++++++++++++++++------------ target/mips/translate.c | 12 +++++- 3 files changed, 78 insertions(+), 28 deletions(-)
target/mips/helper.h +3 -1
@@ -1081,7 +1081,9 @@ DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dotp_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dotp_u_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_dpadd_s_df, void, env, i32, i32, i32, i32) +DEF_HELPER_4(msa_dpadd_s_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpadd_s_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpadd_s_d, void, env, i32, i32, i32) DEF_HELPER_5(msa_dpadd_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dpsub_s_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_dpsub_u_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +64 -26
114 lines not on this page · raw message
target/mips/translate.c +11 -1
@@ -29399,7 +29399,17 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)gen_helper_msa_dotp_u_df (cpu_env, tdf, twd, tws, twt);break ;case OPC_DPADD_S_df: -gen_helper_msa_dpadd_s_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_HALF : +gen_helper_msa_dpadd_s_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_dpadd_s_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_dpadd_s_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_DPADD_U_df:gen_helper_msa_dpadd_u_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 4/14 target/mips: msa: Split helpers for DPADD_U.<H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 4 ++- target/mips/msa_helper.c | 67 ++++++++++++++++++++++++++++++++-------- target/mips/translate.c | 12 ++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
target/mips/helper.h +3 -1
@@ -1084,7 +1084,9 @@ DEF_HELPER_5(msa_dotp_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_4(msa_dpadd_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_s_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_s_d, void, env, i32, i32, i32) -DEF_HELPER_5(msa_dpadd_u_df, void, env, i32, i32, i32, i32) +DEF_HELPER_4(msa_dpadd_u_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpadd_u_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpadd_u_d, void, env, i32, i32, i32) DEF_HELPER_5(msa_dpsub_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_dpsub_u_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_sld_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +54 -13
85 lines not on this page · raw message
target/mips/translate.c +11 -1
@@ -29412,7 +29412,17 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_DPADD_U_df: -gen_helper_msa_dpadd_u_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_HALF : +gen_helper_msa_dpadd_u_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_dpadd_u_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_dpadd_u_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_DPSUB_S_df:gen_helper_msa_dpsub_s_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 5/14 target/mips: msa: Split helpers for DPSUB_S.<H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 4 ++- target/mips/msa_helper.c | 67 ++++++++++++++++++++++++++++++++-------- target/mips/translate.c | 12 ++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
target/mips/helper.h +3 -1
@@ -1087,7 +1087,9 @@ DEF_HELPER_4(msa_dpadd_s_d, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_u_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_u_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_u_d, void, env, i32, i32, i32) -DEF_HELPER_5(msa_dpsub_s_df, void, env, i32, i32, i32, i32) +DEF_HELPER_4(msa_dpsub_s_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpsub_s_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpsub_s_d, void, env, i32, i32, i32) DEF_HELPER_5(msa_dpsub_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_sld_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_splat_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +54 -13
85 lines not on this page · raw message
target/mips/translate.c +11 -1
@@ -29425,7 +29425,17 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_DPSUB_S_df: -gen_helper_msa_dpsub_s_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_HALF : +gen_helper_msa_dpsub_s_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_dpsub_s_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_dpsub_s_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_DPSUB_U_df:gen_helper_msa_dpsub_u_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 6/14 target/mips: msa: Split helpers for DPSUB_U.<H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 4 ++- target/mips/msa_helper.c | 67 ++++++++++++++++++++++++++++++++-------- target/mips/translate.c | 12 ++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
target/mips/helper.h +3 -1
@@ -1090,7 +1090,9 @@ DEF_HELPER_4(msa_dpadd_u_d, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpsub_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpsub_s_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpsub_s_d, void, env, i32, i32, i32) -DEF_HELPER_5(msa_dpsub_u_df, void, env, i32, i32, i32, i32) +DEF_HELPER_4(msa_dpsub_u_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpsub_u_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dpsub_u_d, void, env, i32, i32, i32) DEF_HELPER_5(msa_sld_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_splat_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_vshf_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +54 -13
85 lines not on this page · raw message
target/mips/translate.c +11 -1
@@ -29438,7 +29438,17 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_DPSUB_U_df: -gen_helper_msa_dpsub_u_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_HALF : +gen_helper_msa_dpsub_u_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_dpsub_u_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_dpsub_u_d (cpu_env, twd, tws, twt); +break ; + }break ; }break ;
Signature · 1 line
2.20.1
PATCH v8 7/14 target/mips: msa: Split helpers for DOTP_S.<H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 5 ++- target/mips/msa_helper.c | 66 ++++++++++++++++++++++++++++++++-------- target/mips/translate.c | 12 +++++++- 3 files changed, 69 insertions(+), 14 deletions(-)
target/mips/helper.h +4 -1
@@ -1079,7 +1079,10 @@ DEF_HELPER_5(msa_subs_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsus_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_dotp_s_df, void, env, i32, i32, i32, i32) + +DEF_HELPER_4(msa_dotp_s_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dotp_s_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dotp_s_d, void, env, i32, i32, i32) DEF_HELPER_5(msa_dotp_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_4(msa_dpadd_s_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_dpadd_s_w, void, env, i32, i32, i32)
target/mips/msa_helper.c +54 -12
84 lines not on this page · raw message
target/mips/translate.c +11 -1
@@ -29393,7 +29393,17 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_DOTP_S_df: -gen_helper_msa_dotp_s_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_HALF : +gen_helper_msa_dotp_s_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_dotp_s_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_dotp_s_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_DOTP_U_df:gen_helper_msa_dotp_u_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 8/14 target/mips: msa: Split helpers for DOTP_U.<H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 4 ++- target/mips/msa_helper.c | 65 ++++++++++++++++++++++++++++++++-------- target/mips/translate.c | 12 +++++++- 3 files changed, 67 insertions(+), 14 deletions(-)
target/mips/helper.h +3 -1
@@ -1083,7 +1083,9 @@ DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32) DEF_HELPER_4(msa_dotp_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_dotp_s_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_dotp_s_d, void, env, i32, i32, i32) -DEF_HELPER_5(msa_dotp_u_df, void, env, i32, i32, i32, i32) +DEF_HELPER_4(msa_dotp_u_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dotp_u_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_dotp_u_d, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_dpadd_s_w, void, env, i32, i32, i32)DEF_HELPER_4 (msa_dpadd_s_d, void, env, i32, i32, i32)
target/mips/msa_helper.c +53 -12
83 lines not on this page · raw message
target/mips/translate.c +11 -1
@@ -29406,7 +29406,17 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_DOTP_U_df: -gen_helper_msa_dotp_u_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_HALF : +gen_helper_msa_dotp_u_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_dotp_u_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_dotp_u_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_DPADD_S_df:switch (df) {
Signature · 1 line
2.20.1
PATCH v8 9/14 target/mips: msa: Split helpers for SUBS_S.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 90 ++++++++++++++++++++++++++++++++++------ target/mips/translate.c | 15 ++++++- 3 files changed, 97 insertions(+), 14 deletions(-)
target/mips/helper.h +5 -1
@@ -978,6 +978,11 @@ DEF_HELPER_4(msa_hsub_u_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_hsub_u_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_hsub_u_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_s_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_s_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_s_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_s_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_ilvev_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_ilvev_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_ilvev_w, void, env, i32, i32, i32)
@@ -1074,7 +1079,6 @@ DEF_HELPER_5(msa_srlri_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsl_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsr_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_subs_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subs_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsus_u_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_subsuu_s_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +78 -12
108 lines not on this page · raw message
target/mips/translate.c +14 -1
@@ -29298,7 +29298,20 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_SUBS_S_df: -gen_helper_msa_subs_s_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_BYTE : +gen_helper_msa_subs_s_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_subs_s_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_subs_s_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_subs_s_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_MULV_df:gen_helper_msa_mulv_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 10/14 target/mips: msa: Split helpers for SUBS_U.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 82 ++++++++++++++++++++++++++++++++++++---- target/mips/translate.c | 15 +++++++- 3 files changed, 93 insertions(+), 10 deletions(-)
target/mips/helper.h +5 -1
@@ -983,6 +983,11 @@ DEF_HELPER_4(msa_subs_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_subs_s_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_subs_s_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_u_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_u_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_u_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subs_u_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_ilvev_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_ilvev_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_ilvev_w, void, env, i32, i32, i32)
@@ -1079,7 +1084,6 @@ DEF_HELPER_5(msa_srlri_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsl_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsr_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_subs_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsus_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_mulv_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +74 -8
100 lines not on this page · raw message
target/mips/translate.c +14 -1
@@ -29326,7 +29326,20 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)gen_helper_msa_subv_df (cpu_env, tdf, twd, tws, twt);break ;case OPC_SUBS_U_df: -gen_helper_msa_subs_u_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_BYTE : +gen_helper_msa_subs_u_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_subs_u_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_subs_u_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_subs_u_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_SPLAT_df:gen_helper_msa_splat_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 11/14 target/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 102 ++++++++++++++++++++++++++++++++------- target/mips/translate.c | 15 +++++- 3 files changed, 103 insertions(+), 20 deletions(-)
target/mips/helper.h +5 -1
@@ -988,6 +988,11 @@ DEF_HELPER_4(msa_subs_u_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_subs_u_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_subs_u_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsus_u_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsus_u_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsus_u_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsus_u_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_ilvev_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_ilvev_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_ilvev_w, void, env, i32, i32, i32)
@@ -1084,7 +1089,6 @@ DEF_HELPER_5(msa_srlri_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsl_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsr_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_subsus_u_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32)DEF_HELPER_5 (msa_mulv_df, void, env, i32, i32, i32, i32)
target/mips/msa_helper.c +84 -18
120 lines not on this page · raw message
target/mips/translate.c +14 -1
@@ -29345,7 +29345,20 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)gen_helper_msa_splat_df (cpu_env, tdf, twd, tws, twt);break ;case OPC_SUBSUS_U_df: -gen_helper_msa_subsus_u_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_BYTE : +gen_helper_msa_subsus_u_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_subsus_u_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_subsus_u_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_subsus_u_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_SUBSUU_S_df:gen_helper_msa_subsuu_s_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
PATCH v8 12/14 target/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 102 ++++++++++++++++++++++++++++++++------- target/mips/translate.c | 15 +++++- 3 files changed, 103 insertions(+), 20 deletions(-)
target/mips/helper.h +5 -1
@@ -993,6 +993,11 @@ DEF_HELPER_4(msa_subsus_u_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_subsus_u_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_subsus_u_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsuu_s_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsuu_s_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsuu_s_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subsuu_s_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_ilvev_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_ilvev_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_ilvev_w, void, env, i32, i32, i32)
@@ -1089,7 +1094,6 @@ DEF_HELPER_5(msa_srlri_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsl_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsr_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_subv_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_subsuu_s_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32)DEF_HELPER_4 (msa_dotp_s_h, void, env, i32, i32, i32)
target/mips/msa_helper.c +84 -18
120 lines not on this page · raw message
target/mips/translate.c +14 -1
@@ -29361,7 +29361,20 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_SUBSUU_S_df: -gen_helper_msa_subsuu_s_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_BYTE : +gen_helper_msa_subsuu_s_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_subsuu_s_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_subsuu_s_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_subsuu_s_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_DOTP_S_df:
Signature · 1 line
2.20.1
PATCH v8 13/14 target/mips: msa: Split helpers for SUBV.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 81 +++++++++++++++++++++++++++++++++++----- target/mips/translate.c | 15 +++++++- 3 files changed, 91 insertions(+), 11 deletions(-)
target/mips/helper.h +5 -1
@@ -998,6 +998,11 @@ DEF_HELPER_4(msa_subsuu_s_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_subsuu_s_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_subsuu_s_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subv_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subv_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subv_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_subv_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_ilvev_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_ilvev_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_ilvev_w, void, env, i32, i32, i32)
@@ -1093,7 +1098,6 @@ DEF_HELPER_5(msa_srlri_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsl_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsr_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_subv_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32)DEF_HELPER_4 (msa_dotp_s_h, void, env, i32, i32, i32)
target/mips/msa_helper.c +72 -9
105 lines not on this page · raw message
target/mips/translate.c +14 -1
@@ -29323,7 +29323,20 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx)gen_helper_msa_vshf_df (cpu_env, tdf, twd, tws, twt);break ;case OPC_SUBV_df: -gen_helper_msa_subv_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_BYTE : +gen_helper_msa_subv_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_subv_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_subv_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_subv_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_SUBS_U_df:switch (df) {
Signature · 1 line
2.20.1
PATCH v8 14/14 target/mips: msa: Split helpers for MULV.<B|H|W|D>
In reply to Aleksandar MarkovicAchieves clearer code and slightly better performance.
--- target/mips/helper.h | 6 ++- target/mips/msa_helper.c | 79 ++++++++++++++++++++++++++++++++++++---- target/mips/translate.c | 15 +++++++- 3 files changed, 91 insertions(+), 9 deletions(-)
target/mips/helper.h +5 -1
@@ -960,6 +960,11 @@ DEF_HELPER_4(msa_msubv_h, void, env, i32, i32, i32) DEF_HELPER_4(msa_msubv_w, void, env, i32, i32, i32) DEF_HELPER_4(msa_msubv_d, void, env, i32, i32, i32) +DEF_HELPER_4(msa_mulv_b, void, env, i32, i32, i32) +DEF_HELPER_4(msa_mulv_h, void, env, i32, i32, i32) +DEF_HELPER_4(msa_mulv_w, void, env, i32, i32, i32) +DEF_HELPER_4(msa_mulv_d, void, env, i32, i32, i32) + DEF_HELPER_4(msa_asub_s_b, void, env, i32, i32, i32) DEF_HELPER_4(msa_asub_s_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_asub_s_w, void, env, i32, i32, i32)
@@ -1098,7 +1103,6 @@ DEF_HELPER_5(msa_srlri_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsl_df, void, env, i32, i32, i32, i32) DEF_HELPER_5(msa_binsr_df, void, env, i32, i32, i32, i32) -DEF_HELPER_5(msa_mulv_df, void, env, i32, i32, i32, i32) DEF_HELPER_4(msa_dotp_s_h, void, env, i32, i32, i32)DEF_HELPER_4 (msa_dotp_s_w, void, env, i32, i32, i32)
target/mips/msa_helper.c +72 -7
97 lines not on this page · raw message
target/mips/translate.c +14 -1
@@ -29314,7 +29314,20 @@ static void gen_msa_3r(CPUMIPSState *env, DisasContext *ctx) }break ;case OPC_MULV_df: -gen_helper_msa_mulv_df (cpu_env, tdf, twd, tws, twt); +switch (df) { +case DF_BYTE : +gen_helper_msa_mulv_b (cpu_env, twd, tws, twt); +break ; +case DF_HALF : +gen_helper_msa_mulv_h (cpu_env, twd, tws, twt); +break ; +case DF_WORD : +gen_helper_msa_mulv_w (cpu_env, twd, tws, twt); +break ; +case DF_DOUBLE : +gen_helper_msa_mulv_d (cpu_env, twd, tws, twt); +break ; + }break ;case OPC_SLD_df:gen_helper_msa_sld_df (cpu_env, tdf, twd, tws, twt);
Signature · 1 line
2.20.1
Quoted 55 lines
This series contains some patches that split heprers in
msa_helper.c. It will make easier for debugging tools to display involved source code, and also introduces some modest performance improvements gains for all involved MSA instructions.
v7->v8:- added six new demacroing patches
v6->v7:- excluded patches that have been already upstreamed
- added six new demacroing patches
v5->v6:- excluded a patch that was included by mistake
v4->v5:- corrected some spelling and style mistakes in commit messages
- added changingMAINTAINERStoo while renaming files
- added two patches on splitting helpers inmsa_helper.c
v3->v4:- corrected some spelling and style mistakes in commit messages
- added a patch on renaming some files in hw/mips
v2->v3:- changed Malta patch to perform logging
- added change of Aleksandar Rikalo's email
v1->v2:- added more demacroing
Aleksandar Markovic (14):
target/mips: msa: Split helpers for MADDV.<B|H|W|D> target/mips: msa: Split helpers for MSUBV.<B|H|W|D> target/mips: msa: Split helpers for DPADD_S.<H|W|D> target/mips: msa: Split helpers for DPADD_U.<H|W|D> target/mips: msa: Split helpers for DPSUB_S.<H|W|D> target/mips: msa: Split helpers for DPSUB_U.<H|W|D> target/mips: msa: Split helpers for DOTP_S.<H|W|D> target/mips: msa: Split helpers for DOTP_U.<H|W|D> target/mips: msa: Split helpers for SUBS_S.<B|H|W|D> target/mips: msa: Split helpers for SUBS_U.<B|H|W|D> target/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D> target/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D> target/mips: msa: Split helpers for SUBV.<B|H|W|D> target/mips: msa: Split helpers for MULV.<B|H|W|D>
Quoted 5 lines
target/mips/helper.h | 73 ++- target/mips/msa_helper.c | 1296 ++++++++++++++++++++++++++++++-------- target/mips/translate.c | 200 +++++- 3 files changed, 1271 insertions(+), 298 deletions(-)
For the whole series:
Please run all regression tests. Thank you.
Aleksandar Rikalo
Aleksandar Markovic
AppliedQuoted 6 lines · Aleksandar Markovic
This series contains some patches that split heprers in
msa_helper.c. It will make easier for debugging tools to display involved source code, and also introduces some modest performance improvements gains for all involved MSA instructions.
Applied to MIPS+misc queue.
Quoted 58 lines
v7->v8:- added six new demacroing patches
v6->v7:- excluded patches that have been already upstreamed
- added six new demacroing patches
v5->v6:- excluded a patch that was included by mistake
v4->v5:- corrected some spelling and style mistakes in commit messages
- added changingMAINTAINERStoo while renaming files
- added two patches on splitting helpers inmsa_helper.c
v3->v4:- corrected some spelling and style mistakes in commit messages
- added a patch on renaming some files in hw/mips
v2->v3:- changed Malta patch to perform logging
- added change of Aleksandar Rikalo's email
v1->v2:- added more demacroing
Aleksandar Markovic (14):
target/mips: msa: Split helpers for MADDV.<B|H|W|D> target/mips: msa: Split helpers for MSUBV.<B|H|W|D> target/mips: msa: Split helpers for DPADD_S.<H|W|D> target/mips: msa: Split helpers for DPADD_U.<H|W|D> target/mips: msa: Split helpers for DPSUB_S.<H|W|D> target/mips: msa: Split helpers for DPSUB_U.<H|W|D> target/mips: msa: Split helpers for DOTP_S.<H|W|D> target/mips: msa: Split helpers for DOTP_U.<H|W|D> target/mips: msa: Split helpers for SUBS_S.<B|H|W|D> target/mips: msa: Split helpers for SUBS_U.<B|H|W|D> target/mips: msa: Split helpers for SUBSUS_U.<B|H|W|D> target/mips: msa: Split helpers for SUBSUU_S.<B|H|W|D> target/mips: msa: Split helpers for SUBV.<B|H|W|D> target/mips: msa: Split helpers for MULV.<B|H|W|D>target/mips/helper.h | 73 ++- target/mips/msa_helper.c | 1296 ++++++++++++++++++++++++++++++-------- target/mips/translate.c | 200 +++++- 3 files changed, 1271 insertions(+), 298 deletions(-)--
2.20.1