diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-03-09 17:37:08 +0000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-03-12 04:09:21 -1000 |
commit | 4fe19bbbea2cb9f1ec28cfd40cdc7f61e95a790e (patch) | |
tree | ac0034d1bb9d8b6535d1b474375c7c26fbfefa6c /tcg/aarch64/tcg-target.c.inc | |
parent | 1d24c36b72ed0b98f3b5e6382c6f1deef6b1ca0d (diff) | |
download | qemu-4fe19bbbea2cb9f1ec28cfd40cdc7f61e95a790e.zip qemu-4fe19bbbea2cb9f1ec28cfd40cdc7f61e95a790e.tar.gz qemu-4fe19bbbea2cb9f1ec28cfd40cdc7f61e95a790e.tar.bz2 |
tcg/aarch64: Fix tcg_out_brcond for test comparisons
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>
Diffstat (limited to 'tcg/aarch64/tcg-target.c.inc')
-rw-r--r-- | tcg/aarch64/tcg-target.c.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 38446c1..56fc9cb 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; |