asmjit::BaseMem Class Reference [¶]

Base class for all memory operands.
The data is split into the following parts:
- BASE - Base register or label - requires 36 bits total. 4 bits are used to encode the type of the BASE operand (label vs. register type) and the remaining 32 bits define the BASE id, which can be a physical or virtual register index. If BASE type is zero, which is never used as a register type and label doesn't use it as well then BASE field contains a high DWORD of a possible 64-bit absolute address, which is possible on X64.
- INDEX - Index register (or theoretically Label, which doesn't make sense). Encoding is similar to BASE - it also requires 36 bits and splits the encoding to INDEX type (4 bits defining the register type) and 32-bit id.
- OFFSET - A relative offset of the address. Basically if BASE is specified the relative displacement adjusts BASE and an optional INDEX. if BASE is not specified then the OFFSET should be considered as ABSOLUTE address (at least on X86). In that case its low 32 bits are stored in DISPLACEMENT field and the remaining high 32 bits are stored in BASE.
- OTHER - There is rest 8 bits that can be used for whatever purpose. For example x86::Mem operand uses these bits to store segment override prefix and index shift (or scale).