sra
Assembly Syntax
sra regrs1, reg_or_imm, regrd
op3
100111
Operation
Shift right arithmetic the contents of register regrs1 reg_or_imm number of times and places the result in register regrd
Comments
Replaces vacated positions with the most significant bit of regrs1. sra can be used as fast division.
Example
sra %r1,%r2,%r3
Example
sra %r1,4,%r3 ! equivalent to "divide by 16"
Instruction format
Instruction format