Skip to content

Fix _mm_stream_si64 #1623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions crates/core_arch/src/x86_64/macros.rs
Original file line number Diff line number Diff line change
@@ -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)
};
}
2 changes: 1 addition & 1 deletion crates/core_arch/src/x86_64/sse2.rs
Original file line number Diff line number Diff line change
@@ -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),