* [PATCH 0/2] tcg/aarch64: Fixes for test comparisons @ 2024-03-09 17:51 Richard Henderson 2024-03-09 17:51 ` [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp " Richard Henderson 2024-03-09 17:51 ` [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond " Richard Henderson 0 siblings, 2 replies; 6+ messages in thread From: Richard Henderson @ 2024-03-09 17:51 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini, peter.maydell Oopsies exposed by Paolo's target/i386 changes. r~ Richard Henderson (2): tcg/aarch64: Fix tcg_out_cmp for test comparisons tcg/aarch64: Fix tcg_out_brcond for test comparisons tcg/aarch64/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons 2024-03-09 17:51 [PATCH 0/2] tcg/aarch64: Fixes for test comparisons Richard Henderson @ 2024-03-09 17:51 ` Richard Henderson 2024-03-09 17:57 ` Philippe Mathieu-Daudé 2024-03-10 15:48 ` Michael Tokarev 2024-03-09 17:51 ` [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond " Richard Henderson 1 sibling, 2 replies; 6+ messages in thread From: Richard Henderson @ 2024-03-09 17:51 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini, peter.maydell, qemu-stable Pass the type to tcg_out_logicali; remove the assert, duplicated at the start of tcg_out_logicali. Cc: qemu-stable@nongnu.org Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/aarch64/tcg-target.c.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index dec8ecc1b6..38446c167e 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1388,8 +1388,7 @@ static void tcg_out_cmp(TCGContext *s, TCGType ext, TCGCond cond, TCGReg a, if (!const_b) { tcg_out_insn(s, 3510, ANDS, ext, TCG_REG_XZR, a, b); } else { - tcg_debug_assert(is_limm(b)); - tcg_out_logicali(s, I3404_ANDSI, 0, TCG_REG_XZR, a, b); + tcg_out_logicali(s, I3404_ANDSI, ext, TCG_REG_XZR, a, b); } } else { if (!const_b) { -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons 2024-03-09 17:51 ` [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp " Richard Henderson @ 2024-03-09 17:57 ` Philippe Mathieu-Daudé 2024-03-10 15:48 ` Michael Tokarev 1 sibling, 0 replies; 6+ messages in thread From: Philippe Mathieu-Daudé @ 2024-03-09 17:57 UTC (permalink / raw) To: Richard Henderson, qemu-devel; +Cc: pbonzini, peter.maydell, qemu-stable On 9/3/24 18:51, Richard Henderson wrote: > Pass the type to tcg_out_logicali; remove the assert, duplicated > at the start of tcg_out_logicali. > > Cc: qemu-stable@nongnu.org > Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Oops, thanks. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > tcg/aarch64/tcg-target.c.inc | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons 2024-03-09 17:51 ` [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp " Richard Henderson 2024-03-09 17:57 ` Philippe Mathieu-Daudé @ 2024-03-10 15:48 ` Michael Tokarev 1 sibling, 0 replies; 6+ messages in thread From: Michael Tokarev @ 2024-03-10 15:48 UTC (permalink / raw) To: Richard Henderson, qemu-devel; +Cc: pbonzini, peter.maydell, qemu-stable 09.03.2024 20:51, Richard Henderson wrote: > Pass the type to tcg_out_logicali; remove the assert, duplicated > at the start of tcg_out_logicali. > > Cc: qemu-stable@nongnu.org > Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> v8.2.0-1139-g339adf2f38 isn't in any released version and hasn't been picked up for stable either, so neither of the two changes has to go to stable. Still, thank you for remembering to Cc qemu-stable@, - it is better to have extra there and reject what's not needed than to miss something important. Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> > --- > tcg/aarch64/tcg-target.c.inc | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc > index dec8ecc1b6..38446c167e 100644 > --- a/tcg/aarch64/tcg-target.c.inc > +++ b/tcg/aarch64/tcg-target.c.inc > @@ -1388,8 +1388,7 @@ static void tcg_out_cmp(TCGContext *s, TCGType ext, TCGCond cond, TCGReg a, > if (!const_b) { > tcg_out_insn(s, 3510, ANDS, ext, TCG_REG_XZR, a, b); > } else { > - tcg_debug_assert(is_limm(b)); > - tcg_out_logicali(s, I3404_ANDSI, 0, TCG_REG_XZR, a, b); > + tcg_out_logicali(s, I3404_ANDSI, ext, TCG_REG_XZR, a, b); > } > } else { > if (!const_b) { ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond for test comparisons 2024-03-09 17:51 [PATCH 0/2] tcg/aarch64: Fixes for test comparisons Richard Henderson 2024-03-09 17:51 ` [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp " Richard Henderson @ 2024-03-09 17:51 ` Richard Henderson 2024-03-09 17:59 ` Philippe Mathieu-Daudé 1 sibling, 1 reply; 6+ messages in thread From: Richard Henderson @ 2024-03-09 17:51 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini, peter.maydell, qemu-stable When converting test vs UINT32_MAX to compare vs 0, we need to adjust the condition to match. Cc: qemu-stable@nongnu.org Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/aarch64/tcg-target.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 38446c167e..56fc9cb9e0 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1464,6 +1464,7 @@ static void tcg_out_brcond(TCGContext *s, TCGType ext, TCGCond c, TCGArg a, case TCG_COND_TSTNE: /* tst xN,0xffffffff; b.ne L -> cbnz wN,L */ if (b_const && b == UINT32_MAX) { + c = tcg_tst_eqne_cond(c); ext = TCG_TYPE_I32; need_cmp = false; break; -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond for test comparisons 2024-03-09 17:51 ` [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond " Richard Henderson @ 2024-03-09 17:59 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 6+ messages in thread From: Philippe Mathieu-Daudé @ 2024-03-09 17:59 UTC (permalink / raw) To: Richard Henderson, qemu-devel; +Cc: pbonzini, peter.maydell, qemu-stable On 9/3/24 18:51, Richard Henderson wrote: > When converting test vs UINT32_MAX to compare vs 0, we need to > adjust the condition to match. > > Cc: qemu-stable@nongnu.org > Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > tcg/aarch64/tcg-target.c.inc | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-10 15:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-09 17:51 [PATCH 0/2] tcg/aarch64: Fixes for test comparisons Richard Henderson 2024-03-09 17:51 ` [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp " Richard Henderson 2024-03-09 17:57 ` Philippe Mathieu-Daudé 2024-03-10 15:48 ` Michael Tokarev 2024-03-09 17:51 ` [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond " Richard Henderson 2024-03-09 17:59 ` Philippe Mathieu-Daudé
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).