Enable SIMD instructions from the command line (#232)
This change adds an `--enable-simd` flag to the binaries in this project. This allows the ISA `enable_simd` flag to be set and to configure the validation configuration used by wasmparser to allow SIMD instructions.
This commit is contained in:
committed by
Yury Delendik
parent
fff0198fb7
commit
5873f697fc
@@ -4,7 +4,7 @@ use std::path::Path;
|
||||
use std::{fmt, fs, io, str};
|
||||
use wabt::script::{Action, Command, CommandKind, ModuleBinary, ScriptParser, Value};
|
||||
use wasmtime_jit::{
|
||||
ActionError, ActionOutcome, Compiler, Context, InstanceHandle, InstantiationError,
|
||||
ActionError, ActionOutcome, Compiler, Context, Features, InstanceHandle, InstantiationError,
|
||||
RuntimeValue, UnknownInstance,
|
||||
};
|
||||
|
||||
@@ -85,6 +85,14 @@ impl WastContext {
|
||||
}
|
||||
}
|
||||
|
||||
/// Construct a new instance with the given features using the current `Context`
|
||||
pub fn with_features(self, features: Features) -> Self {
|
||||
Self {
|
||||
context: self.context.with_features(features),
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
fn get_instance(
|
||||
&mut self,
|
||||
instance_name: Option<&str>,
|
||||
|
||||
Reference in New Issue
Block a user