Disable memory bound checking for kernel loader.

This commit is contained in:
Heyang Zhou
2019-05-08 10:25:29 -07:00
parent accb80bca2
commit 620a6ddd85
4 changed files with 27 additions and 14 deletions

View File

@ -39,12 +39,25 @@ impl Token {
}
}
#[derive(Copy, Clone, Debug)]
pub enum MemoryBoundCheckMode {
Default,
Enable,
Disable,
}
impl Default for MemoryBoundCheckMode {
fn default() -> MemoryBoundCheckMode {
MemoryBoundCheckMode::Default
}
}
/// Configuration data for the compiler
#[derive(Default)]
pub struct CompilerConfig {
/// Symbol information generated from emscripten; used for more detailed debug messages
pub symbol_map: Option<HashMap<u32, String>>,
pub enforce_memory_bound_check: bool,
pub memory_bound_check_mode: MemoryBoundCheckMode,
pub enforce_stack_check: bool,
}