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

This class represents an operand for a PowerPC instruction. More...

#include <Operand.hpp>

Inheritance diagram for LIEF::assembly::powerpc::Operand:

Classes

class  Iterator
 Forward iterator that lazily disassembles powerpc Operand. 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 a PowerPC instruction.

Constructor & Destructor Documentation

◆ ~Operand()

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

References LIEF_LOCAL.

Member Function Documentation

◆ as()

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

This function can be used to down cast an Operand instance:

std::unique_ptr<assembly::powerpc::Operand> op = ...;
if (const auto* imm = inst->as<assembly::powerpc::operands::Immediate>()) {
const int64_t value = imm->value();
}
This class represents an immediate operand (i.e. a constant).
Definition powerpc/operands/Immediate.hpp:35

◆ to_string()

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

Pretty representation of the operand.

Referenced by operator<<.


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