Skip to content

Commit

Permalink
Upgraded disassembly to include windows-gnu targets
Browse files Browse the repository at this point in the history
  • Loading branch information
sayantn committed Jun 24, 2024
1 parent 150aada commit 258f489
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 133 deletions.
12 changes: 6 additions & 6 deletions crates/core_arch/src/x86/avx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ pub unsafe fn _mm256_cvttps_epi32(a: __m256) -> __m256i {
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -964,7 +964,7 @@ pub unsafe fn _mm256_extractf128_ps<const IMM1: i32>(a: __m256) -> __m128 {
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -980,7 +980,7 @@ pub unsafe fn _mm256_extractf128_pd<const IMM1: i32>(a: __m256d) -> __m128d {
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(1)]
Expand Down Expand Up @@ -1270,7 +1270,7 @@ pub unsafe fn _mm256_broadcast_pd(a: &__m128d) -> __m256d {
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsertf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -1292,7 +1292,7 @@ pub unsafe fn _mm256_insertf128_ps<const IMM1: i32>(a: __m256, b: __m128) -> __m
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsertf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -1313,7 +1313,7 @@ pub unsafe fn _mm256_insertf128_pd<const IMM1: i32>(a: __m256d, b: __m128d) -> _
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsertf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand Down
4 changes: 2 additions & 2 deletions crates/core_arch/src/x86/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ pub unsafe fn _mm256_cvtepu8_epi64(a: __m128i) -> __m256i {
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(1)]
Expand Down Expand Up @@ -1718,7 +1718,7 @@ pub unsafe fn _mm256_mask_i64gather_pd<const SCALE: i32>(
#[inline]
#[target_feature(enable = "avx2")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsertf128, IMM1 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand Down
50 changes: 25 additions & 25 deletions crates/core_arch/src/x86/avx512f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23499,7 +23499,7 @@ pub unsafe fn _mm256_maskz_shuffle_f64x2<const MASK: i32>(
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf32x4, IMM8 = 3)
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -23520,7 +23520,7 @@ pub unsafe fn _mm512_extractf32x4_ps<const IMM8: i32>(a: __m512) -> __m128 {
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf32x4, IMM8 = 3)
)]
#[rustc_legacy_const_generics(3)]
Expand All @@ -23541,7 +23541,7 @@ pub unsafe fn _mm512_mask_extractf32x4_ps<const IMM8: i32>(
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf32x4, IMM8 = 3)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -23559,7 +23559,7 @@ pub unsafe fn _mm512_maskz_extractf32x4_ps<const IMM8: i32>(k: __mmask8, a: __m5
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextract, IMM8 = 1) //should be vextractf32x4
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -23578,7 +23578,7 @@ pub unsafe fn _mm256_extractf32x4_ps<const IMM8: i32>(a: __m256) -> __m128 {
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf32x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(3)]
Expand All @@ -23599,7 +23599,7 @@ pub unsafe fn _mm256_mask_extractf32x4_ps<const IMM8: i32>(
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf32x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -23617,7 +23617,7 @@ pub unsafe fn _mm256_maskz_extractf32x4_ps<const IMM8: i32>(k: __mmask8, a: __m2
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf64x4, IMM1 = 1) //should be vextracti64x4
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -23636,7 +23636,7 @@ pub unsafe fn _mm512_extracti64x4_epi64<const IMM1: i32>(a: __m512i) -> __m256i
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextracti64x4, IMM1 = 1)
)]
#[rustc_legacy_const_generics(3)]
Expand All @@ -23657,7 +23657,7 @@ pub unsafe fn _mm512_mask_extracti64x4_epi64<const IMM1: i32>(
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextracti64x4, IMM1 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -23675,7 +23675,7 @@ pub unsafe fn _mm512_maskz_extracti64x4_epi64<const IMM1: i32>(k: __mmask8, a: _
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf64x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -23694,7 +23694,7 @@ pub unsafe fn _mm512_extractf64x4_pd<const IMM8: i32>(a: __m512d) -> __m256d {
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf64x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(3)]
Expand All @@ -23715,7 +23715,7 @@ pub unsafe fn _mm512_mask_extractf64x4_pd<const IMM8: i32>(
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf64x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -23733,7 +23733,7 @@ pub unsafe fn _mm512_maskz_extractf64x4_pd<const IMM8: i32>(k: __mmask8, a: __m5
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextractf32x4, IMM2 = 3) //should be vextracti32x4
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -23757,7 +23757,7 @@ pub unsafe fn _mm512_extracti32x4_epi32<const IMM2: i32>(a: __m512i) -> __m128i
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextracti32x4, IMM2 = 3)
)]
#[rustc_legacy_const_generics(3)]
Expand All @@ -23778,7 +23778,7 @@ pub unsafe fn _mm512_mask_extracti32x4_epi32<const IMM2: i32>(
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextracti32x4, IMM2 = 3)
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -23796,7 +23796,7 @@ pub unsafe fn _mm512_maskz_extracti32x4_epi32<const IMM2: i32>(k: __mmask8, a: _
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextract, IMM1 = 1) //should be vextracti32x4
)]
#[rustc_legacy_const_generics(1)]
Expand All @@ -23818,7 +23818,7 @@ pub unsafe fn _mm256_extracti32x4_epi32<const IMM1: i32>(a: __m256i) -> __m128i
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextracti32x4, IMM1 = 1)
)]
#[rustc_legacy_const_generics(3)]
Expand All @@ -23839,7 +23839,7 @@ pub unsafe fn _mm256_mask_extracti32x4_epi32<const IMM1: i32>(
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vextracti32x4, IMM1 = 1)
)]
#[rustc_legacy_const_generics(2)]
Expand Down Expand Up @@ -24189,7 +24189,7 @@ pub unsafe fn _mm512_maskz_inserti32x4<const IMM8: i32>(
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsert, IMM8 = 1) //should be vinserti32x4
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -24211,7 +24211,7 @@ pub unsafe fn _mm256_inserti32x4<const IMM8: i32>(a: __m256i, b: __m128i) -> __m
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinserti32x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(4)]
Expand All @@ -24233,7 +24233,7 @@ pub unsafe fn _mm256_mask_inserti32x4<const IMM8: i32>(
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinserti32x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(3)]
Expand Down Expand Up @@ -24379,7 +24379,7 @@ pub unsafe fn _mm512_maskz_insertf32x4<const IMM8: i32>(
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsert, IMM8 = 1) //should be vinsertf32x4
)]
#[rustc_legacy_const_generics(2)]
Expand All @@ -24399,7 +24399,7 @@ pub unsafe fn _mm256_insertf32x4<const IMM8: i32>(a: __m256, b: __m128) -> __m25
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsertf32x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(4)]
Expand All @@ -24421,7 +24421,7 @@ pub unsafe fn _mm256_mask_insertf32x4<const IMM8: i32>(
#[target_feature(enable = "avx512f,avx512vl")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(
all(test, not(target_os = "windows")),
all(test, not(target_env = "msvc")),
assert_instr(vinsertf32x4, IMM8 = 1)
)]
#[rustc_legacy_const_generics(3)]
Expand Down Expand Up @@ -25554,7 +25554,7 @@ pub unsafe fn _mm512_castsi512_pd(a: __m512i) -> __m512d {
#[inline]
#[target_feature(enable = "avx512f")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
#[cfg_attr(all(test, not(target_os = "windows")), assert_instr(vmovd))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(vmovd))]
pub unsafe fn _mm512_cvtsi512_si32(a: __m512i) -> i32 {
let extract: i32 = simd_extract!(a.as_i32x16(), 0);
extract
Expand Down
22 changes: 17 additions & 5 deletions crates/core_arch/src/x86/pclmulqdq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,23 @@ extern "C" {
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_clmulepi64_si128)
#[inline]
#[target_feature(enable = "pclmulqdq")]
#[cfg_attr(all(test, not(target_os = "linux")), assert_instr(pclmulqdq, IMM8 = 0))]
#[cfg_attr(all(test, target_os = "linux"), assert_instr(pclmullqlqdq, IMM8 = 0))]
#[cfg_attr(all(test, target_os = "linux"), assert_instr(pclmulhqlqdq, IMM8 = 1))]
#[cfg_attr(all(test, target_os = "linux"), assert_instr(pclmullqhqdq, IMM8 = 16))]
#[cfg_attr(all(test, target_os = "linux"), assert_instr(pclmulhqhqdq, IMM8 = 17))]
#[cfg_attr(all(test, target_env = "msvc"), assert_instr(pclmulqdq, IMM8 = 0))]
#[cfg_attr(
all(test, not(target_env = "msvc")),
assert_instr(pclmullqlqdq, IMM8 = 0)
)]
#[cfg_attr(
all(test, not(target_env = "msvc")),
assert_instr(pclmulhqlqdq, IMM8 = 1)
)]
#[cfg_attr(
all(test, not(target_env = "msvc")),
assert_instr(pclmullqhqdq, IMM8 = 16)
)]
#[cfg_attr(
all(test, not(target_env = "msvc")),
assert_instr(pclmulhqhqdq, IMM8 = 17)
)]
#[rustc_legacy_const_generics(2)]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm_clmulepi64_si128<const IMM8: i32>(a: __m128i, b: __m128i) -> __m128i {
Expand Down
Loading

0 comments on commit 258f489

Please sign in to comment.