MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / add_operand

Method add_operand

cranelift/codegen/src/machinst/reg.rs:540–551  ·  view source on GitHub ↗
(
        &mut self,
        reg: &mut Reg,
        constraint: OperandConstraint,
        kind: OperandKind,
        pos: OperandPos,
    )

Source from the content-addressed store, hash-verified

538
539impl<'a, F: Fn(VReg) -> VReg> OperandVisitor for OperandCollector<'a, F> {
540 fn add_operand(
541 &mut self,
542 reg: &mut Reg,
543 constraint: OperandConstraint,
544 kind: OperandKind,
545 pos: OperandPos,
546 ) {
547 debug_assert!(!reg.is_spillslot());
548 reg.0 = (self.renamer)(VReg::from(reg.0)).bits() as u32;
549 self.operands
550 .push(Operand::new(VReg::from(reg.0), constraint, kind, pos));
551 }
552
553 fn debug_assert_is_allocatable_preg(&self, reg: PReg, expected: bool) {
554 debug_assert_eq!(

Callers 5

reg_fixedMethod · 0.45
reg_maybe_fixedMethod · 0.45
reg_reuse_defMethod · 0.45
any_defMethod · 0.45
any_late_useMethod · 0.45

Calls 4

fromFunction · 0.85
newFunction · 0.50
bitsMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected