@@ -1929,10 +1929,9 @@ mod sealed {
1929
1929
type Result = $r;
1930
1930
#[ inline]
1931
1931
#[ target_feature( enable = "vector" ) ]
1932
- unsafe fn $m( self , b: Self , c : * mut i32 ) -> Self :: Result {
1932
+ unsafe fn $m( self , b: Self ) -> ( Self :: Result , i32 ) {
1933
1933
let PackedTuple { x, y } = $fun:: <{ FindImm :: $imm as i32 } >( transmute( self ) , transmute( b) ) ;
1934
- c. write( y) ;
1935
- transmute( x)
1934
+ ( transmute( x) , y)
1936
1935
}
1937
1936
}
1938
1937
) *
@@ -1959,10 +1958,9 @@ mod sealed {
1959
1958
type Result = t_b!( $ty) ;
1960
1959
#[ inline]
1961
1960
#[ target_feature( enable = "vector" ) ]
1962
- unsafe fn $m( self , b: Self , c : * mut i32 ) -> Self :: Result {
1961
+ unsafe fn $m( self , b: Self ) -> ( Self :: Result , i32 ) {
1963
1962
let PackedTuple { x, y } = $fun:: <{ FindImm :: $imm as i32 } >( transmute( self ) , transmute( b) ) ;
1964
- c. write( y) ;
1965
- transmute( x)
1963
+ ( transmute( x) , y)
1966
1964
}
1967
1965
}
1968
1966
) *
@@ -2126,47 +2124,47 @@ mod sealed {
2126
2124
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
2127
2125
pub trait VectorFindAnyEqCC < Other > {
2128
2126
type Result ;
2129
- unsafe fn vec_find_any_eq_cc ( self , other : Other , c : * mut i32 ) -> Self :: Result ;
2127
+ unsafe fn vec_find_any_eq_cc ( self , other : Other ) -> ( Self :: Result , i32 ) ;
2130
2128
}
2131
2129
2132
2130
impl_vfae ! { [ cc VectorFindAnyEqCC vec_find_any_eq_cc] Eq vfaebs vfaehs vfaefs }
2133
2131
2134
2132
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
2135
2133
pub trait VectorFindAnyNeCC < Other > {
2136
2134
type Result ;
2137
- unsafe fn vec_find_any_ne_cc ( self , other : Other , c : * mut i32 ) -> Self :: Result ;
2135
+ unsafe fn vec_find_any_ne_cc ( self , other : Other ) -> ( Self :: Result , i32 ) ;
2138
2136
}
2139
2137
2140
2138
impl_vfae ! { [ cc VectorFindAnyNeCC vec_find_any_ne_cc] Ne vfaebs vfaehs vfaefs }
2141
2139
2142
2140
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
2143
2141
pub trait VectorFindAnyEqIdxCC < Other > {
2144
2142
type Result ;
2145
- unsafe fn vec_find_any_eq_idx_cc ( self , other : Other , c : * mut i32 ) -> Self :: Result ;
2143
+ unsafe fn vec_find_any_eq_idx_cc ( self , other : Other ) -> ( Self :: Result , i32 ) ;
2146
2144
}
2147
2145
2148
2146
impl_vfae ! { [ idx_cc VectorFindAnyEqIdxCC vec_find_any_eq_idx_cc] EqIdx vfaebs vfaehs vfaefs }
2149
2147
2150
2148
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
2151
2149
pub trait VectorFindAnyNeIdxCC < Other > {
2152
2150
type Result ;
2153
- unsafe fn vec_find_any_ne_idx_cc ( self , other : Other , c : * mut i32 ) -> Self :: Result ;
2151
+ unsafe fn vec_find_any_ne_idx_cc ( self , other : Other ) -> ( Self :: Result , i32 ) ;
2154
2152
}
2155
2153
2156
2154
impl_vfae ! { [ idx_cc VectorFindAnyNeIdxCC vec_find_any_ne_idx_cc] NeIdx vfaebs vfaehs vfaefs }
2157
2155
2158
2156
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
2159
2157
pub trait VectorFindAnyEqOrZeroIdxCC < Other > {
2160
2158
type Result ;
2161
- unsafe fn vec_find_any_eq_or_0_idx_cc ( self , other : Other , c : * mut i32 ) -> Self :: Result ;
2159
+ unsafe fn vec_find_any_eq_or_0_idx_cc ( self , other : Other ) -> ( Self :: Result , i32 ) ;
2162
2160
}
2163
2161
2164
2162
impl_vfae ! { [ idx_cc VectorFindAnyEqOrZeroIdxCC vec_find_any_eq_or_0_idx_cc] EqIdx vfaezbs vfaezhs vfaezfs }
2165
2163
2166
2164
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
2167
2165
pub trait VectorFindAnyNeOrZeroIdxCC < Other > {
2168
2166
type Result ;
2169
- unsafe fn vec_find_any_ne_or_0_idx_cc ( self , other : Other , c : * mut i32 ) -> Self :: Result ;
2167
+ unsafe fn vec_find_any_ne_or_0_idx_cc ( self , other : Other ) -> ( Self :: Result , i32 ) ;
2170
2168
}
2171
2169
2172
2170
impl_vfae ! { [ idx_cc VectorFindAnyNeOrZeroIdxCC vec_find_any_ne_or_0_idx_cc] NeIdx vfaezbs vfaezhs vfaezfs }
@@ -2423,11 +2421,9 @@ mod sealed {
2423
2421
unsafe fn $intr(
2424
2422
a: $ty,
2425
2423
b: $ty,
2426
- c: * mut i32 ,
2427
- ) -> $outty {
2424
+ ) -> ( $outty, i32 ) {
2428
2425
let PackedTuple { x, y } = super :: $intr( a, b) ;
2429
- c. write( y) ;
2430
- x
2426
+ ( x, y)
2431
2427
}
2432
2428
2433
2429
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
@@ -2436,8 +2432,8 @@ mod sealed {
2436
2432
2437
2433
#[ inline]
2438
2434
#[ target_feature( enable = "vector" ) ]
2439
- unsafe fn vec_packs_cc( self , b: Self , c : * mut i32 ) -> Self :: Result {
2440
- $intr( self , b, c )
2435
+ unsafe fn vec_packs_cc( self , b: Self ) -> ( Self :: Result , i32 ) {
2436
+ $intr( self , b)
2441
2437
}
2442
2438
}
2443
2439
) *
@@ -2447,7 +2443,7 @@ mod sealed {
2447
2443
#[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
2448
2444
pub trait VectorPacksCC {
2449
2445
type Result ;
2450
- unsafe fn vec_packs_cc ( self , b : Self , c : * mut i32 ) -> Self :: Result ;
2446
+ unsafe fn vec_packs_cc ( self , b : Self ) -> ( Self :: Result , i32 ) ;
2451
2447
}
2452
2448
2453
2449
impl_vector_packs_cc ! {
@@ -2468,8 +2464,8 @@ mod sealed {
2468
2464
2469
2465
#[ inline]
2470
2466
#[ target_feature( enable = "vector" ) ]
2471
- unsafe fn vec_packsu_cc( self , b: Self , c : * mut i32 ) -> Self :: Result {
2472
- $intr( self , b, c )
2467
+ unsafe fn vec_packsu_cc( self , b: Self ) -> ( Self :: Result , i32 ) {
2468
+ $intr( self , b)
2473
2469
}
2474
2470
}
2475
2471
) *
@@ -2479,7 +2475,7 @@ mod sealed {
2479
2475
#[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
2480
2476
pub trait VectorPacksuCC {
2481
2477
type Result ;
2482
- unsafe fn vec_packsu_cc ( self , b : Self , c : * mut i32 ) -> Self :: Result ;
2478
+ unsafe fn vec_packsu_cc ( self , b : Self ) -> ( Self :: Result , i32 ) ;
2483
2479
}
2484
2480
2485
2481
impl_vector_packsu_cc ! {
@@ -3187,15 +3183,13 @@ mod sealed {
3187
3183
self ,
3188
3184
b : Self ,
3189
3185
c : vector_unsigned_char ,
3190
- d : * mut i32 ,
3191
- ) -> vector_unsigned_char ;
3186
+ ) -> ( vector_unsigned_char , i32 ) ;
3192
3187
3193
3188
unsafe fn vec_search_string_until_zero_cc (
3194
3189
self ,
3195
3190
b : Self ,
3196
3191
c : vector_unsigned_char ,
3197
- d : * mut i32 ,
3198
- ) -> vector_unsigned_char ;
3192
+ ) -> ( vector_unsigned_char , i32 ) ;
3199
3193
}
3200
3194
3201
3195
macro_rules! impl_vec_search_string{
@@ -3205,18 +3199,16 @@ mod sealed {
3205
3199
impl VectorSearchString for $ty {
3206
3200
#[ inline]
3207
3201
#[ target_feature( enable = "vector" ) ]
3208
- unsafe fn vec_search_string_cc( self , b: Self , c: vector_unsigned_char, d : * mut i32 ) -> vector_unsigned_char {
3202
+ unsafe fn vec_search_string_cc( self , b: Self , c: vector_unsigned_char) -> ( vector_unsigned_char, i32 ) {
3209
3203
let PackedTuple { x, y } = $intr_s( transmute( self ) , transmute( b) , c) ;
3210
- d. write( y) ;
3211
- x
3204
+ ( x, y)
3212
3205
}
3213
3206
3214
3207
#[ inline]
3215
3208
#[ target_feature( enable = "vector" ) ]
3216
- unsafe fn vec_search_string_until_zero_cc( self , b: Self , c: vector_unsigned_char, d : * mut i32 ) -> vector_unsigned_char {
3209
+ unsafe fn vec_search_string_until_zero_cc( self , b: Self , c: vector_unsigned_char) -> ( vector_unsigned_char, i32 ) {
3217
3210
let PackedTuple { x, y } = $intr_sz( transmute( self ) , transmute( b) , c) ;
3218
- d. write( y) ;
3219
- x
3211
+ ( x, y)
3220
3212
}
3221
3213
}
3222
3214
@@ -3435,8 +3427,8 @@ mod sealed {
3435
3427
impl_vec_trait ! { [ VectorCopyUntilZero vec_cp_until_zero] + vec_vistrf ( vector_unsigned_int) }
3436
3428
3437
3429
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
3438
- pub trait VectorCopyUntilZeroCC {
3439
- unsafe fn vec_cp_until_zero_cc ( self , cc : * mut i32 ) -> Self ;
3430
+ pub trait VectorCopyUntilZeroCC : Sized {
3431
+ unsafe fn vec_cp_until_zero_cc ( self ) -> ( Self , i32 ) ;
3440
3432
}
3441
3433
3442
3434
test_impl ! { vec_vistrbs ( a: vector_unsigned_char) -> PackedTuple <vector_unsigned_char, i32 > [ vistrbs, vistrbs] }
@@ -3450,10 +3442,9 @@ mod sealed {
3450
3442
impl VectorCopyUntilZeroCC for $ty {
3451
3443
#[ inline]
3452
3444
#[ target_feature( enable = "vector" ) ]
3453
- unsafe fn vec_cp_until_zero_cc( self , cc : * mut i32 ) -> Self {
3445
+ unsafe fn vec_cp_until_zero_cc( self ) -> ( Self , i32 ) {
3454
3446
let PackedTuple { x, y } = $intr( transmute( self ) ) ;
3455
- cc. write( y) ;
3456
- transmute( x)
3447
+ ( transmute( x) , y)
3457
3448
}
3458
3449
}
3459
3450
@@ -3729,14 +3720,14 @@ mod sealed {
3729
3720
unsafe fn vec_cmpeq_idx ( self , other : Self ) -> Self :: Result ;
3730
3721
unsafe fn vec_cmpne_idx ( self , other : Self ) -> Self :: Result ;
3731
3722
3732
- unsafe fn vec_cmpeq_idx_cc ( self , other : Self , cc : * mut i32 ) -> Self :: Result ;
3733
- unsafe fn vec_cmpne_idx_cc ( self , other : Self , cc : * mut i32 ) -> Self :: Result ;
3723
+ unsafe fn vec_cmpeq_idx_cc ( self , other : Self ) -> ( Self :: Result , i32 ) ;
3724
+ unsafe fn vec_cmpne_idx_cc ( self , other : Self ) -> ( Self :: Result , i32 ) ;
3734
3725
3735
3726
unsafe fn vec_cmpeq_or_0_idx ( self , other : Self ) -> Self :: Result ;
3736
3727
unsafe fn vec_cmpne_or_0_idx ( self , other : Self ) -> Self :: Result ;
3737
3728
3738
- unsafe fn vec_cmpeq_or_0_idx_cc ( self , other : Self , cc : * mut i32 ) -> Self :: Result ;
3739
- unsafe fn vec_cmpne_or_0_idx_cc ( self , other : Self , cc : * mut i32 ) -> Self :: Result ;
3729
+ unsafe fn vec_cmpeq_or_0_idx_cc ( self , other : Self ) -> ( Self :: Result , i32 ) ;
3730
+ unsafe fn vec_cmpne_or_0_idx_cc ( self , other : Self ) -> ( Self :: Result , i32 ) ;
3740
3731
}
3741
3732
3742
3733
macro_rules! impl_compare_equality_idx {
@@ -3777,34 +3768,30 @@ mod sealed {
3777
3768
3778
3769
#[ inline]
3779
3770
#[ target_feature( enable = "vector" ) ]
3780
- unsafe fn vec_cmpeq_idx_cc( self , other: Self , cc : * mut i32 ) -> Self :: Result {
3771
+ unsafe fn vec_cmpeq_idx_cc( self , other: Self ) -> ( Self :: Result , i32 ) {
3781
3772
let PackedTuple { x, y } = $cmpeq_cc( transmute( self ) , transmute( other) ) ;
3782
- * cc = y;
3783
- transmute( x)
3773
+ ( transmute( x) , y)
3784
3774
}
3785
3775
3786
3776
#[ inline]
3787
3777
#[ target_feature( enable = "vector" ) ]
3788
- unsafe fn vec_cmpne_idx_cc( self , other: Self , cc : * mut i32 ) -> Self :: Result {
3778
+ unsafe fn vec_cmpne_idx_cc( self , other: Self ) -> ( Self :: Result , i32 ) {
3789
3779
let PackedTuple { x, y } = $cmpne_cc( transmute( self ) , transmute( other) ) ;
3790
- * cc = y;
3791
- transmute( x)
3780
+ ( transmute( x) , y)
3792
3781
}
3793
3782
3794
3783
#[ inline]
3795
3784
#[ target_feature( enable = "vector" ) ]
3796
- unsafe fn vec_cmpeq_or_0_idx_cc( self , other: Self , cc : * mut i32 ) -> Self :: Result {
3785
+ unsafe fn vec_cmpeq_or_0_idx_cc( self , other: Self ) -> ( Self :: Result , i32 ) {
3797
3786
let PackedTuple { x, y } = $cmpeq_or_0_cc( transmute( self ) , transmute( other) ) ;
3798
- * cc = y;
3799
- transmute( x)
3787
+ ( transmute( x) , y)
3800
3788
}
3801
3789
3802
3790
#[ inline]
3803
3791
#[ target_feature( enable = "vector" ) ]
3804
- unsafe fn vec_cmpne_or_0_idx_cc( self , other: Self , cc : * mut i32 ) -> Self :: Result {
3792
+ unsafe fn vec_cmpne_or_0_idx_cc( self , other: Self ) -> ( Self :: Result , i32 ) {
3805
3793
let PackedTuple { x, y } = $cmpne_or_0_cc( transmute( self ) , transmute( other) ) ;
3806
- * cc = y;
3807
- transmute( x)
3794
+ ( transmute( x) , y)
3808
3795
}
3809
3796
}
3810
3797
) *
@@ -4279,7 +4266,9 @@ pub unsafe fn vec_packs<T: sealed::VectorPacks<U>, U>(a: T, b: U) -> T::Result {
4279
4266
#[ target_feature( enable = "vector" ) ]
4280
4267
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
4281
4268
pub unsafe fn vec_packs_cc < T : sealed:: VectorPacksCC > ( a : T , b : T , c : * mut i32 ) -> T :: Result {
4282
- a. vec_packs_cc ( b, c)
4269
+ let ( x, y) = a. vec_packs_cc ( b) ;
4270
+ unsafe { c. write ( y) } ;
4271
+ x
4283
4272
}
4284
4273
4285
4274
/// Vector Pack Saturated Unsigned
@@ -4295,7 +4284,9 @@ pub unsafe fn vec_packsu<T: sealed::VectorPacksu<U>, U>(a: T, b: U) -> T::Result
4295
4284
#[ target_feature( enable = "vector" ) ]
4296
4285
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
4297
4286
pub unsafe fn vec_packsu_cc < T : sealed:: VectorPacksuCC > ( a : T , b : T , c : * mut i32 ) -> T :: Result {
4298
- a. vec_packsu_cc ( b, c)
4287
+ let ( x, y) = a. vec_packsu_cc ( b) ;
4288
+ unsafe { c. write ( y) } ;
4289
+ x
4299
4290
}
4300
4291
4301
4292
/// Vector Unpack High
@@ -4668,7 +4659,9 @@ macro_rules! vec_find_any_cc {
4668
4659
#[ target_feature( enable = "vector" ) ]
4669
4660
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
4670
4661
pub unsafe fn $fun<T : sealed:: $Trait<U >, U >( a: T , b: U , c: * mut i32 ) -> T :: Result {
4671
- a. $fun( b, c)
4662
+ let ( x, y) = a. $fun( b) ;
4663
+ unsafe { c. write( y) } ;
4664
+ x
4672
4665
}
4673
4666
) *
4674
4667
}
@@ -5021,7 +5014,9 @@ pub unsafe fn vec_search_string_cc<T: sealed::VectorSearchString>(
5021
5014
c : vector_unsigned_char ,
5022
5015
d : * mut i32 ,
5023
5016
) -> vector_unsigned_char {
5024
- a. vec_search_string_cc ( b, c, d)
5017
+ let ( x, y) = a. vec_search_string_cc ( b, c) ;
5018
+ unsafe { d. write ( y) } ;
5019
+ x
5025
5020
}
5026
5021
5027
5022
/// Vector Search String Until Zero
@@ -5034,7 +5029,9 @@ pub unsafe fn vec_search_string_until_zero_cc<T: sealed::VectorSearchString>(
5034
5029
c : vector_unsigned_char ,
5035
5030
d : * mut i32 ,
5036
5031
) -> vector_unsigned_char {
5037
- a. vec_search_string_until_zero_cc ( b, c, d)
5032
+ let ( x, y) = a. vec_search_string_until_zero_cc ( b, c) ;
5033
+ unsafe { d. write ( y) } ;
5034
+ x
5038
5035
}
5039
5036
5040
5037
/// Vector Convert from float (even elements) to double
@@ -5116,7 +5113,9 @@ pub unsafe fn vec_cp_until_zero<T: sealed::VectorCopyUntilZero>(a: T) -> T {
5116
5113
#[ target_feature( enable = "vector" ) ]
5117
5114
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
5118
5115
pub unsafe fn vec_cp_until_zero_cc < T : sealed:: VectorCopyUntilZeroCC > ( a : T , cc : * mut i32 ) -> T {
5119
- a. vec_cp_until_zero_cc ( cc)
5116
+ let ( x, y) = a. vec_cp_until_zero_cc ( ) ;
5117
+ unsafe { cc. write ( y) } ;
5118
+ x
5120
5119
}
5121
5120
5122
5121
/// Vector Multiply Sum Logical
@@ -5384,7 +5383,9 @@ pub unsafe fn vec_cmpeq_idx_cc<T: sealed::VectorEqualityIdx>(
5384
5383
b : T ,
5385
5384
cc : * mut i32 ,
5386
5385
) -> T :: Result {
5387
- a. vec_cmpeq_idx_cc ( b, cc)
5386
+ let ( x, y) = a. vec_cmpeq_idx_cc ( b) ;
5387
+ unsafe { cc. write ( y) } ;
5388
+ x
5388
5389
}
5389
5390
/// Vector Compare Not Equal Index with Condition Code
5390
5391
#[ inline]
@@ -5395,7 +5396,9 @@ pub unsafe fn vec_cmpne_idx_cc<T: sealed::VectorEqualityIdx>(
5395
5396
b : T ,
5396
5397
cc : * mut i32 ,
5397
5398
) -> T :: Result {
5398
- a. vec_cmpne_idx_cc ( b, cc)
5399
+ let ( x, y) = a. vec_cmpne_idx_cc ( b) ;
5400
+ unsafe { cc. write ( y) } ;
5401
+ x
5399
5402
}
5400
5403
/// Vector Compare Equal or Zero Index
5401
5404
#[ inline]
@@ -5420,7 +5423,9 @@ pub unsafe fn vec_cmpeq_or_0_idx_cc<T: sealed::VectorEqualityIdx>(
5420
5423
b : T ,
5421
5424
cc : * mut i32 ,
5422
5425
) -> T :: Result {
5423
- a. vec_cmpeq_or_0_idx_cc ( b, cc)
5426
+ let ( x, y) = a. vec_cmpeq_or_0_idx_cc ( b) ;
5427
+ unsafe { cc. write ( y) } ;
5428
+ x
5424
5429
}
5425
5430
/// Vector Compare Not Equal or Zero Index with Condition Code
5426
5431
#[ inline]
@@ -5431,7 +5436,9 @@ pub unsafe fn vec_cmpne_or_0_idx_cc<T: sealed::VectorEqualityIdx>(
5431
5436
b : T ,
5432
5437
cc : * mut i32 ,
5433
5438
) -> T :: Result {
5434
- a. vec_cmpne_or_0_idx_cc ( b, cc)
5439
+ let ( x, y) = a. vec_cmpne_or_0_idx_cc ( b) ;
5440
+ unsafe { cc. write ( y) } ;
5441
+ x
5435
5442
}
5436
5443
5437
5444
/// All Elements Equal
0 commit comments