bit.rolΒΆ
rotate x[:n] left by 1-bit
SignatureΒΆ
def rol n, x @ temp_bit { ... }
Defined in bit/shifts.fj β lines 60β67 (view on GitHub).
ComplexityΒΆ
Time:
n(2@-1)Space:
n(2@-1)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def rol n, x @ temp_bit {
.mov temp_bit, x+(n-1)*dw
rep(n-1, i) .mov x+(n-1-i)*dw, x+(n-1-i-1)*dw
.mov x, temp_bit
stl.skip
temp_bit:
.bit
}
Depends onΒΆ
β Previous: bit.ror