1//! Inline asm for making system calls.
2//!
3//! Compilers should really have intrinsics for making system calls. They're
4//! much like regular calls, with custom calling conventions, and calling
5//! conventions are otherwise the compiler's job. But for now, use inline asm.
6//!
7//! The calling conventions for Linux syscalls are [documented here].
8//!
9//! [documented here]: https://man7.org/linux/man-pages/man2/syscall.2.html
10
11#[cfg_attr(target_arch = "aarch64", path = "aarch64.rs")]
12#[cfg_attr(all(target_arch = "arm", not(thumb_mode)), path = "arm.rs")]
13#[cfg_attr(all(target_arch = "arm", thumb_mode), path = "thumb.rs")]
14#[cfg_attr(target_arch = "mips", path = "mips.rs")]
15#[cfg_attr(target_arch = "mips64", path = "mips64.rs")]
16#[cfg_attr(target_arch = "powerpc64", path = "powerpc64.rs")]
17#[cfg_attr(target_arch = "riscv64", path = "riscv64.rs")]
18#[cfg_attr(target_arch = "x86", path = "x86.rs")]
19#[cfg_attr(target_arch = "x86_64", path = "x86_64.rs")]
20mod target_arch;
21
22pub(in crate::backend) use self::target_arch::*;
23