Bump to rust nightly-2022-01-01, feature global_asm,asm->stable

This commit is contained in:
Yifan Wu 2022-01-01 03:07:09 -08:00
parent 98a7b866b5
commit 3f0c3f6dfd
9 changed files with 13 additions and 6 deletions

View file

@ -1,4 +1,5 @@
use core::panic::PanicInfo; use core::panic::PanicInfo;
use core::arch::asm;
use crate::sbi::shutdown; use crate::sbi::shutdown;
use crate::task::current_kstack_top; use crate::task::current_kstack_top;

View file

@ -1,7 +1,5 @@
#![no_std] #![no_std]
#![no_main] #![no_main]
#![feature(global_asm)]
#![feature(asm)]
#![feature(panic_info_message)] #![feature(panic_info_message)]
#![feature(alloc_error_handler)] #![feature(alloc_error_handler)]
@ -24,6 +22,8 @@ mod mm;
mod fs; mod fs;
mod drivers; mod drivers;
use core::arch::global_asm;
global_asm!(include_str!("entry.asm")); global_asm!(include_str!("entry.asm"));
fn clear_bss() { fn clear_bss() {

View file

@ -14,6 +14,7 @@ use crate::config::{
TRAMPOLINE, TRAMPOLINE,
MMIO, MMIO,
}; };
use core::arch::asm;
extern "C" { extern "C" {
fn stext(); fn stext();

View file

@ -1,5 +1,7 @@
#![allow(unused)] #![allow(unused)]
use core::arch::asm;
const SBI_SET_TIMER: usize = 0; const SBI_SET_TIMER: usize = 0;
const SBI_CONSOLE_PUTCHAR: usize = 1; const SBI_CONSOLE_PUTCHAR: usize = 1;
const SBI_CONSOLE_GETCHAR: usize = 2; const SBI_CONSOLE_GETCHAR: usize = 2;

View file

@ -1,6 +1,7 @@
global_asm!(include_str!("switch.S"));
use super::TaskContext; use super::TaskContext;
use core::arch::global_asm;
global_asm!(include_str!("switch.S"));
extern "C" { extern "C" {
pub fn __switch( pub fn __switch(

View file

@ -22,6 +22,7 @@ use crate::task::{
}; };
use crate::timer::{set_next_trigger, check_timer}; use crate::timer::{set_next_trigger, check_timer};
use crate::config::TRAMPOLINE; use crate::config::TRAMPOLINE;
use core::arch::{global_asm, asm};
global_asm!(include_str!("trap.S")); global_asm!(include_str!("trap.S"));

View file

@ -1 +1 @@
nightly-2021-12-15 nightly-2022-01-01

View file

@ -1,5 +1,4 @@
#![no_std] #![no_std]
#![feature(asm)]
#![feature(linkage)] #![feature(linkage)]
#![feature(panic_info_message)] #![feature(panic_info_message)]
#![feature(alloc_error_handler)] #![feature(alloc_error_handler)]

View file

@ -1,3 +1,5 @@
use core::arch::asm;
const SYSCALL_DUP: usize = 24; const SYSCALL_DUP: usize = 24;
const SYSCALL_OPEN: usize = 56; const SYSCALL_OPEN: usize = 56;
const SYSCALL_CLOSE: usize = 57; const SYSCALL_CLOSE: usize = 57;