Lines Matching refs:shift
212 LSL_C (x: 'a word, shift:num) =
213 if shift = 0 then
216 let extended_x = w2n x * (2 ** shift) in
217 (x << shift, BIT (dimindex(:'a)) extended_x)`;
220 LSR_C (x: 'a word, shift:num) =
221 if shift = 0 then
224 (x >>> shift, BIT (shift - 1) (w2n x))`;
227 ASR_C (x: 'a word, shift:num) =
228 if shift = 0 then
231 (x >> shift, x ' (MIN (dimindex(:'a) - 1) (shift - 1)))`;
234 ROR_C (x: 'a word, shift:num) =
235 if shift = 0 then
237 else let result = x #>> shift in
245 val LSL_def = Define `LSL (x: 'a word, shift:num) = x << shift`;
246 val LSR_def = Define `LSR (x: 'a word, shift:num) = x >>> shift`;
247 val ASR_def = Define `ASR (x: 'a word, shift:num) = x >> shift`;
248 val ROR_def = Define `ROR (x: 'a word, shift:num) = x #>> shift`;