@@ -2317,182 +2317,182 @@ pub unsafe fn vcvtq_u32_f32(a: float32x4_t) -> uint32x4_t {
2317
2317
/// Shift Left and Insert (immediate)
2318
2318
#[ inline]
2319
2319
#[ target_feature( enable = "neon" ) ]
2320
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2321
- #[ rustc_args_required_const ( 2 ) ]
2322
- pub unsafe fn vsli_n_s8 ( a : int8x8_t , b : int8x8_t , n : i32 ) -> int8x8_t {
2323
- assert ! ( 0 <= n && n <= 7 , "must have 0 ≤ n ≤ 7, but n = {}" , n ) ;
2324
- vsli_n_s8_ ( a, b, n )
2320
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2321
+ #[ rustc_legacy_const_generics ( 2 ) ]
2322
+ pub unsafe fn vsli_n_s8 < const N : i32 > ( a : int8x8_t , b : int8x8_t ) -> int8x8_t {
2323
+ static_assert_imm3 ! ( N ) ;
2324
+ vsli_n_s8_ ( a, b, N )
2325
2325
}
2326
2326
/// Shift Left and Insert (immediate)
2327
2327
#[ inline]
2328
2328
#[ target_feature( enable = "neon" ) ]
2329
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2330
- #[ rustc_args_required_const ( 2 ) ]
2331
- pub unsafe fn vsliq_n_s8 ( a : int8x16_t , b : int8x16_t , n : i32 ) -> int8x16_t {
2332
- assert ! ( 0 <= n && n <= 7 , "must have 0 ≤ n ≤ 7, but n = {}" , n ) ;
2333
- vsliq_n_s8_ ( a, b, n )
2329
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2330
+ #[ rustc_legacy_const_generics ( 2 ) ]
2331
+ pub unsafe fn vsliq_n_s8 < const N : i32 > ( a : int8x16_t , b : int8x16_t ) -> int8x16_t {
2332
+ static_assert_imm3 ! ( N ) ;
2333
+ vsliq_n_s8_ ( a, b, N )
2334
2334
}
2335
2335
/// Shift Left and Insert (immediate)
2336
2336
#[ inline]
2337
2337
#[ target_feature( enable = "neon" ) ]
2338
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2339
- #[ rustc_args_required_const ( 2 ) ]
2340
- pub unsafe fn vsli_n_s16 ( a : int16x4_t , b : int16x4_t , n : i32 ) -> int16x4_t {
2341
- assert ! ( 0 <= n && n <= 15 , "must have 0 ≤ n ≤ 15, but n = {}" , n ) ;
2342
- vsli_n_s16_ ( a, b, n )
2338
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2339
+ #[ rustc_legacy_const_generics ( 2 ) ]
2340
+ pub unsafe fn vsli_n_s16 < const N : i32 > ( a : int16x4_t , b : int16x4_t ) -> int16x4_t {
2341
+ static_assert_imm4 ! ( N ) ;
2342
+ vsli_n_s16_ ( a, b, N )
2343
2343
}
2344
2344
/// Shift Left and Insert (immediate)
2345
2345
#[ inline]
2346
2346
#[ target_feature( enable = "neon" ) ]
2347
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2348
- #[ rustc_args_required_const ( 2 ) ]
2349
- pub unsafe fn vsliq_n_s16 ( a : int16x8_t , b : int16x8_t , n : i32 ) -> int16x8_t {
2350
- assert ! ( 0 <= n && n <= 15 , "must have 0 ≤ n ≤ 15, but n = {}" , n ) ;
2351
- vsliq_n_s16_ ( a, b, n )
2347
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2348
+ #[ rustc_legacy_const_generics ( 2 ) ]
2349
+ pub unsafe fn vsliq_n_s16 < const N : i32 > ( a : int16x8_t , b : int16x8_t ) -> int16x8_t {
2350
+ static_assert_imm4 ! ( N ) ;
2351
+ vsliq_n_s16_ ( a, b, N )
2352
2352
}
2353
2353
/// Shift Left and Insert (immediate)
2354
2354
#[ inline]
2355
2355
#[ target_feature( enable = "neon" ) ]
2356
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2357
- #[ rustc_args_required_const ( 2 ) ]
2358
- pub unsafe fn vsli_n_s32 ( a : int32x2_t , b : int32x2_t , n : i32 ) -> int32x2_t {
2359
- assert ! ( 0 <= n && n <= 31 , "must have 0 ≤ n ≤ 31, but n = {}" , n ) ;
2360
- vsli_n_s32_ ( a, b, n )
2356
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2357
+ #[ rustc_legacy_const_generics ( 2 ) ]
2358
+ pub unsafe fn vsli_n_s32 < const N : i32 > ( a : int32x2_t , b : int32x2_t ) -> int32x2_t {
2359
+ static_assert ! ( N : i32 where N >= 0 && N <= 31 ) ;
2360
+ vsli_n_s32_ ( a, b, N )
2361
2361
}
2362
2362
/// Shift Left and Insert (immediate)
2363
2363
#[ inline]
2364
2364
#[ target_feature( enable = "neon" ) ]
2365
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2366
- #[ rustc_args_required_const ( 2 ) ]
2367
- pub unsafe fn vsliq_n_s32 ( a : int32x4_t , b : int32x4_t , n : i32 ) -> int32x4_t {
2368
- assert ! ( 0 <= n && n <= 31 , "must have 0 ≤ n ≤ 31, but n = {}" , n ) ;
2369
- vsliq_n_s32_ ( a, b, n )
2365
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2366
+ #[ rustc_legacy_const_generics ( 2 ) ]
2367
+ pub unsafe fn vsliq_n_s32 < const N : i32 > ( a : int32x4_t , b : int32x4_t ) -> int32x4_t {
2368
+ static_assert ! ( N : i32 where N >= 0 && N <= 31 ) ;
2369
+ vsliq_n_s32_ ( a, b, N )
2370
2370
}
2371
2371
/// Shift Left and Insert (immediate)
2372
2372
#[ inline]
2373
2373
#[ target_feature( enable = "neon" ) ]
2374
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2375
- #[ rustc_args_required_const ( 2 ) ]
2376
- pub unsafe fn vsli_n_s64 ( a : int64x1_t , b : int64x1_t , n : i32 ) -> int64x1_t {
2377
- assert ! ( 0 <= n && n <= 63 , "must have 0 ≤ n ≤ 63, but n = {}" , n ) ;
2378
- vsli_n_s64_ ( a, b, n )
2374
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2375
+ #[ rustc_legacy_const_generics ( 2 ) ]
2376
+ pub unsafe fn vsli_n_s64 < const N : i32 > ( a : int64x1_t , b : int64x1_t ) -> int64x1_t {
2377
+ static_assert ! ( N : i32 where N >= 0 && N <= 63 ) ;
2378
+ vsli_n_s64_ ( a, b, N )
2379
2379
}
2380
2380
/// Shift Left and Insert (immediate)
2381
2381
#[ inline]
2382
2382
#[ target_feature( enable = "neon" ) ]
2383
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2384
- #[ rustc_args_required_const ( 2 ) ]
2385
- pub unsafe fn vsliq_n_s64 ( a : int64x2_t , b : int64x2_t , n : i32 ) -> int64x2_t {
2386
- assert ! ( 0 <= n && n <= 63 , "must have 0 ≤ n ≤ 63, but n = {}" , n ) ;
2387
- vsliq_n_s64_ ( a, b, n )
2383
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2384
+ #[ rustc_legacy_const_generics ( 2 ) ]
2385
+ pub unsafe fn vsliq_n_s64 < const N : i32 > ( a : int64x2_t , b : int64x2_t ) -> int64x2_t {
2386
+ static_assert ! ( N : i32 where N >= 0 && N <= 63 ) ;
2387
+ vsliq_n_s64_ ( a, b, N )
2388
2388
}
2389
2389
/// Shift Left and Insert (immediate)
2390
2390
#[ inline]
2391
2391
#[ target_feature( enable = "neon" ) ]
2392
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2393
- #[ rustc_args_required_const ( 2 ) ]
2394
- pub unsafe fn vsli_n_u8 ( a : uint8x8_t , b : uint8x8_t , n : i32 ) -> uint8x8_t {
2395
- assert ! ( 0 <= n && n <= 7 , "must have 0 ≤ n ≤ 7, but n = {}" , n ) ;
2396
- transmute ( vsli_n_s8_ ( transmute ( a) , transmute ( b) , n ) )
2392
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2393
+ #[ rustc_legacy_const_generics ( 2 ) ]
2394
+ pub unsafe fn vsli_n_u8 < const N : i32 > ( a : uint8x8_t , b : uint8x8_t ) -> uint8x8_t {
2395
+ static_assert_imm3 ! ( N ) ;
2396
+ transmute ( vsli_n_s8_ ( transmute ( a) , transmute ( b) , N ) )
2397
2397
}
2398
2398
/// Shift Left and Insert (immediate)
2399
2399
#[ inline]
2400
2400
#[ target_feature( enable = "neon" ) ]
2401
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2402
- #[ rustc_args_required_const ( 2 ) ]
2403
- pub unsafe fn vsliq_n_u8 ( a : uint8x16_t , b : uint8x16_t , n : i32 ) -> uint8x16_t {
2404
- assert ! ( 0 <= n && n <= 7 , "must have 0 ≤ n ≤ 7, but n = {}" , n ) ;
2405
- transmute ( vsliq_n_s8_ ( transmute ( a) , transmute ( b) , n ) )
2401
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2402
+ #[ rustc_legacy_const_generics ( 2 ) ]
2403
+ pub unsafe fn vsliq_n_u8 < const N : i32 > ( a : uint8x16_t , b : uint8x16_t ) -> uint8x16_t {
2404
+ static_assert_imm3 ! ( N ) ;
2405
+ transmute ( vsliq_n_s8_ ( transmute ( a) , transmute ( b) , N ) )
2406
2406
}
2407
2407
/// Shift Left and Insert (immediate)
2408
2408
#[ inline]
2409
2409
#[ target_feature( enable = "neon" ) ]
2410
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2411
- #[ rustc_args_required_const ( 2 ) ]
2412
- pub unsafe fn vsli_n_u16 ( a : uint16x4_t , b : uint16x4_t , n : i32 ) -> uint16x4_t {
2413
- assert ! ( 0 <= n && n <= 15 , "must have 0 ≤ n ≤ 15, but n = {}" , n ) ;
2414
- transmute ( vsli_n_s16_ ( transmute ( a) , transmute ( b) , n ) )
2410
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2411
+ #[ rustc_legacy_const_generics ( 2 ) ]
2412
+ pub unsafe fn vsli_n_u16 < const N : i32 > ( a : uint16x4_t , b : uint16x4_t ) -> uint16x4_t {
2413
+ static_assert_imm4 ! ( N ) ;
2414
+ transmute ( vsli_n_s16_ ( transmute ( a) , transmute ( b) , N ) )
2415
2415
}
2416
2416
/// Shift Left and Insert (immediate)
2417
2417
#[ inline]
2418
2418
#[ target_feature( enable = "neon" ) ]
2419
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2420
- #[ rustc_args_required_const ( 2 ) ]
2421
- pub unsafe fn vsliq_n_u16 ( a : uint16x8_t , b : uint16x8_t , n : i32 ) -> uint16x8_t {
2422
- assert ! ( 0 <= n && n <= 15 , "must have 0 ≤ n ≤ 15, but n = {}" , n ) ;
2423
- transmute ( vsliq_n_s16_ ( transmute ( a) , transmute ( b) , n ) )
2419
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2420
+ #[ rustc_legacy_const_generics ( 2 ) ]
2421
+ pub unsafe fn vsliq_n_u16 < const N : i32 > ( a : uint16x8_t , b : uint16x8_t ) -> uint16x8_t {
2422
+ static_assert_imm4 ! ( N ) ;
2423
+ transmute ( vsliq_n_s16_ ( transmute ( a) , transmute ( b) , N ) )
2424
2424
}
2425
2425
/// Shift Left and Insert (immediate)
2426
2426
#[ inline]
2427
2427
#[ target_feature( enable = "neon" ) ]
2428
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2429
- #[ rustc_args_required_const ( 2 ) ]
2430
- pub unsafe fn vsli_n_u32 ( a : uint32x2_t , b : uint32x2_t , n : i32 ) -> uint32x2_t {
2431
- assert ! ( 0 <= n && n <= 31 , "must have 0 ≤ n ≤ 31, but n = {}" , n ) ;
2432
- transmute ( vsli_n_s32_ ( transmute ( a) , transmute ( b) , n ) )
2428
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2429
+ #[ rustc_legacy_const_generics ( 2 ) ]
2430
+ pub unsafe fn vsli_n_u32 < const N : i32 > ( a : uint32x2_t , b : uint32x2_t ) -> uint32x2_t {
2431
+ static_assert ! ( N : i32 where N >= 0 && N <= 31 ) ;
2432
+ transmute ( vsli_n_s32_ ( transmute ( a) , transmute ( b) , N ) )
2433
2433
}
2434
2434
/// Shift Left and Insert (immediate)
2435
2435
#[ inline]
2436
2436
#[ target_feature( enable = "neon" ) ]
2437
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2438
- #[ rustc_args_required_const ( 2 ) ]
2439
- pub unsafe fn vsliq_n_u32 ( a : uint32x4_t , b : uint32x4_t , n : i32 ) -> uint32x4_t {
2440
- assert ! ( 0 <= n && n <= 31 , "must have 0 ≤ n ≤ 31, but n = {}" , n ) ;
2441
- transmute ( vsliq_n_s32_ ( transmute ( a) , transmute ( b) , n ) )
2437
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2438
+ #[ rustc_legacy_const_generics ( 2 ) ]
2439
+ pub unsafe fn vsliq_n_u32 < const N : i32 > ( a : uint32x4_t , b : uint32x4_t ) -> uint32x4_t {
2440
+ static_assert ! ( N : i32 where N >= 0 && N <= 31 ) ;
2441
+ transmute ( vsliq_n_s32_ ( transmute ( a) , transmute ( b) , N ) )
2442
2442
}
2443
2443
/// Shift Left and Insert (immediate)
2444
2444
#[ inline]
2445
2445
#[ target_feature( enable = "neon" ) ]
2446
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2447
- #[ rustc_args_required_const ( 2 ) ]
2448
- pub unsafe fn vsli_n_u64 ( a : uint64x1_t , b : uint64x1_t , n : i32 ) -> uint64x1_t {
2449
- assert ! ( 0 <= n && n <= 63 , "must have 0 ≤ n ≤ 63, but n = {}" , n ) ;
2450
- transmute ( vsli_n_s64_ ( transmute ( a) , transmute ( b) , n ) )
2446
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2447
+ #[ rustc_legacy_const_generics ( 2 ) ]
2448
+ pub unsafe fn vsli_n_u64 < const N : i32 > ( a : uint64x1_t , b : uint64x1_t ) -> uint64x1_t {
2449
+ static_assert ! ( N : i32 where N >= 0 && N <= 63 ) ;
2450
+ transmute ( vsli_n_s64_ ( transmute ( a) , transmute ( b) , N ) )
2451
2451
}
2452
2452
/// Shift Left and Insert (immediate)
2453
2453
#[ inline]
2454
2454
#[ target_feature( enable = "neon" ) ]
2455
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2456
- #[ rustc_args_required_const ( 2 ) ]
2457
- pub unsafe fn vsliq_n_u64 ( a : uint64x2_t , b : uint64x2_t , n : i32 ) -> uint64x2_t {
2458
- assert ! ( 0 <= n && n <= 63 , "must have 0 ≤ n ≤ 63, but n = {}" , n ) ;
2459
- transmute ( vsliq_n_s64_ ( transmute ( a) , transmute ( b) , n ) )
2455
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2456
+ #[ rustc_legacy_const_generics ( 2 ) ]
2457
+ pub unsafe fn vsliq_n_u64 < const N : i32 > ( a : uint64x2_t , b : uint64x2_t ) -> uint64x2_t {
2458
+ static_assert ! ( N : i32 where N >= 0 && N <= 63 ) ;
2459
+ transmute ( vsliq_n_s64_ ( transmute ( a) , transmute ( b) , N ) )
2460
2460
}
2461
2461
/// Shift Left and Insert (immediate)
2462
2462
#[ inline]
2463
2463
#[ target_feature( enable = "neon" ) ]
2464
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2465
- #[ rustc_args_required_const ( 2 ) ]
2466
- pub unsafe fn vsli_n_p8 ( a : poly8x8_t , b : poly8x8_t , n : i32 ) -> poly8x8_t {
2467
- assert ! ( 0 <= n && n <= 7 , "must have 0 ≤ n ≤ 7, but n = {}" , n ) ;
2468
- transmute ( vsli_n_s8_ ( transmute ( a) , transmute ( b) , n ) )
2464
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2465
+ #[ rustc_legacy_const_generics ( 2 ) ]
2466
+ pub unsafe fn vsli_n_p8 < const N : i32 > ( a : poly8x8_t , b : poly8x8_t ) -> poly8x8_t {
2467
+ static_assert_imm3 ! ( N ) ;
2468
+ transmute ( vsli_n_s8_ ( transmute ( a) , transmute ( b) , N ) )
2469
2469
}
2470
2470
/// Shift Left and Insert (immediate)
2471
2471
#[ inline]
2472
2472
#[ target_feature( enable = "neon" ) ]
2473
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2474
- #[ rustc_args_required_const ( 2 ) ]
2475
- pub unsafe fn vsliq_n_p8 ( a : poly8x16_t , b : poly8x16_t , n : i32 ) -> poly8x16_t {
2476
- assert ! ( 0 <= n && n <= 7 , "must have 0 ≤ n ≤ 7, but n = {}" , n ) ;
2477
- transmute ( vsliq_n_s8_ ( transmute ( a) , transmute ( b) , n ) )
2473
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2474
+ #[ rustc_legacy_const_generics ( 2 ) ]
2475
+ pub unsafe fn vsliq_n_p8 < const N : i32 > ( a : poly8x16_t , b : poly8x16_t ) -> poly8x16_t {
2476
+ static_assert_imm3 ! ( N ) ;
2477
+ transmute ( vsliq_n_s8_ ( transmute ( a) , transmute ( b) , N ) )
2478
2478
}
2479
2479
/// Shift Left and Insert (immediate)
2480
2480
#[ inline]
2481
2481
#[ target_feature( enable = "neon" ) ]
2482
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2483
- #[ rustc_args_required_const ( 2 ) ]
2484
- pub unsafe fn vsli_n_p16 ( a : poly16x4_t , b : poly16x4_t , n : i32 ) -> poly16x4_t {
2485
- assert ! ( 0 <= n && n <= 15 , "must have 0 ≤ n ≤ 15, but n = {}" , n ) ;
2486
- transmute ( vsli_n_s16_ ( transmute ( a) , transmute ( b) , n ) )
2482
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2483
+ #[ rustc_legacy_const_generics ( 2 ) ]
2484
+ pub unsafe fn vsli_n_p16 < const N : i32 > ( a : poly16x4_t , b : poly16x4_t ) -> poly16x4_t {
2485
+ static_assert_imm4 ! ( N ) ;
2486
+ transmute ( vsli_n_s16_ ( transmute ( a) , transmute ( b) , N ) )
2487
2487
}
2488
2488
/// Shift Left and Insert (immediate)
2489
2489
#[ inline]
2490
2490
#[ target_feature( enable = "neon" ) ]
2491
- #[ cfg_attr( test, assert_instr( sli, n = 1 ) ) ]
2492
- #[ rustc_args_required_const ( 2 ) ]
2493
- pub unsafe fn vsliq_n_p16 ( a : poly16x8_t , b : poly16x8_t , n : i32 ) -> poly16x8_t {
2494
- assert ! ( 0 <= n && n <= 15 , "must have 0 ≤ n ≤ 15, but n = {}" , n ) ;
2495
- transmute ( vsliq_n_s16_ ( transmute ( a) , transmute ( b) , n ) )
2491
+ #[ cfg_attr( test, assert_instr( sli, N = 1 ) ) ]
2492
+ #[ rustc_legacy_const_generics ( 2 ) ]
2493
+ pub unsafe fn vsliq_n_p16 < const N : i32 > ( a : poly16x8_t , b : poly16x8_t ) -> poly16x8_t {
2494
+ static_assert_imm4 ! ( N ) ;
2495
+ transmute ( vsliq_n_s16_ ( transmute ( a) , transmute ( b) , N ) )
2496
2496
}
2497
2497
2498
2498
/// Shift Right and Insert (immediate)
0 commit comments