Skip to content

Commit d21b5a8

Browse files
gnzlbgalexcrichton
authored andcommitted
[aarch64] refactor AArch64 intrinsics into its own architecture module (#162)
1 parent ab6e166 commit d21b5a8

File tree

6 files changed

+28
-18
lines changed

6 files changed

+28
-18
lines changed

src/aarch64/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//! AArch64 intrinsics.
2+
//!
3+
//! The reference for NEON is [ARM's NEON Intrinsics Reference][arm_ref]. The
4+
//! [ARM's NEON Intrinsics Online Database][arm_dat] is also useful.
5+
//!
6+
//! [arm_ref]:
7+
//! http://infocenter.arm.com/help/topic/com.arm.doc.
8+
//! ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf
9+
//! [arm_dat]: https://developer.arm.com/technologies/neon/intrinsics
10+
11+
mod v8;
12+
pub use self::v8::*;
13+
14+
#[cfg(target_feature = "neon")]
15+
mod neon;
16+
#[cfg(target_feature = "neon")]
17+
pub use self::neon::*;
File renamed without changes.

src/arm/v8.rs renamed to src/aarch64/v8.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
//! [armv8]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.
66
//! ddi0487a.k_10775/index.html
77
8-
pub use super::v7::*;
9-
108
#[cfg(test)]
119
use stdsimd_test::assert_instr;
1210

@@ -59,7 +57,7 @@ pub unsafe fn _cls_u64(x: u64) -> u64 {
5957

6058
#[cfg(test)]
6159
mod tests {
62-
use arm::v8;
60+
use aarch64::v8;
6361

6462
#[test]
6563
fn _rev_u64() {

src/arm/mod.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,13 @@
88
//! ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf
99
//! [arm_dat]: https://developer.arm.com/technologies/neon/intrinsics
1010
11+
mod v6;
1112
pub use self::v6::*;
13+
14+
mod v7;
1215
pub use self::v7::*;
13-
#[cfg(target_arch = "aarch64")]
14-
pub use self::v8::*;
1516

1617
#[cfg(target_feature = "neon")]
17-
pub use self::v7_neon::*;
18-
19-
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
20-
pub use self::v8_neon::*;
21-
22-
mod v6;
23-
mod v7;
18+
mod neon;
2419
#[cfg(target_feature = "neon")]
25-
mod v7_neon;
26-
27-
#[cfg(target_arch = "aarch64")]
28-
mod v8;
29-
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
30-
mod v8_neon;
20+
pub use self::neon::*;
File renamed without changes.

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ pub mod vendor {
144144

145145
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
146146
pub use arm::*;
147+
148+
#[cfg(target_arch = "aarch64")]
149+
pub use aarch64::*;
147150
}
148151

149152
#[macro_use]
@@ -160,3 +163,5 @@ mod x86;
160163

161164
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
162165
mod arm;
166+
#[cfg(target_arch = "aarch64")]
167+
mod aarch64;

0 commit comments

Comments
 (0)