diff --git a/bootloader/rustsbi-k210.bin b/bootloader/rustsbi-k210.bin index 27987d68..c53ed1fc 100755 Binary files a/bootloader/rustsbi-k210.bin and b/bootloader/rustsbi-k210.bin differ diff --git a/bootloader/rustsbi-qemu.bin b/bootloader/rustsbi-qemu.bin index 0e61b8ea..ddbf336a 100755 Binary files a/bootloader/rustsbi-qemu.bin and b/bootloader/rustsbi-qemu.bin differ diff --git a/rust-toolchain b/rust-toolchain index bf867e0a..1c5af266 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly +nightly-2021-08-25 diff --git a/user/src/lib.rs b/user/src/lib.rs index d14e3d89..94cce773 100644 --- a/user/src/lib.rs +++ b/user/src/lib.rs @@ -1,5 +1,5 @@ #![no_std] -#![feature(llvm_asm)] +#![feature(asm)] #![feature(linkage)] #![feature(panic_info_message)] diff --git a/user/src/syscall.rs b/user/src/syscall.rs index 6a09f46e..4a1f781b 100644 --- a/user/src/syscall.rs +++ b/user/src/syscall.rs @@ -5,11 +5,12 @@ const SYSCALL_YIELD: usize = 124; fn syscall(id: usize, args: [usize; 3]) -> isize { let mut ret: isize; unsafe { - llvm_asm!("ecall" - : "={x10}" (ret) - : "{x10}" (args[0]), "{x11}" (args[1]), "{x12}" (args[2]), "{x17}" (id) - : "memory" - : "volatile" + asm!( + "ecall", + inlateout("x10") args[0] => ret, + in("x11") args[1], + in("x12") args[2], + in("x17") id ); } ret