From becf7a87ac06ec4e1bc4d29f65b1e81fec8d9a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Sat, 17 Aug 2024 13:32:58 +0200 Subject: [PATCH 1/2] Remove `#![feature(asm_const)]` --- crates/core_arch/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/core_arch/src/lib.rs b/crates/core_arch/src/lib.rs index 0aab7346f4..461c9c808c 100644 --- a/crates/core_arch/src/lib.rs +++ b/crates/core_arch/src/lib.rs @@ -31,7 +31,6 @@ rtm_target_feature, allow_internal_unstable, decl_macro, - asm_const, target_feature_11, generic_arg_infer, asm_experimental_arch, From 5d398ddc174f55fe45f1c41830ed9dcb7e128655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Sat, 17 Aug 2024 13:36:16 +0200 Subject: [PATCH 2/2] Use full path to refer `simd_shuffle` intrinsic from `simd_shuffle!` macro Avoids needing to import `crate::intrinsics::simd::simd_shuffle` in each file where `simd_shuffle!` is used and fixes loongarch64 --- crates/core_arch/src/arm/dsp.rs | 1 - crates/core_arch/src/arm/simd32.rs | 1 - crates/core_arch/src/macros.rs | 2 +- crates/core_arch/src/powerpc/vsx.rs | 1 - crates/core_arch/src/simd.rs | 2 -- crates/core_arch/src/x86/fma.rs | 2 +- crates/core_arch/src/x86/mod.rs | 1 - 7 files changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/core_arch/src/arm/dsp.rs b/crates/core_arch/src/arm/dsp.rs index 94e2686702..001f642f19 100644 --- a/crates/core_arch/src/arm/dsp.rs +++ b/crates/core_arch/src/arm/dsp.rs @@ -23,7 +23,6 @@ #[cfg(test)] use stdarch_test::assert_instr; -use crate::intrinsics::simd::simd_shuffle; use crate::mem::transmute; types! { diff --git a/crates/core_arch/src/arm/simd32.rs b/crates/core_arch/src/arm/simd32.rs index bba4ba6a20..260add2464 100644 --- a/crates/core_arch/src/arm/simd32.rs +++ b/crates/core_arch/src/arm/simd32.rs @@ -65,7 +65,6 @@ #[cfg(test)] use stdarch_test::assert_instr; -use crate::intrinsics::simd::simd_shuffle; use crate::{core_arch::arm::dsp::int16x2_t, mem::transmute}; types! { diff --git a/crates/core_arch/src/macros.rs b/crates/core_arch/src/macros.rs index a1fa374cde..22c617b928 100644 --- a/crates/core_arch/src/macros.rs +++ b/crates/core_arch/src/macros.rs @@ -117,7 +117,7 @@ macro_rules! types { #[allow(unused)] macro_rules! simd_shuffle { ($x:expr, $y:expr, $idx:expr $(,)?) => {{ - simd_shuffle::<_, [u32; _], _>($x, $y, const { $idx }) + $crate::intrinsics::simd::simd_shuffle::<_, [u32; _], _>($x, $y, const { $idx }) }}; } diff --git a/crates/core_arch/src/powerpc/vsx.rs b/crates/core_arch/src/powerpc/vsx.rs index 17d26e2cdd..c107575aee 100644 --- a/crates/core_arch/src/powerpc/vsx.rs +++ b/crates/core_arch/src/powerpc/vsx.rs @@ -9,7 +9,6 @@ #![allow(non_camel_case_types)] use crate::core_arch::powerpc::*; -use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/simd.rs b/crates/core_arch/src/simd.rs index fd5a8acf16..e2b9dd36e8 100644 --- a/crates/core_arch/src/simd.rs +++ b/crates/core_arch/src/simd.rs @@ -2,8 +2,6 @@ #![allow(non_camel_case_types)] -use crate::intrinsics::simd::simd_shuffle; - macro_rules! simd_ty { ($id:ident [$elem_type:ty ; $len:literal]: $($param_name:ident),*) => { #[repr(simd)] diff --git a/crates/core_arch/src/x86/fma.rs b/crates/core_arch/src/x86/fma.rs index 618104cdd2..f3e0728525 100644 --- a/crates/core_arch/src/x86/fma.rs +++ b/crates/core_arch/src/x86/fma.rs @@ -19,7 +19,7 @@ //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate use crate::core_arch::x86::*; -use crate::intrinsics::simd::{simd_fma, simd_insert, simd_neg, simd_shuffle}; +use crate::intrinsics::simd::{simd_fma, simd_insert, simd_neg}; use crate::intrinsics::{fmaf32, fmaf64}; #[cfg(test)] diff --git a/crates/core_arch/src/x86/mod.rs b/crates/core_arch/src/x86/mod.rs index 522985f490..1d07187e4b 100644 --- a/crates/core_arch/src/x86/mod.rs +++ b/crates/core_arch/src/x86/mod.rs @@ -1,6 +1,5 @@ //! `x86` and `x86_64` intrinsics. -use crate::intrinsics::simd::simd_shuffle; #[allow(unused_imports)] use crate::marker::Sized; use crate::mem::transmute;