Encoding:

MSA

011110

111

df

wt

ws

wd

3R

001101

6

3

2

5

5

5

6

Format:

BINSR.df 

Vector Bit Insert Right

BINSR.B wd,ws,wt

MSA

Vector Bit Insert Right

BINSR.H wd,ws,wt

MSA

Vector Bit Insert Right

BINSR.W wd,ws,wt

MSA

Vector Bit Insert Right

BINSR.D wd,ws,wt

MSA

Vector Bit Insert Right

Purpose:

Vector Bit Insert Right

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

Description:

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

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 elements in vector wt 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:

BINSR.B:
   for i in 0 .. WRLEN/8-1
      t = WR[wt]8i+2..8i
      WR[wd]8i+7..8i = WR[wd]8i+7..8i+t+1 || WR[ws]8i+t..8i
   endfor
BINSR.H:
   for i in 0 .. WRLEN/16-1
      t = WR[wt]16i+3..16i
      WR[wd]16i+15..16i = WR[wd]16i+15..16i+t+1 || WR[ws]16i+t..16i
   endfor
BINSR.W:
   for i in 0 .. WRLEN/32-1
      t = WR[wt]32i+4..32i
      WR[wd]32i+31..32i = WR[wd]32i+31..32i+t+1 || WR[ws]32i+t..32i
   endfor
BINSR.D:
   for i in 0 .. WRLEN/64-1
      t = WR[wt]64i+5..64i
      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.