POOL32A 000000 |
rt |
rs |
rd |
0 |
PICK.QB 0111101101 |
6 |
5 |
5 |
5 |
1 |
10 |
SPECIAL3 011111 |
rs |
rt |
rd |
PICK.QB 00011 |
CMPU.EQ.QB 010001 |
6 |
5 |
5 |
5 |
5 |
6 |
PICK.QB rd, rs, rt |
microMIPSDSP |
Pick a Vector of Byte Values Based on Condition Code Bits |
Pick a Vector of Byte Values Based on Condition Code Bits
Select four byte elements from either of two source regist ers based on condition code bits, writing the selected elements to the destination register.
rd = sign_extend(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 of the eight 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.
The sign of the left-most selected byte is extended into the 32 most-significant bits of the destination register.
No data-dependent exceptions are possible.
The operands must be in the specified format. If they are not, the results are UNPREDICTABLE and the values of the operand vectors become UNPREDICTABLE.
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]63..0 = (tempD7)32 || tempD7..0|| tempC7..0 || tempB7..0 || tempA7..0
Reserved Instruction, DSP Disabled