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

Method reg_for_class

winch/codegen/src/codegen/context.rs:172–180  ·  view source on GitHub ↗

Request the register allocator to provide the next available register of the specified class.

(
        &mut self,
        class: RegClass,
        masm: &mut M,
    )

Source from the content-addressed store, hash-verified

170 /// Request the register allocator to provide the next available
171 /// register of the specified class.
172 pub fn reg_for_class<M: MacroAssembler>(
173 &mut self,
174 class: RegClass,
175 masm: &mut M,
176 ) -> Result<Reg> {
177 self.regalloc.reg_for_class(class, &mut |regalloc| {
178 Self::spill_impl(&mut self.stack, regalloc, &self.frame, masm)
179 })
180 }
181
182 /// Convenience wrapper around `CodeGenContext::reg_for_class`, to
183 /// request the next available general purpose register.

Callers 8

with_scratchMethod · 0.45
with_scratchMethod · 0.45
reg_for_typeMethod · 0.45
any_gprMethod · 0.45
any_fprMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected