[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/10] target-arm: Fix saturated values for Neon rig
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 05/10] target-arm: Fix saturated values for Neon right shifts |
Date: |
Tue, 15 Feb 2011 13:44:45 +0000 |
Fix value returned by signed 8 and 16 bit qrshl helpers
when the result has saturated.
Signed-off-by: Peter Maydell <address@hidden>
---
target-arm/neon_helper.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index a8885fa..7859f0b 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -886,7 +886,10 @@ uint64_t HELPER(neon_qrshl_u64)(CPUState *env, uint64_t
val, uint64_t shiftop)
dest = src1 << tmp; \
if ((dest >> tmp) != src1) { \
SET_QC(); \
- dest = src1 >> 31; \
+ dest = (uint32_t)(1 << (sizeof(src1) * 8 - 1)); \
+ if (src1 > 0) { \
+ dest--; \
+ } \
} \
}} while (0)
NEON_VOP_ENV(qrshl_s8, neon_s8, 4)
--
1.7.1
- [Qemu-devel] [PATCH 00/10] Fix Neon shift instructions, Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 03/10] target-arm: Fix unsigned VRSHL.s8 and .s16 right shifts by type width, Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 10/10] target-arm: Fix shift by immediate and narrow where src, dest overlap, Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 08/10] target-arm: Fix signed VQRSHL by large shift counts, Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 04/10] target-arm: fix unsigned 64 bit right shifts., Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 07/10] target-arm: fix decoding of Neon 64 bit shifts., Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 05/10] target-arm: Fix saturated values for Neon right shifts,
Peter Maydell <=
- [Qemu-devel] [PATCH 02/10] target-arm: Fix signed VRSHL by large shift counts, Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 01/10] target-arm: Fix rounding constant addition for Neon shifts, Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 06/10] target-arm: fix Neon VQSHRN and VSHRN., Peter Maydell, 2011/02/15
- [Qemu-devel] [PATCH 09/10] target-arm: Fix unsigned VQRSHL by large shift counts, Peter Maydell, 2011/02/15
- [Qemu-devel] Re: [PATCH 00/10] Fix Neon shift instructions, Christophe Lyon, 2011/02/15
- Re: [Qemu-devel] [PATCH 00/10] Fix Neon shift instructions, Aurelien Jarno, 2011/02/20