@@ -55,8 +55,8 @@ use stdarch_test::assert_instr;
55
55
///
56
56
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vaeseq_u8)
57
57
#[ inline]
58
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
59
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
58
+ #[ target_feature( enable = "aes" ) ]
59
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
60
60
#[ cfg_attr( test, assert_instr( aese) ) ]
61
61
pub unsafe fn vaeseq_u8 ( data : uint8x16_t , key : uint8x16_t ) -> uint8x16_t {
62
62
vaeseq_u8_ ( data, key)
@@ -66,8 +66,8 @@ pub unsafe fn vaeseq_u8(data: uint8x16_t, key: uint8x16_t) -> uint8x16_t {
66
66
///
67
67
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vaesdq_u8)
68
68
#[ inline]
69
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
70
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
69
+ #[ target_feature( enable = "aes" ) ]
70
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
71
71
#[ cfg_attr( test, assert_instr( aesd) ) ]
72
72
pub unsafe fn vaesdq_u8 ( data : uint8x16_t , key : uint8x16_t ) -> uint8x16_t {
73
73
vaesdq_u8_ ( data, key)
@@ -77,8 +77,8 @@ pub unsafe fn vaesdq_u8(data: uint8x16_t, key: uint8x16_t) -> uint8x16_t {
77
77
///
78
78
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vaesmcq_u8)
79
79
#[ inline]
80
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
81
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
80
+ #[ target_feature( enable = "aes" ) ]
81
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
82
82
#[ cfg_attr( test, assert_instr( aesmc) ) ]
83
83
pub unsafe fn vaesmcq_u8 ( data : uint8x16_t ) -> uint8x16_t {
84
84
vaesmcq_u8_ ( data)
@@ -88,8 +88,8 @@ pub unsafe fn vaesmcq_u8(data: uint8x16_t) -> uint8x16_t {
88
88
///
89
89
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vaesimcq_u8)
90
90
#[ inline]
91
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
92
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
91
+ #[ target_feature( enable = "aes" ) ]
92
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
93
93
#[ cfg_attr( test, assert_instr( aesimc) ) ]
94
94
pub unsafe fn vaesimcq_u8 ( data : uint8x16_t ) -> uint8x16_t {
95
95
vaesimcq_u8_ ( data)
@@ -99,8 +99,8 @@ pub unsafe fn vaesimcq_u8(data: uint8x16_t) -> uint8x16_t {
99
99
///
100
100
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha1h_u32)
101
101
#[ inline]
102
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
103
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
102
+ #[ target_feature( enable = "sha2" ) ]
103
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
104
104
#[ cfg_attr( test, assert_instr( sha1h) ) ]
105
105
pub unsafe fn vsha1h_u32 ( hash_e : u32 ) -> u32 {
106
106
vsha1h_u32_ ( hash_e)
@@ -110,8 +110,8 @@ pub unsafe fn vsha1h_u32(hash_e: u32) -> u32 {
110
110
///
111
111
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha1cq_u32)
112
112
#[ inline]
113
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
114
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
113
+ #[ target_feature( enable = "sha2" ) ]
114
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
115
115
#[ cfg_attr( test, assert_instr( sha1c) ) ]
116
116
pub unsafe fn vsha1cq_u32 ( hash_abcd : uint32x4_t , hash_e : u32 , wk : uint32x4_t ) -> uint32x4_t {
117
117
vsha1cq_u32_ ( hash_abcd, hash_e, wk)
@@ -121,8 +121,8 @@ pub unsafe fn vsha1cq_u32(hash_abcd: uint32x4_t, hash_e: u32, wk: uint32x4_t) ->
121
121
///
122
122
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha1mq_u32)
123
123
#[ inline]
124
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
125
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
124
+ #[ target_feature( enable = "sha2" ) ]
125
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
126
126
#[ cfg_attr( test, assert_instr( sha1m) ) ]
127
127
pub unsafe fn vsha1mq_u32 ( hash_abcd : uint32x4_t , hash_e : u32 , wk : uint32x4_t ) -> uint32x4_t {
128
128
vsha1mq_u32_ ( hash_abcd, hash_e, wk)
@@ -132,8 +132,8 @@ pub unsafe fn vsha1mq_u32(hash_abcd: uint32x4_t, hash_e: u32, wk: uint32x4_t) ->
132
132
///
133
133
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha1pq_u32)
134
134
#[ inline]
135
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
136
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
135
+ #[ target_feature( enable = "sha2" ) ]
136
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
137
137
#[ cfg_attr( test, assert_instr( sha1p) ) ]
138
138
pub unsafe fn vsha1pq_u32 ( hash_abcd : uint32x4_t , hash_e : u32 , wk : uint32x4_t ) -> uint32x4_t {
139
139
vsha1pq_u32_ ( hash_abcd, hash_e, wk)
@@ -143,8 +143,8 @@ pub unsafe fn vsha1pq_u32(hash_abcd: uint32x4_t, hash_e: u32, wk: uint32x4_t) ->
143
143
///
144
144
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha1su0q_u32)
145
145
#[ inline]
146
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
147
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
146
+ #[ target_feature( enable = "sha2" ) ]
147
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
148
148
#[ cfg_attr( test, assert_instr( sha1su0) ) ]
149
149
pub unsafe fn vsha1su0q_u32 ( w0_3 : uint32x4_t , w4_7 : uint32x4_t , w8_11 : uint32x4_t ) -> uint32x4_t {
150
150
vsha1su0q_u32_ ( w0_3, w4_7, w8_11)
@@ -154,8 +154,8 @@ pub unsafe fn vsha1su0q_u32(w0_3: uint32x4_t, w4_7: uint32x4_t, w8_11: uint32x4_
154
154
///
155
155
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha1su1q_u32)
156
156
#[ inline]
157
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
158
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
157
+ #[ target_feature( enable = "sha2" ) ]
158
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
159
159
#[ cfg_attr( test, assert_instr( sha1su1) ) ]
160
160
pub unsafe fn vsha1su1q_u32 ( tw0_3 : uint32x4_t , w12_15 : uint32x4_t ) -> uint32x4_t {
161
161
vsha1su1q_u32_ ( tw0_3, w12_15)
@@ -165,8 +165,8 @@ pub unsafe fn vsha1su1q_u32(tw0_3: uint32x4_t, w12_15: uint32x4_t) -> uint32x4_t
165
165
///
166
166
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha256hq_u32)
167
167
#[ inline]
168
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
169
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
168
+ #[ target_feature( enable = "sha2" ) ]
169
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
170
170
#[ cfg_attr( test, assert_instr( sha256h) ) ]
171
171
pub unsafe fn vsha256hq_u32 (
172
172
hash_abcd : uint32x4_t ,
@@ -180,8 +180,8 @@ pub unsafe fn vsha256hq_u32(
180
180
///
181
181
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha256h2q_u32)
182
182
#[ inline]
183
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
184
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
183
+ #[ target_feature( enable = "sha2" ) ]
184
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
185
185
#[ cfg_attr( test, assert_instr( sha256h2) ) ]
186
186
pub unsafe fn vsha256h2q_u32 (
187
187
hash_efgh : uint32x4_t ,
@@ -195,8 +195,8 @@ pub unsafe fn vsha256h2q_u32(
195
195
///
196
196
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha256su0q_u32)
197
197
#[ inline]
198
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
199
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
198
+ #[ target_feature( enable = "sha2" ) ]
199
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
200
200
#[ cfg_attr( test, assert_instr( sha256su0) ) ]
201
201
pub unsafe fn vsha256su0q_u32 ( w0_3 : uint32x4_t , w4_7 : uint32x4_t ) -> uint32x4_t {
202
202
vsha256su0q_u32_ ( w0_3, w4_7)
@@ -206,8 +206,8 @@ pub unsafe fn vsha256su0q_u32(w0_3: uint32x4_t, w4_7: uint32x4_t) -> uint32x4_t
206
206
///
207
207
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsha256su1q_u32)
208
208
#[ inline]
209
- #[ cfg_attr ( not ( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
210
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto, v8" ) ) ]
209
+ #[ target_feature( enable = "sha2" ) ]
210
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
211
211
#[ cfg_attr( test, assert_instr( sha256su1) ) ]
212
212
pub unsafe fn vsha256su1q_u32 (
213
213
tw0_3 : uint32x4_t ,
@@ -224,8 +224,7 @@ mod tests {
224
224
use std:: mem;
225
225
use stdarch_test:: simd_test;
226
226
227
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
228
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
227
+ #[ simd_test( enable = "aes" ) ]
229
228
unsafe fn test_vaeseq_u8 ( ) {
230
229
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
231
230
let key = mem:: transmute ( u8x16:: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ) ;
@@ -238,8 +237,7 @@ mod tests {
238
237
) ;
239
238
}
240
239
241
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
242
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
240
+ #[ simd_test( enable = "aes" ) ]
243
241
unsafe fn test_vaesdq_u8 ( ) {
244
242
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
245
243
let key = mem:: transmute ( u8x16:: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ) ;
@@ -250,8 +248,7 @@ mod tests {
250
248
) ;
251
249
}
252
250
253
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
254
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
251
+ #[ simd_test( enable = "aes" ) ]
255
252
unsafe fn test_vaesmcq_u8 ( ) {
256
253
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
257
254
let r: u8x16 = mem:: transmute ( vaesmcq_u8 ( data) ) ;
@@ -261,8 +258,7 @@ mod tests {
261
258
) ;
262
259
}
263
260
264
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
265
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
261
+ #[ simd_test( enable = "aes" ) ]
266
262
unsafe fn test_vaesimcq_u8 ( ) {
267
263
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
268
264
let r: u8x16 = mem:: transmute ( vaesimcq_u8 ( data) ) ;
@@ -272,15 +268,13 @@ mod tests {
272
268
) ;
273
269
}
274
270
275
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
276
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
271
+ #[ simd_test( enable = "sha2" ) ]
277
272
unsafe fn test_vsha1h_u32 ( ) {
278
273
assert_eq ! ( vsha1h_u32( 0x1234 ) , 0x048d ) ;
279
274
assert_eq ! ( vsha1h_u32( 0x5678 ) , 0x159e ) ;
280
275
}
281
276
282
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
283
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
277
+ #[ simd_test( enable = "sha2" ) ]
284
278
unsafe fn test_vsha1su0q_u32 ( ) {
285
279
let r: u32x4 = mem:: transmute ( vsha1su0q_u32 (
286
280
mem:: transmute ( u32x4:: new ( 0x1234_u32 , 0x5678_u32 , 0x9abc_u32 , 0xdef0_u32 ) ) ,
@@ -290,8 +284,7 @@ mod tests {
290
284
assert_eq ! ( r, u32x4:: new( 0x9abc , 0xdef0 , 0x1234 , 0x5678 ) ) ;
291
285
}
292
286
293
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
294
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
287
+ #[ simd_test( enable = "sha2" ) ]
295
288
unsafe fn test_vsha1su1q_u32 ( ) {
296
289
let r: u32x4 = mem:: transmute ( vsha1su1q_u32 (
297
290
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -303,8 +296,7 @@ mod tests {
303
296
) ;
304
297
}
305
298
306
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
307
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
299
+ #[ simd_test( enable = "sha2" ) ]
308
300
unsafe fn test_vsha1cq_u32 ( ) {
309
301
let r: u32x4 = mem:: transmute ( vsha1cq_u32 (
310
302
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -317,8 +309,7 @@ mod tests {
317
309
) ;
318
310
}
319
311
320
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
321
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
312
+ #[ simd_test( enable = "sha2" ) ]
322
313
unsafe fn test_vsha1pq_u32 ( ) {
323
314
let r: u32x4 = mem:: transmute ( vsha1pq_u32 (
324
315
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -331,8 +322,7 @@ mod tests {
331
322
) ;
332
323
}
333
324
334
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
335
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
325
+ #[ simd_test( enable = "sha2" ) ]
336
326
unsafe fn test_vsha1mq_u32 ( ) {
337
327
let r: u32x4 = mem:: transmute ( vsha1mq_u32 (
338
328
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -345,8 +335,7 @@ mod tests {
345
335
) ;
346
336
}
347
337
348
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
349
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
338
+ #[ simd_test( enable = "sha2" ) ]
350
339
unsafe fn test_vsha256hq_u32 ( ) {
351
340
let r: u32x4 = mem:: transmute ( vsha256hq_u32 (
352
341
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -359,8 +348,7 @@ mod tests {
359
348
) ;
360
349
}
361
350
362
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
363
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
351
+ #[ simd_test( enable = "sha2" ) ]
364
352
unsafe fn test_vsha256h2q_u32 ( ) {
365
353
let r: u32x4 = mem:: transmute ( vsha256h2q_u32 (
366
354
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -373,8 +361,7 @@ mod tests {
373
361
) ;
374
362
}
375
363
376
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
377
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
364
+ #[ simd_test( enable = "sha2" ) ]
378
365
unsafe fn test_vsha256su0q_u32 ( ) {
379
366
let r: u32x4 = mem:: transmute ( vsha256su0q_u32 (
380
367
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -386,8 +373,7 @@ mod tests {
386
373
) ;
387
374
}
388
375
389
- #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
390
- #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
376
+ #[ simd_test( enable = "sha2" ) ]
391
377
unsafe fn test_vsha256su1q_u32 ( ) {
392
378
let r: u32x4 = mem:: transmute ( vsha256su1q_u32 (
393
379
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
0 commit comments