On 8/21/26 19:44, Michael Tokarev wrote:
On 8/21/26 14:00, Peter Maydell wrote:
From: Richard Henderson <[email protected]>
The trans_WHILE_ptr function incorrectly handles the case where the
address difference divided by ESIZE results in zero. This happens when
the address difference is less than ESIZE but greater than zero.
Fix by dropping direct comparisons of op0 vs op1, and instead
testing the scaled diff vs 0. Merge with the bounding to the
maximum vector length via wrapping arithmetic.
Cc: [email protected]
Fixes: 14f6dad168e ("target/arm: Implement SVE2 WHILERW, WHILEWR")
Reported-by: YanjunYang <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
...
While picking this one up for 10.0.x stable series, I come across an
interesting case. This very code were changed in v10.0.0-1961-gf96fd13c6ea0
("target/arm: Move scale by esz into helper_sve_while*"), and is now being
dropped entirely.
The back-port of this patch to 10.0.x is below, and is also available at
https://gitlab.com/mjt0k/qemu/-/commit/f25f16d5c5d364306ee88438704a9054855c12b0
(staging-10.0 branch). It should be okay, but I appreciate an additional
look there, just in case :)
(Yes, I picked up the testcase too, and it passes).
So, this testcase fails on 10.0.x, here:
https://gitlab.com/qemu-project/qemu/-/jobs/16088801753
sve-while-ptr:
/home/gitlab-runner/builds/bCHvkPZE-/0/qemu-project/qemu/tests/tcg/aarch64/sve-while-ptr.c:19:
main: Assertion `p == 0x1111' failed.
It seems this only happens on ubuntu-24.04-aarch64-all-linux-static job,
which is kinda unexpected.
I guess my backport is wrong for 10.0.x.
I'm dropping this change from 10.0.x for now, and will either take another
look at it later, trying to figure out what's going on, or I need help :)
Thanks,
/mjt