MSA 011110 |
101 |
df |
wt |
ws |
wd |
3R 010101 |
6 |
3 |
2 |
5 |
5 |
5 |
6 |
HADD_U.df |
Vector Unsigned Horizontal Add | |
HADD_U.H wd,ws,wt |
MSA |
Vector Unsigned Horizontal Add |
HADD_U.W wd,ws,wt |
MSA |
Vector Unsigned Horizontal Add |
HADD_U.D wd,ws,wt |
MSA |
Vector Unsigned Horizontal Add |
Vector Unsigned Horizontal Add
Vector zero extend and pairwise add the odd elements with the even elements to double width elements
(wd[2i+1], wd[2i]) = unsigned(ws[2i+1]) + unsigned(wt[2i])
The zero-extended odd elements in vector ws are added to the zero-extended even elements in vector wt producing a result twice the size of the input operands. The result is written to vector wd.
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.
HADD_U.H for i in 0 .. WRLEN/16-1 WR[wd]16i+15..16i = hadd_u(WR[ws]16i+15..16i, WR[wt]16i+15..16i, 8) endfor HADD_U.W for i in 0 .. WRLEN/32-1 WR[wd]32i+31..32i = hadd_u(WR[ws]32i+31..32i, WR[wt]32i+31..32i, 16) endfor HADD_U.D for i in 0 .. WRLEN/64-1 WR[wd]64i+63..64i = hadd_u(WR[ws]64i+63..64i, WR[wt]64i+63..64i, 32) endfor function hadd_u(ts, tt, n) t = (0n || ts2n-1..n) + (0n || ttn-1..0) return t endfunction hadd_u
Reserved Instruction Exception, MSA Disabled Exception.