Encoding:

MSA

011110

111

df/m

ws

wd

BIT

001001

6

3

7

5

5

6

Format:

BINSRI.df 

Immediate Bit Insert Right

BINSRI.B wd,ws,m

MSA

Immediate Bit Insert Right

BINSRI.H wd,ws,m

MSA

Immediate Bit Insert Right

BINSRI.W wd,ws,m

MSA

Immediate Bit Insert Right

BINSRI.D wd,ws,m

MSA

Immediate Bit Insert Right

Purpose:

Immediate Bit Insert Right

Immediate selected right most bits copy while preserving destination left bits.

Description:

wd[i] = bit_insert_right(wd[i], ws[i], m)

Copy least significant (right) bits in each element of vector ws to elements in vector wd while preserving the most significant (left) bits. The number of bits to copy is given by the immediate m modulo the size of the element in bits plus

1.

The operands and results are values in integer data format df.

Restrictions:

No data-dependent exceptions are possible.

Operation:

BINSRI.B:
   t = m
   for i in 0 .. WRLEN/8-1
      WR[wd]8i+7..8i = WR[wd]8i+7..8i+7+t+1 || WR[ws]8i+t..8i
   endfor
BINSRI.H:
   t = m
   for i in 0 .. WRLEN/16-1
      WR[wd]16i+15..16i = WR[wd]16i+15..16i+t+1 || WR[ws]16i+t..16i
   endfor
BINSRI.W:
   t = m
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = WR[wd]32i+31..32i+t+1 || WR[ws]32i+t..32i
   endfor
BINSRI.D:
   t = m
   for i in 0 .. WRLEN/64-1
      WR[wd]64i+63..64i = WR[wd]64i+63..64i+t+1 || WR[ws]64i+t..64i
   endfor

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.