[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/49] target/mips: Do not treat msa INSERT as NOP when wd is zero
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 05/49] target/mips: Do not treat msa INSERT as NOP when wd is zero |
Date: |
Sat, 11 Jun 2022 12:32:28 +0200 |
From: Ni Hui <shuizhuyuanluo@126.com>
Only for msa COPY_U/COPY_S with wd zero, we treat it as NOP.
Move this special rule into COPY_U and COPY_S trans function.
Fixes: 97fe675519 ("target/mips: Convert MSA COPY_S and INSERT opcodes to
decodetree")
Signed-off-by: Ni Hui <shuizhuyuanluo@126.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220503130708.272850-4-shuizhuyuanluo@126.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/tcg/msa_translate.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c
index 92ccc6f921..0b3dd0957c 100644
--- a/target/mips/tcg/msa_translate.c
+++ b/target/mips/tcg/msa_translate.c
@@ -603,11 +603,6 @@ static bool trans_msa_elm_fn(DisasContext *ctx,
arg_msa_elm_df *a,
return true;
}
- if (a->wd == 0) {
- /* Treat as NOP. */
- return true;
- }
-
gen_msa_elm[a->df](cpu_env,
tcg_constant_i32(a->wd),
tcg_constant_i32(a->ws),
@@ -624,6 +619,11 @@ static bool trans_msa_elm_fn(DisasContext *ctx,
arg_msa_elm_df *a,
static bool trans_COPY_U(DisasContext *ctx, arg_msa_elm_df *a)
{
+ if (a->wd == 0) {
+ /* Treat as NOP. */
+ return true;
+ }
+
static gen_helper_piii * const gen_msa_copy_u[4] = {
gen_helper_msa_copy_u_b, gen_helper_msa_copy_u_h,
NULL_IF_MIPS32(gen_helper_msa_copy_u_w), NULL
@@ -634,6 +634,11 @@ static bool trans_COPY_U(DisasContext *ctx, arg_msa_elm_df
*a)
static bool trans_COPY_S(DisasContext *ctx, arg_msa_elm_df *a)
{
+ if (a->wd == 0) {
+ /* Treat as NOP. */
+ return true;
+ }
+
static gen_helper_piii * const gen_msa_copy_s[4] = {
gen_helper_msa_copy_s_b, gen_helper_msa_copy_s_h,
gen_helper_msa_copy_s_w, NULL_IF_MIPS32(gen_helper_msa_copy_s_d)
--
2.36.1
- [PULL 00/49] MIPS patches for 2022-06-11, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 01/49] target/mips: Fix WatchHi.M handling, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 02/49] target/mips: Fix SAT_S trans helper, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 03/49] target/mips: Fix df_extract_val() and df_extract_df() dfe lookup, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 04/49] target/mips: Fix msa checking condition in trans_msa_elm_fn(), Philippe Mathieu-Daudé, 2022/06/11
- [PULL 05/49] target/mips: Do not treat msa INSERT as NOP when wd is zero,
Philippe Mathieu-Daudé <=
- [PULL 06/49] target/mips: Fix store adress of high 64bit in helper_msa_st_b(), Philippe Mathieu-Daudé, 2022/06/11
- [PULL 07/49] target/mips: Fix FTRUNC_S and FTRUNC_U trans helper, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 08/49] target/mips: Fix emulation of nanoMIPS MTHLIP instruction, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 09/49] target/mips: Fix emulation of nanoMIPS EXTRV_S.H instruction, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 10/49] target/mips: Fix emulation of nanoMIPS BPOSGE32C instruction, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 11/49] target/mips: Fix emulation of nanoMIPS BNEC[32] instruction, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 12/49] target/mips: Fix handling of unaligned memory access for nanoMIPS ISA, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 13/49] target/mips: Add missing default cases for some nanoMIPS pools, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 14/49] target/mips: Undeprecate nanoMIPS ISA support in QEMU, Philippe Mathieu-Daudé, 2022/06/11
- [PULL 15/49] hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA, Philippe Mathieu-Daudé, 2022/06/11