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
  • Loading branch information
sayantn committed Jul 17, 2024
1 parent d503863 commit 81512ca
Show file tree
Hide file tree
Showing 5 changed files with 142,493 additions and 162,850 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
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
9 changes: 3 additions & 6 deletions crates/core_arch/src/x86/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ pub unsafe fn get_m128(a: __m128, idx: usize) -> f32 {
#[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 @@ -92,8 +91,7 @@ pub unsafe fn get_m256(a: __m256, idx: usize) -> f32 {
#[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 @@ -166,8 +164,7 @@ pub unsafe fn assert_eq_m512d(a: __m512d, b: __m512d) {
#[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 81512ca

Please sign in to comment.