|
|
От: | rameel | https://github.com/rsdn/CodeJam |
| Дата: | 15.07.21 17:35 | ||
| Оценка: | 111 (6) +3 -1 | ||
If the type of x is int or uint, the shift count is defined by the low-order five bits of the right-hand operand. That is, the shift count is computed from count & 0x1F (or count & 0b_1_1111)
C.M(Int32, Byte)
L0000: mov eax, ecx
L0002: movzx ecx, dl
L0005: shl eax, cl
L0007: retSAL/SAR/SHL/SHR (x86)
The destination operand can be a register or a memory location. The count operand can be an immediate value or register CL. The count is masked to 5 bits, which limits the count range to 0 to 31.