Skip to content

Commit 97862d5

Browse files
authored
fix _mm_loadu_si64 (#992)
1 parent da69c54 commit 97862d5

File tree

1 file changed

+2
-3
lines changed
  • crates/core_arch/src/x86

1 file changed

+2
-3
lines changed

crates/core_arch/src/x86/sse.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,10 +1243,9 @@ pub unsafe fn _mm_loadr_ps(p: *const f32) -> __m128 {
12431243
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_loadu_si64)
12441244
#[inline]
12451245
#[target_feature(enable = "sse")]
1246-
#[cfg_attr(all(test, not(target_arch = "x86")), assert_instr(movq))]
12471246
#[stable(feature = "simd_x86_mm_loadu_si64", since = "1.46.0")]
12481247
pub unsafe fn _mm_loadu_si64(mem_addr: *const u8) -> __m128i {
1249-
transmute(i64x2(0, ptr::read_unaligned(mem_addr as *const i64)))
1248+
transmute(i64x2(ptr::read_unaligned(mem_addr as *const i64), 0))
12501249
}
12511250

12521251
/// Stores the lowest 32 bit float of `a` into memory.
@@ -3083,7 +3082,7 @@ mod tests {
30833082
unsafe fn test_mm_loadu_si64() {
30843083
let a = _mm_setr_epi64x(5, 6);
30853084
let r = _mm_loadu_si64(&a as *const _ as *const _);
3086-
assert_eq_m128i(r, _mm_set_epi64x(5, 0));
3085+
assert_eq_m128i(r, _mm_setr_epi64x(5, 0));
30873086
}
30883087

30893088
#[simd_test(enable = "sse")]

0 commit comments

Comments
 (0)