Skip to main content

ax_cpu/
lib.rs

1#![cfg_attr(not(test), no_std)]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3#![feature(extern_item_impls)]
4#![deny(missing_docs)]
5#![doc = include_str!("../README.md")]
6
7#[macro_use]
8extern crate log;
9
10#[macro_use]
11extern crate ax_memory_addr;
12
13#[macro_use]
14pub mod trap;
15
16#[cfg(feature = "exception-table")]
17mod exception_table;
18#[cfg(feature = "uspace")]
19mod uspace_common;
20
21cfg_if::cfg_if! {
22    if #[cfg(target_arch = "x86_64")] {
23        mod x86_64;
24        pub use self::x86_64::*;
25    } else if #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] {
26        mod riscv;
27        pub use self::riscv::*;
28    } else if #[cfg(target_arch = "aarch64")]{
29        mod aarch64;
30        pub use self::aarch64::*;
31    } else if #[cfg(any(target_arch = "loongarch64"))] {
32        mod loongarch64;
33        pub use self::loongarch64::*;
34    }
35}