POOL32S 010110 |
rt |
rs |
msbd |
lsb |
DEXTM 100100 |
6 |
5 |
5 |
5 |
5 |
5 |
DEXTM rt, rs, pos, size |
microMIPS |
Doubleword Extract Bit Field Middle |
Doubleword Extract Bit Field Middle
To extract a bit field from GPR rs and store it right-justified into GPR rt.
GPR[rt] = ExtractField(GPR[rs], msbd, lsb)
The bit field starting at bit pos and extending for size bits is extracted from GPR rs and stored zero-extended and right-justified in GPR rt. The assembly language arguments pos and size are converted by the assembler to the instruction fields msbdminus32 (the most significant bit of the destination field in GPR rt, minus 32), in instruction bits 15..11, and lsb (least significant bit of the source field in GPR rs), in instruction bits 10..6, as follows:
msbdminus32 = size-1-32 lsb = pos msbd = msbdminus32 + 32 msb = lsb+msbd
For this instruction, the values of pos and size must satisfy all of the following relations:
0 <= pos < 32 32 < size <= 64 32 < pos+size <= 64
In implementations prior to Release 2 of the architecture, this instruction resulted in a Reserved Instruction exception.
The operation is UNPREDICTABLE if (lsb + msbd + 1) > 64.
msbd = msbdminus32 + 32 if ((lsb + msbd + 1) > 64) then UNPREDICTABLE endif GPR[rt] = 063-(msbd+1) || GPR[rs]msbd+lsb..pos
Reserved Instruction
Programming Notes
The assembler will accept any value of pos and size that satisfies the relationship 0 < pos+size <= 64 and emit DEXT,
DEXTM, or DEXTU as appropriate to the values. Programmers should always specify the DEXT mnemonic and let the assembler select the instruction to use.