Skip to content

Commit 47b929d

Browse files
sayantnAmanieu
authored andcommitted
Fix _mm_stream_si64
1 parent 7c6e063 commit 47b929d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

crates/core_arch/src/x86_64/macros.rs

+13
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,16 @@ macro_rules! static_assert_sae {
2020
static_assert!($imm == 4 || $imm == 8, "Invalid IMM value")
2121
};
2222
}
23+
24+
#[cfg(target_pointer_width = "32")]
25+
macro_rules! vps {
26+
($inst1:expr, $inst2:expr) => {
27+
concat!($inst1, " [{p:e}]", $inst2)
28+
};
29+
}
30+
#[cfg(target_pointer_width = "64")]
31+
macro_rules! vps {
32+
($inst1:expr, $inst2:expr) => {
33+
concat!($inst1, " [{p}]", $inst2)
34+
};
35+
}

crates/core_arch/src/x86_64/sse2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub unsafe fn _mm_cvttsd_si64x(a: __m128d) -> i64 {
7979
#[stable(feature = "simd_x86", since = "1.27.0")]
8080
pub unsafe fn _mm_stream_si64(mem_addr: *mut i64, a: i64) {
8181
crate::arch::asm!(
82-
"movnti [{p}], {a}",
82+
vps!("movnti", ",{a}"),
8383
p = in(reg) mem_addr,
8484
a = in(reg) a,
8585
options(nostack, preserves_flags),

0 commit comments

Comments
 (0)