MSA 011110 |
df |
i8 |
ws |
wd |
I8 000010 |
6 |
2 |
8 |
5 |
5 |
6 |
SHF.df |
Immediate Set Shuffle Elements | |
SHF.B wd,ws,i8 |
MSA |
Immediate Set Shuffle Elements |
SHF.H wd,ws,i8 |
MSA |
Immediate Set Shuffle Elements |
SHF.W wd,ws,i8 |
MSA |
Immediate Set Shuffle Elements |
Immediate Set Shuffle Elements
Immediate control value-based 4 element set copy
wd[i] = shuffle_set(ws, i, i8)
The set shuffle instruction works on 4-element sets in df data format. All sets are shuf fled in the same w ay: the element i82i+1..2i in ws is copied over the element i in wd, where i is 0, 1, 2, 3.
The operands and results are values in byte data format.
No data-dependent exceptions are possible.
SHF.B for i in 0 .. WRLEN/8-1 j = i % 4 k = i - j + i82j+1..2j WR[wd]8i+7..8i = WR[ws]8k+7..8k endfor SHF.H for i in 0 .. WRLEN/16-1 j = i % 4 k = i - j + i82j+1..2j WR[wd]16i+15..16i = WR[ws]16k+15..16k endfor SHF.W for i in 0 .. WRLEN/32-1 j = i % 4 k = i - j + i82j+1..2j WR[wd]32i+31..32i = WR[ws]32k+31..32k endfor
Reserved Instruction Exception, MSA Disabled Exception.