Encoding:

POOL32S

010110

rt

rs

msbd

lsb

DINS

001100

6

5

5

5

5

5

Format:

DINS rt, rs, pos, size

microMIPS64

Doubleword Insert Bit Field

Purpose:

Doubleword Insert Bit Field

To merge a right-justified bit field from GPR rs into a specified position in GPR rt.

Description:

 GPR[rt] = InsertField(GPR[rt], GPR[rs], msb, lsb)

The right-most size bits from GPR rs are merged into the value from GPR rt starting at bit position pos. The result is placed back in GPR rt. The assembly language arguments pos and size are converted by the assembler to the instruction fields msb (the most significant bit of the field), in instruction bits 15..11, and lsb (least significant bit of the field), in instruction bits 10..6, as follows:

msb = pos+size-1
lsb = pos

For this instruction, the values of pos and size must satisfy all of the following relations:

0 <= pos < 32
0 < size <= 32
0 < pos+size <= 32

Restrictions:

In implementations prior to Release 2 of the architecture, this instruction resulted in a Reserved Instruction exception.

The operation is UNPREDICTABLE if lsb > msb.

Operation:

if (lsb > msb) then
      UNPREDICTABLE
   endif
   GPR[rt] = GPR[rt]63..msb+1 || GPR[rs]msb-lsb..0 || GPR[rt]lsb-1..0

Exceptions:

Reserved Instruction

Programming Notes

The assembler will accept any value of pos and size that satisfies the relationship 0 < pos+size <= 64 and emit DINS,

DINSM, or DINSU as appropriate to the values. Programmers should always specify the DINS mnemonic and let the assembler select the instruction to use.