Skip to content

Commit

Permalink
Update Intrinsics List to v3.6.9
Browse files Browse the repository at this point in the history
Add `#[inline]` to avx512ifma intrinsics
Fix the test equality.
Remove the stability attributes in simd types and test functions
  • Loading branch information
sayantn authored and Amanieu committed Jul 26, 2024
1 parent ff9fdbc commit fb90dfa
Show file tree
Hide file tree
Showing 6 changed files with 142,494 additions and 162,858 deletions.
6 changes: 3 additions & 3 deletions crates/core_arch/missing-x86.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,23 @@
</p></details>


<details><summary>["SHA512", "SHA512"]</summary><p>
<details><summary>["SHA512", "AVX"]</summary><p>

* [ ] [`_mm256_sha512msg1_epi64`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_sha512msg1_epi64)
* [ ] [`_mm256_sha512msg2_epi64`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_sha512msg2_epi64)
* [ ] [`_mm256_sha512rnds2_epi64`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_sha512rnds2_epi64)
</p></details>


<details><summary>["SM3"]</summary><p>
<details><summary>["SM3", "AVX"]</summary><p>

* [ ] [`_mm_sm3msg1_epi32`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sm3msg1_epi32)
* [ ] [`_mm_sm3msg2_epi32`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sm3msg2_epi32)
* [ ] [`_mm_sm3rnds2_epi32`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sm3rnds2_epi32)
</p></details>


<details><summary>["SM4"]</summary><p>
<details><summary>["SM4", "AVX"]</summary><p>

* [ ] [`_mm256_sm4key4_epi32`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_sm4key4_epi32)
* [ ] [`_mm256_sm4rnds4_epi32`](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_sm4rnds4_epi32)
Expand Down
6 changes: 1 addition & 5 deletions crates/core_arch/src/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
#![allow(non_camel_case_types)]

