Encoding:

P32A

001000

rt

mask

00

011

001

111

111

6

5

7

2

3

3

3

3

Format:

RDDSP rt, mask

DSP

Read DSPControl Register Fields to a GPR

Purpose:

Read DSPControl Register Fields to a GPR

To copy selected fields from the special-purpose DSPControl register to the specified GPR.

Description:

rt = select(mask, DSPControl)

Selected fields in the special register DSPControl are copied into the corresponding bits of destination register rt.

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 rt, and a mask bit value of 0 indicates that the corresponding bit positions in rt will be set to zer o. 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.

Bit31242316151413127650

DSPControl

ccond

ouflag

0

EFI C

scount

pos

4

3

5

2

1

0

field

Mask bit

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 rt will have the value of bits 7 through 12 from the scount field in DSPControl. The remaining bits in register rt 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).

Restrictions:

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.

Operation:

ValidateAccessToDSPResources()
temp31..0 = 032
if ( mask0 = 1 ) then
   temp5..0 = DSPControlpos:5..0
endif
if ( mask1 = 1 ) then
   temp12..7 = DSPControlscount:12..7
endif
if ( mask2 = 1 ) then
   temp13 = DSPControlc:13
endif
if ( mask3 = 1 ) then
endif
if ( mask4 = 1 ) then
   temp27..24 = DSPControlccond:27..24
endif
if ( mask5 = 1 ) then
   temp14 = DSPControlefi:14
endif
GPR[rt]31..0 = temp31..0

Exceptions:

Reserved Instruction, DSP Disabled