[meta] Use a ref-counted pointer to an InstructionFormat in instructions;
This avoids a lot of dereferences, and InstructionFormat are immutable once they're created. It removes a lot of code that was keeping the FormatRegistry around, just in case we needed the format. This is more in line with the way we create Instructions, and make it easy to reference InstructionFormats in general.
This commit is contained in:
@@ -39,13 +39,7 @@ pub fn generate(isas: &Vec<isa::Isa>, out_dir: &str) -> Result<(), error::Error>
|
||||
|
||||
gen_inst::generate(&shared_defs, "opcodes.rs", "inst_builder.rs", &out_dir)?;
|
||||
|
||||
gen_legalizer::generate(
|
||||
&isas,
|
||||
&shared_defs.format_registry,
|
||||
&shared_defs.transform_groups,
|
||||
"legalize",
|
||||
&out_dir,
|
||||
)?;
|
||||
gen_legalizer::generate(&isas, &shared_defs.transform_groups, "legalize", &out_dir)?;
|
||||
|
||||
for isa in isas {
|
||||
gen_registers::generate(&isa, &format!("registers-{}.rs", isa.name), &out_dir)?;
|
||||
@@ -65,7 +59,6 @@ pub fn generate(isas: &Vec<isa::Isa>, out_dir: &str) -> Result<(), error::Error>
|
||||
)?;
|
||||
|
||||
gen_binemit::generate(
|
||||
&shared_defs.format_registry,
|
||||
&isa.name,
|
||||
&isa.recipes,
|
||||
&format!("binemit-{}.rs", isa.name),
|
||||
|
||||
Reference in New Issue
Block a user