Encoding:

MSA

011110

101

df

wt

ws

wd

3R

010100

6

3

2

5

5

5

6

Format:

ILVR.df 

Vector Interleave Right

ILVR.B wd,ws,wt

MSA

Vector Interleave Right

ILVR.H wd,ws,wt

MSA

Vector Interleave Right

ILVR.W wd,ws,wt

MSA

Vector Interleave Right

ILVR.D wd,ws,wt

MSA

Vector Interleave Right

Purpose:

Vector Interleave Right

Vector right elements interleave.

Description:

wd[2i] = right_half(wt)[i]; wd[2i+1] = right_half(ws)[i]

The right half elements in vectors ws and wt are copied to vector wd alternating one element from ws with one element from wt.

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

Restrictions:

No data-dependent exceptions are possible.

Operation:

ILVR.B
   for i in 0 .. WRLEN/16-1
      j = 2 * i
      k = 2 * i + 1
      WR[wd]8j+7..8j = WR[wt]8i+7..8i
      WR[wd]8k+7..8k = WR[ws]8i+7..8i
   endfor
ILVR.H
   for i in 0 .. WRLEN/32-1
      j = 2 * i
      k = 2 * i + 1
      WR[wd]16j+15..16j = WR[wt]16i+15..16i
      WR[wd]16k+15..16k = WR[ws]16i+15..16i
   endfor
ILVR.W
   for i in 0 .. WRLEN/64-1
      j = 2 * i
      k = 2 * i + 1
      WR[wd]32j+31..32j = WR[wt]32i+31..32i
      WR[wd]32k+31..32k = WR[ws]32i+31..32i
   endfor
ILVR.D
   for i in 0 .. WRLEN/128-1
      j = 2 * i
      k = 2 * i + 1
      WR[wd]64j+63..64j = WR[wt]64i+63..64i
      WR[wd]64k+63..64k = WR[ws]64i+63..64i
   endfor

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.