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