qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
	qemu-s390x@nongnu.org
Subject: Re: [PATCH 07/24] target/ppc: Use tcg_gen_negsetcond_*
Date: Tue, 8 Aug 2023 13:51:00 -0300	[thread overview]
Message-ID: <e3d08774-850c-315e-9902-18fe4d76c1f7@gmail.com> (raw)
In-Reply-To: <20230808031143.50925-8-richard.henderson@linaro.org>



On 8/8/23 00:11, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>


>   target/ppc/translate/fixedpoint-impl.c.inc | 6 ++++--
>   target/ppc/translate/vmx-impl.c.inc        | 8 +++-----
>   2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/target/ppc/translate/fixedpoint-impl.c.inc b/target/ppc/translate/fixedpoint-impl.c.inc
> index f47f1a50e8..4ce02fd3a4 100644
> --- a/target/ppc/translate/fixedpoint-impl.c.inc
> +++ b/target/ppc/translate/fixedpoint-impl.c.inc
> @@ -342,12 +342,14 @@ static bool do_set_bool_cond(DisasContext *ctx, arg_X_bi *a, bool neg, bool rev)
>       uint32_t mask = 0x08 >> (a->bi & 0x03);
>       TCGCond cond = rev ? TCG_COND_EQ : TCG_COND_NE;
>       TCGv temp = tcg_temp_new();
> +    TCGv zero = tcg_constant_tl(0);
>   
>       tcg_gen_extu_i32_tl(temp, cpu_crf[a->bi >> 2]);
>       tcg_gen_andi_tl(temp, temp, mask);
> -    tcg_gen_setcondi_tl(cond, cpu_gpr[a->rt], temp, 0);
>       if (neg) {
> -        tcg_gen_neg_tl(cpu_gpr[a->rt], cpu_gpr[a->rt]);
> +        tcg_gen_negsetcond_tl(cond, cpu_gpr[a->rt], temp, zero);
> +    } else {
> +        tcg_gen_setcond_tl(cond, cpu_gpr[a->rt], temp, zero);
>       }
>       return true;
>   }
> diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc
> index c8712dd7d8..6d7669aabd 100644
> --- a/target/ppc/translate/vmx-impl.c.inc
> +++ b/target/ppc/translate/vmx-impl.c.inc
> @@ -1341,8 +1341,7 @@ static bool trans_VCMPEQUQ(DisasContext *ctx, arg_VC *a)
>       tcg_gen_xor_i64(t1, t0, t1);
>   
>       tcg_gen_or_i64(t1, t1, t2);
> -    tcg_gen_setcondi_i64(TCG_COND_EQ, t1, t1, 0);
> -    tcg_gen_neg_i64(t1, t1);
> +    tcg_gen_negsetcond_i64(TCG_COND_EQ, t1, t1, tcg_constant_i64(0));
>   
>       set_avr64(a->vrt, t1, true);
>       set_avr64(a->vrt, t1, false);
> @@ -1365,15 +1364,14 @@ static bool do_vcmpgtq(DisasContext *ctx, arg_VC *a, bool sign)
>   
>       get_avr64(t0, a->vra, false);
>       get_avr64(t1, a->vrb, false);
> -    tcg_gen_setcond_i64(TCG_COND_GTU, t2, t0, t1);
> +    tcg_gen_negsetcond_i64(TCG_COND_GTU, t2, t0, t1);
>   
>       get_avr64(t0, a->vra, true);
>       get_avr64(t1, a->vrb, true);
>       tcg_gen_movcond_i64(TCG_COND_EQ, t2, t0, t1, t2, tcg_constant_i64(0));
> -    tcg_gen_setcond_i64(sign ? TCG_COND_GT : TCG_COND_GTU, t1, t0, t1);
> +    tcg_gen_negsetcond_i64(sign ? TCG_COND_GT : TCG_COND_GTU, t1, t0, t1);
>   
>       tcg_gen_or_i64(t1, t1, t2);
> -    tcg_gen_neg_i64(t1, t1);
>   
>       set_avr64(a->vrt, t1, true);
>       set_avr64(a->vrt, t1, false);


  reply	other threads:[~2023-08-08 16:52 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  3:11 [PATCH for-8.2 00/24] tcg: Introduce negsetcond opcodes Richard Henderson
2023-08-08  3:11 ` [PATCH 01/24] " Richard Henderson
2023-08-10 16:12   ` Peter Maydell
2023-08-10 16:39     ` Richard Henderson
2023-08-08  3:11 ` [PATCH 02/24] tcg: Use tcg_gen_negsetcond_* Richard Henderson
2023-08-08 15:55   ` Peter Maydell
2023-08-08 16:04     ` Richard Henderson
2023-08-10 16:13   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 03/24] target/alpha: Use tcg_gen_movcond_i64 in gen_fold_mzero Richard Henderson
2023-08-10 16:19   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 04/24] target/arm: Use tcg_gen_negsetcond_* Richard Henderson
2023-08-10 16:22   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 05/24] target/m68k: " Richard Henderson
2023-08-10 16:24   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 06/24] target/openrisc: " Richard Henderson
2023-08-10 16:24   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 07/24] target/ppc: " Richard Henderson
2023-08-08 16:51   ` Daniel Henrique Barboza [this message]
2023-08-15 12:54   ` Nicholas Piggin
2023-08-08  3:11 ` [PATCH 08/24] target/sparc: Use tcg_gen_movcond_i64 in gen_edge Richard Henderson
2023-08-10 16:29   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 09/24] target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl Richard Henderson
2023-08-08 15:42   ` Bastian Koppelmann
2023-08-08  3:11 ` [PATCH 10/24] tcg/ppc: Implement negsetcond_* Richard Henderson
2023-08-08 16:55   ` Daniel Henrique Barboza
2023-08-08  3:11 ` [PATCH 11/24] tcg/ppc: Use the Set Boolean Extension Richard Henderson
2023-08-08 16:56   ` Daniel Henrique Barboza
2023-08-15 13:16   ` Nicholas Piggin
2023-08-08  3:11 ` [PATCH 12/24] tcg/aarch64: Implement negsetcond_* Richard Henderson
2023-08-10 16:39   ` Peter Maydell
2023-08-10 16:55     ` Richard Henderson
2023-08-10 16:58       ` Peter Maydell
2023-08-10 17:01         ` Richard Henderson
2023-08-08  3:11 ` [PATCH 13/24] tcg/arm: Implement negsetcond_i32 Richard Henderson
2023-08-10 16:41   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 14/24] tcg/riscv: Implement negsetcond_* Richard Henderson
2023-08-08 16:47   ` Daniel Henrique Barboza
2023-08-08  3:11 ` [PATCH 15/24] tcg/s390x: " Richard Henderson
2023-08-08  3:11 ` [PATCH 16/24] tcg/sparc64: " Richard Henderson
2023-08-11 12:24   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 17/24] tcg/i386: Merge tcg_out_brcond{32,64} Richard Henderson
2023-08-11 10:20   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 18/24] tcg/i386: Merge tcg_out_setcond{32,64} Richard Henderson
2023-08-11 10:21   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 19/24] tcg/i386: Merge tcg_out_movcond{32,64} Richard Henderson
2023-08-11 10:22   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 20/24] tcg/i386: Add cf parameter to tcg_out_cmp Richard Henderson
2023-08-11 10:26   ` Peter Maydell
2023-08-11 10:45     ` Peter Maydell
2023-08-11 15:06       ` Richard Henderson
2023-08-12 17:21         ` Richard Henderson
2023-08-08  3:11 ` [PATCH 21/24] tcg/i386: Use CMP+SBB in tcg_out_setcond Richard Henderson
2023-08-11 12:07   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 22/24] tcg/i386: Clear dest first in tcg_out_setcond if possible Richard Henderson
2023-08-11 12:09   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 23/24] tcg/i386: Use shift in tcg_out_setcond Richard Henderson
2023-08-11 12:10   ` Peter Maydell
2023-08-08  3:11 ` [PATCH 24/24] tcg/i386: Implement negsetcond_* Richard Henderson
2023-08-11 12:13   ` Peter Maydell

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=e3d08774-850c-315e-9902-18fe4d76c1f7@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@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).