extldi
Extract and Left Justify Immediate
extldi ra,rs,n,b (n > 0)
Extracts a field of n bits starting at bit position b in the source register, left justifies this field in the target register, and clears all other bits of the target register to 0.
Details
For extldi, the field of n bits starting at bit position b in the source register is extracted, left justified in the target register, and all other bits are cleared to 0.
Programming Note
Use extldi to extract a specific bit field from a source register, left-justifying it in the target register. Ensure that the bit position and length are correctly specified to avoid data corruption. This instruction operates at user privilege level.
Example
extldi ra, rs, n, b (n > 0)
Encoding
Binary Layout
18
0
LI
6
AA
30
LK
31
Operands
-
ra
Target General Purpose Register -
rs
Source General Purpose Register -
n
Number of bits to extract -
b
Starting bit position