LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::assembly::riscv::operands::Memory Class Reference

This class represents a memory operand. More...

#include <Memory.hpp>

Inheritance diagram for LIEF::assembly::riscv::operands::Memory:
Collaboration diagram for LIEF::assembly::riscv::operands::Memory:

Public Member Functions

REG base () const
 The base register.
int64_t displacement () const
 The displacement value.
 ~Memory () override=default
Public Member Functions inherited from LIEF::assembly::riscv::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)

Detailed Description

This class represents a memory operand.

lw a0, 8(sp)
| |
| +----> Base: sp
|
+-------> Displacement: 8

Constructor & Destructor Documentation

◆ ~Memory()

LIEF::assembly::riscv::operands::Memory::~Memory ( )
overridedefault

Member Function Documentation

◆ base()

REG LIEF::assembly::riscv::operands::Memory::base ( ) const

The base register.

For lw a0, 8(sp) it would return sp.

◆ classof()

bool LIEF::assembly::riscv::operands::Memory::classof ( const Operand * op)
static

◆ displacement()

int64_t LIEF::assembly::riscv::operands::Memory::displacement ( ) const

The displacement value.

For lw a0, 8(sp) it would return 8.


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