Skip to content

Commit 13a58f8

Browse files
marxinAmanieu
authored andcommitted
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.
1 parent d7550cb commit 13a58f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/core_arch/src/x86/avx512f.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -32783,8 +32783,8 @@ pub unsafe fn _mm512_loadu_si512(mem_addr: *const i32) -> __m512i {
3278332783
#[target_feature(enable = "avx512f")]
3278432784
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
3278532785
#[cfg_attr(test, assert_instr(vmovups))] //should be vmovdqu32
32786-
pub unsafe fn _mm512_storeu_si512(mem_addr: *mut i32, a: __m512i) {
32787-
ptr::write_unaligned(mem_addr as *mut __m512i, a);
32786+
pub unsafe fn _mm512_storeu_si512(mem_addr: *mut __m512i, a: __m512i) {
32787+
ptr::write_unaligned(mem_addr, a);
3278832788
}
3278932789

3279032790
/// 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 {
3285732857
#[target_feature(enable = "avx512f")]
3285832858
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
3285932859
#[cfg_attr(test, assert_instr(vmovaps))] //should be vmovdqa32
32860-
pub unsafe fn _mm512_store_si512(mem_addr: *mut i32, a: __m512i) {
32861-
ptr::write(mem_addr as *mut __m512i, a);
32860+
pub unsafe fn _mm512_store_si512(mem_addr: *mut __m512i, a: __m512i) {
32861+
ptr::write(mem_addr, a);
3286232862
}
3286332863

3286432864
/// 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 {
5524655246
unsafe fn test_mm512_storeu_si512() {
5524755247
let a = _mm512_set1_epi32(9);
5524855248
let mut r = _mm512_undefined_epi32();
55249-
_mm512_storeu_si512(&mut r as *mut _ as *mut i32, a);
55249+
_mm512_storeu_si512(&mut r as *mut _, a);
5525055250
assert_eq_m512i(r, a);
5525155251
}
5525255252

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

0 commit comments

Comments
 (0)