|
| 1 | +#![allow(unused)] |
1 | 2 | use crate::simd::*;
|
2 | 3 |
|
3 |
| -#[cfg(all(target_arch = "arm", target_feature = "v7"))] |
| 4 | +#[cfg(target_arch = "arm")] |
4 | 5 | use core::arch::arm::*;
|
5 | 6 |
|
6 | 7 | #[cfg(target_arch = "aarch64")]
|
7 | 8 | use core::arch::aarch64::*;
|
8 | 9 |
|
9 |
| -from_transmute! { unsafe f32x2 => float32x2_t } |
10 |
| -from_transmute! { unsafe f32x4 => float32x4_t } |
11 |
| - |
12 |
| -from_transmute! { unsafe u8x8 => uint8x8_t } |
13 |
| -from_transmute! { unsafe u8x16 => uint8x16_t } |
14 |
| -from_transmute! { unsafe i8x8 => int8x8_t } |
15 |
| -from_transmute! { unsafe i8x16 => int8x16_t } |
16 |
| -from_transmute! { unsafe u8x8 => poly8x8_t } |
17 |
| -from_transmute! { unsafe u8x16 => poly8x16_t } |
18 |
| - |
19 |
| -from_transmute! { unsafe u16x4 => uint16x4_t } |
20 |
| -from_transmute! { unsafe u16x8 => uint16x8_t } |
21 |
| -from_transmute! { unsafe i16x4 => int16x4_t } |
22 |
| -from_transmute! { unsafe i16x8 => int16x8_t } |
23 |
| -from_transmute! { unsafe u16x4 => poly16x4_t } |
24 |
| -from_transmute! { unsafe u16x8 => poly16x8_t } |
25 |
| - |
26 |
| -from_transmute! { unsafe u32x2 => uint32x2_t } |
27 |
| -from_transmute! { unsafe u32x4 => uint32x4_t } |
28 |
| -from_transmute! { unsafe i32x2 => int32x2_t } |
29 |
| -from_transmute! { unsafe i32x4 => int32x4_t } |
30 |
| - |
31 |
| -from_transmute! { unsafe Simd<u64, 1> => uint64x1_t } |
32 |
| -from_transmute! { unsafe u64x2 => uint64x2_t } |
33 |
| -from_transmute! { unsafe Simd<i64, 1> => int64x1_t } |
34 |
| -from_transmute! { unsafe i64x2 => int64x2_t } |
35 |
| -from_transmute! { unsafe Simd<u64, 1> => poly64x1_t } |
36 |
| -from_transmute! { unsafe u64x2 => poly64x2_t } |
37 |
| - |
38 |
| -#[cfg(all(target_arch = "arm", target_feature = "v7"))] |
39 |
| -mod arm { |
| 10 | +#[cfg(any( |
| 11 | + target_arch = "aarch64", |
| 12 | + all(target_arch = "arm", target_feature = "v7"), |
| 13 | +))] |
| 14 | +mod neon { |
| 15 | + use super::*; |
| 16 | + |
| 17 | + from_transmute! { unsafe f32x2 => float32x2_t } |
| 18 | + from_transmute! { unsafe f32x4 => float32x4_t } |
| 19 | + |
| 20 | + from_transmute! { unsafe u8x8 => uint8x8_t } |
| 21 | + from_transmute! { unsafe u8x16 => uint8x16_t } |
| 22 | + from_transmute! { unsafe i8x8 => int8x8_t } |
| 23 | + from_transmute! { unsafe i8x16 => int8x16_t } |
| 24 | + from_transmute! { unsafe u8x8 => poly8x8_t } |
| 25 | + from_transmute! { unsafe u8x16 => poly8x16_t } |
| 26 | + |
| 27 | + from_transmute! { unsafe u16x4 => uint16x4_t } |
| 28 | + from_transmute! { unsafe u16x8 => uint16x8_t } |
| 29 | + from_transmute! { unsafe i16x4 => int16x4_t } |
| 30 | + from_transmute! { unsafe i16x8 => int16x8_t } |
| 31 | + from_transmute! { unsafe u16x4 => poly16x4_t } |
| 32 | + from_transmute! { unsafe u16x8 => poly16x8_t } |
| 33 | + |
| 34 | + from_transmute! { unsafe u32x2 => uint32x2_t } |
| 35 | + from_transmute! { unsafe u32x4 => uint32x4_t } |
| 36 | + from_transmute! { unsafe i32x2 => int32x2_t } |
| 37 | + from_transmute! { unsafe i32x4 => int32x4_t } |
| 38 | + |
| 39 | + from_transmute! { unsafe Simd<u64, 1> => uint64x1_t } |
| 40 | + from_transmute! { unsafe u64x2 => uint64x2_t } |
| 41 | + from_transmute! { unsafe Simd<i64, 1> => int64x1_t } |
| 42 | + from_transmute! { unsafe i64x2 => int64x2_t } |
| 43 | + from_transmute! { unsafe Simd<u64, 1> => poly64x1_t } |
| 44 | + from_transmute! { unsafe u64x2 => poly64x2_t } |
| 45 | +} |
| 46 | + |
| 47 | +#[cfg(any( |
| 48 | + all(target_feature = "v5te", not(target_feature = "mclass")), |
| 49 | + all(target_feature = "mclass", target_feature = "dsp"), |
| 50 | +))] |
| 51 | +mod dsp { |
40 | 52 | use super::*;
|
41 |
| - from_transmute! { unsafe Simd<u8, 4> => uint8x4_t } |
42 |
| - from_transmute! { unsafe Simd<i8, 4> => int8x4_t } |
43 | 53 |
|
44 | 54 | from_transmute! { unsafe Simd<u16, 2> => uint16x2_t }
|
45 | 55 | from_transmute! { unsafe Simd<i16, 2> => int16x2_t }
|
46 | 56 | }
|
47 | 57 |
|
| 58 | +#[cfg(any( |
| 59 | + all(target_feature = "v6", not(target_feature = "mclass")), |
| 60 | + all(target_feature = "mclass", target_feature = "dsp"), |
| 61 | +))] |
| 62 | +mod simd32 { |
| 63 | + use super::*; |
| 64 | + |
| 65 | + from_transmute! { unsafe Simd<u8, 4> => uint8x4_t } |
| 66 | + from_transmute! { unsafe Simd<i8, 4> => int8x4_t } |
| 67 | +} |
| 68 | + |
48 | 69 | #[cfg(target_arch = "aarch64")]
|
49 | 70 | mod aarch64 {
|
| 71 | + use super::neon::*; |
50 | 72 | use super::*;
|
| 73 | + |
51 | 74 | from_transmute! { unsafe Simd<f64, 1> => float64x1_t }
|
52 | 75 | from_transmute! { unsafe f64x2 => float64x2_t }
|
53 | 76 | }
|
0 commit comments