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:
Andrew Brown
2019-07-31 07:48:43 -07:00
committed by Yury Delendik
parent fff0198fb7
commit 5873f697fc
6 changed files with 83 additions and 23 deletions

View File

@@ -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>,