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 0d4e44a7..902c5421 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 1b23a48a..ed3d16aa 100644 --- a/user/src/syscall.rs +++ b/user/src/syscall.rs @@ -6,11 +6,12 @@ const SYSCALL_GET_TIME: usize = 169; 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