From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: david@gibson.dropbear.id.au, clg@kaod.org, groug@kaod.org,
qemu-ppc@nongnu.org, Nicholas Piggin <npiggin@gmail.com>,
Anton Johansson <anjo@rev.ng>
Subject: Re: [PATCH for-8.0 v2] target/ppc: Fix temp usage in gen_op_arith_modw
Date: Mon, 10 Apr 2023 08:30:55 -0300 [thread overview]
Message-ID: <4413874a-ecdd-85ed-565e-c7e24656428c@gmail.com> (raw)
In-Reply-To: <20230408070547.3609447-1-richard.henderson@linaro.org>
On 4/8/23 04:05, Richard Henderson wrote:
> Fix a crash writing to 't3', which is now a constant.
> Instead, write the result of the remu to 't1'.
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
And thanks Cedric for picking this up :D
Daniel
>
> Fixes: 7058ff5231a ("target/ppc: Avoid tcg_const_* in translate.c")
> Reported-by: Nicholas Piggin <npiggin@gmail.com>
> Reviewed-by: Anton Johansson <anjo@rev.ng>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>
> v2: Use a temp of the correct type, for ppc64.
> It's what I get for rushing things this afternoon.
>
> r~
>
> ---
> target/ppc/translate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index 9d05357d03..f603f1a939 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -1807,8 +1807,8 @@ static inline void gen_op_arith_modw(DisasContext *ctx, TCGv ret, TCGv arg1,
> TCGv_i32 t2 = tcg_constant_i32(1);
> TCGv_i32 t3 = tcg_constant_i32(0);
> tcg_gen_movcond_i32(TCG_COND_EQ, t1, t1, t3, t2, t1);
> - tcg_gen_remu_i32(t3, t0, t1);
> - tcg_gen_extu_i32_tl(ret, t3);
> + tcg_gen_remu_i32(t0, t0, t1);
> + tcg_gen_extu_i32_tl(ret, t0);
> }
> }
>
prev parent reply other threads:[~2023-04-10 11:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-08 7:05 [PATCH for-8.0 v2] target/ppc: Fix temp usage in gen_op_arith_modw Richard Henderson
2023-04-08 21:24 ` Cédric Le Goater
2023-04-09 2:16 ` Nicholas Piggin
2023-04-10 12:50 ` Fabiano Rosas
2023-04-09 16:21 ` Richard Henderson
2023-04-09 17:29 ` Cédric Le Goater
2023-04-09 18:08 ` Richard Henderson
2023-04-10 11:30 ` Daniel Henrique Barboza [this message]
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=4413874a-ecdd-85ed-565e-c7e24656428c@gmail.com \
--to=danielhb413@gmail.com \
--cc=anjo@rev.ng \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).