P32A 001000 |
rt |
rs |
ac |
10 |
100 |
010 |
111 |
111 |
6 |
5 |
5 |
2 |
2 |
3 |
3 |
3 |
3 |
EXTPV rt, ac, rs |
DSP |
Extract Variable Bitfield From Arbitrary Position in Accumulator to GPR |
Extract Variable Bitfield From Arbitrary Position in Accumulator to GPR
Extract a variable number of contiguous bits from a 64-bit accumulator from a position specified in the DSPControl register, writing the bits to a GPR with zero-extension.
rt = zero_extend(acpos..pos-rs[4:0])
A variable number of contiguous bits are extracted from an arbitrary position in accumulator ac, zero-extended to 32 bits, then written to register rt. The number of bits extracted is size+1, where size is specified by the five least-significant bits in register rs, interpreted as a five-bit unsigned integer. The remaining bits in register rs are ignored.
The position of the first bit of the contiguous set to extract, start_pos, is specified by the pos field in bits 0 through 5 of the DSPControl register. The position of the last bit in the contiguous set is start_pos - size.
The value of ac can range from 0 to 3. When ac=0, this refers to the original HI/LO register pair of the MIPS32 architecture. After the execution of this instruction, accumulator ac remains unmodified.
An extraction is valid if start_possize; otherwise, the extraction is invalid and is said to have failed. The–(1+)1–>= value of the destination register is UNPREDICTABLE when the extraction is invalid. Upon an invalid extraction this instruction writes a 1 to bit 14, the Extract Failed Indicator (EFI) bit of the DSPControl register, and 0 otherwise.
The values of bits 0 to 5 in the pos field of the DSPControl register are unchanged by this instruction.
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.
ValidateAccessToDSPResources() start_pos5..0 = DSPControlpos:5..0 size4..0 = GPR[rs]4..0 if ( start_pos - (size+1) >= -1 ) then tempsize..0 = ( HI[ac]31..0 || LO[ac]31..0 )start_pos..start_pos-size GPR[rt] = 0(GPRLEN-(size+1)) || tempsize..0 DSPControlEFI:14 = 0 else DSPControlEFI:14 = 1 GPR[rt] = UNPREDICTABLE endif
Reserved Instruction, DSP Disabled