[meta] Port Instruction/InstructionGroup to the Rust meta crate;

This commit is contained in:
Benjamin Bouvier
2019-03-11 19:36:45 +01:00
parent 208c4e6da6
commit 3c31eac48c
11 changed files with 763 additions and 24 deletions

View File

@@ -1,16 +1,24 @@
use super::regs::IsaRegs;
use super::settings::SettingGroup;
use crate::cdsl::inst::InstructionGroup;
use crate::cdsl::regs::IsaRegs;
use crate::cdsl::settings::SettingGroup;
pub struct TargetIsa {
pub name: &'static str,
pub instructions: InstructionGroup,
pub settings: SettingGroup,
pub regs: IsaRegs,
}
impl TargetIsa {
pub fn new(name: &'static str, settings: SettingGroup, regs: IsaRegs) -> Self {
pub fn new(
name: &'static str,
instructions: InstructionGroup,
settings: SettingGroup,
regs: IsaRegs,
) -> Self {
Self {
name,
instructions,
settings,
regs,
}