ConstantOffsets

class iced_x86.ConstantOffsets

Contains the offsets of the displacement and immediate.

Call Decoder.get_constant_offsets or Encoder.get_constant_offsets to get the offsets of the constants after the instruction has been decoded/encoded.

copy()

Returns a copy of this instance.

Returns:

A copy of this instance

Return type:

ConstantOffsets

displacement_offset

(u32) The offset of the displacement, if any

Type:

int

displacement_size

(u32) Size in bytes of the displacement, or 0 if there’s no displacement

Type:

int

has_displacement

True if ConstantOffsets.displacement_offset and ConstantOffsets.displacement_size are valid

Type:

bool

has_immediate

True if ConstantOffsets.immediate_offset and ConstantOffsets.immediate_size are valid

Type:

bool

has_immediate2

True if ConstantOffsets.immediate_offset2 and ConstantOffsets.immediate_size2 are valid

Type:

bool

immediate_offset

(u32) The offset of the first immediate, if any.

This field can be invalid even if the operand has an immediate if it’s an immediate that isn’t part of the instruction stream, eg. SHL AL,1.

Type:

int

immediate_offset2

(u32) The offset of the second immediate, if any.

Type:

int

immediate_size

(u32) Size in bytes of the first immediate, or 0 if there’s no immediate

Type:

int

immediate_size2

(u32) Size in bytes of the second immediate, or 0 if there’s no second immediate

Type:

int