Move encoding-related information into an EncInfo struct.
The tables returned by recipe_names() and recipe_constraints() are now collected into an EncInfo struct that is available from TargetIsa::encoding_info(). This is equivalent to the register bank tables available fro TargetIsa::register_info(). This cleans of the TargetIsa interface and makes it easier to add encoding-related information.
This commit is contained in:
@@ -108,7 +108,8 @@ impl<'a> Context<'a> {
|
||||
fn find_recipe_index(&self, recipe_name: &str) -> Option<u16> {
|
||||
if let Some(unique_isa) = self.unique_isa {
|
||||
unique_isa
|
||||
.recipe_names()
|
||||
.encoding_info()
|
||||
.names
|
||||
.iter()
|
||||
.position(|&name| name == recipe_name)
|
||||
.map(|idx| idx as u16)
|
||||
|
||||
Reference in New Issue
Block a user