qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Chinmay Rath <rathc@linux.ibm.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org, npiggin@gmail.com,
	danielhb413@gmail.com
Cc: harshpb@linux.ibm.com
Subject: Re: [PATCH 2/5] target/ppc: Move floating-point compare instructions to decodetree.
Date: Mon, 15 Sep 2025 06:14:45 -0700	[thread overview]
Message-ID: <8ca09e2d-47d1-4259-97a7-481d68a979fa@linaro.org> (raw)
In-Reply-To: <768c783a-7165-482e-aa28-86430a4527a9@linux.ibm.com>

On 9/11/25 02:29, Chinmay Rath wrote:
> 
> On 8/27/25 12:49, Richard Henderson wrote:
>> On 6/19/25 19:58, Chinmay Rath wrote:
>>> +static bool do_helper_cmp(DisasContext *ctx, arg_X_bf *a,
>>> +                          void (*helper)(TCGv_env, TCGv_i64, TCGv_i64,
>>> +                                         TCGv_i32))
>>> +    REQUIRE_INSNS_FLAGS(ctx, FLOAT);
>>
>> ...
>>
>>> +TRANS(FCMPU, do_helper_cmp, gen_helper_FCMPU);
>>> +TRANS(FCMPO, do_helper_cmp, gen_helper_FCMPO);
>>
>> It's probably better to standardize on TRANS_FLAGS even though the flags checked is the 
>> same for both of these.
>>
> Hi Richard,
> 
> I did notice in the code that there are quite many instructions using TRANS and doing flag 
> check in the common helper.
> For example, in target/ppc/translate/fixedpoint-impl.c.inc :
> 
> /static bool do_set_bool_cond(DisasContext *ctx, arg_X_bi *a, bool neg, bool rev)
> {
>      REQUIRE_INSNS_FLAGS2(ctx, ISA310);
>      uint32_t mask = 0x08 >> (a->bi & 0x03);
>      ....
>      return true;
> }
> 
> TRANS(SETBC, do_set_bool_cond, false, false)
> TRANS(SETBCR, do_set_bool_cond, false, true)
> TRANS(SETNBC, do_set_bool_cond, true, false)
> TRANS(SETNBCR, do_set_bool_cond, true, true)
> /
> 
> Do we want to standardize the use of TRANS_FLAGS in all such existing insns ?

Yes, I think so.


r~


  reply	other threads:[~2025-09-15 13:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19  9:58 [PATCH 0/5] target/ppc: Move floating-point instructions to decodetree Chinmay Rath
2025-06-19  9:58 ` [PATCH 1/5] target/ppc: Move floating-point rounding and conversion " Chinmay Rath
2025-06-19  9:58 ` [PATCH 2/5] target/ppc: Move floating-point compare " Chinmay Rath
2025-08-27  7:19   ` Richard Henderson
2025-09-04 12:27     ` Chinmay Rath
2025-09-11  9:29     ` Chinmay Rath
2025-09-15 13:14       ` Richard Henderson [this message]
2025-06-19  9:58 ` [PATCH 3/5] target/ppc: Move floating-point move " Chinmay Rath
2025-06-19  9:58 ` [PATCH 4/5] target/ppc: Move remaining " Chinmay Rath
2025-06-19  9:58 ` [PATCH 5/5] MAINTAINERS: Add myself as reviewer for PowerPC TCG CPUs Chinmay Rath
2025-06-19 11:57   ` Cédric Le Goater
2025-06-30  6:41     ` Chinmay Rath
2025-06-30  6:42 ` [PATCH 0/5] target/ppc: Move floating-point instructions to decodetree Chinmay Rath
2025-08-27  7:23 ` Richard Henderson

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=8ca09e2d-47d1-4259-97a7-481d68a979fa@linaro.org \
    --to=richard.henderson@linaro.org \
    --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 \
    /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).