LIEF: Library to Instrument Executable Formats Version 0.17.0
|
This class represents a memory operand. More...
#include <Memory.hpp>
Public Member Functions | |
REG | base () const |
The base register. | |
REG | scaled_register () const |
The scaled register. | |
REG | segment_register () const |
The segment register associated with the memory operation. | |
uint64_t | scale () const |
The scale value associated with the scaled_register(): | |
int64_t | displacement () const |
The displacement value. | |
~Memory () override=default | |
Public Member Functions inherited from LIEF::assembly::x86::Operand | |
std::string | to_string () const |
Pretty representation of the operand. | |
template<class T > | |
const T * | as () const |
This function can be used to down cast an Operand instance: | |
virtual | ~Operand () |
Static Public Member Functions | |
static bool | classof (const Operand *op) |
This class represents a memory operand.
For instance:
|
overridedefault |
REG LIEF::assembly::x86::operands::Memory::base | ( | ) | const |
The base register.
For lea rdx, [rip + 244634]
it would return rip
|
static |
int64_t LIEF::assembly::x86::operands::Memory::displacement | ( | ) | const |
The displacement value.
For call qword ptr [rip + 248779]
it would return 248779
uint64_t LIEF::assembly::x86::operands::Memory::scale | ( | ) | const |
The scale value associated with the scaled_register():
For mov rdi, qword ptr [r13 + 8*r14]
it would return 8
REG LIEF::assembly::x86::operands::Memory::scaled_register | ( | ) | const |
The scaled register.
For mov rdi, qword ptr [r13 + 8*r14]
it would return r14
REG LIEF::assembly::x86::operands::Memory::segment_register | ( | ) | const |
The segment register associated with the memory operation.
For mov eax, dword ptr gs:[0]
is would return gs