summaryrefslogtreecommitdiffstats
path: root/vendor/redox_syscall
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
commit2ff14448863ac1a1dd9533461708e29aae170c2d (patch)
tree85b9fea2bbfe3f06473cfa381eed11f273b57c5c /vendor/redox_syscall
parentAdding debian version 1.64.0+dfsg1-1. (diff)
downloadrustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz
rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/redox_syscall')
-rw-r--r--vendor/redox_syscall/.cargo-checksum.json2
-rw-r--r--vendor/redox_syscall/Cargo.toml2
-rw-r--r--vendor/redox_syscall/src/arch/x86.rs105
-rw-r--r--vendor/redox_syscall/src/io/mod.rs4
-rw-r--r--vendor/redox_syscall/src/lib.rs2
5 files changed, 110 insertions, 5 deletions
diff --git a/vendor/redox_syscall/.cargo-checksum.json b/vendor/redox_syscall/.cargo-checksum.json
index 223c03b3c..9c62b6521 100644
--- a/vendor/redox_syscall/.cargo-checksum.json
+++ b/vendor/redox_syscall/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"69f08bb56c6fc199b61cbe959b6e9f93df554f5d4e87d5e64551116cedf15067","LICENSE":"efcfee7981ff72431fffb06925cad00a23dce079ed4354f61030ad5abdb78829","README.md":"9161f18ba7f69b4ca51e844aee8ffb8237513a468c5c3b1f3a5f989044f895ac","src/arch/aarch64.rs":"61b5811b47a29257c3b5e15e7d9d15e7143bad99fbe29f0cb17ead9cbc17186f","src/arch/nonredox.rs":"9eac0fa2cf9eae07f0cafa2dd63c4a820791897a3de9ad1a933ab4f53458dbd8","src/arch/riscv64.rs":"20bf9a8db779059773b113643d0cb3737fbb5d57f45ee39b8ae9d3396b6ef636","src/arch/x86_64.rs":"f40bad2680fd5e7f100ee1afaa805f33dd0e12ec8786b956d47204f66771801d","src/call.rs":"0d3e32e33ecdf75963e5d244f9e86e94047d155c5de5fa3c0085faf18ed97b33","src/daemon.rs":"11cd633298fe2eb89906a4d8c12ab34e4ee355f759e1216cee536f24c7c679b2","src/data.rs":"bd4545d4c2fcc59ff26ae52ad7f773a697d5ccf639a2ffc253cece6b31e94d51","src/error.rs":"ef20f3817f997a1aeb7114628407f19cb8bc13c555d4e093918f38a5d098f798","src/flag.rs":"f07d6a7aa6766d30d0a303c7b3bda5bb4c473dd9dd51687cf8e0631b1bf3ec9d","src/io/dma.rs":"fbc46e924d5913f5a3fb723751d7a9dd1b079ccf058500fde4957aaf9fa7dd1c","src/io/io.rs":"e1d454ff47efac70fdaa709251a5a9c1c5637f931994ba3bf6a38c6db9145822","src/io/mmio.rs":"12d0fb4d4f45097bf2c14f73cb1ce21325eae193b537e9f18af73ed5281b5e63","src/io/mod.rs":"62438ff452c266692ea8fcfc4b6aad73184a1f67276327a4d5f71c4fbbaeab55","src/io/pio.rs":"9ee6f2229b700d1c45b4c8c6242bd99fe69634e16dcd5843d9e8d1c958047406","src/lib.rs":"d30eec6d2480c6dbc74221a10cc662a649bd24dc3ac640bbcdab9e416aab727f","src/number.rs":"fe7b47b06566aa1f8a75f50b685801259df03a1a5c85b91817b4552583cd7862","src/scheme/generate.sh":"dde4e30f4e0223fb1a24ed486a6c36e624c854dbf890862cb6866f4fa3c7a6eb","src/scheme/mod.rs":"cb622405deb0aef4ab04499ea1adfd338c9c5dd9c31a1fe9989786dbf69b49d8","src/scheme/scheme.rs":"30263996f0b4930edd76dace5f5750e48229066bc888bc13365846688d0a870b","src/scheme/scheme_block.rs":"b7a761e4349eb87d106c8af14894e8c4272769b9eb235cd500b075ac1f823683","src/scheme/scheme_block_mut.rs":"4a4fc03bce14757b64006b9bc3fa2779e95382b2d99579870146ee0c3be3f46c","src/scheme/scheme_mut.rs":"e6f0671b77f1bf5263e497c69dec553352249b75d52af62ac19477ba5127f803","src/scheme/seek.rs":"94e044de47b0f00eb0c2aea3fb21001ac2b9aa1e4b20d73fd54163fe92fa63f7","src/tests.rs":"416a428ba6a9c5f0d8f4c3dbe91d9aa940a04472ec9a2d17bc5a66c455b4416f"},"package":"62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"} \ No newline at end of file
+{"files":{"Cargo.toml":"0e92420005ca47c7854d02e9b637262cc13f800d48614aeef69be2f1119fc19b","LICENSE":"efcfee7981ff72431fffb06925cad00a23dce079ed4354f61030ad5abdb78829","README.md":"9161f18ba7f69b4ca51e844aee8ffb8237513a468c5c3b1f3a5f989044f895ac","src/arch/aarch64.rs":"61b5811b47a29257c3b5e15e7d9d15e7143bad99fbe29f0cb17ead9cbc17186f","src/arch/nonredox.rs":"9eac0fa2cf9eae07f0cafa2dd63c4a820791897a3de9ad1a933ab4f53458dbd8","src/arch/riscv64.rs":"20bf9a8db779059773b113643d0cb3737fbb5d57f45ee39b8ae9d3396b6ef636","src/arch/x86.rs":"7802186155c06638235e49e11f4c046b68f1d8145b2c849adec84497eb3cb70f","src/arch/x86_64.rs":"f40bad2680fd5e7f100ee1afaa805f33dd0e12ec8786b956d47204f66771801d","src/call.rs":"0d3e32e33ecdf75963e5d244f9e86e94047d155c5de5fa3c0085faf18ed97b33","src/daemon.rs":"11cd633298fe2eb89906a4d8c12ab34e4ee355f759e1216cee536f24c7c679b2","src/data.rs":"bd4545d4c2fcc59ff26ae52ad7f773a697d5ccf639a2ffc253cece6b31e94d51","src/error.rs":"ef20f3817f997a1aeb7114628407f19cb8bc13c555d4e093918f38a5d098f798","src/flag.rs":"f07d6a7aa6766d30d0a303c7b3bda5bb4c473dd9dd51687cf8e0631b1bf3ec9d","src/io/dma.rs":"fbc46e924d5913f5a3fb723751d7a9dd1b079ccf058500fde4957aaf9fa7dd1c","src/io/io.rs":"e1d454ff47efac70fdaa709251a5a9c1c5637f931994ba3bf6a38c6db9145822","src/io/mmio.rs":"12d0fb4d4f45097bf2c14f73cb1ce21325eae193b537e9f18af73ed5281b5e63","src/io/mod.rs":"79c2fce4fd6d75f3b9169df64b7a605feff31fab2e5ed81984ae085a1d07c0c4","src/io/pio.rs":"9ee6f2229b700d1c45b4c8c6242bd99fe69634e16dcd5843d9e8d1c958047406","src/lib.rs":"0bc9c8ca513dc6f0d9ef587bc53587114c31c1217d6b620399fc0fcbc54bf658","src/number.rs":"fe7b47b06566aa1f8a75f50b685801259df03a1a5c85b91817b4552583cd7862","src/scheme/generate.sh":"dde4e30f4e0223fb1a24ed486a6c36e624c854dbf890862cb6866f4fa3c7a6eb","src/scheme/mod.rs":"cb622405deb0aef4ab04499ea1adfd338c9c5dd9c31a1fe9989786dbf69b49d8","src/scheme/scheme.rs":"30263996f0b4930edd76dace5f5750e48229066bc888bc13365846688d0a870b","src/scheme/scheme_block.rs":"b7a761e4349eb87d106c8af14894e8c4272769b9eb235cd500b075ac1f823683","src/scheme/scheme_block_mut.rs":"4a4fc03bce14757b64006b9bc3fa2779e95382b2d99579870146ee0c3be3f46c","src/scheme/scheme_mut.rs":"e6f0671b77f1bf5263e497c69dec553352249b75d52af62ac19477ba5127f803","src/scheme/seek.rs":"94e044de47b0f00eb0c2aea3fb21001ac2b9aa1e4b20d73fd54163fe92fa63f7","src/tests.rs":"416a428ba6a9c5f0d8f4c3dbe91d9aa940a04472ec9a2d17bc5a66c455b4416f"},"package":"fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"} \ No newline at end of file
diff --git a/vendor/redox_syscall/Cargo.toml b/vendor/redox_syscall/Cargo.toml
index c6a9e03a4..74e23e8c9 100644
--- a/vendor/redox_syscall/Cargo.toml
+++ b/vendor/redox_syscall/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "redox_syscall"
-version = "0.2.13"
+version = "0.2.16"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
description = "A Rust library to access raw Redox system calls"
documentation = "https://docs.rs/redox_syscall"
diff --git a/vendor/redox_syscall/src/arch/x86.rs b/vendor/redox_syscall/src/arch/x86.rs
new file mode 100644
index 000000000..2f9301e0e
--- /dev/null
+++ b/vendor/redox_syscall/src/arch/x86.rs
@@ -0,0 +1,105 @@
+use core::{mem, slice};
+use core::arch::asm;
+use core::ops::{Deref, DerefMut};
+
+use super::error::{Error, Result};
+
+macro_rules! syscall {
+ ($($name:ident($a:ident, $($b:ident, $($c:ident, $($d:ident, $($e:ident, $($f:ident, )?)?)?)?)?);)+) => {
+ $(
+ pub unsafe fn $name(mut $a: usize, $($b: usize, $($c: usize, $($d: usize, $($e: usize, $($f: usize)?)?)?)?)?) -> Result<usize> {
+ asm!(
+ "int 0x80",
+ inout("eax") $a,
+ $(
+ in("ebx") $b,
+ $(
+ in("ecx") $c,
+ $(
+ in("edx") $d,
+ $(
+ in("esi") $e,
+ $(
+ in("edi") $f,
+ )?
+ )?
+ )?
+ )?
+ )?
+ options(nostack),
+ );
+
+ Error::demux($a)
+ }
+ )+
+ };
+}
+
+syscall! {
+ syscall0(a,);
+ syscall1(a, b,);
+ syscall2(a, b, c,);
+ syscall3(a, b, c, d,);
+ // Must be done custom because LLVM reserves ESI
+ //syscall4(a, b, c, d, e,);
+ //syscall5(a, b, c, d, e, f,);
+}
+
+pub unsafe fn syscall4(mut a: usize, b: usize, c: usize, d: usize, e: usize)
+ -> Result<usize> {
+ asm!(
+ "xchg esi, {e}
+ int 0x80
+ xchg esi, {e}",
+ e = in(reg) e,
+ inout("eax") a,
+ in("ebx") b,
+ in("ecx") c,
+ in("edx") d,
+ options(nostack),
+ );
+
+ Error::demux(a)
+}
+
+pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize)
+ -> Result<usize> {
+ asm!(
+ "xchg esi, {e}
+ int 0x80
+ xchg esi, {e}",
+ e = in(reg) e,
+ inout("eax") a,
+ in("ebx") b,
+ in("ecx") c,
+ in("edx") d,
+ in("edi") f,
+ options(nostack),
+ );
+
+ Error::demux(a)
+}
+
+#[derive(Clone, Copy, Debug, Default)]
+#[repr(packed)]
+pub struct EnvRegisters {
+ pub fsbase: u32,
+ pub gsbase: u32,
+}
+
+impl Deref for EnvRegisters {
+ type Target = [u8];
+ fn deref(&self) -> &[u8] {
+ unsafe {
+ slice::from_raw_parts(self as *const EnvRegisters as *const u8, mem::size_of::<EnvRegisters>())
+ }
+ }
+}
+
+impl DerefMut for EnvRegisters {
+ fn deref_mut(&mut self) -> &mut [u8] {
+ unsafe {
+ slice::from_raw_parts_mut(self as *mut EnvRegisters as *mut u8, mem::size_of::<EnvRegisters>())
+ }
+ }
+}
diff --git a/vendor/redox_syscall/src/io/mod.rs b/vendor/redox_syscall/src/io/mod.rs
index a9cd4c86d..a225f0650 100644
--- a/vendor/redox_syscall/src/io/mod.rs
+++ b/vendor/redox_syscall/src/io/mod.rs
@@ -4,12 +4,12 @@ pub use self::dma::*;
pub use self::io::*;
pub use self::mmio::*;
-#[cfg(target_arch = "x86_64")]
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use self::pio::*;
mod dma;
mod io;
mod mmio;
-#[cfg(target_arch = "x86_64")]
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod pio;
diff --git a/vendor/redox_syscall/src/lib.rs b/vendor/redox_syscall/src/lib.rs
index 050ee8160..9c5939830 100644
--- a/vendor/redox_syscall/src/lib.rs
+++ b/vendor/redox_syscall/src/lib.rs
@@ -26,7 +26,7 @@ mod arch;
mod arch;
#[cfg(all(any(target_os = "none", target_os = "redox"), target_arch = "x86"))]
-#[path="arch/nonredox.rs"]
+#[path="arch/x86.rs"]
mod arch;
#[cfg(all(any(target_os = "none", target_os = "redox"), target_arch = "x86_64"))]