Nightly opts
This commit is contained in:
parent
37a1923f1e
commit
582c716445
|
@ -9,6 +9,7 @@ lto = true
|
||||||
[features]
|
[features]
|
||||||
default = ["alloc"]
|
default = ["alloc"]
|
||||||
alloc = []
|
alloc = []
|
||||||
|
nightly = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
delegate = "0.9"
|
delegate = "0.9"
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
|
#![cfg_attr(feature = "nightly", feature(fn_align))]
|
||||||
|
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
|
@ -90,6 +92,7 @@ impl<'a, PfHandler: HandlePageFault, const TIMER_QUOTIENT: usize>
|
||||||
/// Execute program
|
/// Execute program
|
||||||
///
|
///
|
||||||
/// Program can return [`VmRunError`] if a trap handling failed
|
/// Program can return [`VmRunError`] if a trap handling failed
|
||||||
|
#[cfg_attr(feature = "nightly", repr(align(4096)))]
|
||||||
pub fn run(&mut self) -> Result<VmRunOk, VmRunError> {
|
pub fn run(&mut self) -> Result<VmRunOk, VmRunError> {
|
||||||
use hbbytecode::opcode::*;
|
use hbbytecode::opcode::*;
|
||||||
loop {
|
loop {
|
||||||
|
|
|
@ -26,6 +26,7 @@ pub struct BlockCopier {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BlockCopier {
|
impl BlockCopier {
|
||||||
|
#[inline]
|
||||||
pub fn new(src: u64, dst: u64, count: usize) -> Self {
|
pub fn new(src: u64, dst: u64, count: usize) -> Self {
|
||||||
Self {
|
Self {
|
||||||
src,
|
src,
|
||||||
|
|
|
@ -310,6 +310,7 @@ struct AddrPageLookuper {
|
||||||
|
|
||||||
impl AddrPageLookuper {
|
impl AddrPageLookuper {
|
||||||
/// Create a new page lookuper
|
/// Create a new page lookuper
|
||||||
|
#[inline]
|
||||||
pub const fn new(addr: u64, size: usize, pagetable: *const PageTable) -> Self {
|
pub const fn new(addr: u64, size: usize, pagetable: *const PageTable) -> Self {
|
||||||
Self {
|
Self {
|
||||||
addr,
|
addr,
|
||||||
|
|
Loading…
Reference in a new issue