@@ -4483,10 +4483,8 @@ pub unsafe fn vec_packs<T: sealed::VectorPacks<U>, U>(a: T, b: U) -> T::Result {
4483
4483
#[ inline]
4484
4484
#[ target_feature( enable = "vector" ) ]
4485
4485
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
4486
- pub unsafe fn vec_packs_cc < T : sealed:: VectorPacksCC > ( a : T , b : T , c : * mut i32 ) -> T :: Result {
4487
- let ( x, y) = a. vec_packs_cc ( b) ;
4488
- unsafe { c. write ( y) } ;
4489
- x
4486
+ pub unsafe fn vec_packs_cc < T : sealed:: VectorPacksCC > ( a : T , b : T ) -> ( T :: Result , i32 ) {
4487
+ a. vec_packs_cc ( b)
4490
4488
}
4491
4489
4492
4490
/// Vector Pack Saturated Unsigned
@@ -4501,10 +4499,8 @@ pub unsafe fn vec_packsu<T: sealed::VectorPacksu<U>, U>(a: T, b: U) -> T::Result
4501
4499
#[ inline]
4502
4500
#[ target_feature( enable = "vector" ) ]
4503
4501
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
4504
- pub unsafe fn vec_packsu_cc < T : sealed:: VectorPacksuCC > ( a : T , b : T , c : * mut i32 ) -> T :: Result {
4505
- let ( x, y) = a. vec_packsu_cc ( b) ;
4506
- unsafe { c. write ( y) } ;
4507
- x
4502
+ pub unsafe fn vec_packsu_cc < T : sealed:: VectorPacksuCC > ( a : T , b : T ) -> ( T :: Result , i32 ) {
4503
+ a. vec_packsu_cc ( b)
4508
4504
}
4509
4505
4510
4506
/// Vector Unpack High
@@ -4878,10 +4874,8 @@ macro_rules! vec_find_any_cc {
4878
4874
#[ target_feature( enable = "vector" ) ]
4879
4875
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
4880
4876
#[ doc = $doc]
4881
- pub unsafe fn $fun<T : sealed:: $Trait<U >, U >( a: T , b: U , c: * mut i32 ) -> T :: Result {
4882
- let ( x, y) = a. $fun( b) ;
4883
- unsafe { c. write( y) } ;
4884
- x
4877
+ pub unsafe fn $fun<T : sealed:: $Trait<U >, U >( a: T , b: U ) -> ( T :: Result , i32 ) {
4878
+ a. $fun( b)
4885
4879
}
4886
4880
) *
4887
4881
}
@@ -5236,11 +5230,8 @@ pub unsafe fn vec_search_string_cc<T: sealed::VectorSearchString>(
5236
5230
a : T ,
5237
5231
b : T ,
5238
5232
c : vector_unsigned_char ,
5239
- d : * mut i32 ,
5240
- ) -> vector_unsigned_char {
5241
- let ( x, y) = a. vec_search_string_cc ( b, c) ;
5242
- unsafe { d. write ( y) } ;
5243
- x
5233
+ ) -> ( vector_unsigned_char , i32 ) {
5234
+ a. vec_search_string_cc ( b, c)
5244
5235
}
5245
5236
5246
5237
/// Vector Search String Until Zero
@@ -5251,11 +5242,8 @@ pub unsafe fn vec_search_string_until_zero_cc<T: sealed::VectorSearchString>(
5251
5242
a : T ,
5252
5243
b : T ,
5253
5244
c : vector_unsigned_char ,
5254
- d : * mut i32 ,
5255
- ) -> vector_unsigned_char {
5256
- let ( x, y) = a. vec_search_string_until_zero_cc ( b, c) ;
5257
- unsafe { d. write ( y) } ;
5258
- x
5245
+ ) -> ( vector_unsigned_char , i32 ) {
5246
+ a. vec_search_string_until_zero_cc ( b, c)
5259
5247
}
5260
5248
5261
5249
/// Vector Convert from float (even elements) to double
@@ -5336,10 +5324,8 @@ pub unsafe fn vec_cp_until_zero<T: sealed::VectorCopyUntilZero>(a: T) -> T {
5336
5324
#[ inline]
5337
5325
#[ target_feature( enable = "vector" ) ]
5338
5326
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
5339
- pub unsafe fn vec_cp_until_zero_cc < T : sealed:: VectorCopyUntilZeroCC > ( a : T , cc : * mut i32 ) -> T {
5340
- let ( x, y) = a. vec_cp_until_zero_cc ( ) ;
5341
- unsafe { cc. write ( y) } ;
5342
- x
5327
+ pub unsafe fn vec_cp_until_zero_cc < T : sealed:: VectorCopyUntilZeroCC > ( a : T ) -> ( T , i32 ) {
5328
+ a. vec_cp_until_zero_cc ( )
5343
5329
}
5344
5330
5345
5331
/// Vector Multiply Sum Logical
@@ -5603,27 +5589,15 @@ pub unsafe fn vec_cmpne_idx<T: sealed::VectorEqualityIdx>(a: T, b: T) -> T::Resu
5603
5589
#[ inline]
5604
5590
#[ target_feature( enable = "vector" ) ]
5605
5591
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
5606
- pub unsafe fn vec_cmpeq_idx_cc < T : sealed:: VectorEqualityIdx > (
5607
- a : T ,
5608
- b : T ,
5609
- cc : * mut i32 ,
5610
- ) -> T :: Result {
5611
- let ( x, y) = a. vec_cmpeq_idx_cc ( b) ;
5612
- unsafe { cc. write ( y) } ;
5613
- x
5592
+ pub unsafe fn vec_cmpeq_idx_cc < T : sealed:: VectorEqualityIdx > ( a : T , b : T ) -> ( T :: Result , i32 ) {
5593
+ a. vec_cmpeq_idx_cc ( b)
5614
5594
}
5615
5595
/// Vector Compare Not Equal Index with Condition Code
5616
5596
#[ inline]
5617
5597
#[ target_feature( enable = "vector" ) ]
5618
5598
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
5619
- pub unsafe fn vec_cmpne_idx_cc < T : sealed:: VectorEqualityIdx > (
5620
- a : T ,
5621
- b : T ,
5622
- cc : * mut i32 ,
5623
- ) -> T :: Result {
5624
- let ( x, y) = a. vec_cmpne_idx_cc ( b) ;
5625
- unsafe { cc. write ( y) } ;
5626
- x
5599
+ pub unsafe fn vec_cmpne_idx_cc < T : sealed:: VectorEqualityIdx > ( a : T , b : T ) -> ( T :: Result , i32 ) {
5600
+ a. vec_cmpne_idx_cc ( b)
5627
5601
}
5628
5602
/// Vector Compare Equal or Zero Index
5629
5603
#[ inline]
@@ -5643,27 +5617,15 @@ pub unsafe fn vec_cmpne_or_0_idx<T: sealed::VectorEqualityIdx>(a: T, b: T) -> T:
5643
5617
#[ inline]
5644
5618
#[ target_feature( enable = "vector" ) ]
5645
5619
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
5646
- pub unsafe fn vec_cmpeq_or_0_idx_cc < T : sealed:: VectorEqualityIdx > (
5647
- a : T ,
5648
- b : T ,
5649
- cc : * mut i32 ,
5650
- ) -> T :: Result {
5651
- let ( x, y) = a. vec_cmpeq_or_0_idx_cc ( b) ;
5652
- unsafe { cc. write ( y) } ;
5653
- x
5620
+ pub unsafe fn vec_cmpeq_or_0_idx_cc < T : sealed:: VectorEqualityIdx > ( a : T , b : T ) -> ( T :: Result , i32 ) {
5621
+ a. vec_cmpeq_or_0_idx_cc ( b)
5654
5622
}
5655
5623
/// Vector Compare Not Equal or Zero Index with Condition Code
5656
5624
#[ inline]
5657
5625
#[ target_feature( enable = "vector" ) ]
5658
5626
#[ unstable( feature = "stdarch_s390x" , issue = "135681" ) ]
5659
- pub unsafe fn vec_cmpne_or_0_idx_cc < T : sealed:: VectorEqualityIdx > (
5660
- a : T ,
5661
- b : T ,
5662
- cc : * mut i32 ,
5663
- ) -> T :: Result {
5664
- let ( x, y) = a. vec_cmpne_or_0_idx_cc ( b) ;
5665
- unsafe { cc. write ( y) } ;
5666
- x
5627
+ pub unsafe fn vec_cmpne_or_0_idx_cc < T : sealed:: VectorEqualityIdx > ( a : T , b : T ) -> ( T :: Result , i32 ) {
5628
+ a. vec_cmpne_or_0_idx_cc ( b)
5667
5629
}
5668
5630
5669
5631
/// All Elements Equal
@@ -6426,138 +6388,126 @@ mod tests {
6426
6388
6427
6389
#[ simd_test( enable = "vector" ) ]
6428
6390
fn test_vec_find_any_eq_cc ( ) {
6429
- let mut c = 0i32 ;
6430
-
6431
6391
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6432
6392
let b = vector_unsigned_int ( [ 5 , 3 , 7 , 8 ] ) ;
6433
6393
6434
- let d = unsafe { vec_find_any_eq_cc ( a, b, & mut c ) } ;
6394
+ let ( d , c ) = unsafe { vec_find_any_eq_cc ( a, b) } ;
6435
6395
assert_eq ! ( c, 1 ) ;
6436
6396
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , -1 , 0 ] ) ;
6437
6397
6438
6398
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6439
6399
let b = vector_unsigned_int ( [ 5 , 6 , 7 , 8 ] ) ;
6440
- let d = unsafe { vec_find_any_eq_cc ( a, b, & mut c ) } ;
6400
+ let ( d , c ) = unsafe { vec_find_any_eq_cc ( a, b) } ;
6441
6401
assert_eq ! ( c, 3 ) ;
6442
6402
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , 0 , 0 ] ) ;
6443
6403
}
6444
6404
6445
6405
#[ simd_test( enable = "vector" ) ]
6446
6406
fn test_vec_find_any_ne_cc ( ) {
6447
- let mut c = 0i32 ;
6448
-
6449
6407
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6450
6408
let b = vector_unsigned_int ( [ 5 , 3 , 7 , 8 ] ) ;
6451
6409
6452
- let d = unsafe { vec_find_any_ne_cc ( a, b, & mut c ) } ;
6410
+ let ( d , c ) = unsafe { vec_find_any_ne_cc ( a, b) } ;
6453
6411
assert_eq ! ( c, 1 ) ;
6454
6412
assert_eq ! ( d. as_array( ) , & [ -1 , -1 , 0 , -1 ] ) ;
6455
6413
6456
6414
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6457
6415
let b = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6458
- let d = unsafe { vec_find_any_ne_cc ( a, b, & mut c ) } ;
6416
+ let ( d , c ) = unsafe { vec_find_any_ne_cc ( a, b) } ;
6459
6417
assert_eq ! ( c, 3 ) ;
6460
6418
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , 0 , 0 ] ) ;
6461
6419
}
6462
6420
6463
6421
#[ simd_test( enable = "vector" ) ]
6464
6422
fn test_vec_find_any_eq_idx_cc ( ) {
6465
- let mut c = 0i32 ;
6466
-
6467
6423
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6468
6424
let b = vector_unsigned_int ( [ 5 , 3 , 7 , 8 ] ) ;
6469
6425
6470
- let d = unsafe { vec_find_any_eq_idx_cc ( a, b, & mut c ) } ;
6426
+ let ( d , c ) = unsafe { vec_find_any_eq_idx_cc ( a, b) } ;
6471
6427
assert_eq ! ( c, 1 ) ;
6472
6428
assert_eq ! ( d. as_array( ) , & [ 0 , 8 , 0 , 0 ] ) ;
6473
6429
6474
6430
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6475
6431
let b = vector_unsigned_int ( [ 5 , 6 , 7 , 8 ] ) ;
6476
- let d = unsafe { vec_find_any_eq_idx_cc ( a, b, & mut c ) } ;
6432
+ let ( d , c ) = unsafe { vec_find_any_eq_idx_cc ( a, b) } ;
6477
6433
assert_eq ! ( c, 3 ) ;
6478
6434
assert_eq ! ( d. as_array( ) , & [ 0 , 16 , 0 , 0 ] ) ;
6479
6435
}
6480
6436
6481
6437
#[ simd_test( enable = "vector" ) ]
6482
6438
fn test_vec_find_any_ne_idx_cc ( ) {
6483
- let mut c = 0i32 ;
6484
-
6485
6439
let a = vector_unsigned_int ( [ 5 , 2 , 3 , 4 ] ) ;
6486
6440
let b = vector_unsigned_int ( [ 5 , 3 , 7 , 8 ] ) ;
6487
6441
6488
- let d = unsafe { vec_find_any_ne_idx_cc ( a, b, & mut c ) } ;
6442
+ let ( d , c ) = unsafe { vec_find_any_ne_idx_cc ( a, b) } ;
6489
6443
assert_eq ! ( c, 1 ) ;
6490
6444
assert_eq ! ( d. as_array( ) , & [ 0 , 4 , 0 , 0 ] ) ;
6491
6445
6492
6446
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6493
6447
let b = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6494
- let d = unsafe { vec_find_any_ne_idx_cc ( a, b, & mut c ) } ;
6448
+ let ( d , c ) = unsafe { vec_find_any_ne_idx_cc ( a, b) } ;
6495
6449
assert_eq ! ( c, 3 ) ;
6496
6450
assert_eq ! ( d. as_array( ) , & [ 0 , 16 , 0 , 0 ] ) ;
6497
6451
}
6498
6452
6499
6453
#[ simd_test( enable = "vector" ) ]
6500
6454
fn test_vec_find_any_eq_or_0_idx_cc ( ) {
6501
- let mut c = 0i32 ;
6502
-
6503
6455
// if no element of a matches any element of b with an equal value, and there is at least one element from a with a value of 0
6504
6456
let a = vector_unsigned_int ( [ 0 , 1 , 2 , 3 ] ) ;
6505
6457
let b = vector_unsigned_int ( [ 4 , 5 , 6 , 7 ] ) ;
6506
- let d = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b, & mut c ) } ;
6458
+ let ( d , c ) = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b) } ;
6507
6459
assert_eq ! ( c, 0 ) ;
6508
6460
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , 0 , 0 ] ) ;
6509
6461
6510
6462
// if at least one element of a matches any element of b with an equal value, and no elements of a with a value of 0
6511
6463
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6512
6464
let b = vector_unsigned_int ( [ 5 , 2 , 3 , 4 ] ) ;
6513
- let d = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b, & mut c ) } ;
6465
+ let ( d , c ) = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b) } ;
6514
6466
assert_eq ! ( c, 1 ) ;
6515
6467
assert_eq ! ( d. as_array( ) , & [ 0 , 4 , 0 , 0 ] ) ;
6516
6468
6517
6469
// if at least one element of a matches any element of b with an equal value, and there is at least one element from a has a value of 0
6518
6470
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 0 ] ) ;
6519
6471
let b = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6520
- let d = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b, & mut c ) } ;
6472
+ let ( d , c ) = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b) } ;
6521
6473
assert_eq ! ( c, 2 ) ;
6522
6474
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , 0 , 0 ] ) ;
6523
6475
6524
6476
// if no element of a matches any element of b with an equal value, and there is no element from a with a value of 0.
6525
6477
let a = vector_unsigned_int ( [ 1 , 2 , 3 , 4 ] ) ;
6526
6478
let b = vector_unsigned_int ( [ 5 , 6 , 7 , 8 ] ) ;
6527
- let d = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b, & mut c ) } ;
6479
+ let ( d , c ) = unsafe { vec_find_any_eq_or_0_idx_cc ( a, b) } ;
6528
6480
assert_eq ! ( c, 3 ) ;
6529
6481
assert_eq ! ( d. as_array( ) , & [ 0 , 16 , 0 , 0 ] ) ;
6530
6482
}
6531
6483
6532
6484
#[ simd_test( enable = "vector" ) ]
6533
6485
fn test_vec_find_any_ne_or_0_idx_cc ( ) {
6534
- let mut c = 0i32 ;
6535
-
6536
6486
// if no element of a matches any element of b with a not equal value, and there is at least one element from a with a value of 0.
6537
6487
let a = vector_unsigned_int ( [ 0 , 1 , 2 , 3 ] ) ;
6538
6488
let b = vector_unsigned_int ( [ 4 , 1 , 2 , 3 ] ) ;
6539
- let d = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b, & mut c ) } ;
6489
+ let ( d , c ) = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b) } ;
6540
6490
assert_eq ! ( c, 0 ) ;
6541
6491
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , 0 , 0 ] ) ;
6542
6492
6543
6493
// if at least one element of a matches any element of b with a not equal value, and no elements of a with a value of 0.
6544
6494
let a = vector_unsigned_int ( [ 4 , 2 , 3 , 4 ] ) ;
6545
6495
let b = vector_unsigned_int ( [ 4 , 5 , 6 , 7 ] ) ;
6546
- let d = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b, & mut c ) } ;
6496
+ let ( d , c ) = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b) } ;
6547
6497
assert_eq ! ( c, 1 ) ;
6548
6498
assert_eq ! ( d. as_array( ) , & [ 0 , 4 , 0 , 0 ] ) ;
6549
6499
6550
6500
// if at least one element of a matches any element of b with a not equal value, and there is at least one element from a has a value of 0.
6551
6501
let a = vector_unsigned_int ( [ 1 , 0 , 1 , 1 ] ) ;
6552
6502
let b = vector_unsigned_int ( [ 4 , 5 , 6 , 7 ] ) ;
6553
- let d = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b, & mut c ) } ;
6503
+ let ( d , c ) = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b) } ;
6554
6504
assert_eq ! ( c, 2 ) ;
6555
6505
assert_eq ! ( d. as_array( ) , & [ 0 , 0 , 0 , 0 ] ) ;
6556
6506
6557
6507
// if no element of a matches any element of b with a not equal value, and there is no element from a with a value of 0.
6558
6508
let a = vector_unsigned_int ( [ 4 , 4 , 4 , 4 ] ) ;
6559
6509
let b = vector_unsigned_int ( [ 4 , 5 , 6 , 7 ] ) ;
6560
- let d = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b, & mut c ) } ;
6510
+ let ( d , c ) = unsafe { vec_find_any_ne_or_0_idx_cc ( a, b) } ;
6561
6511
assert_eq ! ( c, 3 ) ;
6562
6512
assert_eq ! ( d. as_array( ) , & [ 0 , 16 , 0 , 0 ] ) ;
6563
6513
}
@@ -6981,30 +6931,29 @@ mod tests {
6981
6931
unsafe {
6982
6932
let b = vector_unsigned_char ( * b"ABCD------------" ) ;
6983
6933
let c = vector_unsigned_char ( [ 4 ; 16 ] ) ;
6984
- let mut d = 0i32 ;
6985
6934
6986
6935
let haystack = vector_unsigned_char ( * b"__ABCD__________" ) ;
6987
- let result = vec_search_string_cc ( haystack, b, c, & mut d ) ;
6936
+ let ( result, d ) = vec_search_string_cc ( haystack, b, c) ;
6988
6937
assert_eq ! ( result. as_array( ) [ 7 ] , 2 ) ;
6989
6938
assert_eq ! ( d, 2 ) ;
6990
6939
6991
6940
let haystack = vector_unsigned_char ( * b"___ABCD_________" ) ;
6992
- let result = vec_search_string_cc ( haystack, b, c, & mut d ) ;
6941
+ let ( result, d ) = vec_search_string_cc ( haystack, b, c) ;
6993
6942
assert_eq ! ( result. as_array( ) [ 7 ] , 3 ) ;
6994
6943
assert_eq ! ( d, 2 ) ;
6995
6944
6996
6945
let haystack = vector_unsigned_char ( * b"________________" ) ;
6997
- let result = vec_search_string_cc ( haystack, b, c, & mut d ) ;
6946
+ let ( result, d ) = vec_search_string_cc ( haystack, b, c) ;
6998
6947
assert_eq ! ( result. as_array( ) [ 7 ] , 16 ) ;
6999
6948
assert_eq ! ( d, 0 ) ;
7000
6949
7001
6950
let haystack = vector_unsigned_char ( * b"______\0 _________" ) ;
7002
- let result = vec_search_string_cc ( haystack, b, c, & mut d ) ;
6951
+ let ( result, d ) = vec_search_string_cc ( haystack, b, c) ;
7003
6952
assert_eq ! ( result. as_array( ) [ 7 ] , 16 ) ;
7004
6953
assert_eq ! ( d, 0 ) ;
7005
6954
7006
6955
let haystack = vector_unsigned_char ( * b"______\0 __ABCD___" ) ;
7007
- let result = vec_search_string_cc ( haystack, b, c, & mut d ) ;
6956
+ let ( result, d ) = vec_search_string_cc ( haystack, b, c) ;
7008
6957
assert_eq ! ( result. as_array( ) [ 7 ] , 9 ) ;
7009
6958
assert_eq ! ( d, 2 ) ;
7010
6959
}
@@ -7015,30 +6964,29 @@ mod tests {
7015
6964
unsafe {
7016
6965
let b = vector_unsigned_char ( * b"ABCD\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 " ) ;
7017
6966
let c = vector_unsigned_char ( [ 16 ; 16 ] ) ;
7018
- let mut d = 0i32 ;
7019
6967
7020
6968
let haystack = vector_unsigned_char ( * b"__ABCD__________" ) ;
7021
- let result = vec_search_string_until_zero_cc ( haystack, b, c, & mut d ) ;
6969
+ let ( result, d ) = vec_search_string_until_zero_cc ( haystack, b, c) ;
7022
6970
assert_eq ! ( result. as_array( ) [ 7 ] , 2 ) ;
7023
6971
assert_eq ! ( d, 2 ) ;
7024
6972
7025
6973
let haystack = vector_unsigned_char ( * b"___ABCD_________" ) ;
7026
- let result = vec_search_string_until_zero_cc ( haystack, b, c, & mut d ) ;
6974
+ let ( result, d ) = vec_search_string_until_zero_cc ( haystack, b, c) ;
7027
6975
assert_eq ! ( result. as_array( ) [ 7 ] , 3 ) ;
7028
6976
assert_eq ! ( d, 2 ) ;
7029
6977
7030
6978
let haystack = vector_unsigned_char ( * b"________________" ) ;
7031
- let result = vec_search_string_until_zero_cc ( haystack, b, c, & mut d ) ;
6979
+ let ( result, d ) = vec_search_string_until_zero_cc ( haystack, b, c) ;
7032
6980
assert_eq ! ( result. as_array( ) [ 7 ] , 16 ) ;
7033
6981
assert_eq ! ( d, 0 ) ;
7034
6982
7035
6983
let haystack = vector_unsigned_char ( * b"______\0 _________" ) ;
7036
- let result = vec_search_string_until_zero_cc ( haystack, b, c, & mut d ) ;
6984
+ let ( result, d ) = vec_search_string_until_zero_cc ( haystack, b, c) ;
7037
6985
assert_eq ! ( result. as_array( ) [ 7 ] , 16 ) ;
7038
6986
assert_eq ! ( d, 1 ) ;
7039
6987
7040
6988
let haystack = vector_unsigned_char ( * b"______\0 __ABCD___" ) ;
7041
- let result = vec_search_string_until_zero_cc ( haystack, b, c, & mut d ) ;
6989
+ let ( result, d ) = vec_search_string_until_zero_cc ( haystack, b, c) ;
7042
6990
assert_eq ! ( result. as_array( ) [ 7 ] , 16 ) ;
7043
6991
assert_eq ! ( d, 1 ) ;
7044
6992
}
@@ -7132,15 +7080,14 @@ mod tests {
7132
7080
7133
7081
#[ simd_test( enable = "vector" ) ]
7134
7082
fn test_vec_cp_until_zero_cc ( ) {
7135
- let mut cc = 0 ;
7136
7083
unsafe {
7137
7084
let v = vector_signed_int ( [ 1 , 2 , 3 , 4 ] ) ;
7138
- let d = vec_cp_until_zero_cc ( v, & mut cc ) ;
7085
+ let ( d , cc ) = vec_cp_until_zero_cc ( v) ;
7139
7086
assert_eq ! ( d. as_array( ) , & [ 1 , 2 , 3 , 4 ] ) ;
7140
7087
assert_eq ! ( cc, 3 ) ;
7141
7088
7142
7089
let v = vector_signed_int ( [ 1 , 2 , 0 , 4 ] ) ;
7143
- let d = vec_cp_until_zero_cc ( v, & mut cc ) ;
7090
+ let ( d , cc ) = vec_cp_until_zero_cc ( v) ;
7144
7091
assert_eq ! ( d. as_array( ) , & [ 1 , 2 , 0 , 0 ] ) ;
7145
7092
assert_eq ! ( cc, 0 ) ;
7146
7093
}
0 commit comments