diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-03-09 07:53:00 -0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-03-12 12:40:10 +0000 |
commit | fd911a21414b5a17663fa2b97f1059fb11cee99d (patch) | |
tree | 802efc24c7a86867ee20b15ea243d0f13ea8f470 /target | |
parent | 8e7fefed1bdcc0f7e722ccf2a2fc2b4f79fe725e (diff) | |
download | qemu-fd911a21414b5a17663fa2b97f1059fb11cee99d.zip qemu-fd911a21414b5a17663fa2b97f1059fb11cee99d.tar.gz qemu-fd911a21414b5a17663fa2b97f1059fb11cee99d.tar.bz2 |
target/arm: Fix sve_punpk_p vs odd vector lengths
Wrote too much with punpk1 with vl % 512 != 0.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210309155305.11301-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/arm/sve_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 2fb4b2c..981895a 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -2105,11 +2105,11 @@ void HELPER(sve_punpk_p)(void *vd, void *vn, uint32_t pred_desc) high = oprsz >> 1; } - if ((high & 3) == 0) { + if ((oprsz & 7) == 0) { uint32_t *n = vn; high >>= 2; - for (i = 0; i < DIV_ROUND_UP(oprsz, 8); i++) { + for (i = 0; i < oprsz / 8; i++) { uint64_t nn = n[H4(high + i)]; d[i] = expand_bits(nn, 0); } |