From 1f202e7fe743648dd906c20da2e2765d10aa2ccc Mon Sep 17 00:00:00 2001 From: Folkert de Vries Date: Sun, 16 Mar 2025 16:38:44 +0100 Subject: [PATCH] shink the size of type signatures --- .../crates/core_arch/src/s390x/vector.rs | 220 ++++-------------- 1 file changed, 44 insertions(+), 176 deletions(-) diff --git a/library/stdarch/crates/core_arch/src/s390x/vector.rs b/library/stdarch/crates/core_arch/src/s390x/vector.rs index 13f410f53418..a4df04ed0e28 100644 --- a/library/stdarch/crates/core_arch/src/s390x/vector.rs +++ b/library/stdarch/crates/core_arch/src/s390x/vector.rs @@ -3837,10 +3837,7 @@ unsafe fn __lcbb(ptr: *const u8) -> u32 { #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_add(a: T, b: U) -> >::Result -where - T: sealed::VectorAdd, -{ +pub unsafe fn vec_add, U>(a: T, b: U) -> T::Result { a.vec_add(b) } @@ -3848,10 +3845,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_sub(a: T, b: U) -> >::Result -where - T: sealed::VectorSub, -{ +pub unsafe fn vec_sub, U>(a: T, b: U) -> T::Result { a.vec_sub(b) } @@ -3865,10 +3859,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_mul(a: T, b: T) -> T -where - T: sealed::VectorMul, -{ +pub unsafe fn vec_mul(a: T, b: T) -> T { a.vec_mul(b) } @@ -3876,10 +3867,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_cntlz(a: T) -> ::Result -where - T: sealed::CountBits, -{ +pub unsafe fn vec_cntlz(a: T) -> T::Result { a.vec_cntlz() } @@ -3887,10 +3875,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_cnttz(a: T) -> ::Result -where - T: sealed::CountBits, -{ +pub unsafe fn vec_cnttz(a: T) -> T::Result { a.vec_cnttz() } @@ -3900,10 +3885,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_popcnt(a: T) -> ::Result -where - T: sealed::CountBits, -{ +pub unsafe fn vec_popcnt(a: T) -> T::Result { a.vec_popcnt() } @@ -3911,10 +3893,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_max(a: T, b: U) -> >::Result -where - T: sealed::VectorMax, -{ +pub unsafe fn vec_max, U>(a: T, b: U) -> T::Result { a.vec_max(b) } @@ -3922,10 +3901,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_min(a: T, b: U) -> >::Result -where - T: sealed::VectorMin, -{ +pub unsafe fn vec_min, U>(a: T, b: U) -> T::Result { a.vec_min(b) } @@ -3933,10 +3909,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_abs(a: T) -> T -where - T: sealed::VectorAbs, -{ +pub unsafe fn vec_abs(a: T) -> T { a.vec_abs() } @@ -3968,10 +3941,7 @@ pub unsafe fn vec_nmsub(a: T, b: T, c: T) -> T { #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_sqrt(a: T) -> T -where - T: sealed::VectorSqrt, -{ +pub unsafe fn vec_sqrt(a: T) -> T { a.vec_sqrt() } @@ -3979,10 +3949,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_splat(a: T) -> T -where - T: sealed::VectorSplat, -{ +pub unsafe fn vec_splat(a: T) -> T { a.vec_splat::() } @@ -3990,10 +3957,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_splats(a: T) -> U -where - T: sealed::VectorSplats, -{ +pub unsafe fn vec_splats, U>(a: T) -> U { a.vec_splats() } @@ -4001,10 +3965,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_and(a: T, b: U) -> >::Result -where - T: sealed::VectorAnd, -{ +pub unsafe fn vec_and, U>(a: T, b: U) -> T::Result { a.vec_and(b) } @@ -4012,10 +3973,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_or(a: T, b: U) -> >::Result -where - T: sealed::VectorOr, -{ +pub unsafe fn vec_or, U>(a: T, b: U) -> T::Result { a.vec_or(b) } @@ -4023,10 +3981,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_xor(a: T, b: U) -> >::Result -where - T: sealed::VectorXor, -{ +pub unsafe fn vec_xor, U>(a: T, b: U) -> T::Result { a.vec_xor(b) } @@ -4034,10 +3989,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_nor(a: T, b: U) -> >::Result -where - T: sealed::VectorNor, -{ +pub unsafe fn vec_nor, U>(a: T, b: U) -> T::Result { a.vec_nor(b) } @@ -4045,10 +3997,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_nand(a: T, b: U) -> >::Result -where - T: sealed::VectorNand, -{ +pub unsafe fn vec_nand, U>(a: T, b: U) -> T::Result { a.vec_nand(b) } @@ -4056,10 +4005,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_eqv(a: T, b: U) -> >::Result -where - T: sealed::VectorEqv, -{ +pub unsafe fn vec_eqv, U>(a: T, b: U) -> T::Result { a.vec_eqv(b) } @@ -4067,10 +4013,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_andc(a: T, b: U) -> >::Result -where - T: sealed::VectorAndc, -{ +pub unsafe fn vec_andc, U>(a: T, b: U) -> T::Result { a.vec_andc(b) } @@ -4084,10 +4027,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_orc(a: T, b: U) -> >::Result -where - T: sealed::VectorOrc, -{ +pub unsafe fn vec_orc, U>(a: T, b: U) -> T::Result { a.vec_orc(b) } @@ -4095,10 +4035,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_floor(a: T) -> T -where - T: sealed::VectorFloor, -{ +pub unsafe fn vec_floor(a: T) -> T { a.vec_floor() } @@ -4106,10 +4043,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_ceil(a: T) -> T -where - T: sealed::VectorCeil, -{ +pub unsafe fn vec_ceil(a: T) -> T { a.vec_ceil() } @@ -4118,10 +4052,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_trunc(a: T) -> T -where - T: sealed::VectorTrunc, -{ +pub unsafe fn vec_trunc(a: T) -> T { a.vec_trunc() } @@ -4130,10 +4061,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_round(a: T) -> T -where - T: sealed::VectorRound, -{ +pub unsafe fn vec_round(a: T) -> T { a.vec_round() } @@ -4142,10 +4070,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_roundc(a: T) -> T -where - T: sealed::VectorRoundc, -{ +pub unsafe fn vec_roundc(a: T) -> T { a.vec_roundc() } @@ -4154,10 +4079,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_roundm(a: T) -> T -where - T: sealed::VectorFloor, -{ +pub unsafe fn vec_roundm(a: T) -> T { // the IBM docs note // // > vec_roundm provides the same functionality as vec_floor, except that vec_roundz would not trigger the IEEE-inexact exception. @@ -4171,10 +4093,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_roundp(a: T) -> T -where - T: sealed::VectorCeil, -{ +pub unsafe fn vec_roundp(a: T) -> T { // the IBM docs note // // > vec_roundp provides the same functionality as vec_ceil, except that vec_roundz would not trigger the IEEE-inexact exception. @@ -4188,10 +4107,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_roundz(a: T) -> T -where - T: sealed::VectorTrunc, -{ +pub unsafe fn vec_roundz(a: T) -> T { // the IBM docs note // // > vec_roundz provides the same functionality as vec_trunc, except that vec_roundz would not trigger the IEEE-inexact exception. @@ -4204,10 +4120,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_rint(a: T) -> T -where - T: sealed::VectorRint, -{ +pub unsafe fn vec_rint(a: T) -> T { a.vec_rint() } @@ -4223,10 +4136,7 @@ pub unsafe fn vec_avg, U>(a: T, b: U) -> T::Result { #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_sl(a: T, b: U) -> >::Result -where - T: sealed::VectorSl, -{ +pub unsafe fn vec_sl, U>(a: T, b: U) -> T::Result { a.vec_sl(b) } @@ -4234,10 +4144,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_sr(a: T, b: U) -> >::Result -where - T: sealed::VectorSr, -{ +pub unsafe fn vec_sr, U>(a: T, b: U) -> T::Result { a.vec_sr(b) } @@ -4245,10 +4152,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_sra(a: T, b: U) -> >::Result -where - T: sealed::VectorSra, -{ +pub unsafe fn vec_sra, U>(a: T, b: U) -> T::Result { a.vec_sra(b) } @@ -4256,10 +4160,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_slb(a: T, b: U) -> >::Result -where - T: sealed::VectorSlb, -{ +pub unsafe fn vec_slb, U>(a: T, b: U) -> T::Result { a.vec_slb(b) } @@ -4267,10 +4168,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_srb(a: T, b: U) -> >::Result -where - T: sealed::VectorSrb, -{ +pub unsafe fn vec_srb, U>(a: T, b: U) -> T::Result { a.vec_srb(b) } @@ -4278,10 +4176,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_srab(a: T, b: U) -> >::Result -where - T: sealed::VectorSrab, -{ +pub unsafe fn vec_srab, U>(a: T, b: U) -> T::Result { a.vec_srab(b) } @@ -4289,10 +4184,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_rl(a: T, b: U) -> >::Result -where - T: sealed::VectorRl, -{ +pub unsafe fn vec_rl, U>(a: T, b: U) -> T::Result { a.vec_rl(b) } @@ -4338,10 +4230,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_rli(a: T, bits: core::ffi::c_ulong) -> T -where - T: sealed::VectorRli, -{ +pub unsafe fn vec_rli(a: T, bits: core::ffi::c_ulong) -> T { a.vec_rli(bits) } @@ -4349,10 +4238,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_reve(a: T) -> T -where - T: sealed::VectorReve, -{ +pub unsafe fn vec_reve(a: T) -> T { a.vec_reve() } @@ -4360,10 +4246,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_revb(a: T) -> T -where - T: sealed::VectorRevb, -{ +pub unsafe fn vec_revb(a: T) -> T { a.vec_revb() } @@ -4371,10 +4254,7 @@ where #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_mergeh(a: T, b: T) -> T -where - T: sealed::VectorMergeh, -{ +pub unsafe fn vec_mergeh(a: T, b: T) -> T { a.vec_mergeh(b) } @@ -4438,10 +4318,7 @@ pub unsafe fn vec_unpackl(a: T) -> (a: T, b: T) -> T -where - T: sealed::VectorMergel, -{ +pub unsafe fn vec_mergel(a: T, b: T) -> T { a.vec_mergel(b) } @@ -4579,10 +4456,7 @@ pub unsafe fn vec_sub_u128( #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] -pub unsafe fn vec_subc(a: T, b: U) -> >::Result -where - T: sealed::VectorSubc, -{ +pub unsafe fn vec_subc, U>(a: T, b: U) -> T::Result { a.vec_subc(b) } @@ -4771,10 +4645,7 @@ macro_rules! vec_find_any { #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] - pub unsafe fn $fun(a: T, b: U) -> >::Result - where - T: sealed::$Trait, - { + pub unsafe fn $fun, U>(a: T, b: U) -> T::Result { a.$fun(b) } )* @@ -4796,10 +4667,7 @@ macro_rules! vec_find_any_cc { #[inline] #[target_feature(enable = "vector")] #[unstable(feature = "stdarch_s390x", issue = "135681")] - pub unsafe fn $fun(a: T, b: U, c: *mut i32) -> >::Result - where - T: sealed::$Trait, - { + pub unsafe fn $fun, U>(a: T, b: U, c: *mut i32) -> T::Result { a.$fun(b, c) } )*