diff options
| author | Sayantan Chakraborty <142906350+sayantn@users.noreply.github.com> | 2025-09-06 13:46:43 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-06 13:46:43 +0000 | 
| commit | d5bed4b1403310741fde73836c0a2f1f0656d0d5 (patch) | |
| tree | 42cd7d9ca54994f43208759d36e45bef5fb59366 /library/stdarch/crates | |
| parent | e1a3b8bdc1c02f9407cd712e3ca916a9436d3bef (diff) | |
| parent | 93101b5783b522469320b60926918f308ddae6b6 (diff) | |
| download | rust-d5bed4b1403310741fde73836c0a2f1f0656d0d5.tar.gz rust-d5bed4b1403310741fde73836c0a2f1f0656d0d5.zip | |
Merge pull request #1913 from folkertdev/s390x-vector-funnel-shift
s390x: use the new `u128::funnel_shl`
Diffstat (limited to 'library/stdarch/crates')
| -rw-r--r-- | library/stdarch/crates/core_arch/src/lib.rs | 3 | ||||
| -rw-r--r-- | library/stdarch/crates/core_arch/src/s390x/vector.rs | 17 | 
2 files changed, 5 insertions, 15 deletions
| diff --git a/library/stdarch/crates/core_arch/src/lib.rs b/library/stdarch/crates/core_arch/src/lib.rs index 7d3cbd55ad8..26a9cb58991 100644 --- a/library/stdarch/crates/core_arch/src/lib.rs +++ b/library/stdarch/crates/core_arch/src/lib.rs @@ -33,7 +33,8 @@ x86_amx_intrinsics, f16, aarch64_unstable_target_feature, - bigint_helper_methods + bigint_helper_methods, + funnel_shifts )] #![cfg_attr(test, feature(test, abi_vectorcall, stdarch_internal))] #![deny(clippy::missing_inline_in_public_items)] diff --git a/library/stdarch/crates/core_arch/src/s390x/vector.rs b/library/stdarch/crates/core_arch/src/s390x/vector.rs index f6d14c45e0d..f018344ead1 100644 --- a/library/stdarch/crates/core_arch/src/s390x/vector.rs +++ b/library/stdarch/crates/core_arch/src/s390x/vector.rs @@ -3513,17 +3513,6 @@ mod sealed { a.vec_srdb::<7>(b) } - unsafe fn funnel_shl_u128(a: u128, b: u128, c: u128) -> u128 { - #[repr(simd)] - struct Single([u128; 1]); - - transmute(simd_funnel_shl::<Single>( - transmute(a), - transmute(b), - transmute(c), - )) - } - macro_rules! impl_vec_sld { ($($ty:ident)*) => { $( @@ -3533,21 +3522,21 @@ mod sealed { #[target_feature(enable = "vector")] unsafe fn vec_sld<const C: u32>(self, b: Self) -> Self { static_assert_uimm_bits!(C, 4); - transmute(funnel_shl_u128(transmute(self), transmute(b), const { C as u128 * 8 })) + transmute(u128::funnel_shl(transmute(self), transmute(b), C * 8)) } #[inline] #[target_feature(enable = "vector")] unsafe fn vec_sldw<const C: u32>(self, b: Self) -> Self { static_assert_uimm_bits!(C, 2); - transmute(funnel_shl_u128(transmute(self), transmute(b), const { C as u128 * 4 * 8 })) + transmute(u128::funnel_shl(transmute(self), transmute(b), C * 4 * 8)) } #[inline] #[target_feature(enable = "vector-enhancements-2")] unsafe fn vec_sldb<const C: u32>(self, b: Self) -> Self { static_assert_uimm_bits!(C, 3); - transmute(funnel_shl_u128(transmute(self), transmute(b), const { C as u128 })) + transmute(u128::funnel_shl(transmute(self), transmute(b), C)) } } | 
