aboutsummaryrefslogtreecommitdiff
path: root/target/arm/sve_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2018-08-14 17:17:22 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-08-14 17:17:22 +0100
commitbbd0968c458d48e34a08b8694fa3309a9fe1c9e7 (patch)
tree2fbc7ecabca4fcc7f93db569ec697688e42fbe99 /target/arm/sve_helper.c
parent7a31e0c6c68baffab0867bdd92b8744568b1d3ba (diff)
downloadqemu-bbd0968c458d48e34a08b8694fa3309a9fe1c9e7.zip
qemu-bbd0968c458d48e34a08b8694fa3309a9fe1c9e7.tar.gz
qemu-bbd0968c458d48e34a08b8694fa3309a9fe1c9e7.tar.bz2
target/arm: Reorganize SVE WHILE
The pseudocode for this operation is an increment + compare loop, so comparing <= the maximum integer produces an all-true predicate. Rather than bound in both the inline code and the helper, pass the helper the number of predicate bits to set instead of the number of predicate elements to set. Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com> Tested-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com> Message-id: 20180801123111.3595-4-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/sve_helper.c')
-rw-r--r--target/arm/sve_helper.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c
index 9bd0694..87594a8 100644
--- a/target/arm/sve_helper.c
+++ b/target/arm/sve_helper.c
@@ -2846,11 +2846,6 @@ uint32_t HELPER(sve_while)(void *vd, uint32_t count, uint32_t pred_desc)
return flags;
}
- /* Scale from predicate element count to bits. */
- count <<= esz;
- /* Bound to the bits in the predicate. */
- count = MIN(count, oprsz * 8);
-
/* Set all of the requested bits. */
for (i = 0; i < count / 64; ++i) {
d->p[i] = esz_mask;