]> Git Repo - qemu.git/commitdiff
softfloat: Fix shift128Right for shift counts 64..127
authorPeter Maydell <[email protected]>
Sun, 2 Jun 2013 15:17:49 +0000 (16:17 +0100)
committerAnthony Liguori <[email protected]>
Mon, 10 Jun 2013 16:36:12 +0000 (11:36 -0500)
shift128Right would give the wrong result for a shift count
between 64 and 127. This was never noticed because all of
our uses of this function are guaranteed not to use shift
counts in this range.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: 1370186269[email protected]
Signed-off-by: Anthony Liguori <[email protected]>
fpu/softfloat-macros.h

index b5164af7fa161a1b18c9a5edec8fe6403305e58b..9b095456c5b148acfc14895faa129ac90aa0b1a6 100644 (file)
@@ -168,7 +168,7 @@ INLINE void
         z0 = a0>>count;
     }
     else {
-        z1 = ( count < 64 ) ? ( a0>>( count & 63 ) ) : 0;
+        z1 = (count < 128) ? (a0 >> (count & 63)) : 0;
         z0 = 0;
     }
     *z1Ptr = z1;
This page took 0.025803 seconds and 4 git commands to generate.