srl $dest, $src1, $src2
Logically shift the contents of a register right by a variable amount.
Format
This is an RR format instrucion.
31 - 26 |
25 - 21 |
20 - 16 |
15 - 11 |
10 - 0 |
111000 |
dest |
src1 |
src2 |
00000000000 |
Functional Description
The srl instruction performs a logical right shift of the contents of register src1 and stores the shifted value in register dest. The shift amount is taken from the contents of register src2 & 0x1f. Zero is shifted in from the left to replace empty bits.
dest = (unsigned) src1 >> (src2 & 0x1f);
Side Effects
None
Processor Mode
This is a user-level instruction.
Last modified: Fri Feb 23 02:56:04 CST 2001