From: Chinmay Rath <rathc@linux.vnet.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>,
Chinmay Rath <rathc@linux.ibm.com>,
qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org, npiggin@gmail.com, danielhb413@gmail.com,
harshpb@linux.ibm.com
Subject: Re: [PATCH v2 2/4] target/ppc: Move VSX vector with length storage access insns to decodetree.
Date: Mon, 17 Jun 2024 17:21:01 +0530 [thread overview]
Message-ID: <94d97af2-62e2-4fde-909b-c57af8ef814f@linux.vnet.ibm.com> (raw)
In-Reply-To: <6638b813-f4ef-4587-b94f-3c24d90ca09e@linaro.org>
Hi Richard,
On 6/17/24 00:43, Richard Henderson wrote:
> On 6/13/24 02:33, Chinmay Rath wrote:
>> +/* EA <- (ra == 0) ? 0 : GPR[ra] */
>> +static TCGv do_ea_calc_ra(DisasContext *ctx, int ra)
>> +{
>> + TCGv EA;
>> + if (!ra) {
>> + EA = tcg_constant_tl(0);
>> + return EA;
>> + }
>> + EA = tcg_temp_new();
>> + if (NARROW_MODE(ctx)) {
>> + tcg_gen_ext32u_tl(EA, cpu_gpr[ra]);
>> + } else {
>> + tcg_gen_mov_tl(EA, cpu_gpr[ra]);
>
> Why are you making a copy, rather than just returning cpu_gpr[ra]?
> If you need to modify the resulting EA, then you also need to make a
> copy for 0.
>
Please ignore my previous response.
I think do_ea_calc_ra should allow modification to the resulting EA,
hence below change appears more appropriate to me :
/* EA <- (ra == 0) ? 0 : GPR[ra] */
static TCGv do_ea_calc_ra(DisasContext *ctx, int ra)
{
TCGv EA = tcg_temp_new();
if (!ra) {
tcg_gen_movi_tl(EA, 0);
return EA;
}
if (NARROW_MODE(ctx)) {
tcg_gen_ext32u_tl(EA, cpu_gpr[ra]);
} else {
tcg_gen_mov_tl(EA, cpu_gpr[ra]);
}
return EA;
}
Let me know your thoughts.
Thanks & Regards,
Chinmay
>
> r~
>
next prev parent reply other threads:[~2024-06-17 11:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 9:33 [PATCH v2 0/4] Move VSX storage access and compare insns to Chinmay Rath
2024-06-13 9:33 ` [PATCH v2 1/4] target/ppc: Moving VSX scalar storage access insns to decodetree Chinmay Rath
2024-06-13 9:33 ` [PATCH v2 2/4] target/ppc: Move VSX vector with length " Chinmay Rath
2024-06-16 19:13 ` Richard Henderson
2024-06-17 10:40 ` Chinmay Rath
2024-06-17 17:45 ` Richard Henderson
2024-06-18 8:16 ` Chinmay Rath
2024-06-17 11:51 ` Chinmay Rath [this message]
2024-06-17 17:57 ` Richard Henderson
2024-06-18 8:19 ` Chinmay Rath
2024-06-13 9:33 ` [PATCH v2 3/4] target/ppc: Move VSX vector " Chinmay Rath
2024-06-13 9:33 ` [PATCH v2 4/4] target/ppc: Move VSX fp compare " Chinmay Rath
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=94d97af2-62e2-4fde-909b-c57af8ef814f@linux.vnet.ibm.com \
--to=rathc@linux.vnet.ibm.com \
--cc=danielhb413@gmail.com \
--cc=harshpb@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--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).