[meta] Uniquely number every instruction in the Rust crate;
This commit is contained in:
@@ -55,6 +55,7 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {
|
||||
let inst_group = InstructionGroupBuilder::new(
|
||||
"arm32",
|
||||
"arm32 specific instruction set",
|
||||
&mut shared_defs.all_instructions,
|
||||
&shared_defs.format_registry,
|
||||
)
|
||||
.build();
|
||||
|
||||
@@ -51,6 +51,7 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {
|
||||
let inst_group = InstructionGroupBuilder::new(
|
||||
"arm64",
|
||||
"arm64 specific instruction set",
|
||||
&mut shared_defs.all_instructions,
|
||||
&shared_defs.format_registry,
|
||||
)
|
||||
.build();
|
||||
|
||||
@@ -89,6 +89,7 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {
|
||||
let inst_group = InstructionGroupBuilder::new(
|
||||
"riscv",
|
||||
"riscv specific instruction set",
|
||||
&mut shared_defs.all_instructions,
|
||||
&shared_defs.format_registry,
|
||||
)
|
||||
.build();
|
||||
|
||||
@@ -2,16 +2,23 @@
|
||||
|
||||
use crate::cdsl::formats::FormatRegistry;
|
||||
use crate::cdsl::instructions::{
|
||||
InstructionBuilder as Inst, InstructionGroup, InstructionGroupBuilder,
|
||||
AllInstructions, InstructionBuilder as Inst, InstructionGroup, InstructionGroupBuilder,
|
||||
};
|
||||
use crate::cdsl::operands::{create_operand as operand, create_operand_doc as operand_doc};
|
||||
use crate::cdsl::types::ValueType;
|
||||
use crate::cdsl::typevar::{Interval, TypeSetBuilder, TypeVar};
|
||||
use crate::shared::types;
|
||||
|
||||
pub fn define(format_registry: &FormatRegistry) -> InstructionGroup {
|
||||
let mut ig =
|
||||
InstructionGroupBuilder::new("x86", "x86 specific instruction set", format_registry);
|
||||
pub fn define(
|
||||
mut all_instructions: &mut AllInstructions,
|
||||
format_registry: &FormatRegistry,
|
||||
) -> InstructionGroup {
|
||||
let mut ig = InstructionGroupBuilder::new(
|
||||
"x86",
|
||||
"x86 specific instruction set",
|
||||
&mut all_instructions,
|
||||
format_registry,
|
||||
);
|
||||
|
||||
let iflags: &TypeVar = &ValueType::Special(types::Flag::IFlags.into()).into();
|
||||
|
||||
|
||||
@@ -15,7 +15,10 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {
|
||||
let settings = settings::define(&shared_defs.settings);
|
||||
let regs = registers::define();
|
||||
|
||||
let inst_group = instructions::define(&shared_defs.format_registry);
|
||||
let inst_group = instructions::define(
|
||||
&mut shared_defs.all_instructions,
|
||||
&shared_defs.format_registry,
|
||||
);
|
||||
legalize::define(shared_defs, &inst_group);
|
||||
|
||||
// CPU modes for 32-bit and 64-bit operations.
|
||||
|
||||
Reference in New Issue
Block a user