pub struct OperandDesc {
pub class: RegClass,
pub role: Role,
pub constraint: Constraint,
}Expand description
One operand of one instruction, as a target’s description of that instruction writes it.
The difference from an operand in the machine IR is the register: there is none here, because a description is about every instruction of that opcode and a register belongs to one of them.
Fields§
§class: RegClassThe class the operand is drawn from.
role: RoleWhether the instruction reads it or writes it.
constraint: ConstraintWhere it is allowed to live.
Implementations§
Source§impl OperandDesc
impl OperandDesc
Sourcepub const fn read(class: RegClass) -> Self
pub const fn read(class: RegClass) -> Self
An operand the instruction reads, in any register of its class.
Sourcepub const fn write_early(class: RegClass) -> Self
pub const fn write_early(class: RegClass) -> Self
An operand the instruction writes before it has finished reading, which is what a register the instruction destroys on its way through is.
Sourcepub const fn with(self, constraint: Constraint) -> Self
pub const fn with(self, constraint: Constraint) -> Self
The same operand, constrained.
Trait Implementations§
Source§impl Clone for OperandDesc
impl Clone for OperandDesc
Source§fn clone(&self) -> OperandDesc
fn clone(&self) -> OperandDesc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OperandDesc
Source§impl Debug for OperandDesc
impl Debug for OperandDesc
impl Eq for OperandDesc
Source§impl PartialEq for OperandDesc
impl PartialEq for OperandDesc
impl StructuralPartialEq for OperandDesc
Auto Trait Implementations§
impl Freeze for OperandDesc
impl RefUnwindSafe for OperandDesc
impl Send for OperandDesc
impl Sync for OperandDesc
impl Unpin for OperandDesc
impl UnsafeUnpin for OperandDesc
impl UnwindSafe for OperandDesc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more