Low-Latency Machine Code Generation
Provides information about formatting offsets, absolute addresses, or their parts.
Offset format is used by both RelocEntry and LabelLink. The illustration below describes the relation of region size and offset size. Region size is the size of the whole unit whereas offset size is the size of the unit that will be patched.
Once the offset word has been located it can be patched like this:
Returns the type of the offset.
Returns whether the offset is encoded as an absolute value of the offset with additional field(s) that represent the sign (AArch32 U/N fields in the opcode).
If true, the offset itself is always positive and a separate U/N field is used to indicate the sign of the offset (usually
U==1 means ADD, but sometimes
N==1 means negative offset, which implies SUB).
Returns the size of the region/instruction where the offset is encoded.
Returns the offset of the word relative to the start of the region where the offset is.
Returns the size of the data-type (word) that contains the offset, in bytes.
Returns the count of bits of the offset value in the data it's stored in.
Returns the bit-shift of the offset value in the data it's stored in.
Returns the number of least significant bits of the offset value, that must be zero and that are not part of the encoded data.
Resets this offset format to a simple data value of
The region will be the same size as data and immediate bits would correspond to
dataSize * 8. There will be no immediate bit shift or discarded bits.
Type of the offset.
Size of the region (in bytes) containing the offset value, if the offset value is part of an instruction, otherwise it would be the same as
Size of the offset value, in bytes (1, 2, 4, or 8).
Offset of the offset value, in bytes, relative to the start of the region or data.
Value offset would be zero if both region size and value size are equal.
Size of the offset immediate value in bits.
Shift of the offset immediate value in bits in the target word.
Number of least significant bits to discard before writing the immediate to the destination.
All discarded bits must be zero otherwise the value is invalid.