x86/x86-64¶
Instruction¶

- class lief.assembly.x86.Instruction¶
Bases:
InstructionThis class represents a x86/x86-64 instruction
- property has_lock_prefix bool¶
True if this instruction has a
LOCKprefix
- property is_atomic bool¶
True if this instruction executes as an atomic read-modify-write
- property is_lockable bool¶
True if the
LOCKprefix is architecturally valid on this instruction
- lock(self) lief._lief.assembly.x86.Instruction | None¶
Re-encoded copy of this instruction with a
LOCKprefix added.If the instruction already has a
LOCKprefix, it returns a plain copy.
- property opcode lief.assembly.x86.OPCODE¶
The instruction opcode as defined in LLVM
- property operands Iterator[lief.assembly.x86.Operand | None]¶
Iterator over the operands of the current instruction
- unlock(self) lief._lief.assembly.x86.Instruction | None¶
Re-encoded copy of this instruction with the
LOCKprefix removed.If the instruction does not have a
LOCKprefix, it returns a plain copy orNoneif theLOCKsemantic can’t be removed.
Opcodes¶
See: lief.assembly.x86.OPCODE
Operands¶

- class lief.assembly.x86.Operand¶
Bases:
objectThis class represents an operand for an x86/x86-64 instruction
- property to_string str¶
Pretty representation of the operand
Immediate¶

Register¶

Memory¶

- class lief.assembly.x86.operands.Memory¶
Bases:
OperandThis class represents a memory operand.
For instance:
movq xmm3, qword ptr [rip + 823864]; | | Memory | +-----------+-----------+ | | | Base: rip Scale: 1 Displacement: 823864- property base lief.assembly.x86.REG¶
The base register.
For
lea rdx, [rip + 244634]it would returnrip
- property displacement int¶
The displacement value.
For
call qword ptr [rip + 248779]it would return248779
- property scale int¶
The scale value associated with the
scaled_register:For
mov rdi, qword ptr [r13 + 8*r14]it would return8
- property scaled_register lief.assembly.x86.REG¶
The scaled register.
For
mov rdi, qword ptr [r13 + 8*r14]it would returnr14
- property segment_register lief.assembly.x86.REG¶
The segment register associated with the memory operation.
For
mov eax, dword ptr gs:[0]it would returngs
PCRelative¶
