# Function core::arch::x86_64::_mm_insert_ps 1.27.0[−][src]

    pub unsafe fn _mm_insert_ps(a: __m128, b: __m128, imm8: i32) -> __m128

This is supported on x86-64 and target feature `sse4.1` only.

Select a single value in `a` to store at some position in `b`, Then zero elements according to `imm8`.

`imm8` specifies which bits from operand `a` will be copied, which bits in the result they will be copied to, and which bits in the result will be cleared. The following assignments are made:

- Bits `[7:6]` specify the bits to copy from operand `a`:

  - `00`: Selects bits `[31:0]` from operand `a`.
  - `01`: Selects bits `[63:32]` from operand `a`.
  - `10`: Selects bits `[95:64]` from operand `a`.
  - `11`: Selects bits `[127:96]` from operand `a`.

- Bits `[5:4]` specify the bits in the result to which the selected bits from operand `a` are copied:

  - `00`: Copies the selected bits from `a` to result bits `[31:0]`.
  - `01`: Copies the selected bits from `a` to result bits `[63:32]`.
  - `10`: Copies the selected bits from `a` to result bits `[95:64]`.
  - `11`: Copies the selected bits from `a` to result bits `[127:96]`.

- Bits `[3:0]`: If any of these bits are set, the corresponding result element is cleared.

Intel's documentation

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)