qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chinmay Rath <rathc@linux.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>,
	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: Thu, 11 Sep 2025 14:59:30 +0530	[thread overview]
Message-ID: <768c783a-7165-482e-aa28-86430a4527a9@linux.ibm.com> (raw)
In-Reply-To: <7857ae80-63eb-4d18-9618-d6c94cdd0c17@linaro.org>


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 ?

I can send a followup patch doing the same for such insns (including the 
ones in this patch)

Thanks,

Chinmay

> But anyway,
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
> r~


  parent reply	other threads:[~2025-09-11  9:30 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 [this message]
2025-09-15 13:14       ` Richard Henderson
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=768c783a-7165-482e-aa28-86430a4527a9@linux.ibm.com \
    --to=rathc@linux.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=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).