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

Method derive_operand_size

winch/codegen/src/masm.rs:579–591  ·  view source on GitHub ↗

Returns the [`OperandSize`] used in the load operation.

(&self)

Source from the content-addressed store, hash-verified

577impl LoadKind {
578 /// Returns the [`OperandSize`] used in the load operation.
579 pub(crate) fn derive_operand_size(&self) -> OperandSize {
580 match self {
581 Self::ScalarExtend(extend) | Self::Atomic(_, Some(extend)) => {
582 Self::operand_size_for_scalar(extend)
583 }
584 Self::VectorExtend(_) => OperandSize::S64,
585 Self::Splat(kind) => Self::operand_size_for_splat(kind),
586 Self::Operand(size)
587 | Self::Atomic(size, None)
588 | Self::VectorLane(LaneSelector { size, .. })
589 | Self::VectorZero(size) => *size,
590 }
591 }
592
593 pub fn vector_lane(lane: u8, size: OperandSize) -> Self {
594 Self::VectorLane(LaneSelector { lane, size })

Callers 3

wasm_loadMethod · 0.80
wasm_loadMethod · 0.80
emit_wasm_loadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected