POOL32A 000000 |
rt |
mask |
RDDSP 00011001 |
POOL32Axf 111100 |
6 |
5 |
7 |
8 |
6 |
SPECIAL3 011111 |
mask |
rd |
RDDSP 10010 |
EXTR.W 111000 |
6 |
10 |
5 |
5 |
6 |
RDDSP rdt, mask |
microMIPSDSP |
Read DSPControl Register Fields to a GPR |
Read DSPControl Register Fields to a GPR
To copy selected fields from the special-purpose DSPControl register to the specified GPR.
rdt = select(mask, DSPControl)
Selected fields in the s pecial register DSPControl are copied into the correspondi ng bits of destination register rdt.
Each of bits 0 through 5 of the mask operand corresponds to a specific field in the DSPControl register. A mask bit value of 1 indicates that the bits from the corresponding field in DSPControl will be copied into the same bit positions in register rdt, and a mask bit value of 0 indicates that the corresponding bit positions in rdt will be set to zero. Bits 6 through 9 of the mask operand are ignored.
The table below shows the correspondence between the bits in the mask operand and the fields in the DSPControl register; mask bit 0 is the least-significant bit in mask.
ccond |
ouflag |
0 |
EFI |
C |
scount |
pos |
4 |
3 |
5 |
2 |
1 |
0 |
For example, to copy only the bits from the scount field in DSPControl, the value of the mask operand used will be 2 decimal (0x02 hexadecimal). After execution of the instruction, bits 7 through 12 of register rdt will have the value of bits 7 through 12 from the scount field in DSPControl. The remaining bits in register rdt will be set to zero.
The one-operand version of the instruction provides a convenient assembly idiom that allows the programmer to read all fields in the DSPControl register into the destination register, i.e., it is equivalent to specifying a mask value of 31 decimal (0x1F hexadecimal).
No data-dependent exceptions are possible.
The operands must be values in the specified format. If they are not, the results are UNPREDICTABLE and the values of the operand vectors become UNPREDICTABLE.
temp63..0 = 064 if ( mask0 = 1 ) then temp6..0 = DSPControlpos:6..0 endif if ( mask1 = 1 ) then temp12..7 = DSPControlscount:12..7 endif if ( mask2 = 1 ) then temp13 = DSPControlc:13 endif if ( mask3 = 1 ) then temp23..16 = DSPControlouflag:23..16 endif if ( mask4 = 1 ) then temp31..24 = DSPControlccond:31..24 endif if ( mask5 = 1 ) then temp14 = DSPControlefi:14 endif GPR[rdt]63..0 = temp63..0
Reserved Instruction, DSP Disabled