MemoryInstruction
sealed class MemoryInstruction
Extensions
validate
fun Instruction.validate(context: FunctionBody): FunctionBody
Validates the Instruction.
Receiver
Name | Description |
---|---|
Instruction
|
Parameters
Name | Description |
---|---|
context: FunctionBody
|
ReturnValue
Name | Description |
---|---|
FunctionBody
|
Base class for all Instructions dealing with memory.
From
the docs:Instructions in this group are concerned with linear memory.
Memory is accessed with
load
andstore
instructions for the different value types. They all take a memory immediate MemArg that contains an address offset and the expected alignment (expressed as the exponent of a power of 2). Integer loads and stores can optionally specify a storage size that is smaller than the bit width of the respective value type. In the case of loads, a sign extension modesx
is then required to select appropriate behavior.The static address offset is added to the dynamic address operand, yielding a 33 bit effective address that is the zero-based index at which the memory is accessed. All values are read and written in little endian byte order. A trap results if any of the accessed memory bytes lies outside the address range implied by the memory’s current size.