@@ -62,8 +62,8 @@ unsafe extern "C" {
62
62
#[ target_feature( enable = "gfni,avx512f" ) ]
63
63
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
64
64
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
65
- pub unsafe fn _mm512_gf2p8mul_epi8 ( a : __m512i , b : __m512i ) -> __m512i {
66
- transmute ( vgf2p8mulb_512 ( a. as_i8x64 ( ) , b. as_i8x64 ( ) ) )
65
+ pub fn _mm512_gf2p8mul_epi8 ( a : __m512i , b : __m512i ) -> __m512i {
66
+ unsafe { transmute ( vgf2p8mulb_512 ( a. as_i8x64 ( ) , b. as_i8x64 ( ) ) ) }
67
67
}
68
68
69
69
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -78,17 +78,14 @@ pub unsafe fn _mm512_gf2p8mul_epi8(a: __m512i, b: __m512i) -> __m512i {
78
78
#[ target_feature( enable = "gfni,avx512bw,avx512f" ) ]
79
79
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
80
80
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
81
- pub unsafe fn _mm512_mask_gf2p8mul_epi8 (
82
- src : __m512i ,
83
- k : __mmask64 ,
84
- a : __m512i ,
85
- b : __m512i ,
86
- ) -> __m512i {
87
- transmute ( simd_select_bitmask (
88
- k,
89
- vgf2p8mulb_512 ( a. as_i8x64 ( ) , b. as_i8x64 ( ) ) ,
90
- src. as_i8x64 ( ) ,
91
- ) )
81
+ pub fn _mm512_mask_gf2p8mul_epi8 ( src : __m512i , k : __mmask64 , a : __m512i , b : __m512i ) -> __m512i {
82
+ unsafe {
83
+ transmute ( simd_select_bitmask (
84
+ k,
85
+ vgf2p8mulb_512 ( a. as_i8x64 ( ) , b. as_i8x64 ( ) ) ,
86
+ src. as_i8x64 ( ) ,
87
+ ) )
88
+ }
92
89
}
93
90
94
91
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -103,13 +100,15 @@ pub unsafe fn _mm512_mask_gf2p8mul_epi8(
103
100
#[ target_feature( enable = "gfni,avx512bw,avx512f" ) ]
104
101
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
105
102
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
106
- pub unsafe fn _mm512_maskz_gf2p8mul_epi8 ( k : __mmask64 , a : __m512i , b : __m512i ) -> __m512i {
103
+ pub fn _mm512_maskz_gf2p8mul_epi8 ( k : __mmask64 , a : __m512i , b : __m512i ) -> __m512i {
107
104
let zero = i8x64:: ZERO ;
108
- transmute ( simd_select_bitmask (
109
- k,
110
- vgf2p8mulb_512 ( a. as_i8x64 ( ) , b. as_i8x64 ( ) ) ,
111
- zero,
112
- ) )
105
+ unsafe {
106
+ transmute ( simd_select_bitmask (
107
+ k,
108
+ vgf2p8mulb_512 ( a. as_i8x64 ( ) , b. as_i8x64 ( ) ) ,
109
+ zero,
110
+ ) )
111
+ }
113
112
}
114
113
115
114
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -121,8 +120,8 @@ pub unsafe fn _mm512_maskz_gf2p8mul_epi8(k: __mmask64, a: __m512i, b: __m512i) -
121
120
#[ target_feature( enable = "gfni,avx" ) ]
122
121
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
123
122
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
124
- pub unsafe fn _mm256_gf2p8mul_epi8 ( a : __m256i , b : __m256i ) -> __m256i {
125
- transmute ( vgf2p8mulb_256 ( a. as_i8x32 ( ) , b. as_i8x32 ( ) ) )
123
+ pub fn _mm256_gf2p8mul_epi8 ( a : __m256i , b : __m256i ) -> __m256i {
124
+ unsafe { transmute ( vgf2p8mulb_256 ( a. as_i8x32 ( ) , b. as_i8x32 ( ) ) ) }
126
125
}
127
126
128
127
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -137,17 +136,14 @@ pub unsafe fn _mm256_gf2p8mul_epi8(a: __m256i, b: __m256i) -> __m256i {
137
136
#[ target_feature( enable = "gfni,avx512bw,avx512vl" ) ]
138
137
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
139
138
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
140
- pub unsafe fn _mm256_mask_gf2p8mul_epi8 (
141
- src : __m256i ,
142
- k : __mmask32 ,
143
- a : __m256i ,
144
- b : __m256i ,
145
- ) -> __m256i {
146
- transmute ( simd_select_bitmask (
147
- k,
148
- vgf2p8mulb_256 ( a. as_i8x32 ( ) , b. as_i8x32 ( ) ) ,
149
- src. as_i8x32 ( ) ,
150
- ) )
139
+ pub fn _mm256_mask_gf2p8mul_epi8 ( src : __m256i , k : __mmask32 , a : __m256i , b : __m256i ) -> __m256i {
140
+ unsafe {
141
+ transmute ( simd_select_bitmask (
142
+ k,
143
+ vgf2p8mulb_256 ( a. as_i8x32 ( ) , b. as_i8x32 ( ) ) ,
144
+ src. as_i8x32 ( ) ,
145
+ ) )
146
+ }
151
147
}
152
148
153
149
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -162,13 +158,15 @@ pub unsafe fn _mm256_mask_gf2p8mul_epi8(
162
158
#[ target_feature( enable = "gfni,avx512bw,avx512vl" ) ]
163
159
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
164
160
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
165
- pub unsafe fn _mm256_maskz_gf2p8mul_epi8 ( k : __mmask32 , a : __m256i , b : __m256i ) -> __m256i {
161
+ pub fn _mm256_maskz_gf2p8mul_epi8 ( k : __mmask32 , a : __m256i , b : __m256i ) -> __m256i {
166
162
let zero = i8x32:: ZERO ;
167
- transmute ( simd_select_bitmask (
168
- k,
169
- vgf2p8mulb_256 ( a. as_i8x32 ( ) , b. as_i8x32 ( ) ) ,
170
- zero,
171
- ) )
163
+ unsafe {
164
+ transmute ( simd_select_bitmask (
165
+ k,
166
+ vgf2p8mulb_256 ( a. as_i8x32 ( ) , b. as_i8x32 ( ) ) ,
167
+ zero,
168
+ ) )
169
+ }
172
170
}
173
171
174
172
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -180,8 +178,8 @@ pub unsafe fn _mm256_maskz_gf2p8mul_epi8(k: __mmask32, a: __m256i, b: __m256i) -
180
178
#[ target_feature( enable = "gfni" ) ]
181
179
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
182
180
#[ cfg_attr( test, assert_instr( gf2p8mulb) ) ]
183
- pub unsafe fn _mm_gf2p8mul_epi8 ( a : __m128i , b : __m128i ) -> __m128i {
184
- transmute ( vgf2p8mulb_128 ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) )
181
+ pub fn _mm_gf2p8mul_epi8 ( a : __m128i , b : __m128i ) -> __m128i {
182
+ unsafe { transmute ( vgf2p8mulb_128 ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) ) }
185
183
}
186
184
187
185
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -196,17 +194,14 @@ pub unsafe fn _mm_gf2p8mul_epi8(a: __m128i, b: __m128i) -> __m128i {
196
194
#[ target_feature( enable = "gfni,avx512bw,avx512vl" ) ]
197
195
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
198
196
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
199
- pub unsafe fn _mm_mask_gf2p8mul_epi8 (
200
- src : __m128i ,
201
- k : __mmask16 ,
202
- a : __m128i ,
203
- b : __m128i ,
204
- ) -> __m128i {
205
- transmute ( simd_select_bitmask (
206
- k,
207
- vgf2p8mulb_128 ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) ,
208
- src. as_i8x16 ( ) ,
209
- ) )
197
+ pub fn _mm_mask_gf2p8mul_epi8 ( src : __m128i , k : __mmask16 , a : __m128i , b : __m128i ) -> __m128i {
198
+ unsafe {
199
+ transmute ( simd_select_bitmask (
200
+ k,
201
+ vgf2p8mulb_128 ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) ,
202
+ src. as_i8x16 ( ) ,
203
+ ) )
204
+ }
210
205
}
211
206
212
207
/// Performs a multiplication in GF(2^8) on the packed bytes.
@@ -221,13 +216,15 @@ pub unsafe fn _mm_mask_gf2p8mul_epi8(
221
216
#[ target_feature( enable = "gfni,avx512bw,avx512vl" ) ]
222
217
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
223
218
#[ cfg_attr( test, assert_instr( vgf2p8mulb) ) ]
224
- pub unsafe fn _mm_maskz_gf2p8mul_epi8 ( k : __mmask16 , a : __m128i , b : __m128i ) -> __m128i {
225
- let zero = i8x16:: ZERO ;
226
- transmute ( simd_select_bitmask (
227
- k,
228
- vgf2p8mulb_128 ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) ,
229
- zero,
230
- ) )
219
+ pub fn _mm_maskz_gf2p8mul_epi8 ( k : __mmask16 , a : __m128i , b : __m128i ) -> __m128i {
220
+ unsafe {
221
+ let zero = i8x16:: ZERO ;
222
+ transmute ( simd_select_bitmask (
223
+ k,
224
+ vgf2p8mulb_128 ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) ,
225
+ zero,
226
+ ) )
227
+ }
231
228
}
232
229
233
230
/// Performs an affine transformation on the packed bytes in x.
@@ -241,13 +238,15 @@ pub unsafe fn _mm_maskz_gf2p8mul_epi8(k: __mmask16, a: __m128i, b: __m128i) -> _
241
238
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
242
239
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
243
240
#[ rustc_legacy_const_generics( 2 ) ]
244
- pub unsafe fn _mm512_gf2p8affine_epi64_epi8 < const B : i32 > ( x : __m512i , a : __m512i ) -> __m512i {
241
+ pub fn _mm512_gf2p8affine_epi64_epi8 < const B : i32 > ( x : __m512i , a : __m512i ) -> __m512i {
245
242
static_assert_uimm_bits ! ( B , 8 ) ;
246
243
let b = B as u8 ;
247
244
let x = x. as_i8x64 ( ) ;
248
245
let a = a. as_i8x64 ( ) ;
249
- let r = vgf2p8affineqb_512 ( x, a, b) ;
250
- transmute ( r)
246
+ unsafe {
247
+ let r = vgf2p8affineqb_512 ( x, a, b) ;
248
+ transmute ( r)
249
+ }
251
250
}
252
251
253
252
/// Performs an affine transformation on the packed bytes in x.
@@ -264,7 +263,7 @@ pub unsafe fn _mm512_gf2p8affine_epi64_epi8<const B: i32>(x: __m512i, a: __m512i
264
263
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
265
264
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
266
265
#[ rustc_legacy_const_generics( 3 ) ]
267
- pub unsafe fn _mm512_maskz_gf2p8affine_epi64_epi8 < const B : i32 > (
266
+ pub fn _mm512_maskz_gf2p8affine_epi64_epi8 < const B : i32 > (
268
267
k : __mmask64 ,
269
268
x : __m512i ,
270
269
a : __m512i ,
@@ -274,8 +273,10 @@ pub unsafe fn _mm512_maskz_gf2p8affine_epi64_epi8<const B: i32>(
274
273
let zero = i8x64:: ZERO ;
275
274
let x = x. as_i8x64 ( ) ;
276
275
let a = a. as_i8x64 ( ) ;
277
- let r = vgf2p8affineqb_512 ( x, a, b) ;
278
- transmute ( simd_select_bitmask ( k, r, zero) )
276
+ unsafe {
277
+ let r = vgf2p8affineqb_512 ( x, a, b) ;
278
+ transmute ( simd_select_bitmask ( k, r, zero) )
279
+ }
279
280
}
280
281
281
282
/// Performs an affine transformation on the packed bytes in x.
@@ -292,7 +293,7 @@ pub unsafe fn _mm512_maskz_gf2p8affine_epi64_epi8<const B: i32>(
292
293
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
293
294
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
294
295
#[ rustc_legacy_const_generics( 4 ) ]
295
- pub unsafe fn _mm512_mask_gf2p8affine_epi64_epi8 < const B : i32 > (
296
+ pub fn _mm512_mask_gf2p8affine_epi64_epi8 < const B : i32 > (
296
297
src : __m512i ,
297
298
k : __mmask64 ,
298
299
x : __m512i ,
@@ -302,8 +303,10 @@ pub unsafe fn _mm512_mask_gf2p8affine_epi64_epi8<const B: i32>(
302
303
let b = B as u8 ;
303
304
let x = x. as_i8x64 ( ) ;
304
305
let a = a. as_i8x64 ( ) ;
305
- let r = vgf2p8affineqb_512 ( x, a, b) ;
306
- transmute ( simd_select_bitmask ( k, r, src. as_i8x64 ( ) ) )
306
+ unsafe {
307
+ let r = vgf2p8affineqb_512 ( x, a, b) ;
308
+ transmute ( simd_select_bitmask ( k, r, src. as_i8x64 ( ) ) )
309
+ }
307
310
}
308
311
309
312
/// Performs an affine transformation on the packed bytes in x.
@@ -317,13 +320,15 @@ pub unsafe fn _mm512_mask_gf2p8affine_epi64_epi8<const B: i32>(
317
320
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
318
321
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
319
322
#[ rustc_legacy_const_generics( 2 ) ]
320
- pub unsafe fn _mm256_gf2p8affine_epi64_epi8 < const B : i32 > ( x : __m256i , a : __m256i ) -> __m256i {
323
+ pub fn _mm256_gf2p8affine_epi64_epi8 < const B : i32 > ( x : __m256i , a : __m256i ) -> __m256i {
321
324
static_assert_uimm_bits ! ( B , 8 ) ;
322
325
let b = B as u8 ;
323
326
let x = x. as_i8x32 ( ) ;
324
327
let a = a. as_i8x32 ( ) ;
325
- let r = vgf2p8affineqb_256 ( x, a, b) ;
326
- transmute ( r)
328
+ unsafe {
329
+ let r = vgf2p8affineqb_256 ( x, a, b) ;
330
+ transmute ( r)
331
+ }
327
332
}
328
333
329
334
/// Performs an affine transformation on the packed bytes in x.
@@ -340,7 +345,7 @@ pub unsafe fn _mm256_gf2p8affine_epi64_epi8<const B: i32>(x: __m256i, a: __m256i
340
345
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
341
346
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
342
347
#[ rustc_legacy_const_generics( 3 ) ]
343
- pub unsafe fn _mm256_maskz_gf2p8affine_epi64_epi8 < const B : i32 > (
348
+ pub fn _mm256_maskz_gf2p8affine_epi64_epi8 < const B : i32 > (
344
349
k : __mmask32 ,
345
350
x : __m256i ,
346
351
a : __m256i ,
@@ -350,8 +355,10 @@ pub unsafe fn _mm256_maskz_gf2p8affine_epi64_epi8<const B: i32>(
350
355
let zero = i8x32:: ZERO ;
351
356
let x = x. as_i8x32 ( ) ;
352
357
let a = a. as_i8x32 ( ) ;
353
- let r = vgf2p8affineqb_256 ( x, a, b) ;
354
- transmute ( simd_select_bitmask ( k, r, zero) )
358
+ unsafe {
359
+ let r = vgf2p8affineqb_256 ( x, a, b) ;
360
+ transmute ( simd_select_bitmask ( k, r, zero) )
361
+ }
355
362
}
356
363
357
364
/// Performs an affine transformation on the packed bytes in x.
@@ -368,7 +375,7 @@ pub unsafe fn _mm256_maskz_gf2p8affine_epi64_epi8<const B: i32>(
368
375
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
369
376
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
370
377
#[ rustc_legacy_const_generics( 4 ) ]
371
- pub unsafe fn _mm256_mask_gf2p8affine_epi64_epi8 < const B : i32 > (
378
+ pub fn _mm256_mask_gf2p8affine_epi64_epi8 < const B : i32 > (
372
379
src : __m256i ,
373
380
k : __mmask32 ,
374
381
x : __m256i ,
@@ -378,8 +385,10 @@ pub unsafe fn _mm256_mask_gf2p8affine_epi64_epi8<const B: i32>(
378
385
let b = B as u8 ;
379
386
let x = x. as_i8x32 ( ) ;
380
387
let a = a. as_i8x32 ( ) ;
381
- let r = vgf2p8affineqb_256 ( x, a, b) ;
382
- transmute ( simd_select_bitmask ( k, r, src. as_i8x32 ( ) ) )
388
+ unsafe {
389
+ let r = vgf2p8affineqb_256 ( x, a, b) ;
390
+ transmute ( simd_select_bitmask ( k, r, src. as_i8x32 ( ) ) )
391
+ }
383
392
}
384
393
385
394
/// Performs an affine transformation on the packed bytes in x.
@@ -393,13 +402,15 @@ pub unsafe fn _mm256_mask_gf2p8affine_epi64_epi8<const B: i32>(
393
402
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
394
403
#[ cfg_attr( test, assert_instr( gf2p8affineqb, B = 0 ) ) ]
395
404
#[ rustc_legacy_const_generics( 2 ) ]
396
- pub unsafe fn _mm_gf2p8affine_epi64_epi8 < const B : i32 > ( x : __m128i , a : __m128i ) -> __m128i {
405
+ pub fn _mm_gf2p8affine_epi64_epi8 < const B : i32 > ( x : __m128i , a : __m128i ) -> __m128i {
397
406
static_assert_uimm_bits ! ( B , 8 ) ;
398
407
let b = B as u8 ;
399
408
let x = x. as_i8x16 ( ) ;
400
409
let a = a. as_i8x16 ( ) ;
401
- let r = vgf2p8affineqb_128 ( x, a, b) ;
402
- transmute ( r)
410
+ unsafe {
411
+ let r = vgf2p8affineqb_128 ( x, a, b) ;
412
+ transmute ( r)
413
+ }
403
414
}
404
415
405
416
/// Performs an affine transformation on the packed bytes in x.
@@ -416,7 +427,7 @@ pub unsafe fn _mm_gf2p8affine_epi64_epi8<const B: i32>(x: __m128i, a: __m128i) -
416
427
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
417
428
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
418
429
#[ rustc_legacy_const_generics( 3 ) ]
419
- pub unsafe fn _mm_maskz_gf2p8affine_epi64_epi8 < const B : i32 > (
430
+ pub fn _mm_maskz_gf2p8affine_epi64_epi8 < const B : i32 > (
420
431
k : __mmask16 ,
421
432
x : __m128i ,
422
433
a : __m128i ,
@@ -426,8 +437,10 @@ pub unsafe fn _mm_maskz_gf2p8affine_epi64_epi8<const B: i32>(
426
437
let zero = i8x16:: ZERO ;
427
438
let x = x. as_i8x16 ( ) ;
428
439
let a = a. as_i8x16 ( ) ;
429
- let r = vgf2p8affineqb_128 ( x, a, b) ;
430
- transmute ( simd_select_bitmask ( k, r, zero) )
440
+ unsafe {
441
+ let r = vgf2p8affineqb_128 ( x, a, b) ;
442
+ transmute ( simd_select_bitmask ( k, r, zero) )
443
+ }
431
444
}
432
445
433
446
/// Performs an affine transformation on the packed bytes in x.
@@ -444,7 +457,7 @@ pub unsafe fn _mm_maskz_gf2p8affine_epi64_epi8<const B: i32>(
444
457
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
445
458
#[ cfg_attr( test, assert_instr( vgf2p8affineqb, B = 0 ) ) ]
446
459
#[ rustc_legacy_const_generics( 4 ) ]
447
- pub unsafe fn _mm_mask_gf2p8affine_epi64_epi8 < const B : i32 > (
460
+ pub fn _mm_mask_gf2p8affine_epi64_epi8 < const B : i32 > (
448
461
src : __m128i ,
449
462
k : __mmask16 ,
450
463
x : __m128i ,
@@ -454,8 +467,10 @@ pub unsafe fn _mm_mask_gf2p8affine_epi64_epi8<const B: i32>(
454
467
let b = B as u8 ;
455
468
let x = x. as_i8x16 ( ) ;
456
469
let a = a. as_i8x16 ( ) ;
457
- let r = vgf2p8affineqb_128 ( x, a, b) ;
458
- transmute ( simd_select_bitmask ( k, r, src. as_i8x16 ( ) ) )
470
+ unsafe {
471
+ let r = vgf2p8affineqb_128 ( x, a, b) ;
472
+ transmute ( simd_select_bitmask ( k, r, src. as_i8x16 ( ) ) )
473
+ }
459
474
}
460
475
461
476
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -471,13 +486,15 @@ pub unsafe fn _mm_mask_gf2p8affine_epi64_epi8<const B: i32>(
471
486
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
472
487
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
473
488
#[ rustc_legacy_const_generics( 2 ) ]
474
- pub unsafe fn _mm512_gf2p8affineinv_epi64_epi8 < const B : i32 > ( x : __m512i , a : __m512i ) -> __m512i {
489
+ pub fn _mm512_gf2p8affineinv_epi64_epi8 < const B : i32 > ( x : __m512i , a : __m512i ) -> __m512i {
475
490
static_assert_uimm_bits ! ( B , 8 ) ;
476
491
let b = B as u8 ;
477
492
let x = x. as_i8x64 ( ) ;
478
493
let a = a. as_i8x64 ( ) ;
479
- let r = vgf2p8affineinvqb_512 ( x, a, b) ;
480
- transmute ( r)
494
+ unsafe {
495
+ let r = vgf2p8affineinvqb_512 ( x, a, b) ;
496
+ transmute ( r)
497
+ }
481
498
}
482
499
483
500
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -496,7 +513,7 @@ pub unsafe fn _mm512_gf2p8affineinv_epi64_epi8<const B: i32>(x: __m512i, a: __m5
496
513
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
497
514
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
498
515
#[ rustc_legacy_const_generics( 3 ) ]
499
- pub unsafe fn _mm512_maskz_gf2p8affineinv_epi64_epi8 < const B : i32 > (
516
+ pub fn _mm512_maskz_gf2p8affineinv_epi64_epi8 < const B : i32 > (
500
517
k : __mmask64 ,
501
518
x : __m512i ,
502
519
a : __m512i ,
@@ -506,8 +523,10 @@ pub unsafe fn _mm512_maskz_gf2p8affineinv_epi64_epi8<const B: i32>(
506
523
let zero = i8x64:: ZERO ;
507
524
let x = x. as_i8x64 ( ) ;
508
525
let a = a. as_i8x64 ( ) ;
509
- let r = vgf2p8affineinvqb_512 ( x, a, b) ;
510
- transmute ( simd_select_bitmask ( k, r, zero) )
526
+ unsafe {
527
+ let r = vgf2p8affineinvqb_512 ( x, a, b) ;
528
+ transmute ( simd_select_bitmask ( k, r, zero) )
529
+ }
511
530
}
512
531
513
532
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -526,7 +545,7 @@ pub unsafe fn _mm512_maskz_gf2p8affineinv_epi64_epi8<const B: i32>(
526
545
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
527
546
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
528
547
#[ rustc_legacy_const_generics( 4 ) ]
529
- pub unsafe fn _mm512_mask_gf2p8affineinv_epi64_epi8 < const B : i32 > (
548
+ pub fn _mm512_mask_gf2p8affineinv_epi64_epi8 < const B : i32 > (
530
549
src : __m512i ,
531
550
k : __mmask64 ,
532
551
x : __m512i ,
@@ -536,8 +555,10 @@ pub unsafe fn _mm512_mask_gf2p8affineinv_epi64_epi8<const B: i32>(
536
555
let b = B as u8 ;
537
556
let x = x. as_i8x64 ( ) ;
538
557
let a = a. as_i8x64 ( ) ;
539
- let r = vgf2p8affineinvqb_512 ( x, a, b) ;
540
- transmute ( simd_select_bitmask ( k, r, src. as_i8x64 ( ) ) )
558
+ unsafe {
559
+ let r = vgf2p8affineinvqb_512 ( x, a, b) ;
560
+ transmute ( simd_select_bitmask ( k, r, src. as_i8x64 ( ) ) )
561
+ }
541
562
}
542
563
543
564
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -553,13 +574,15 @@ pub unsafe fn _mm512_mask_gf2p8affineinv_epi64_epi8<const B: i32>(
553
574
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
554
575
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
555
576
#[ rustc_legacy_const_generics( 2 ) ]
556
- pub unsafe fn _mm256_gf2p8affineinv_epi64_epi8 < const B : i32 > ( x : __m256i , a : __m256i ) -> __m256i {
577
+ pub fn _mm256_gf2p8affineinv_epi64_epi8 < const B : i32 > ( x : __m256i , a : __m256i ) -> __m256i {
557
578
static_assert_uimm_bits ! ( B , 8 ) ;
558
579
let b = B as u8 ;
559
580
let x = x. as_i8x32 ( ) ;
560
581
let a = a. as_i8x32 ( ) ;
561
- let r = vgf2p8affineinvqb_256 ( x, a, b) ;
562
- transmute ( r)
582
+ unsafe {
583
+ let r = vgf2p8affineinvqb_256 ( x, a, b) ;
584
+ transmute ( r)
585
+ }
563
586
}
564
587
565
588
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -578,7 +601,7 @@ pub unsafe fn _mm256_gf2p8affineinv_epi64_epi8<const B: i32>(x: __m256i, a: __m2
578
601
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
579
602
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
580
603
#[ rustc_legacy_const_generics( 3 ) ]
581
- pub unsafe fn _mm256_maskz_gf2p8affineinv_epi64_epi8 < const B : i32 > (
604
+ pub fn _mm256_maskz_gf2p8affineinv_epi64_epi8 < const B : i32 > (
582
605
k : __mmask32 ,
583
606
x : __m256i ,
584
607
a : __m256i ,
@@ -588,8 +611,10 @@ pub unsafe fn _mm256_maskz_gf2p8affineinv_epi64_epi8<const B: i32>(
588
611
let zero = i8x32:: ZERO ;
589
612
let x = x. as_i8x32 ( ) ;
590
613
let a = a. as_i8x32 ( ) ;
591
- let r = vgf2p8affineinvqb_256 ( x, a, b) ;
592
- transmute ( simd_select_bitmask ( k, r, zero) )
614
+ unsafe {
615
+ let r = vgf2p8affineinvqb_256 ( x, a, b) ;
616
+ transmute ( simd_select_bitmask ( k, r, zero) )
617
+ }
593
618
}
594
619
595
620
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -608,7 +633,7 @@ pub unsafe fn _mm256_maskz_gf2p8affineinv_epi64_epi8<const B: i32>(
608
633
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
609
634
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
610
635
#[ rustc_legacy_const_generics( 4 ) ]
611
- pub unsafe fn _mm256_mask_gf2p8affineinv_epi64_epi8 < const B : i32 > (
636
+ pub fn _mm256_mask_gf2p8affineinv_epi64_epi8 < const B : i32 > (
612
637
src : __m256i ,
613
638
k : __mmask32 ,
614
639
x : __m256i ,
@@ -618,8 +643,10 @@ pub unsafe fn _mm256_mask_gf2p8affineinv_epi64_epi8<const B: i32>(
618
643
let b = B as u8 ;
619
644
let x = x. as_i8x32 ( ) ;
620
645
let a = a. as_i8x32 ( ) ;
621
- let r = vgf2p8affineinvqb_256 ( x, a, b) ;
622
- transmute ( simd_select_bitmask ( k, r, src. as_i8x32 ( ) ) )
646
+ unsafe {
647
+ let r = vgf2p8affineinvqb_256 ( x, a, b) ;
648
+ transmute ( simd_select_bitmask ( k, r, src. as_i8x32 ( ) ) )
649
+ }
623
650
}
624
651
625
652
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -635,13 +662,15 @@ pub unsafe fn _mm256_mask_gf2p8affineinv_epi64_epi8<const B: i32>(
635
662
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
636
663
#[ cfg_attr( test, assert_instr( gf2p8affineinvqb, B = 0 ) ) ]
637
664
#[ rustc_legacy_const_generics( 2 ) ]
638
- pub unsafe fn _mm_gf2p8affineinv_epi64_epi8 < const B : i32 > ( x : __m128i , a : __m128i ) -> __m128i {
665
+ pub fn _mm_gf2p8affineinv_epi64_epi8 < const B : i32 > ( x : __m128i , a : __m128i ) -> __m128i {
639
666
static_assert_uimm_bits ! ( B , 8 ) ;
640
667
let b = B as u8 ;
641
668
let x = x. as_i8x16 ( ) ;
642
669
let a = a. as_i8x16 ( ) ;
643
- let r = vgf2p8affineinvqb_128 ( x, a, b) ;
644
- transmute ( r)
670
+ unsafe {
671
+ let r = vgf2p8affineinvqb_128 ( x, a, b) ;
672
+ transmute ( r)
673
+ }
645
674
}
646
675
647
676
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -660,7 +689,7 @@ pub unsafe fn _mm_gf2p8affineinv_epi64_epi8<const B: i32>(x: __m128i, a: __m128i
660
689
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
661
690
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
662
691
#[ rustc_legacy_const_generics( 3 ) ]
663
- pub unsafe fn _mm_maskz_gf2p8affineinv_epi64_epi8 < const B : i32 > (
692
+ pub fn _mm_maskz_gf2p8affineinv_epi64_epi8 < const B : i32 > (
664
693
k : __mmask16 ,
665
694
x : __m128i ,
666
695
a : __m128i ,
@@ -670,8 +699,10 @@ pub unsafe fn _mm_maskz_gf2p8affineinv_epi64_epi8<const B: i32>(
670
699
let zero = i8x16:: ZERO ;
671
700
let x = x. as_i8x16 ( ) ;
672
701
let a = a. as_i8x16 ( ) ;
673
- let r = vgf2p8affineinvqb_128 ( x, a, b) ;
674
- transmute ( simd_select_bitmask ( k, r, zero) )
702
+ unsafe {
703
+ let r = vgf2p8affineinvqb_128 ( x, a, b) ;
704
+ transmute ( simd_select_bitmask ( k, r, zero) )
705
+ }
675
706
}
676
707
677
708
/// Performs an affine transformation on the inverted packed bytes in x.
@@ -690,7 +721,7 @@ pub unsafe fn _mm_maskz_gf2p8affineinv_epi64_epi8<const B: i32>(
690
721
#[ unstable( feature = "stdarch_x86_avx512" , issue = "111137" ) ]
691
722
#[ cfg_attr( test, assert_instr( vgf2p8affineinvqb, B = 0 ) ) ]
692
723
#[ rustc_legacy_const_generics( 4 ) ]
693
- pub unsafe fn _mm_mask_gf2p8affineinv_epi64_epi8 < const B : i32 > (
724
+ pub fn _mm_mask_gf2p8affineinv_epi64_epi8 < const B : i32 > (
694
725
src : __m128i ,
695
726
k : __mmask16 ,
696
727
x : __m128i ,
@@ -700,8 +731,10 @@ pub unsafe fn _mm_mask_gf2p8affineinv_epi64_epi8<const B: i32>(
700
731
let b = B as u8 ;
701
732
let x = x. as_i8x16 ( ) ;
702
733
let a = a. as_i8x16 ( ) ;
703
- let r = vgf2p8affineinvqb_128 ( x, a, b) ;
704
- transmute ( simd_select_bitmask ( k, r, src. as_i8x16 ( ) ) )
734
+ unsafe {
735
+ let r = vgf2p8affineinvqb_128 ( x, a, b) ;
736
+ transmute ( simd_select_bitmask ( k, r, src. as_i8x16 ( ) ) )
737
+ }
705
738
}
706
739
707
740
#[ cfg( test) ]
0 commit comments