Allow binding immediates to instructions (#1012)
This change should make the code more clear (and less code) when adding encodings for instructions with specific immediates; e.g., a constant with a 0 immediate could be encoded as an XOR with something like `const.bind(...)` without explicitly creating the necessary predicates. It has several parts: * Introduce Bindable trait to instructions * Convert all instruction bindings to use Bindable::bind() * Add ability to bind immediates to BoundInstruction This is an attempt to reduce some of the issues in #955.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::cdsl::ast::{var, ExprBuilder, Literal};
|
||||
use crate::cdsl::instructions::{Instruction, InstructionGroup};
|
||||
use crate::cdsl::instructions::{Bindable, Instruction, InstructionGroup};
|
||||
use crate::cdsl::xform::{TransformGroupBuilder, TransformGroups};
|
||||
|
||||
use crate::shared::immediates::Immediates;
|
||||
|
||||
Reference in New Issue
Block a user