Struct wasm_encoder::MemArg
source · pub struct MemArg {
pub offset: u64,
pub align: u32,
pub memory_index: u32,
}
Expand description
The immediate for a memory instruction.
Fields§
§offset: u64
A static offset to add to the instruction’s dynamic address operand.
This is a u64
field for the memory64 proposal, but 32-bit memories
limit offsets to at most u32::MAX
bytes. This will be encoded as a LEB
but it won’t generate a valid module if an offset is specified which is
larger than the maximum size of the index space for the memory indicated
by memory_index
.
align: u32
The expected alignment of the instruction’s dynamic address operand (expressed the exponent of a power of two).
memory_index: u32
The index of the memory this instruction is operating upon.