mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-16 11:22:33 +03:00
parent
c859570234
commit
56f263895a
@ -678,9 +678,8 @@ sshrV =
|
||||
wlam $ \y ->
|
||||
let signx = testBit x (fromInteger (i-1))
|
||||
amt = fromInteger (bvVal y)
|
||||
negv = (((-1) `shiftL` amt) .|. x) `shiftR` amt
|
||||
posv = x `shiftR` amt
|
||||
in return . VWord i . ready . WordVal . mkBv i $! if signx then negv else posv
|
||||
x' = if signx then x - bit (fromInteger i) else x
|
||||
in return . VWord i . ready . WordVal . mkBv i $! x' `shiftR` amt
|
||||
|
||||
-- | Signed carry bit.
|
||||
scarryV :: Value
|
||||
|
Loading…
Reference in New Issue
Block a user