Encoding:

P32A

001000

rt

rs

rd

x

0111101

101

6

5

5

5

1

7

3

Format:

PICK.QB rd, rs, rt

DSP

Pick a Vector of Byte Values Based on Condition Code Bits

Purpose:

Pick a Vector of Byte Values Based on Condition Code Bits

Select four byte elements from either of two source registers based on condition code bits, writing the selected elements to the destination register.

Description:

rd = pick(cc27,rs31..24,rt31..24) || pick(cc26,rs23..16,rt23..16) || 
pick(cc25,rs15..8,rt15..8) || pick(cc24,rs7..0,rt7..0)

Four condition code bits in the DSPControl register are used to select byte values from the corresponding byte element of either source register rs or source register rt. If the value of the corresponding condition code bit is 1, then the byte value is selected from register rs; otherwise, it is selected from rt. The selected bytes are written to the destination register rd.

Restrictions:

No data-dependent exceptions are possible.

The operands must be in the specif ied format. If they are not, the results are UNPREDICTABLE and the values of the operand vectors become UNPREDICTABLE.

Operation:

ValidateAccessToDSPResources()
tempD7..0 = ( DSPControlccond:27 = 1 ? GPR[rs]31..24 : GPR[rt]31..24 )
tempC7..0 = ( DSPControlccond:26 = 1 ? GPR[rs]23..16 : GPR[rt]23..16 )
tempB7..0 = ( DSPControlccond:25 = 1 ? GPR[rs]15..8 : GPR[rt]15..8 )
tempA7..0 = ( DSPControlccond:24 = 1 ? GPR[rs]7..0 : GPR[rt]7..0 )
GPR[rd]31..0 = tempD7..0|| tempC7..0 || tempB7..0 || tempA7..0

Exceptions:

Reserved Instruction, DSP Disabled