macro_rules! simd_ty {
($(#[$stability:meta])? $id:ident [$ety:ident]: $($elem_name:ident),*) => {
($id:ident [$ety:ident]: $($elem_name:ident),*) => {
#[repr(simd)]
#[derive(Copy, Clone, Debug, PartialEq)]
$(#[$stability])?
pub(crate) struct $id { $(pub $elem_name: $ety),* }

#[allow(clippy::use_self)]
Expand Down Expand Up @@ -188,7 +187,6 @@ simd_ty!(i32x4[i32]: x0, x1, x2, x3);
simd_ty!(i64x2[i64]: x0, x1);

simd_ty!(
#[unstable(feature = "f16", issue = "116909")]
f16x8[f16]:
x0,
x1,
Expand Down Expand Up @@ -372,7 +370,6 @@ simd_ty!(
simd_ty!(i64x4[i64]: x0, x1, x2, x3);

simd_ty!(
#[unstable(feature = "f16", issue = "116909")]
f16x16[f16]:
x0,
x1,
Expand Down Expand Up @@ -722,7 +719,6 @@ simd_ty!(
);

simd_ty!(
#[unstable(feature = "f16", issue = "116909")]
f16x32[f16]:
x0,
x1,
Expand Down
12 changes: 12 additions & 0 deletions crates/core_arch/src/x86/avx512ifma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub unsafe fn _mm512_madd52hi_epu64(a: __m512i, b: __m512i, c: __m512i) -> __m51
/// from `k` when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm512_mask_madd52hi_epu64)
#[inline]
#[target_feature(enable = "avx512ifma")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52huq))]
Expand All @@ -47,6 +48,7 @@ pub unsafe fn _mm512_mask_madd52hi_epu64(
/// out when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm512_maskz_madd52hi_epu64)
#[inline]
#[target_feature(enable = "avx512ifma")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52huq))]
Expand Down Expand Up @@ -82,6 +84,7 @@ pub unsafe fn _mm512_madd52lo_epu64(a: __m512i, b: __m512i, c: __m512i) -> __m51
/// from `k` when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm512_mask_madd52lo_epu64)
#[inline]
#[target_feature(enable = "avx512ifma")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52luq))]
Expand All @@ -102,6 +105,7 @@ pub unsafe fn _mm512_mask_madd52lo_epu64(
/// out when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm512_maskz_madd52lo_epu64)
#[inline]
#[target_feature(enable = "avx512ifma")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52luq))]
Expand Down Expand Up @@ -155,6 +159,7 @@ pub unsafe fn _mm256_madd52hi_epu64(a: __m256i, b: __m256i, c: __m256i) -> __m25
/// from `k` when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm256_mask_madd52hi_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52huq))]
Expand All @@ -175,6 +180,7 @@ pub unsafe fn _mm256_mask_madd52hi_epu64(
/// out when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm256_maskz_madd52hi_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52huq))]
Expand Down Expand Up @@ -228,6 +234,7 @@ pub unsafe fn _mm256_madd52lo_epu64(a: __m256i, b: __m256i, c: __m256i) -> __m25
/// from `k` when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm256_mask_madd52lo_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52luq))]
Expand All @@ -248,6 +255,7 @@ pub unsafe fn _mm256_mask_madd52lo_epu64(
/// out when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm256_maskz_madd52lo_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52luq))]
Expand Down Expand Up @@ -301,6 +309,7 @@ pub unsafe fn _mm_madd52hi_epu64(a: __m128i, b: __m128i, c: __m128i) -> __m128i
/// from `k` when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm_mask_madd52hi_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52huq))]
Expand All @@ -316,6 +325,7 @@ pub unsafe fn _mm_mask_madd52hi_epu64(a: __m128i, k: __mmask8, b: __m128i, c: __
/// out when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm_maskz_madd52hi_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52huq))]
Expand Down Expand Up @@ -364,6 +374,7 @@ pub unsafe fn _mm_madd52lo_epu64(a: __m128i, b: __m128i, c: __m128i) -> __m128i
/// from `k` when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm_mask_madd52lo_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52luq))]
Expand All @@ -379,6 +390,7 @@ pub unsafe fn _mm_mask_madd52lo_epu64(a: __m128i, k: __mmask8, b: __m128i, c: __
/// out when the corresponding mask bit is not set).
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512IFMA52&text=_mm_maskz_madd52lo_epu64)
#[inline]
#[target_feature(enable = "avx512ifma,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(test, assert_instr(vpmadd52luq))]
Expand Down
12 changes: 3 additions & 9 deletions crates/core_arch/src/x86/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ pub unsafe fn get_m128(a: __m128, idx: usize) -> f32 {

#[track_caller]
#[target_feature(enable = "avx512fp16")]
#[unstable(feature = "stdarch_x86_avx512_f16", issue = "127213")]
pub unsafe fn assert_eq_m128h(a: __m128h, b: __m128h) {
// FIXME: use `_mm_cmp_ph_mask::<_CMP_EQ_OQ>` when it's implemented
let r = _mm_cmpeq_epi16_mask(transmute(a), transmute(b));
let r = _mm_cmp_ph_mask::<_CMP_EQ_OQ>(a, b);
if r != 0b1111_1111 {
panic!("{:?} != {:?}", a, b);
}
Expand Down Expand Up @@ -90,10 +88,8 @@ pub unsafe fn get_m256(a: __m256, idx: usize) -> f32 {

#[track_caller]
#[target_feature(enable = "avx512fp16")]
#[unstable(feature = "stdarch_x86_avx512_f16", issue = "127213")]
pub unsafe fn assert_eq_m256h(a: __m256h, b: __m256h) {
// FIXME: use `_mm256_cmp_ph_mask::<_CMP_EQ_OQ>` when it's implemented
let r = _mm256_cmpeq_epi16_mask(transmute(a), transmute(b));
let r = _mm256_cmp_ph_mask::<_CMP_EQ_OQ>(a, b);
if r != 0b11111111_11111111 {
panic!("{:?} != {:?}", a, b);
}
Expand Down Expand Up @@ -164,10 +160,8 @@ pub unsafe fn assert_eq_m512d(a: __m512d, b: __m512d) {

#[track_caller]
#[target_feature(enable = "avx512fp16")]
#[unstable(feature = "stdarch_x86_avx512_f16", issue = "127213")]
pub unsafe fn assert_eq_m512h(a: __m512h, b: __m512h) {
// FIXME: use `_mm512_cmp_ph_mask::<_CMP_EQ_OQ>` when it's implemented
let r = _mm512_cmpeq_epi16_mask(transmute(a), transmute(b));
let r = _mm512_cmp_ph_mask::<_CMP_EQ_OQ>(a, b);
if r != 0b11111111_11111111_11111111_11111111 {
panic!("{:?} != {:?}", a, b);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/stdarch-verify/tests/x86-intel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn verify_all_signatures() {
// https://software.intel.com/sites/landingpage/IntrinsicsGuide/#
//
// Open up the network console and you'll see an xml file was downloaded
// (currently called data-3.6.8.xml). That's the file we downloaded
// (currently called data-3.6.9.xml). That's the file we downloaded
// here.
let xml = include_bytes!("../x86-intel.xml");

Expand Down
Loading

0 comments on commit fb90dfa

Please sign in to comment.