[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 8/8] tcg/aarch64: Fix tcg_out_brcond for test comparisons
From: |
Richard Henderson |
Subject: |
[PULL 8/8] tcg/aarch64: Fix tcg_out_brcond for test comparisons |
Date: |
Tue, 12 Mar 2024 08:41:15 -1000 |
When converting test vs UINT32_MAX to compare vs 0, we need to
adjust the condition to match.
Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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
- [PULL 0/8] tcg + linux-user patch queue, Richard Henderson, 2024/03/12
- [PULL 1/8] linux-user: Add FIFREEZE and FITHAW ioctls, Richard Henderson, 2024/03/12
- [PULL 3/8] linux-user: Implement PR_{GET,SET}_SPECULATION_CTRL, Richard Henderson, 2024/03/12
- [PULL 2/8] linux-user: Implement PR_{GET,SET}_CHILD_SUBREAPER, Richard Henderson, 2024/03/12
- [PULL 4/8] linux-user: Implement PR_GET_TID_ADDRESS, Richard Henderson, 2024/03/12
- [PULL 8/8] tcg/aarch64: Fix tcg_out_brcond for test comparisons,
Richard Henderson <=
- [PULL 6/8] linux-user/elfload: Fully initialize struct target_elf_prpsinfo, Richard Henderson, 2024/03/12
- [PULL 5/8] linux-user/elfload: Don't close an unopened file descriptor, Richard Henderson, 2024/03/12
- [PULL 7/8] tcg/aarch64: Fix tcg_out_cmp for test comparisons, Richard Henderson, 2024/03/12
- Re: [PULL 0/8] tcg + linux-user patch queue, Peter Maydell, 2024/03/13