pub struct Operand {
pub reg: Reg,
pub class: RegClass,
pub role: Role,
pub constraint: Constraint,
}Expand description
One operand of one instruction.
Fields§
§reg: RegThe register, virtual until the allocator has run.
class: RegClassThe class it is drawn from.
role: RoleWhether the instruction reads it or writes it.
constraint: ConstraintWhere it is allowed to live.
Implementations§
Source§impl Operand
impl Operand
Sourcepub const fn write(reg: Reg, class: RegClass) -> Self
pub const fn write(reg: Reg, class: RegClass) -> Self
An operand the instruction writes as it finishes.
Sourcepub const fn write_early(reg: Reg, class: RegClass) -> Self
pub const fn write_early(reg: Reg, class: RegClass) -> Self
An operand the instruction writes before it has finished reading.
Sourcepub const fn with(self, constraint: Constraint) -> Self
pub const fn with(self, constraint: Constraint) -> Self
The same operand, constrained.
Trait Implementations§
impl Copy for Operand
impl Eq for Operand
impl StructuralPartialEq for Operand
Auto Trait Implementations§
impl Freeze for Operand
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnsafeUnpin for Operand
impl UnwindSafe for Operand
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