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

This class represents a memory operand. More...

#include <Memory.hpp>

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

Classes

struct  offset_t
 Wraps a memory offset as an integer offset or as a register offset. More...
 
struct  shift_info_t
 This structure holds shift info (type + value) More...
 

Public Types

enum class  SHIFT : int32_t {
  UNKNOWN = 0 , LSL , UXTX , UXTW ,
  SXTX , SXTW
}
 

Public Member Functions

REG base () const
 The base register.
 
offset_t offset () const
 The addressing offset.
 
shift_info_t shift () const
 Shift information.
 
 ~Memory () override=default
 
- Public Member Functions inherited from LIEF::assembly::aarch64::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.

ldr x0, [x1, x2, lsl #3]
| | |
+------------+ | +--------+
| | |
v v v
Base Reg Offset Shift

Member Enumeration Documentation

◆ SHIFT

Enumerator
UNKNOWN 
LSL 
UXTX 
UXTW 
SXTX 
SXTW 

Constructor & Destructor Documentation

◆ ~Memory()

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

Member Function Documentation

◆ base()

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

The base register.

For str x3, [x8, #8] it would return x8.

◆ classof()

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

◆ offset()

offset_t LIEF::assembly::aarch64::operands::Memory::offset ( ) const

The addressing offset.

It can be either:

  • A register (e.g. ldr x0, [x1, x3])
  • An offset (e.g. ldr x0, [x1, #8])

◆ shift()

shift_info_t LIEF::assembly::aarch64::operands::Memory::shift ( ) const

Shift information.

For instance, for ldr x1, [x2, x3, lsl #3] it would return a SHIFT::LSL with a shift_info_t::value set to 3.


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