This class represents a x86/x86-64 instruction.
Public Types
Public Functions
The instruction opcode as defined in LLVM.
Iterator over the operands of the current instruction.
Public Static Functions
True if inst
is an effective instance of x86::Instruction.
See LIEF::assembly::x86::OPCODE
in include/asm/x86/opcodes.hpp
This class represents an operand for an x86/x86-64 instruction.
Subclassed by LIEF::assembly::x86::operands::Immediate, LIEF::assembly::x86::operands::Memory, LIEF::assembly::x86::operands::PCRelative, LIEF::assembly::x86::operands::Register
Public Functions
Pretty representation of the operand.
This function can be used to down cast an Operand instance:
std::unique_ptr<assembly::x86::Operand> op = ...;
if (const auto* memory = inst->as<assembly::x86::operands::Memory>()) {
const assembly::x86::REG base = memory->base();
}
This class represents a memory operand.
For instance:
movq xmm3, qword ptr [rip + 823864];
|
|
Memory
|
+-----------+-----------+
| | |
Base: rip Scale: 1 Displacement: 823864
Public Functions
The base register.
For lea rdx, [rip + 244634]
it would return rip
The scaled register.
For mov rdi, qword ptr [r13 + 8*r14]
it would return r14
The segment register associated with the memory operation.
For mov eax, dword ptr gs:[0]
is would return gs
The scale value associated with the scaled_register():
For mov rdi, qword ptr [r13 + 8*r14]
it would return 8
The displacement value.
For call qword ptr [rip + 248779]
it would return 248779