Encoding:

MSA

011110

010

df

wt

ws

wd

3R

010001

6

3

2

5

5

5

6

Format:

SUBSUS_U.df 

Vector Unsigned Saturated Subtract of Signed from Unsigned

SUBSUS_U.B wd,ws,wt

MSA

Vector Unsigned Saturated Subtract of Signed from Unsigned

SUBSUS_U.H wd,ws,wt

MSA

Vector Unsigned Saturated Subtract of Signed from Unsigned

SUBSUS_U.W wd,ws,wt

MSA

Vector Unsigned Saturated Subtract of Signed from Unsigned

SUBSUS_U.D wd,ws,wt

MSA

Vector Unsigned Saturated Subtract of Signed from Unsigned

Purpose:

Vector Unsigned Saturated Subtract of Signed from Unsigned

Vector subtraction of signed values from unsigned values saturating the results as unsigned values.

Description:

wd[i] = saturate_unsigned(unsigned(ws[i]) - signed(wt[i]))

ector wt are subtracted from the unsigned elements in v ector ws. The signe d result is

The signed elements in v unsigned saturated and written to vector wd.

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

Restrictions:

No data-dependent exceptions are possible.

Operation:

SUBSUS_U.B
   for i in 0 .. WRLEN/8-1
      WR[wd]8i+7..8i = subsus_u(WR[ws]8i+7..8i, WR[wt]8i+7..8i, 8)
   endfor
SUBSUS_U.H
   for i in 0 .. WRLEN/16-1
      WR[wd]16i+15..16i = subsus_u(WR[ws]16i+15..16i, WR[wt]16i+15..16i, 16)
   endfor
SUBSUS_U.W
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = subsus_u(WR[ws]32i+31..32i, WR[wt]32i+31..32i, 32)
   endfor
SUBSUS_U.D
   for i in 0 .. WRLEN/64-1
      WR[wd]64i+63..64i = subsus_u(WR[ws]64i+63..64i, WR[wt]64i+63..64i, 64)
   endfor
function sat_u(tt, n, b)
   if ttn-1..b != 0n-b then
      return 0n-b || 1b
   else
      return tt
   endif
endfunction sat_u
function subsus_u(ts, tt, n)
   t = (0 || ts) - (ttn-1 || tt)
   if tn = 0
      return sat_u(t, n+1, n)
   else
      return 0
endfunction subsus_u

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.