From 9f57fdea537f473b2a9822b551fb904049b88403 Mon Sep 17 00:00:00 2001 From: The rustc-josh-sync Cronjob Bot Date: Thu, 12 Nov 2026 04:09:01 +0000 Subject: [PATCH 1/4] Prepare for merging from rust-lang/rust This updates the rust-version file to ee8268e23d0e2e308b52e4f63df69afb69bc61a4. --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index e4f77638ae..912f0d44a8 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -16d1ffac17ad8b739e32483ac2e65fe7e1804977 +ee8268e23d0e2e308b52e4f63df69afb69bc61a4 From 1ac4fa9ba1f48d644bf746e1a8a8d19bf553afb8 Mon Sep 17 00:00:00 2001 From: panstromek Date: Thu, 29 Oct 2026 16:46:52 +0100 Subject: [PATCH 2/4] ref: replace debug_tuple helpers with debug struct ones They have the same signature now, so we can unify them. The implementation for tuple is selected based on whether the concatenated string contains field names. --- crates/core_arch/src/simd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/core_arch/src/simd.rs b/crates/core_arch/src/simd.rs index 286f9b3bbc..69f5eda999 100644 --- a/crates/core_arch/src/simd.rs +++ b/crates/core_arch/src/simd.rs @@ -428,7 +428,7 @@ pub(crate) fn debug_simd_finish( type_name: &str, array: &[T; N], ) -> crate::fmt::Result { - crate::fmt::Formatter::debug_tuple_fields_finish( + crate::fmt::Formatter::debug_struct_fields_finish( formatter, type_name, &crate::array::from_fn::<&dyn crate::fmt::Debug, N, _>(|i| &array[i]), From 2daeacea3668d0c2f755a96bd50c38247fc6a61f Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Wed, 23 Sep 2026 16:11:02 +0200 Subject: [PATCH 3/4] add `core::arch::{x86, x86_64}::x87_f80` --- crates/core_arch/src/lib.rs | 1 + crates/core_arch/src/x86/mod.rs | 73 +++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/crates/core_arch/src/lib.rs b/crates/core_arch/src/lib.rs index 2af8a830cd..b95f92c6f9 100644 --- a/crates/core_arch/src/lib.rs +++ b/crates/core_arch/src/lib.rs @@ -48,6 +48,7 @@ any(target_arch = "powerpc", target_arch = "powerpc64"), feature(powerpc_ppcf128) )] +#![cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), feature(x87_f80))] #![cfg_attr( test, feature( diff --git a/crates/core_arch/src/x86/mod.rs b/crates/core_arch/src/x86/mod.rs index e6875a628f..ca5551ca6c 100644 --- a/crates/core_arch/src/x86/mod.rs +++ b/crates/core_arch/src/x86/mod.rs @@ -5,6 +5,79 @@ use crate::mem::transmute; #[macro_use] mod macros; +/// The x87 80-bit extended-precision floating-point type. +/// +/// FIXME: extend the documentation. +#[doc(alias = "long double")] +#[doc(alias = "x86_fp80")] +#[doc(alias = "__float80")] +#[unstable(feature = "x87_f80", issue = "163982")] +#[allow(non_camel_case_types)] +#[doc(cfg(any(target_arch = "x86", target_arch = "x86_64")))] +#[derive(Clone, Copy)] +#[repr(transparent)] +pub struct x87_f80(crate::num::imp::x87_f80::x87_f80); + +const _: () = assert!( + size_of::() + == cfg_select! { + target_arch = "x86" => cfg_select! { + target_vendor = "apple" => 16, + target_env = "msvc" => 16, + _ => 12, + }, + target_arch = "x86_64" => 16, + _ => size_of::(), // for doc builds + } +); + +const _: () = assert!( + align_of::() + == cfg_select! { + target_arch = "x86" => cfg_select! { + target_vendor = "apple" => 16, + target_env = "msvc" => 16, + _ => 4, + }, + target_arch = "x86_64" => 16, + _ => align_of::(), // for doc builds + } +); + +#[unstable(feature = "x87_f80", issue = "163982")] +impl crate::fmt::Debug for x87_f80 { + #[inline] + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { + let mut bytes = [0u8; 16]; + bytes[..10].copy_from_slice(&self.to_ne_bytes()); + write!(f, "x87_f80({:#022x})", u128::from_ne_bytes(bytes)) + } +} + +impl x87_f80 { + /// Returns the memory representation of this floating point number as a byte array in + /// native byte order. + #[unstable(feature = "x87_f80", issue = "163982")] + #[inline] + pub const fn to_ne_bytes(self) -> [u8; 10] { + // SAFETY: the first 10 bytes are initialized. + unsafe { (&raw const self).cast::<[u8; 10]>().read() } + } + + /// Creates a floating point value from its representation as a byte array in native endian. + #[unstable(feature = "x87_f80", issue = "163982")] + #[inline] + pub const fn from_ne_bytes(bytes: [u8; 10]) -> Self { + // SAFETY: we initialize the first 10 bytes, the remaining bytes remain uninitialized. + // That is exactly the layout of x87_f80. + unsafe { + let mut this = crate::mem::MaybeUninit::::uninit(); + this.as_mut_ptr().cast::<[u8; 10]>().write(bytes); + this.assume_init() + } + } +} + types! { #![stable(feature = "simd_x86", since = "1.27.0")] From d31184646e00fdeb48184d048962917e87ae1fab Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Sun, 15 Nov 2026 16:22:01 +0100 Subject: [PATCH 4/4] disable `assert_instr` on some amx tests they run into https://github.com/rust-lang/rust/issues/165931, which we can't fix here. --- crates/core_arch/src/x86_64/amx.rs | 57 ++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/crates/core_arch/src/x86_64/amx.rs b/crates/core_arch/src/x86_64/amx.rs index 3f98df5b77..22b9598d5a 100644 --- a/crates/core_arch/src/x86_64/amx.rs +++ b/crates/core_arch/src/x86_64/amx.rs @@ -106,7 +106,8 @@ pub unsafe fn _tile_stored(base: *mut u8, stride: usize) { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_stored&ig_expand=6881) #[inline] #[target_feature(enable = "amx-tile")] -#[cfg_attr(test, assert_instr(tilestored))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tilestored))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_stored(base: *mut u8, stride: usize, src: __tile1024i) { tilestored64_internal(src.rows, src.colsb, base, stride as u64, src.tile); @@ -191,7 +192,8 @@ pub unsafe fn _tile_dpbf16ps() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_dpbf16ps&ig_expand=6864) #[inline] #[target_feature(enable = "amx-bf16")] -#[cfg_attr(test, assert_instr(tdpbf16ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tdpbf16ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbf16ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbf16ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -224,7 +226,8 @@ pub unsafe fn _tile_dpbssd() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_dpbssd&ig_expand=6866) #[inline] #[target_feature(enable = "amx-int8")] -#[cfg_attr(test, assert_instr(tdpbssd))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tdpbssd))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbssd(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbssd_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -257,7 +260,8 @@ pub unsafe fn _tile_dpbsud() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_dpbsud&ig_expand=6868) #[inline] #[target_feature(enable = "amx-int8")] -#[cfg_attr(test, assert_instr(tdpbsud))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tdpbsud))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbsud(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbsud_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -290,7 +294,8 @@ pub unsafe fn _tile_dpbusd() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_dpbusd&ig_expand=6870) #[inline] #[target_feature(enable = "amx-int8")] -#[cfg_attr(test, assert_instr(tdpbusd))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tdpbusd))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbusd(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbusd_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -323,7 +328,8 @@ pub unsafe fn _tile_dpbuud() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_dpbuud&ig_expand=6872) #[inline] #[target_feature(enable = "amx-int8")] -#[cfg_attr(test, assert_instr(tdpbuud))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tdpbuud))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbuud(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbuud_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -354,7 +360,8 @@ pub unsafe fn _tile_dpfp16ps() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_dpfp16ps&ig_expand=6874) #[inline] #[target_feature(enable = "amx-fp16")] -#[cfg_attr(test, assert_instr(tdpfp16ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tdpfp16ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpfp16ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpfp16ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -393,7 +400,8 @@ pub unsafe fn _tile_cmmimfp16ps() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_cmmimfp16ps&ig_expand=6860) #[inline] #[target_feature(enable = "amx-complex")] -#[cfg_attr(test, assert_instr(tcmmimfp16ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tcmmimfp16ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cmmimfp16ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tcmmimfp16ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -432,7 +440,8 @@ pub unsafe fn _tile_cmmrlfp16ps() { /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=__tile_cmmrlfp16ps&ig_expand=6862) #[inline] #[target_feature(enable = "amx-complex")] -#[cfg_attr(test, assert_instr(tcmmrlfp16ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(test, assert_instr(tcmmrlfp16ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cmmrlfp16ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tcmmrlfp16ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -464,7 +473,8 @@ pub unsafe fn _tile_dpbf8ps() { /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-fp8")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdpbf8ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdpbf8ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbf8ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbf8ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -496,7 +506,8 @@ pub unsafe fn _tile_dpbhf8ps() { /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-fp8")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdpbhf8ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdpbhf8ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dpbhf8ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdpbhf8ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -528,7 +539,8 @@ pub unsafe fn _tile_dphbf8ps() { /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-fp8")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdphbf8ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdphbf8ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dphbf8ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdphbf8ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -560,7 +572,8 @@ pub unsafe fn _tile_dphf8ps() { /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-fp8")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdphf8ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tdphf8ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_dphf8ps(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) { (*dst).tile = tdphf8ps_internal(a.rows, b.colsb, a.colsb, (*dst).tile, a.tile, b.tile); @@ -668,7 +681,8 @@ pub unsafe fn _tile_cvtrowd2psi() -> __m512 { /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-avx512,avx10.2")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowd2ps))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowd2ps))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cvtrowd2ps(src: __tile1024i, row: u32) -> __m512 { tcvtrowd2ps_internal(src.rows, src.colsb, src.tile, row).as_m512() @@ -713,7 +727,8 @@ pub unsafe fn _tile_cvtrowps2phhi() -> __m512h /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-avx512,avx10.2")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2phh))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2phh))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cvtrowps2phh(src: __tile1024i, row: u32) -> __m512h { tcvtrowps2phh_internal(src.rows, src.colsb, src.tile, row).as_m512h() @@ -758,7 +773,8 @@ pub unsafe fn _tile_cvtrowps2phli() -> __m512h /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-avx512,avx10.2")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2phl))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2phl))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cvtrowps2phl(src: __tile1024i, row: u32) -> __m512h { tcvtrowps2phl_internal(src.rows, src.colsb, src.tile, row).as_m512h() @@ -803,7 +819,8 @@ pub unsafe fn _tile_cvtrowps2bf16hi() -> __m512 /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-avx512,avx10.2")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2bf16h))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2bf16h))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cvtrowps2bf16h(src: __tile1024i, row: u32) -> __m512bh { tcvtrowps2bf16h_internal(src.rows, src.colsb, src.tile, row).as_m512bh() @@ -848,7 +865,8 @@ pub unsafe fn _tile_cvtrowps2bf16li() -> __m512 /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-avx512,avx10.2")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2bf16l))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tcvtrowps2bf16l))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_cvtrowps2bf16l(src: __tile1024i, row: u32) -> __m512bh { tcvtrowps2bf16l_internal(src.rows, src.colsb, src.tile, row).as_m512bh() @@ -887,7 +905,8 @@ pub unsafe fn _tile_movrowi() -> __m512i { /// The shape of the tile is specified in the struct of [`__tile1024i`]. The register of the tile is allocated by the compiler. #[inline] #[target_feature(enable = "amx-avx512,avx10.2")] -#[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tilemovrow))] +// FIXME(amx) see https://github.com/rust-lang/rust/issues/165931. +// #[cfg_attr(all(test, not(target_vendor = "apple")), assert_instr(tilemovrow))] #[unstable(feature = "x86_amx_intrinsics", issue = "126622")] pub unsafe fn __tile_movrow(src: __tile1024i, row: u32) -> __m512i { tilemovrow_internal(src.rows, src.colsb, src.tile, row).as_m512i()