qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: nihui <shuizhuyuanluo@126.com>,
	qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH 2/4] target/mips: Fix df_extract_val() and df_extract_df() dfe lookup
Date: Tue, 3 May 2022 08:12:01 -0700	[thread overview]
Message-ID: <4863f69d-0713-6d05-9703-8882ecbb2bfc@linaro.org> (raw)
In-Reply-To: <20220503130708.272850-2-shuizhuyuanluo@126.com>

On 5/3/22 06:07, nihui wrote:
> From: Ni Hui <shuizhuyuanluo@126.com>
> 
> Actually look into dfe structure data so that df_extract_val() and
> df_extract_df() can return immediate and datafield other than BYTE.
> 
> Signed-off-by: Ni Hui <shuizhuyuanluo@126.com>
> ---
>   target/mips/tcg/msa_translate.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c
> index 76307102f2..aa45bae0aa 100644
> --- a/target/mips/tcg/msa_translate.c
> +++ b/target/mips/tcg/msa_translate.c
> @@ -68,8 +68,8 @@ struct dfe {
>   static int df_extract_val(DisasContext *ctx, int x, const struct dfe *s)
>   {
>       for (unsigned i = 0; i < 4; i++) {
> -        if (extract32(x, s->start, s->length) == s->mask) {
> -            return extract32(x, 0, s->start);
> +        if (extract32(x, s[i].start, s[i].length) == s[i].mask) {
> +            return extract32(x, 0, s[i].start);
>           }
>       }
>       return -1;
> @@ -82,7 +82,7 @@ static int df_extract_val(DisasContext *ctx, int x, const struct dfe *s)
>   static int df_extract_df(DisasContext *ctx, int x, const struct dfe *s)
>   {
>       for (unsigned i = 0; i < 4; i++) {
> -        if (extract32(x, s->start, s->length) == s->mask) {
> +        if (extract32(x, s[i].start, s[i].length) == s[i].mask) {
>               return i;
>           }
>       }

Cc: phil
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2022-05-03 15:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 13:07 [PATCH 1/4] target/mips: Fix SAT_S trans helper nihui
2022-05-03 13:07 ` [PATCH 2/4] target/mips: Fix df_extract_val() and df_extract_df() dfe lookup nihui
2022-05-03 15:12   ` Richard Henderson [this message]
2022-05-30 13:59     ` Philippe Mathieu-Daudé via
2022-05-03 13:07 ` [PATCH 3/4] target/mips: Fix msa checking condition in trans_msa_elm_fn() nihui
2022-05-03 15:12   ` Richard Henderson
2022-05-30 14:03     ` Philippe Mathieu-Daudé via
2022-05-03 13:07 ` [PATCH 4/4] target/mips: Do not treat msa INSERT as NOP when wd is zero nihui
2022-05-31  8:09   ` Philippe Mathieu-Daudé via
2022-05-03 15:11 ` [PATCH 1/4] target/mips: Fix SAT_S trans helper Richard Henderson
2022-05-30 13:54   ` Philippe Mathieu-Daudé via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4863f69d-0713-6d05-9703-8882ecbb2bfc@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shuizhuyuanluo@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).