Fix _mm_stream_si64

This commit is contained in:
Sayantan Chakraborty 2024-08-04 01:53:40 +05:30 committed by Amanieu d'Antras
parent 47068b1a06
commit 200905e0e9
2 changed files with 14 additions and 1 deletions

View file

@ -20,3 +20,16 @@ macro_rules! static_assert_sae {
static_assert!($imm == 4 || $imm == 8, "Invalid IMM value")
};
}
#[cfg(target_pointer_width = "32")]
macro_rules! vps {
($inst1:expr, $inst2:expr) => {
concat!($inst1, " [{p:e}]", $inst2)
};
}
#[cfg(target_pointer_width = "64")]
macro_rules! vps {
($inst1:expr, $inst2:expr) => {
concat!($inst1, " [{p}]", $inst2)
};
}

View file

@ -79,7 +79,7 @@ pub unsafe fn _mm_cvttsd_si64x(a: __m128d) -> i64 {
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm_stream_si64(mem_addr: *mut i64, a: i64) {
crate::arch::asm!(
"movnti [{p}], {a}",
vps!("movnti", ",{a}"),
p = in(reg) mem_addr,
a = in(reg) a,
options(nostack, preserves_flags),