Skip to content

Commit 0e05a1f

Browse files
committed
Add v8only to code generator
This also removes some unnecessary v7 gating.
1 parent 8a682cb commit 0e05a1f

File tree

6 files changed

+92
-400
lines changed

6 files changed

+92
-400
lines changed

crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,32 +1859,6 @@ pub unsafe fn vrndnq_f64(a: float64x2_t) -> float64x2_t {
18591859
vrndnq_f64_(a)
18601860
}
18611861

1862-
/// Floating-point round to integral, to nearest with ties to even
1863-
#[inline]
1864-
#[target_feature(enable = "neon")]
1865-
#[cfg_attr(test, assert_instr(frintn))]
1866-
pub unsafe fn vrndn_f32(a: float32x2_t) -> float32x2_t {
1867-
#[allow(improper_ctypes)]
1868-
extern "C" {
1869-
#[cfg_attr(target_arch = "aarch64", link_name = "llvm.aarch64.neon.frintn.v2f32")]
1870-
fn vrndn_f32_(a: float32x2_t) -> float32x2_t;
1871-
}
1872-
vrndn_f32_(a)
1873-
}
1874-
1875-
/// Floating-point round to integral, to nearest with ties to even
1876-
#[inline]
1877-
#[target_feature(enable = "neon")]
1878-
#[cfg_attr(test, assert_instr(frintn))]
1879-
pub unsafe fn vrndnq_f32(a: float32x4_t) -> float32x4_t {
1880-
#[allow(improper_ctypes)]
1881-
extern "C" {
1882-
#[cfg_attr(target_arch = "aarch64", link_name = "llvm.aarch64.neon.frintn.v4f32")]
1883-
fn vrndnq_f32_(a: float32x4_t) -> float32x4_t;
1884-
}
1885-
vrndnq_f32_(a)
1886-
}
1887-
18881862
#[cfg(test)]
18891863
mod test {
18901864
use super::*;
@@ -3517,20 +3491,4 @@ mod test {
35173491
let r: f64x2 = transmute(vrndnq_f64(transmute(a)));
35183492
assert_eq!(r, e);
35193493
}
3520-
3521-
#[simd_test(enable = "neon")]
3522-
unsafe fn test_vrndn_f32() {
3523-
let a: f32x2 = f32x2::new(-1.5, 2.5);
3524-
let e: f32x2 = f32x2::new(-2.0, 2.0);
3525-
let r: f32x2 = transmute(vrndn_f32(transmute(a)));
3526-
assert_eq!(r, e);
3527-
}
3528-
3529-
#[simd_test(enable = "neon")]
3530-
unsafe fn test_vrndnq_f32() {
3531-
let a: f32x4 = f32x4::new(-1.5, 2.5, -3.5, 4.5);
3532-
let e: f32x4 = f32x4::new(-2.0, 2.0, -4.0, 4.0);
3533-
let r: f32x4 = transmute(vrndnq_f32(transmute(a)));
3534-
assert_eq!(r, e);
3535-
}
35363494
}

