[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-6.2 03/53] target/arm: Fix MVE VSLI by 0 and VSRI by <dt>
From: |
Peter Maydell |
Subject: |
[PATCH for-6.2 03/53] target/arm: Fix MVE VSLI by 0 and VSRI by <dt> |
Date: |
Thu, 29 Jul 2021 12:14:22 +0100 |
In the MVE shift-and-insert insns, we special case VSLI by 0
and VSRI by <dt>. VSRI by <dt> means "don't update the destination",
which is what we've implemented. However VSLI by 0 is "set
destination to the input", so we don't want to use the same
special-casing that we do for VSRI by <dt>.
Since the generic logic gives the right answer for a shift
by 0, just use that.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/mve_helper.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/target/arm/mve_helper.c b/target/arm/mve_helper.c
index db5d6220854..f14fa914b68 100644
--- a/target/arm/mve_helper.c
+++ b/target/arm/mve_helper.c
@@ -1279,11 +1279,12 @@ DO_2SHIFT_S(vrshli_s, DO_VRSHLS)
uint16_t mask; \
uint64_t shiftmask; \
unsigned e; \
- if (shift == 0 || shift == ESIZE * 8) { \
+ if (shift == ESIZE * 8) { \
/* \
- * Only VSLI can shift by 0; only VSRI can shift by <dt>. \
- * The generic logic would give the right answer for 0 but \
- * fails for <dt>. \
+ * Only VSRI can shift by <dt>; it should mean "don't \
+ * update the destination". The generic logic can't handle \
+ * this because it would try to shift by an out-of-range \
+ * amount, so special case it here. \
*/ \
goto done; \
} \
--
2.20.1
- [PATCH for-6.2 00/53] target/arm: MVE slices 3 and 4, Peter Maydell, 2021/07/29
- [PATCH for-6.2 02/53] target/arm: Print MVE VPR in CPU dumps, Peter Maydell, 2021/07/29
- [PATCH for-6.2 03/53] target/arm: Fix MVE VSLI by 0 and VSRI by <dt>,
Peter Maydell <=
- [PATCH for-6.2 04/53] target/arm: Fix signed VADDV, Peter Maydell, 2021/07/29
- [PATCH for-6.2 01/53] target/arm: Note that we handle VMOVL as a special case of VSHLL, Peter Maydell, 2021/07/29
- [PATCH for-6.2 05/53] target/arm: Fix mask handling for MVE narrowing operations, Peter Maydell, 2021/07/29
- [PATCH for-6.2 09/53] target/arm: Factor out mve_eci_mask(), Peter Maydell, 2021/07/29
- [PATCH for-6.2 06/53] target/arm: Fix 48-bit saturating shifts, Peter Maydell, 2021/07/29
- [PATCH for-6.2 08/53] target/arm: Fix calculation of LTP mask when LR is 0, Peter Maydell, 2021/07/29
- [PATCH for-6.2 10/53] target/arm: Fix VPT advance when ECI is non-zero, Peter Maydell, 2021/07/29
- [PATCH for-6.2 07/53] target/arm: Fix MVE 48-bit SQRSHRL for small right shifts, Peter Maydell, 2021/07/29