summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs')
-rw-r--r--vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs b/vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs
new file mode 100644
index 000000000..ce1352751
--- /dev/null
+++ b/vendor/rustix/src/imp/linux_raw/arch/outline/mod.rs
@@ -0,0 +1,33 @@
+//! Declare functions defined in out-of-line ("outline") asm files.
+//!
+//! Kernel calling conventions differ from userspace calling conventions,
+//! so we also define inline function wrappers which reorder the arguments
+//! so that they match with the kernel convention as closely as possible,
+//! to minimize the amount of out-of-line code we need.
+
+#[cfg(target_arch = "x86")]
+mod x86;
+// For these architectures, pass the `nr` argument last.
+#[cfg(any(
+ target_arch = "arm",
+ target_arch = "aarch64",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "powerpc64",
+ target_arch = "riscv64",
+ target_arch = "x86_64",
+))]
+mod nr_last;
+
+#[cfg(any(
+ target_arch = "arm",
+ target_arch = "aarch64",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "powerpc64",
+ target_arch = "riscv64",
+ target_arch = "x86_64",
+))]
+pub(in crate::imp) use nr_last::*;
+#[cfg(target_arch = "x86")]
+pub(in crate::imp) use x86::*;