diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/rustix/src/backend/linux_raw/arch/riscv64.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/arch/riscv64.rs')
-rw-r--r-- | vendor/rustix/src/backend/linux_raw/arch/riscv64.rs | 265 |
1 files changed, 0 insertions, 265 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/arch/riscv64.rs b/vendor/rustix/src/backend/linux_raw/arch/riscv64.rs deleted file mode 100644 index 7b8533d..0000000 --- a/vendor/rustix/src/backend/linux_raw/arch/riscv64.rs +++ /dev/null @@ -1,265 +0,0 @@ -//! riscv64 Linux system calls. - -use crate::backend::reg::{ - ArgReg, FromAsm, RetReg, SyscallNumber, ToAsm, A0, A1, A2, A3, A4, A5, R0, -}; -use core::arch::asm; - -#[inline] -pub(in crate::backend) unsafe fn syscall0_readonly(nr: SyscallNumber<'_>) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - lateout("a0") r0, - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall1(nr: SyscallNumber<'_>, a0: ArgReg<'_, A0>) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - options(nostack, preserves_flags) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall1_readonly( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall1_noreturn(nr: SyscallNumber<'_>, a0: ArgReg<'_, A0>) -> ! { - asm!( - "ecall", - in("a7") nr.to_asm(), - in("a0") a0.to_asm(), - options(nostack, noreturn) - ); -} - -#[inline] -pub(in crate::backend) unsafe fn syscall2( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - options(nostack, preserves_flags) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall2_readonly( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall3( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - options(nostack, preserves_flags) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall3_readonly( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall4( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, - a3: ArgReg<'_, A3>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - in("a3") a3.to_asm(), - options(nostack, preserves_flags) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall4_readonly( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, - a3: ArgReg<'_, A3>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - in("a3") a3.to_asm(), - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall5( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, - a3: ArgReg<'_, A3>, - a4: ArgReg<'_, A4>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - in("a3") a3.to_asm(), - in("a4") a4.to_asm(), - options(nostack, preserves_flags) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall5_readonly( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, - a3: ArgReg<'_, A3>, - a4: ArgReg<'_, A4>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - in("a3") a3.to_asm(), - in("a4") a4.to_asm(), - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall6( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, - a3: ArgReg<'_, A3>, - a4: ArgReg<'_, A4>, - a5: ArgReg<'_, A5>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - in("a3") a3.to_asm(), - in("a4") a4.to_asm(), - in("a5") a5.to_asm(), - options(nostack, preserves_flags) - ); - FromAsm::from_asm(r0) -} - -#[inline] -pub(in crate::backend) unsafe fn syscall6_readonly( - nr: SyscallNumber<'_>, - a0: ArgReg<'_, A0>, - a1: ArgReg<'_, A1>, - a2: ArgReg<'_, A2>, - a3: ArgReg<'_, A3>, - a4: ArgReg<'_, A4>, - a5: ArgReg<'_, A5>, -) -> RetReg<R0> { - let r0; - asm!( - "ecall", - in("a7") nr.to_asm(), - inlateout("a0") a0.to_asm() => r0, - in("a1") a1.to_asm(), - in("a2") a2.to_asm(), - in("a3") a3.to_asm(), - in("a4") a4.to_asm(), - in("a5") a5.to_asm(), - options(nostack, preserves_flags, readonly) - ); - FromAsm::from_asm(r0) -} |