Skip to content
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

Fix signature of _mm512_store{u,}_si512. #1685

Merged
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
Fix signature of _mm512_store{u,}_si512.
Simiarly to other functions for `mm` and `mm256` register widths, the
first argument should be a pointer to the pointer type. See e.g.
`_mm256_store_si256` function.
marxin committed Nov 30, 2024
commit ed51aa5c185c98c9936c4318cc4f1809add708f5
12 changes: 6 additions & 6 deletions crates/core_arch/src/x86/avx512f.rs
Original file line number Diff line number Diff line change
@@ -32783,8 +32783,8 @@ pub unsafe fn _mm512_loadu_si512(mem_addr: *const i32) -> __m512i {
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vmovups))] //should be vmovdqu32
pub unsafe fn _mm512_storeu_si512(mem_addr: *mut i32, a: __m512i) {
ptr::write_unaligned(mem_addr as *mut __m512i, a);
pub unsafe fn _mm512_storeu_si512(mem_addr: *mut __m512i, a: __m512i) {
ptr::write_unaligned(mem_addr, a);
}

/// Loads 512-bits (composed of 8 packed double-precision (64-bit)
@@ -32857,8 +32857,8 @@ pub unsafe fn _mm512_load_si512(mem_addr: *const i32) -> __m512i {
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vmovaps))] //should be vmovdqa32
pub unsafe fn _mm512_store_si512(mem_addr: *mut i32, a: __m512i) {
ptr::write(mem_addr as *mut __m512i, a);
pub unsafe fn _mm512_store_si512(mem_addr: *mut __m512i, a: __m512i) {
ptr::write(mem_addr, a);
}

/// Load 512-bits (composed of 16 packed 32-bit integers) from memory into dst. mem_addr must be aligned on a 64-byte boundary or a general-protection exception may be generated.
@@ -55246,7 +55246,7 @@ mod tests {
unsafe fn test_mm512_storeu_si512() {
let a = _mm512_set1_epi32(9);
let mut r = _mm512_undefined_epi32();
_mm512_storeu_si512(&mut r as *mut _ as *mut i32, a);
_mm512_storeu_si512(&mut r as *mut _, a);
assert_eq_m512i(r, a);
}

@@ -55269,7 +55269,7 @@ mod tests {
unsafe fn test_mm512_store_si512() {
let a = _mm512_set1_epi32(9);
let mut r = _mm512_undefined_epi32();
_mm512_store_si512(&mut r as *mut _ as *mut i32, a);
_mm512_store_si512(&mut r as *mut _, a);
assert_eq_m512i(r, a);
}