blob: fb9b352c21275106233ecd95db856f2c1488d261 (
plain)
1
2
3
4
5
6
7
8
|
val LSL_C : forall 'N 'S, 'N >= 0 & 'S >= 1.
(bits('N), int('S)) -> (bits('N), bits(1)) effect pure
function LSL_C (x, shift) = {
result : bits('N) = x << shift;
carry_out : bits(1) = if shift > 'N then 0b0 else [x['N - shift]];
return((result, carry_out))
}
|