LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::assembly::x86::Operand Class Reference

This class represents an operand for an x86/x86-64 instruction. More...

#include <Operand.hpp>

Inheritance diagram for LIEF::assembly::x86::Operand:

Classes

class  Iterator
 Forward iterator that outputs x86 Operand as std::unique_ptr More...
 

Public Member Functions

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 ()
 

Detailed Description

This class represents an operand for an x86/x86-64 instruction.

Constructor & Destructor Documentation

◆ ~Operand()

virtual LIEF::assembly::x86::Operand::~Operand ( )
virtual

Member Function Documentation

◆ as()

template<class T >
const T * LIEF::assembly::x86::Operand::as ( ) const
inline

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();
}
REG
Definition x86/registers.hpp:23

◆ to_string()

std::string LIEF::assembly::x86::Operand::to_string ( ) const

Pretty representation of the operand.

Referenced by operator<<.


The documentation for this class was generated from the following file: