Lines Matching refs:shift
216 LSL_C (x: 'a word, shift:num) =
217 if shift = 0 then
220 let extended_x = w2n x * (2 ** shift) in
221 (x << shift, BIT (dimindex(:'a)) extended_x)`;
224 LSR_C (x: 'a word, shift:num) =
225 if shift = 0 then
228 (x >>> shift, BIT (shift - 1) (w2n x))`;
231 ASR_C (x: 'a word, shift:num) =
232 if shift = 0 then
235 (x >> shift, x ' (MIN (dimindex(:'a) - 1) (shift - 1)))`;
238 ROR_C (x: 'a word, shift:num) =
239 if shift = 0 then
241 else let result = x #>> shift in
249 val LSL_def = Define `LSL (x: 'a word, shift:num) = x << shift`;
250 val LSR_def = Define `LSR (x: 'a word, shift:num) = x >>> shift`;
251 val ASR_def = Define `ASR (x: 'a word, shift:num) = x >> shift`;
252 val ROR_def = Define `ROR (x: 'a word, shift:num) = x #>> shift`;