Encoding:

MSA

011110

010

df

s5

ws

wd

I5

000110

6

3

2

5

5

5

6

Format:

MAXI_S.df 

Immediate Signed Maximum

MAXI_S.B wd,ws,s5

MSA

Immediate Signed Maximum

MAXI_S.H wd,ws,s5

MSA

Immediate Signed Maximum

MAXI_S.W wd,ws,s5

MSA

Immediate Signed Maximum

MAXI_S.D wd,ws,s5

MSA

Immediate Signed Maximum

Purpose:

Immediate Signed Maximum

Immediate and vector signed maximum.

Description:

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

Maximum values between signed elements in vector ws and the 5-bit signed immediate s5 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_S.B
   t = (s54)3 || s54..0
   for i in 0 .. WRLEN/8-1
      WR[wd]8i+7..8i = max_s(WR[ws]8i+7..8i, t, 8)
   endfor
MAXI_S.H
   t = (s54)11 || s54..0
   for i in 0 .. WRLEN/16-1
      WR[wd]16i+15..16i = max_s(WR[ws]16i+15..16i, t, 16)
   endfor
MAXI_S.W
   t = (s54)27 || s54..0
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = max_s(WR[ws]32i+31..32i, t, 32)
   endfor
MAXI_S.D
   t = (s54)59 || s54..0
   for i in 0 .. WRLEN/64-1
      WR[wd]64i+63..64i = max_s(WR[ws]64i+63..64i, t, 64)
   endfor
function max_s(ts, tt, n)
   t = ttn-1 || tt
   s = tsn-1 || ts
   if t < s then
      return ts
   else
      return tt
   endif
endfunction max_s

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.