MSA 011110 |
100 |
df |
wt |
ws |
wd |
3R 010001 |
6 |
3 |
2 |
5 |
5 |
5 |
6 |
ASUB_S.df |
Vector Absolute Values of Signed Subtract | |
ASUB_S.B wd,ws,wt |
MSA |
Vector Absolute Values of Signed Subtract |
ASUB_S.H wd,ws,wt |
MSA |
Vector Absolute Values of Signed Subtract |
ASUB_S.W wd,ws,wt |
MSA |
Vector Absolute Values of Signed Subtract |
ASUB_S.D wd,ws,wt |
MSA |
Vector Absolute Values of Signed Subtract |
Vector Absolute Values of Signed Subtract
Vector subtraction from vector of signed values taking the absolute value of the results.
wd[i] = absolute_value(signed(ws[i]) - signed(wt[i]))
The signed elements in v ector wt are subtracted from the signed elements in v ector ws. The absolute value of the signed result is written to vector wd.
The operands and results are values in integer data format df.
No data-dependent exceptions are possible.
ASUB_S.B: for i in 0 .. WRLEN/8-1 WR[wd]8i+7..8i = asub_s(WR[ws]8i+7..8i, WR[wt]8i+7..8i, 8) endfor ASUB_S.H: for i in 0 .. WRLEN/16-1 WR[wd]16i+15..16i = asub_s(WR[ws]16i+15..16i, WR[wt]16i+15..16i, 16) endfor ASUB_S.W: for i in 0 .. WRLEN/32-1 WR[wd]32i+31..32i = asub_s(WR[ws]32i+31..32i, WR[wt]32i+31..32i, 32) endfor ASUB_S.D: for i in 0 .. WRLEN/64-1 WR[wd]64i+63..64i = asub_s(WR[ws]64i+63..64i, WR[wt]64i+63..64i, 64) endfor function asub_s(ts, tt, n) t = (tsn-1 || ts) - (ttn-1 || tt) if tn = 0 then return tn-1..0 else return (-t)n-1..0 endfunction asub_s
Reserved Instruction Exception, MSA Disabled Exception.