Encoding:

MSA

011110

10

i8

ws

wd

I8

000001

6

2

8

5

5

6

Format:

BSELI.B 

Immediate Bit Select

BSELI.B wd,ws,i8

MSA

Immediate Bit Select

Purpose:

Immediate Bit Select

Immediate mask-based copy bits from two source vectors selected by the bit mask value

Description:

wd = (ws AND NOT wd) OR (i8 AND wd)

Selectively copy bits from the the 8-bit immediate i8 and source v ector ws into destination vector wd based on the corresponding bit in wd: if 0 copies the bit from ws, if 1 copies the bit from i8.

Restrictions:

The operands and results are bit vector values.

Operation:

 for i in 0 .. WRLEN/8-1
   WR[wd]8i+7..8i =
      (WR[ws]8i+7..8i and not WR[wd]8i+7..8i) or (i87..0 and WR[wd]8i+7..8i)
endfor

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.