mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-15 07:22:46 +00:00
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: 34aff3c2e0
("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>
This commit is contained in:
parent
1d24c36b72
commit
4fe19bbbea
|
@ -1464,6 +1464,7 @@ static void tcg_out_brcond(TCGContext *s, TCGType ext, TCGCond c, TCGArg a,
|
||||||
case TCG_COND_TSTNE:
|
case TCG_COND_TSTNE:
|
||||||
/* tst xN,0xffffffff; b.ne L -> cbnz wN,L */
|
/* tst xN,0xffffffff; b.ne L -> cbnz wN,L */
|
||||||
if (b_const && b == UINT32_MAX) {
|
if (b_const && b == UINT32_MAX) {
|
||||||
|
c = tcg_tst_eqne_cond(c);
|
||||||
ext = TCG_TYPE_I32;
|
ext = TCG_TYPE_I32;
|
||||||
need_cmp = false;
|
need_cmp = false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue