MSA 011110 |
000 |
df |
wt |
ws |
wd |
3R 010011 |
6 |
3 |
2 |
5 |
5 |
5 |
6 |
DOTP_S.df |
Vector Signed Dot Product | |
DOTP_S.H wd,ws,wt |
MSA |
Vector Signed Dot Product |
DOTP_S.W wd,ws,wt |
MSA |
Vector Signed Dot Product |
DOTP_S.D wd,ws,wt |
MSA |
Vector Signed Dot Product |
Vector Signed Dot Product
Vector signed dot product (multiply and then pairwise add the adjacent multiplication results) to double width elements.
(wd[2i+1], wd[2i]) = signed(ws[2i+1]) * signed(wt[2i+1]) + signed(ws[2i]) * signed(wt[2i])
The signed integer elements in vector wt are multiplied by signed integer elements in vector ws producing a result twice the size of the input operands. The multiplication results of adjacent odd/even elements are added and stored to the destination.
The operands are values in integer data format half the size of df. The results are values in integer data format df.
No data-dependent exceptions are possible.
DOTP_S.H for i in 0 .. WRLEN/16-1 WR[wd]16i+15..16i = dotp_s(WR[ws]16i+15..16i, WR[wt]16i+15..16i, 8) endfor DOTP_S.W for i in 0 .. WRLEN/32-1 WR[wd]32i+31..32i = dotp_s(WR[ws]32i+31..32i, WR[wt]32i+31..32i, 16) endfor DOTP_S.D for i in 0 .. WRLEN/64-1 WR[wd]64i+63..64i = dotp_s(WR[ws]64i+63..64i, WR[wt]64i+63..64i, 32) endfor function mulx_s(ts, tt, n) s = (tsn-1)n || tsn-1..0 t = (ttn-1)n || ttn-1..0 p = s * t return p2n-1..0 endfunction mulx_s function dotp_s(ts, tt, n) p1 = mulx_s(ts2n-1..n, tt2n-1..n, n) p0 = mulx_s(tsn-1..0, ttn-1..0, n) p = p1 + p0 return p2n-1..0 endfunction dotp_s
Reserved Instruction Exception, MSA Disabled Exception.