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

Method free

winch/codegen/src/regset.rs:107–115  ·  view source on GitHub ↗

Marks the specified register as available, utilizing the register class to determine the bitset that requires updating.

(&mut self, reg: Reg)

Source from the content-addressed store, hash-verified

105 /// Marks the specified register as available, utilizing the
106 /// register class to determine the bitset that requires updating.
107 pub fn free(&mut self, reg: Reg) {
108 let bitset = &self[reg.class()];
109 let index = reg.hw_enc();
110 assert!(index < bitset.max);
111 let index = u64::try_from(index).unwrap();
112 if !self.is_non_allocatable(reg.class(), index) {
113 self[reg.class()].allocatable |= 1 << index;
114 }
115 }
116
117 /// Returns true if the specified register is allocatable.
118 pub fn named_reg_available(&self, reg: Reg) -> bool {

Callers 7

visit_dropMethod · 0.45
test_free_regFunction · 0.45
with_scratchMethod · 0.45
with_scratchMethod · 0.45
free_regMethod · 0.45
truncate_stack_toMethod · 0.45
spill_implMethod · 0.45

Calls 4

is_non_allocatableMethod · 0.80
classMethod · 0.45
hw_encMethod · 0.45
unwrapMethod · 0.45

Tested by 1

test_free_regFunction · 0.36