@@ -51,147 +51,102 @@ extern "C" {
51
51
#[ cfg( test) ]
52
52
use stdarch_test:: assert_instr;
53
53
54
- // Rust compilers without 8a57820bca64a252489790a57cb5ea23db6f9198 need crypto (hence the bootstrap check)
55
- // LLVM builds without b8baa2a9132498ea286dbb0d03f005760ecc6fdb need crypto for arm (hence the target_arch check)
54
+ // TODO: Use AES for ARM when the minimum LLVM version includes b8baa2a9132498ea286dbb0d03f005760ecc6fdb
56
55
57
56
/// AES single round encryption.
58
57
#[ inline]
59
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
60
- #[ cfg_attr(
61
- not( any( bootstrap, target_arch = "arm" ) ) ,
62
- target_feature( enable = "aes" )
63
- ) ]
64
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
58
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
59
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
65
60
#[ cfg_attr( test, assert_instr( aese) ) ]
66
61
pub unsafe fn vaeseq_u8 ( data : uint8x16_t , key : uint8x16_t ) -> uint8x16_t {
67
62
vaeseq_u8_ ( data, key)
68
63
}
69
64
70
65
/// AES single round decryption.
71
66
#[ inline]
72
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
73
- #[ cfg_attr(
74
- not( any( bootstrap, target_arch = "arm" ) ) ,
75
- target_feature( enable = "aes" )
76
- ) ]
77
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
67
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
68
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
78
69
#[ cfg_attr( test, assert_instr( aesd) ) ]
79
70
pub unsafe fn vaesdq_u8 ( data : uint8x16_t , key : uint8x16_t ) -> uint8x16_t {
80
71
vaesdq_u8_ ( data, key)
81
72
}
82
73
83
74
/// AES mix columns.
84
75
#[ inline]
85
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
86
- #[ cfg_attr(
87
- not( any( bootstrap, target_arch = "arm" ) ) ,
88
- target_feature( enable = "aes" )
89
- ) ]
90
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
76
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
77
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
91
78
#[ cfg_attr( test, assert_instr( aesmc) ) ]
92
79
pub unsafe fn vaesmcq_u8 ( data : uint8x16_t ) -> uint8x16_t {
93
80
vaesmcq_u8_ ( data)
94
81
}
95
82
96
83
/// AES inverse mix columns.
97
84
#[ inline]
98
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
99
- #[ cfg_attr(
100
- not( any( bootstrap, target_arch = "arm" ) ) ,
101
- target_feature( enable = "aes" )
102
- ) ]
103
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
85
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "aes" ) ) ]
86
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
104
87
#[ cfg_attr( test, assert_instr( aesimc) ) ]
105
88
pub unsafe fn vaesimcq_u8 ( data : uint8x16_t ) -> uint8x16_t {
106
89
vaesimcq_u8_ ( data)
107
90
}
108
91
109
92
/// SHA1 fixed rotate.
110
93
#[ inline]
111
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
112
- #[ cfg_attr(
113
- not( any( bootstrap, target_arch = "arm" ) ) ,
114
- target_feature( enable = "sha2" )
115
- ) ]
116
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
94
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
95
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
117
96
#[ cfg_attr( test, assert_instr( sha1h) ) ]
118
97
pub unsafe fn vsha1h_u32 ( hash_e : u32 ) -> u32 {
119
98
vsha1h_u32_ ( hash_e)
120
99
}
121
100
122
101
/// SHA1 hash update accelerator, choose.
123
102
#[ inline]
124
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
125
- #[ cfg_attr(
126
- not( any( bootstrap, target_arch = "arm" ) ) ,
127
- target_feature( enable = "sha2" )
128
- ) ]
129
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
103
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
104
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
130
105
#[ cfg_attr( test, assert_instr( sha1c) ) ]
131
106
pub unsafe fn vsha1cq_u32 ( hash_abcd : uint32x4_t , hash_e : u32 , wk : uint32x4_t ) -> uint32x4_t {
132
107
vsha1cq_u32_ ( hash_abcd, hash_e, wk)
133
108
}
134
109
135
110
/// SHA1 hash update accelerator, majority.
136
111
#[ inline]
137
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
138
- #[ cfg_attr(
139
- not( any( bootstrap, target_arch = "arm" ) ) ,
140
- target_feature( enable = "sha2" )
141
- ) ]
142
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
112
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
113
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
143
114
#[ cfg_attr( test, assert_instr( sha1m) ) ]
144
115
pub unsafe fn vsha1mq_u32 ( hash_abcd : uint32x4_t , hash_e : u32 , wk : uint32x4_t ) -> uint32x4_t {
145
116
vsha1mq_u32_ ( hash_abcd, hash_e, wk)
146
117
}
147
118
148
119
/// SHA1 hash update accelerator, parity.
149
120
#[ inline]
150
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
151
- #[ cfg_attr(
152
- not( any( bootstrap, target_arch = "arm" ) ) ,
153
- target_feature( enable = "sha2" )
154
- ) ]
155
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
121
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
122
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
156
123
#[ cfg_attr( test, assert_instr( sha1p) ) ]
157
124
pub unsafe fn vsha1pq_u32 ( hash_abcd : uint32x4_t , hash_e : u32 , wk : uint32x4_t ) -> uint32x4_t {
158
125
vsha1pq_u32_ ( hash_abcd, hash_e, wk)
159
126
}
160
127
161
128
/// SHA1 schedule update accelerator, first part.
162
129
#[ inline]
163
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
164
- #[ cfg_attr(
165
- not( any( bootstrap, target_arch = "arm" ) ) ,
166
- target_feature( enable = "sha2" )
167
- ) ]
168
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
130
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
131
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
169
132
#[ cfg_attr( test, assert_instr( sha1su0) ) ]
170
133
pub unsafe fn vsha1su0q_u32 ( w0_3 : uint32x4_t , w4_7 : uint32x4_t , w8_11 : uint32x4_t ) -> uint32x4_t {
171
134
vsha1su0q_u32_ ( w0_3, w4_7, w8_11)
172
135
}
173
136
174
137
/// SHA1 schedule update accelerator, second part.
175
138
#[ inline]
176
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
177
- #[ cfg_attr(
178
- not( any( bootstrap, target_arch = "arm" ) ) ,
179
- target_feature( enable = "sha2" )
180
- ) ]
181
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
139
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
140
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
182
141
#[ cfg_attr( test, assert_instr( sha1su1) ) ]
183
142
pub unsafe fn vsha1su1q_u32 ( tw0_3 : uint32x4_t , w12_15 : uint32x4_t ) -> uint32x4_t {
184
143
vsha1su1q_u32_ ( tw0_3, w12_15)
185
144
}
186
145
187
146
/// SHA256 hash update accelerator.
188
147
#[ inline]
189
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
190
- #[ cfg_attr(
191
- not( any( bootstrap, target_arch = "arm" ) ) ,
192
- target_feature( enable = "sha2" )
193
- ) ]
194
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
148
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
149
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
195
150
#[ cfg_attr( test, assert_instr( sha256h) ) ]
196
151
pub unsafe fn vsha256hq_u32 (
197
152
hash_abcd : uint32x4_t ,
@@ -203,12 +158,8 @@ pub unsafe fn vsha256hq_u32(
203
158
204
159
/// SHA256 hash update accelerator, upper part.
205
160
#[ inline]
206
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
207
- #[ cfg_attr(
208
- not( any( bootstrap, target_arch = "arm" ) ) ,
209
- target_feature( enable = "sha2" )
210
- ) ]
211
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
161
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
162
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
212
163
#[ cfg_attr( test, assert_instr( sha256h2) ) ]
213
164
pub unsafe fn vsha256h2q_u32 (
214
165
hash_efgh : uint32x4_t ,
@@ -220,25 +171,17 @@ pub unsafe fn vsha256h2q_u32(
220
171
221
172
/// SHA256 schedule update accelerator, first part.
222
173
#[ inline]
223
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
224
- #[ cfg_attr(
225
- not( any( bootstrap, target_arch = "arm" ) ) ,
226
- target_feature( enable = "sha2" )
227
- ) ]
228
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
174
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
175
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
229
176
#[ cfg_attr( test, assert_instr( sha256su0) ) ]
230
177
pub unsafe fn vsha256su0q_u32 ( w0_3 : uint32x4_t , w4_7 : uint32x4_t ) -> uint32x4_t {
231
178
vsha256su0q_u32_ ( w0_3, w4_7)
232
179
}
233
180
234
181
/// SHA256 schedule update accelerator, second part.
235
182
#[ inline]
236
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , target_feature( enable = "crypto" ) ) ]
237
- #[ cfg_attr(
238
- not( any( bootstrap, target_arch = "arm" ) ) ,
239
- target_feature( enable = "sha2" )
240
- ) ]
241
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v8" ) ) ]
183
+ #[ cfg_attr( not( target_arch = "arm" ) , target_feature( enable = "sha2" ) ) ]
184
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "crypto,v8" ) ) ]
242
185
#[ cfg_attr( test, assert_instr( sha256su1) ) ]
243
186
pub unsafe fn vsha256su1q_u32 (
244
187
tw0_3 : uint32x4_t ,
@@ -255,11 +198,8 @@ mod tests {
255
198
use std:: mem;
256
199
use stdarch_test:: simd_test;
257
200
258
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
259
- #[ cfg_attr(
260
- all( not( bootstrap) , target_arch = "aarch64" ) ,
261
- simd_test( enable = "aes" )
262
- ) ]
201
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
202
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
263
203
unsafe fn test_vaeseq_u8 ( ) {
264
204
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
265
205
let key = mem:: transmute ( u8x16:: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ) ;
@@ -272,11 +212,8 @@ mod tests {
272
212
) ;
273
213
}
274
214
275
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
276
- #[ cfg_attr(
277
- all( not( bootstrap) , target_arch = "aarch64" ) ,
278
- simd_test( enable = "aes" )
279
- ) ]
215
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
216
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
280
217
unsafe fn test_vaesdq_u8 ( ) {
281
218
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
282
219
let key = mem:: transmute ( u8x16:: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ) ;
@@ -287,11 +224,8 @@ mod tests {
287
224
) ;
288
225
}
289
226
290
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
291
- #[ cfg_attr(
292
- all( not( bootstrap) , target_arch = "aarch64" ) ,
293
- simd_test( enable = "aes" )
294
- ) ]
227
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
228
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
295
229
unsafe fn test_vaesmcq_u8 ( ) {
296
230
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
297
231
let r: u8x16 = mem:: transmute ( vaesmcq_u8 ( data) ) ;
@@ -301,11 +235,8 @@ mod tests {
301
235
) ;
302
236
}
303
237
304
- #[ cfg_attr( any( bootstrap, target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
305
- #[ cfg_attr(
306
- all( not( bootstrap) , target_arch = "aarch64" ) ,
307
- simd_test( enable = "aes" )
308
- ) ]
238
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
239
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "aes" ) ) ]
309
240
unsafe fn test_vaesimcq_u8 ( ) {
310
241
let data = mem:: transmute ( u8x16:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ) ;
311
242
let r: u8x16 = mem:: transmute ( vaesimcq_u8 ( data) ) ;
@@ -315,15 +246,15 @@ mod tests {
315
246
) ;
316
247
}
317
248
318
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
319
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
249
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
250
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
320
251
unsafe fn test_vsha1h_u32 ( ) {
321
252
assert_eq ! ( vsha1h_u32( 0x1234 ) , 0x048d ) ;
322
253
assert_eq ! ( vsha1h_u32( 0x5678 ) , 0x159e ) ;
323
254
}
324
255
325
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
326
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
256
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
257
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
327
258
unsafe fn test_vsha1su0q_u32 ( ) {
328
259
let r: u32x4 = mem:: transmute ( vsha1su0q_u32 (
329
260
mem:: transmute ( u32x4:: new ( 0x1234_u32 , 0x5678_u32 , 0x9abc_u32 , 0xdef0_u32 ) ) ,
@@ -333,8 +264,8 @@ mod tests {
333
264
assert_eq ! ( r, u32x4:: new( 0x9abc , 0xdef0 , 0x1234 , 0x5678 ) ) ;
334
265
}
335
266
336
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
337
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
267
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
268
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
338
269
unsafe fn test_vsha1su1q_u32 ( ) {
339
270
let r: u32x4 = mem:: transmute ( vsha1su1q_u32 (
340
271
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -346,8 +277,8 @@ mod tests {
346
277
) ;
347
278
}
348
279
349
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
350
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
280
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
281
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
351
282
unsafe fn test_vsha1cq_u32 ( ) {
352
283
let r: u32x4 = mem:: transmute ( vsha1cq_u32 (
353
284
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -360,8 +291,8 @@ mod tests {
360
291
) ;
361
292
}
362
293
363
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
364
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
294
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
295
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
365
296
unsafe fn test_vsha1pq_u32 ( ) {
366
297
let r: u32x4 = mem:: transmute ( vsha1pq_u32 (
367
298
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -374,8 +305,8 @@ mod tests {
374
305
) ;
375
306
}
376
307
377
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
378
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
308
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
309
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
379
310
unsafe fn test_vsha1mq_u32 ( ) {
380
311
let r: u32x4 = mem:: transmute ( vsha1mq_u32 (
381
312
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -388,8 +319,8 @@ mod tests {
388
319
) ;
389
320
}
390
321
391
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
392
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
322
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
323
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
393
324
unsafe fn test_vsha256hq_u32 ( ) {
394
325
let r: u32x4 = mem:: transmute ( vsha256hq_u32 (
395
326
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -402,8 +333,8 @@ mod tests {
402
333
) ;
403
334
}
404
335
405
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
406
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
336
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
337
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
407
338
unsafe fn test_vsha256h2q_u32 ( ) {
408
339
let r: u32x4 = mem:: transmute ( vsha256h2q_u32 (
409
340
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -416,8 +347,8 @@ mod tests {
416
347
) ;
417
348
}
418
349
419
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
420
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
350
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
351
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
421
352
unsafe fn test_vsha256su0q_u32 ( ) {
422
353
let r: u32x4 = mem:: transmute ( vsha256su0q_u32 (
423
354
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
@@ -429,8 +360,8 @@ mod tests {
429
360
) ;
430
361
}
431
362
432
- #[ cfg_attr( any ( bootstrap , target_arch = "arm" ) , simd_test( enable = "crypto" ) ) ]
433
- #[ cfg_attr( not( any ( bootstrap , target_arch = "arm" ) ) , simd_test( enable = "sha2" ) ) ]
363
+ #[ cfg_attr( target_arch = "arm" , simd_test( enable = "crypto" ) ) ]
364
+ #[ cfg_attr( not( target_arch = "arm" ) , simd_test( enable = "sha2" ) ) ]
434
365
unsafe fn test_vsha256su1q_u32 ( ) {
435
366
let r: u32x4 = mem:: transmute ( vsha256su1q_u32 (
436
367
mem:: transmute ( u32x4:: new ( 0x1234 , 0x5678 , 0x9abc , 0xdef0 ) ) ,
0 commit comments