srl

Assembly Syntax

srl regrs1, reg_or_imm, regrd

op3

100110

Operation

Shift right logical the contents of register regrs1 reg_or_imm number of times and places the result in register regrd

Comments

Replaces vacated positions with zeros. Can be used as unsigned division.

Example

srl %r1,%r2,%r3

Example

srl %r1,4,%r3 ! equivalent to "divide by 16"

Instruction format

Instruction format

Home Page Index Page All Shift Instructions