[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 39/48] target-arm: fix neon vrshr instruction
From: |
Riku Voipio |
Subject: |
[Qemu-devel] [PATCH 39/48] target-arm: fix neon vrshr instruction |
Date: |
Fri, 26 Mar 2010 16:06:59 +0000 |
From: Juha Riihimäki <address@hidden>
Signed-Off-By: Riku Voipio <address@hidden>
Signed-off-by: Juha Riihimäki <address@hidden>
---
target-arm/neon_helper.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 0df13f5..4604698 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -573,7 +573,13 @@ uint64_t HELPER(neon_rshl_u64)(uint64_t val, uint64_t
shiftop)
/* Rounding a 1-bit result just preserves that bit. */
val >>= 63;
} if (shift < 0) {
- val = (val + ((uint64_t)1 << (-1 - shift))) >> -shift;
+ uint64_t r = ((uint64_t)1 << (-1 - shift));
+ uint64_t lo = val + r;
+ if (lo < val || lo < r) {
+ val = (lo >> -shift) | ((1ull << 63) >> (-shift - 1));
+ } else {
+ val = lo >> -shift;
+ }
} else {
val <<= shift;
}
--
1.6.5
- [Qemu-devel] [PATCH 07/48] Shrink tb_jmp_offset to two entries, the other two are never used., (continued)
- [Qemu-devel] [PATCH 07/48] Shrink tb_jmp_offset to two entries, the other two are never used., Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 17/48] add multi-sd support, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 23/48] multi-mmc support in init call, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 01/48] arm-dis debug helper, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 18/48] make cursor grab optional, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 47/48] target-arm: fix neon vshll (shift < max), Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 38/48] target-arm: fix neon vrshl instruction, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 40/48] target-arm: fix neon v(r)sra instructions, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 39/48] target-arm: fix neon vrshr instruction,
Riku Voipio <=
- [Qemu-devel] [PATCH 25/48] blizzard: fix for non-32bpp host displays, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 09/48] console change headers, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 48/48] usb: fix -usbdevice option handling with no parameters, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 46/48] target-arm: fix neon vrsqrts instruction, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 45/48] target-arm: fix neon vcvt fixed-point, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 43/48] target-arm: fix neon vq(r)dmulh.s16 instructions, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 42/48] target-arm: fix signed narrow 64->32 operation, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 41/48] target-arm: fix neon vld1 single element to all lanes, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 35/48] target-arm: fix neon vmon/vmvn with modified immediate, Riku Voipio, 2010/03/26
- [Qemu-devel] [PATCH 32/48] Add beagleboard and n900 machine definitions, Riku Voipio, 2010/03/26