Skip to content

Commit 6d0479d

Browse files
kadiwa4Amanieu
authored andcommitted
correct _mm_insert_ps documentation
1 parent 7d7351a commit 6d0479d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

crates/core_arch/src/x86/sse41.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -234,25 +234,25 @@ pub unsafe fn _mm_extract_epi32<const IMM8: i32>(a: __m128i) -> i32 {
234234
simd_extract!(a.as_i32x4(), IMM8 as u32, i32)
235235
}
236236

237-
/// Select a single value in `a` to store at some position in `b`,
237+
/// Select a single value in `b` to store at some position in `a`,
238238
/// Then zero elements according to `IMM8`.
239239
///
240-
/// `IMM8` specifies which bits from operand `a` will be copied, which bits in
240+
/// `IMM8` specifies which bits from operand `b` will be copied, which bits in
241241
/// the result they will be copied to, and which bits in the result will be
242242
/// cleared. The following assignments are made:
243243
///
244-
/// * Bits `[7:6]` specify the bits to copy from operand `a`:
245-
/// - `00`: Selects bits `[31:0]` from operand `a`.
246-
/// - `01`: Selects bits `[63:32]` from operand `a`.
247-
/// - `10`: Selects bits `[95:64]` from operand `a`.
248-
/// - `11`: Selects bits `[127:96]` from operand `a`.
244+
/// * Bits `[7:6]` specify the bits to copy from operand `b`:
245+
/// - `00`: Selects bits `[31:0]` from operand `b`.
246+
/// - `01`: Selects bits `[63:32]` from operand `b`.
247+
/// - `10`: Selects bits `[95:64]` from operand `b`.
248+
/// - `11`: Selects bits `[127:96]` from operand `b`.
249249
///
250250
/// * Bits `[5:4]` specify the bits in the result to which the selected bits
251-
/// from operand `a` are copied:
252-
/// - `00`: Copies the selected bits from `a` to result bits `[31:0]`.
253-
/// - `01`: Copies the selected bits from `a` to result bits `[63:32]`.
254-
/// - `10`: Copies the selected bits from `a` to result bits `[95:64]`.
255-
/// - `11`: Copies the selected bits from `a` to result bits `[127:96]`.
251+
/// from operand `b` are copied:
252+
/// - `00`: Copies the selected bits from `b` to result bits `[31:0]`.
253+
/// - `01`: Copies the selected bits from `b` to result bits `[63:32]`.
254+
/// - `10`: Copies the selected bits from `b` to result bits `[95:64]`.
255+
/// - `11`: Copies the selected bits from `b` to result bits `[127:96]`.
256256
///
257257
/// * Bits `[3:0]`: If any of these bits are set, the corresponding result
258258
/// element is cleared.

0 commit comments

Comments
 (0)