maat::ir::Param class

Base class for parameters to be used in IR instructions.

❱   Public types

enum class Type: uint8_t { CST, REG, TMP, ADDR, NONE }

❱   Public static functions

static auto None() -> const Param&
Return the 'None' parameter.

❱   Constructors, destructors, conversion operators

Constructor, create an empty None parameter.

Param(const Param& other) defaulted
Copy constructor.

Param(Type type, uint64_t val, size_t hb, size_t lb)

❱   Public functions

auto operator=(const Param& other) -> Param&
Assignment operator.

auto operator=(Param&& other) -> Param& defaulted
Move semantics operator.

auto is_cst() const -> bool
Return true if it is a constant parameter.

auto is_cst(cst_t val) const -> bool
Return true if it is a constant parameter of value 'val'.

auto is_reg() const -> bool
Return true if it is a CPU register parameter.

auto is_reg(reg_t reg) const -> bool
Return if it is the CPU register parameter for 'reg'.

auto is_tmp() const -> bool
Return true if it is a tmp register parameter.

auto is_tmp(tmp_t tmp) const -> bool
Return true if it is the tmp register parameter for 'tmp'.

auto is_addr() const -> bool
Return true if it is a memory address.

auto is_none() const -> bool
Return true if the parameter is empty.

auto cst() const -> cst_t
Return the constant if constant parameter.

auto reg() const -> reg_t
Return the CPU register if register parameter.

auto tmp() const -> tmp_t
Return the tmp register if tmp parameter.

auto addr() const -> addr_t
Return the address if address parameter.

auto size() const -> size_t
Return the size in bits of the parameter.

❱   Public variables

Type type
Type of this parameter.

size_t hb
Higher bit of the parameter.

size_t lb
Lower bit of the parameter.

❱   Enum documentation

enum class maat::ir::Param::Type: uint8_t

Types of parameters/operands in the IR


A constant value.


References an actual CPU register in the arch being lifted.


References a temporary register used to hold temporary values but don't correspond to actual CPU registers.


References a value stored in the RAM at a given address.