Encoding:

MSA

011110

101

df/m

ws

wd

BIT

001001

6

3

7

5

5

6

Format:

BNEGI.df 

Immediate Bit Negate

BNEGI.B wd,ws,m

MSA

Immediate Bit Negate

BNEGI.H wd,ws,m

MSA

Immediate Bit Negate

BNEGI.W wd,ws,m

MSA

Immediate Bit Negate

BNEGI.D wd,ws,m

MSA

Immediate Bit Negate

Purpose:

Immediate Bit Negate

Immediate selected bit position negate in each element.

Description:

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

Negate (complement) one bit in each element of vector ws. The bit position is given by the immediate m modulo the size of the element in bits. The result is written to vector wd.

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

Restrictions:

No data-dependent exceptions are possible.

Operation:

BNEGI.B:
   t = m
   for i in 0 .. WRLEN/8-1
      WR[wd]8i+7..8i = WR[ws]8i+7..8i xor (07-t || 1 || 0t)
   endfor
BNEGI.H:
   t = m
   for i in 0 .. WRLEN/16-1
      WR[wd]16i+15..16i = WR[ws]16i+15..16i xor (015-t || 1 || 0t)
   endfor
BNEGI.W:
   t = m
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = WR[ws]32i+31..32i xor (031-t || 1 || 0t)
   endfor
BNEGI.D:
   t = m
   for i in 0 .. WRLEN/64-1
      WR[wd]64i+63..64i = WR[ws]64i+63..64i xor (063-t || 1 || 0t)
   endfor

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.