Skip to main content

## zip

# Function zip

Source

    pub fn zip(rs: u32) -> u32

🔬This is a nightly-only experimental API. (`riscv_ext_intrinsics` #114544)
Available on target feature `zbkb` and (RISC-V RV32) only.
Expand description

Place upper/lower halves of the source register into odd/even bits of the destination respectivley.

This instruction places bits in the low half of the source register into the even bit positions of the destination, and bits in the high half of the source register into the odd bit positions of the destination. It is the inverse of the unzip instruction. This instruction is available only on RV32.

Source: RISC-V Cryptography Extensions Volume I: Scalar & Entropy Source Instructions

Version: v1.0.1

Section: 3.49