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

Method reg

winch/codegen/src/regset.rs:97–103  ·  view source on GitHub ↗

Request a specific register.

(&mut self, reg: Reg)

Source from the content-addressed store, hash-verified

95
96 /// Request a specific register.
97 pub fn reg(&mut self, reg: Reg) -> Option<Reg> {
98 let index = reg.hw_enc();
99 self.named_reg_available(reg).then(|| {
100 self.allocate(reg.class(), index.try_into().unwrap());
101 reg
102 })
103 }
104
105 /// Marks the specified register as available, utilizing the
106 /// register class to determine the bitset that requires updating.

Callers

nothing calls this directly

Calls 6

named_reg_availableMethod · 0.80
hw_encMethod · 0.45
allocateMethod · 0.45
classMethod · 0.45
unwrapMethod · 0.45
try_intoMethod · 0.45

Tested by

no test coverage detected