pshufb in miri::shims::x86 - Rust
Description: Shuffles bytes from `left` using `right` as pattern. Each 16-byte block is shuffled independently.

Skip to main content

## pshufb

# Function pshufb

Source

    fn pshufb<'tcx>(
        ecx: &mut MiriInterpCx<'tcx>,
        left: &OpTy<'tcx>,
        right: &OpTy<'tcx>,
        dest: &MPlaceTy<'tcx>,
    ) -> InterpResult<'tcx, ()>

Expand description

Shuffles bytes from `left` using `right` as pattern. Each 16-byte block is shuffled independently.

`left` and `right` are both vectors of type `len` x i8.

If the highest bit of a byte in `right` is not set, the corresponding byte in `dest` is taken from the current 16-byte block of `left` at the position indicated by the lowest 4 bits of this byte in `right`. If the highest bit of a byte in `right` is set, the corresponding byte in `dest` is set to `0`.

https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_shuffle_epi8 https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_shuffle_epi8 https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm512_shuffle_epi8