crates/core_arch/src/arm/crypto.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ mod tests {
195195
use std::mem;
196196
use stdarch_test::simd_test;
197197

198-
#[simd_test(enable = "crypto")]
198+
#[simd_test(enable = "crypto,v8")]
199199
unsafe fn test_vaeseq_u8() {
200200
let data = mem::transmute(u8x16::new(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8));
201201
let key = mem::transmute(u8x16::new(0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7));
@@ -208,7 +208,7 @@ mod tests {
208208
);
209209
}
210210

211-
#[simd_test(enable = "crypto")]
211+
#[simd_test(enable = "crypto,v8")]
212212
unsafe fn test_vaesdq_u8() {
213213
let data = mem::transmute(u8x16::new(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8));
214214
let key = mem::transmute(u8x16::new(0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7));
@@ -219,7 +219,7 @@ mod tests {
219219
);
220220
}
221221

222-
#[simd_test(enable = "crypto")]
222+
#[simd_test(enable = "crypto,v8")]
223223
unsafe fn test_vaesmcq_u8() {
224224
let data = mem::transmute(u8x16::new(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8));
225225
let r: u8x16 = mem::transmute(vaesmcq_u8(data));
@@ -229,7 +229,7 @@ mod tests {
229229
);
230230
}
231231

232-
#[simd_test(enable = "crypto")]
232+
#[simd_test(enable = "crypto,v8")]
233233
unsafe fn test_vaesimcq_u8() {
234234
let data = mem::transmute(u8x16::new(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8));
235235
let r: u8x16 = mem::transmute(vaesimcq_u8(data));
@@ -239,13 +239,13 @@ mod tests {
239239
);
240240
}
241241

242-
#[simd_test(enable = "crypto")]
242+
#[simd_test(enable = "crypto,v8")]
243243
unsafe fn test_vsha1h_u32() {
244244
assert_eq!(vsha1h_u32(0x1234), 0x048d);
245245
assert_eq!(vsha1h_u32(0x5678), 0x159e);
246246
}
247247

248-
#[simd_test(enable = "crypto")]
248+
#[simd_test(enable = "crypto,v8")]
249249
unsafe fn test_vsha1su0q_u32() {
250250
let r: u32x4 = mem::transmute(vsha1su0q_u32(
251251
mem::transmute(u32x4::new(0x1234_u32, 0x5678_u32, 0x9abc_u32, 0xdef0_u32)),
@@ -255,7 +255,7 @@ mod tests {
255255
assert_eq!(r, u32x4::new(0x9abc, 0xdef0, 0x1234, 0x5678));
256256
}
257257

258-
#[simd_test(enable = "crypto")]
258+
#[simd_test(enable = "crypto,v8")]
259259
unsafe fn test_vsha1su1q_u32() {
260260
let r: u32x4 = mem::transmute(vsha1su1q_u32(
261261
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -267,7 +267,7 @@ mod tests {
267267
);
268268
}
269269

270-
#[simd_test(enable = "crypto")]
270+
#[simd_test(enable = "crypto,v8")]
271271
unsafe fn test_vsha1cq_u32() {
272272
let r: u32x4 = mem::transmute(vsha1cq_u32(
273273
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -280,7 +280,7 @@ mod tests {
280280
);
281281
}
282282

283-
#[simd_test(enable = "crypto")]
283+
#[simd_test(enable = "crypto,v8")]
284284
unsafe fn test_vsha1pq_u32() {
285285
let r: u32x4 = mem::transmute(vsha1pq_u32(
286286
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -293,7 +293,7 @@ mod tests {
293293
);
294294
}
295295

296-
#[simd_test(enable = "crypto")]
296+
#[simd_test(enable = "crypto,v8")]
297297
unsafe fn test_vsha1mq_u32() {
298298
let r: u32x4 = mem::transmute(vsha1mq_u32(
299299
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -306,7 +306,7 @@ mod tests {
306306
);
307307
}
308308

309-
#[simd_test(enable = "crypto")]
309+
#[simd_test(enable = "crypto,v8")]
310310
unsafe fn test_vsha256hq_u32() {
311311
let r: u32x4 = mem::transmute(vsha256hq_u32(
312312
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -319,7 +319,7 @@ mod tests {
319319
);
320320
}
321321

322-
#[simd_test(enable = "crypto")]
322+
#[simd_test(enable = "crypto,v8")]
323323
unsafe fn test_vsha256h2q_u32() {
324324
let r: u32x4 = mem::transmute(vsha256h2q_u32(
325325
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -332,7 +332,7 @@ mod tests {
332332
);
333333
}
334334

335-
#[simd_test(enable = "crypto")]
335+
#[simd_test(enable = "crypto,v8")]
336336
unsafe fn test_vsha256su0q_u32() {
337337
let r: u32x4 = mem::transmute(vsha256su0q_u32(
338338
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),
@@ -344,7 +344,7 @@ mod tests {
344344
);
345345
}
346346

347-
#[simd_test(enable = "crypto")]
347+
#[simd_test(enable = "crypto,v8")]
348348
unsafe fn test_vsha256su1q_u32() {
349349
let r: u32x4 = mem::transmute(vsha256su1q_u32(
350350
mem::transmute(u32x4::new(0x1234, 0x5678, 0x9abc, 0xdef0)),

crates/core_arch/src/arm/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,16 @@ pub use self::armclang::*;
1414
mod v6;
1515
pub use self::v6::*;
1616

17-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
1817
mod v7;
19-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
2018
pub use self::v7::*;
2119

22-
#[cfg(any(target_arch = "aarch64", target_feature = "v7", doc))]
2320
mod neon;
24-
#[cfg(any(target_arch = "aarch64", target_feature = "v7", doc))]
2521
pub use self::neon::*;
2622

27-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
2823
mod crc;
29-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
3024
pub use self::crc::*;
3125

32-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
3326
mod crypto;
34-
#[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
3527
pub use self::crypto::*;
3628

3729
pub use crate::core_arch::acle::*;

0 commit comments

Comments
 (0)