Encoding:

MSA

011110

011

df

u5

ws

wd

I5

000110

6

3

2

5

5

5

6

Format:

MAXI_U.df 

Immediate Unsigned Maximum

MAXI_U.B wd,ws,u5

MSA

Immediate Unsigned Maximum

MAXI_U.H wd,ws,u5

MSA

Immediate Unsigned Maximum

MAXI_U.W wd,ws,u5

MSA

Immediate Unsigned Maximum

MAXI_U.D wd,ws,u5

MSA

Immediate Unsigned Maximum

Purpose:

Immediate Unsigned Maximum

Immediate and vector unsigned maximum.

Description:

wd[i] = max(ws[i], u5)

Maximum values between unsigned elements in v ector ws and the 5-bit unsigned immediate u5 are written to vector wd.

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

Restrictions:

No data-dependent exceptions are possible.

Operation:

MAXI_U.B
   t = 03 || u54..0
   for i in 0 .. WRLEN/8-1
      WR[wd]8i+7..8i = max_u(WR[ws]8i+7..8i, t, 8)
   endfor
MAXI_U.H
   t = 011 || u54..0
   for i in 0 .. WRLEN/16-1
      WR[wd]16i+15..16i = max_u(WR[ws]16i+15..16i, t, 16)
   endfor
MAXI_U.W
   t = 027 || u54..0
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = max_u(WR[ws]32i+31..32i, t, 32)
   endfor
MAXI_U.D
   t = 059 || u54..0
   for i in 0 .. WRLEN/64-1
      WR[wd]64i+63..64i = max_u(WR[ws]64i+63..64i, t, 64)
   endfor
function max_u(ts, tt, n)
   t = 0 || tt
   s = 0 || ts
   if t < s then
      return ts
   else
      return tt
   endif
endfunction max_u

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.