Skip to content

PUNPKHI

Operation

Unpacks the upper half of source predicate positions into wider destination positions.

Assembler Syntax

PUNPKHI.{B|W|L}(z) Pn(p), Pn(q)

Privilege

Unprivileged

Required CPUID flags

VECTOR

PUNPKHI reads the significant predicate positions for the selected B, W, or L source element width. It selects the upper half of those positions and copies them in lane order to the significant destination positions for elements twice that width. The complete destination predicate image is written, and every bit outside the significant destination positions is cleared. The operation leaves FLAGS unchanged.

In the illustrated 16-byte instance, the upper half of the significant byte-predicate positions of source Pn is copied in lane order to the significant word-predicate positions of new Pq. Every other result bit is cleared, and the same upper-half rule scales with VLEN.

PUNPKHI.B upper-half predicate unpacking

2.75in

Encodings

PUNPKHI.{B|W|L}(z) Pn(p), Pn(q)

Format: Instruction format for PUNPKHI.{B|W|L}(z) Pn(p), Pn(q)

Format: Instruction format for PUNPKHI.{B|W|L}(z) Pn(p), Pn(q)

sizeallowed: 0x0..0x2 [reserved_vector_element_type]