projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51e3930
)
target-arm: Fix saturated values for Neon right shifts
author
Peter Maydell
<peter.maydell@linaro.org>
Tue, 15 Feb 2011 13:44:45 +0000
(13:44 +0000)
committer
Aurelien Jarno
<aurelien@aurel32.net>
Sun, 20 Feb 2011 16:43:01 +0000
(17:43 +0100)
Fix value returned by signed 8 and 16 bit qrshl helpers
when the result has saturated.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/neon_helper.c
patch
|
blob
|
history
diff --git
a/target-arm/neon_helper.c
b/target-arm/neon_helper.c
index c97aa7dbd430b7649d233a63850036baff3091a9..235a32c6704a52d29320c9d86db60533d263bc03 100644
(file)
--- 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)