punpkhi
PUNPKHI <Pd>.H, <Pn>.B
Unpack Predicate High.
Pseudocode Operation
No pseudocode available.
Encoding
Binary Layout
000001010011000
31:17
1
16
010000
15:10
0
9
Pn
8:5
0
4
Pd
3:0
Related
More in SVE
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x05314000 | PUNPKHI <Pd>.H, <Pn>.B | A64 | 000001010011000 | 1 | 010000 | 0 | Pn | 0 | Pd |
Description
Unpack elements from the lowest or highest half of the source predicate and place in elements of twice their size within the destination predicate. This instruction is unpredicated.
Operation
CheckSVEEnabled();
constant integer VL = CurrentVL;
constant integer PL = VL DIV 8;
constant integer elements = VL DIV esize;
bits(PL) operand = P[n, PL];
bits(PL) result;
constant integer psize = esize DIV 8;
for e = 0 to elements-1
bit pbit = PredicateElement(operand, if hi then e + elements else e, esize DIV 2);
Elem[result, e, psize] = ZeroExtend(pbit, psize);
P[d, PL] = result;