Verify that the instruction encoding matches what the ISA would encode.

Fixes #69
This commit is contained in:
Eric Anholt
2017-04-22 16:58:29 -07:00
committed by Jakob Stoklund Olesen
parent d0d5f3bb26
commit 43ce26e64b
6 changed files with 78 additions and 12 deletions

View File

@@ -53,8 +53,8 @@ impl Context {
///
/// The `TargetIsa` argument is currently unused, but the verifier will soon be able to also
/// check ISA-dependent constraints.
pub fn verify<'a, ISA: Into<Option<&'a TargetIsa>>>(&self, _isa: ISA) -> verifier::Result {
verifier::verify_context(&self.func, &self.cfg, &self.domtree)
pub fn verify<'a, ISA: Into<Option<&'a TargetIsa>>>(&self, isa: ISA) -> verifier::Result {
verifier::verify_context(&self.func, &self.cfg, &self.domtree, isa.into())
}
/// Run the verifier only if the `enable_verifier` setting is true.