]> Git Repo - qemu.git/commitdiff
target-arm: fix unsigned 64 bit right shifts.
authorChristophe Lyon <[email protected]>
Tue, 15 Feb 2011 13:44:44 +0000 (13:44 +0000)
committerAurelien Jarno <[email protected]>
Sun, 20 Feb 2011 16:43:01 +0000 (17:43 +0100)
Fix range of shift amounts which always give 0 as result.

Signed-off-by: Christophe Lyon <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
target-arm/neon_helper.c

index 52ef994d2b81136e025bc14bdeed68b300148e73..c97aa7dbd430b7649d233a63850036baff3091a9 100644 (file)
@@ -639,7 +639,7 @@ uint32_t HELPER(neon_rshl_u32)(uint32_t val, uint32_t shiftop)
 uint64_t HELPER(neon_rshl_u64)(uint64_t val, uint64_t shiftop)
 {
     int8_t shift = (uint8_t)shiftop;
-    if (shift >= 64 || shift < 64) {
+    if (shift >= 64 || shift < -64) {
         val = 0;
     } else if (shift == -64) {
         /* Rounding a 1-bit result just preserves that bit.  */
This page took 0.025762 seconds and 4 git commands to generate.