B2R2


Operand Type

We define four different types of X86 operands: register, memory, direct address, and immediate.

Union cases

Union case Description

Label(string, RegType)

Full Usage: Label(string, RegType)

Parameters:

Label is *not* encoded in the actual binary. This is only used when we assemble binaries.

Item1 : string
Item2 : RegType

OprDirAddr JumpTarget

Full Usage: OprDirAddr JumpTarget

Parameters:

OprDirAddr is a direct branch target address.

Item : JumpTarget

OprImm(int64, OperandSize)

Full Usage: OprImm(int64, OperandSize)

Parameters:

OprImm represents an immediate operand. The OperandSize here means the size of the encoded immediate value.

Item1 : int64
Item2 : OperandSize

OprMem(Register option, ScaledIndex option, Disp option, OperandSize)

Full Usage: OprMem(Register option, ScaledIndex option, Disp option, OperandSize)

Parameters:

OprMem represents a memory operand. The OperandSize here means the memory access size of the operand, i.e., how many bytes do we read/write here.

Item1 : Register option
Item2 : ScaledIndex option
Item3 : Disp option
Item4 : OperandSize

OprReg Register

Full Usage: OprReg Register

Parameters:

A register operand.

Item : Register