|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 3/4] target/mips: Fix msa checking condition in trans_msa_elm_fn() |
Date: | Mon, 30 May 2022 16:03:19 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
On 3/5/22 17:12, Richard Henderson wrote:
On 5/3/22 06:07, nihui wrote:From: Ni Hui <shuizhuyuanluo@126.com> Fix issue that condition of check_msa_enabled(ctx) is reversed that causes segfault when msa elm_fn op encountered. Signed-off-by: Ni Hui <shuizhuyuanluo@126.com> --- target/mips/tcg/msa_translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.cindex aa45bae0aa..92ccc6f921 100644 --- a/target/mips/tcg/msa_translate.c +++ b/target/mips/tcg/msa_translate.c@@ -599,7 +599,7 @@ static bool trans_msa_elm_fn(DisasContext *ctx, arg_msa_elm_df *a,return false; } - if (check_msa_enabled(ctx)) { + if (!check_msa_enabled(ctx)) { return true; }Cc: phil Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Clearly this path is not exercised in TCG tests. Ni, could you contribute tests for the ELM MSA opcodes? Fixes: 2f2745c81a ("target/mips: Convert MSA COPY_U opcode to decodetree")Fixes: 97fe675519 ("target/mips: Convert MSA COPY_S and INSERT opcodes to decodetree")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Queued.
[Prev in Thread] | Current Thread | [Next in Thread] |