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

Method mask_immediates

cranelift/codegen/src/ir/instructions.rs:634–647  ·  view source on GitHub ↗
(&mut self, ctrl_typevar: Type)

Source from the content-addressed store, hash-verified

632
633 #[inline]
634 pub(crate) fn mask_immediates(&mut self, ctrl_typevar: Type) {
635 if ctrl_typevar.is_invalid() {
636 return;
637 }
638
639 let bit_width = ctrl_typevar.bits();
640
641 match self {
642 Self::UnaryImm { opcode: _, imm } => {
643 *imm = imm.mask_to_width(bit_width);
644 }
645 _ => {}
646 }
647 }
648
649 /// Get the exception table, if any, associated with this instruction.
650 pub fn exception_table(&self) -> Option<ExceptionTable> {

Callers 1

build_imm_constMethod · 0.80

Calls 3

mask_to_widthMethod · 0.80
is_invalidMethod · 0.45
bitsMethod · 0.45

Tested by

no test coverage detected