Generate an INST_PREDICATES table for each ISA.

Instead of generating a single `check_instp()` function, create an array
of individual function pointers for checking instruction predicates.

This makes explicit the jump table in the old check_instp() method and
it gives us a way of determining the number of instruction predicates
that exists.
This commit is contained in:
Jakob Stoklund Olesen
2017-07-24 14:13:35 -07:00
parent f39d75fa58
commit 776af93ef2
8 changed files with 35 additions and 36 deletions

View File

@@ -74,8 +74,8 @@ impl TargetIsa for Isa {
Ok(Encodings::new(enclist_offset,
&enc_tables::ENCLISTS[..],
&enc_tables::RECIPE_PREDICATES[..],
&enc_tables::INST_PREDICATES[..],
inst,
enc_tables::check_instp,
self.isa_flags.predicate_view()))
})
}