Skip to content

Commit

Permalink
[aarch64] refactor AArch64 intrinsics into its own architecture module (
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg authored and alexcrichton committed Oct 29, 2017
1 parent ab6e166 commit d21b5a8
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 18 deletions.
17 changes: 17 additions & 0 deletions src/aarch64/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//! AArch64 intrinsics.
//!
//! The reference for NEON is [ARM's NEON Intrinsics Reference][arm_ref]. The
//! [ARM's NEON Intrinsics Online Database][arm_dat] is also useful.
//!
//! [arm_ref]:
//! http://infocenter.arm.com/help/topic/com.arm.doc.
//! ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf
//! [arm_dat]: https://developer.arm.com/technologies/neon/intrinsics
mod v8;
pub use self::v8::*;

#[cfg(target_feature = "neon")]
mod neon;
#[cfg(target_feature = "neon")]
pub use self::neon::*;
File renamed without changes.
4 changes: 1 addition & 3 deletions src/arm/v8.rs → src/aarch64/v8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
//! [armv8]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.
//! ddi0487a.k_10775/index.html
pub use super::v7::*;

#[cfg(test)]
use stdsimd_test::assert_instr;

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

#[cfg(test)]
mod tests {
use arm::v8;
use aarch64::v8;

#[test]
fn _rev_u64() {
Expand Down
20 changes: 5 additions & 15 deletions src/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,13 @@
//! ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf
//! [arm_dat]: https://developer.arm.com/technologies/neon/intrinsics
mod v6;
pub use self::v6::*;

mod v7;
pub use self::v7::*;
#[cfg(target_arch = "aarch64")]
pub use self::v8::*;

#[cfg(target_feature = "neon")]
pub use self::v7_neon::*;

#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
pub use self::v8_neon::*;

mod v6;
mod v7;
mod neon;
#[cfg(target_feature = "neon")]
mod v7_neon;

#[cfg(target_arch = "aarch64")]
mod v8;
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
mod v8_neon;
pub use self::neon::*;
File renamed without changes.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ pub mod vendor {

#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
pub use arm::*;

#[cfg(target_arch = "aarch64")]
pub use aarch64::*;
}

#[macro_use]
Expand All @@ -160,3 +163,5 @@ mod x86;

#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
mod arm;
#[cfg(target_arch = "aarch64")]
mod aarch64;

0 comments on commit d21b5a8

Please sign in to comment.