[meta] Port Instruction/InstructionGroup to the Rust meta crate;
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use crate::cdsl::inst::InstructionGroup;
|
||||
use crate::cdsl::isa::TargetIsa;
|
||||
use crate::cdsl::regs::{IsaRegs, IsaRegsBuilder, RegBankBuilder, RegClassBuilder};
|
||||
use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder};
|
||||
use crate::shared::Definitions as SharedDefinitions;
|
||||
|
||||
fn define_settings(_shared: &SettingGroup) -> SettingGroup {
|
||||
let setting = SettingGroupBuilder::new("arm32");
|
||||
@@ -44,8 +46,11 @@ fn define_regs() -> IsaRegs {
|
||||
regs.finish()
|
||||
}
|
||||
|
||||
pub fn define(shared_settings: &SettingGroup) -> TargetIsa {
|
||||
let settings = define_settings(shared_settings);
|
||||
pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {
|
||||
let settings = define_settings(&shared_defs.settings);
|
||||
let regs = define_regs();
|
||||
TargetIsa::new("arm32", settings, regs)
|
||||
|
||||
let inst_group = InstructionGroup::new("arm32", "arm32 specific instruction set");
|
||||
|
||||
TargetIsa::new("arm32", inst_group, settings, regs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user