AArch64¶
Instruction¶
- class Instruction : public LIEF::assembly::Instruction¶
This class represents an AArch64 instruction.
Public Types
- using operands_it = iterator_range<Operand::Iterator>¶
Public Functions
- OPCODE opcode() const¶
The instruction opcode as defined in LLVM.
- operands_it operands() const¶
Iterator over the operands of the current instruction.
- virtual ~Instruction() override = default¶
Public Static Functions
- static bool classof(const assembly::Instruction *inst)¶
True if
instis an effective instance of aarch64::Instruction.
- using operands_it = iterator_range<Operand::Iterator>¶
Opcodes¶
See LIEF::assembly::aarch64::OPCODE in include/asm/aarch64/opcodes.hpp
Operands¶
- class Operand¶
This class represents an operand for an AArch64 instruction.
Subclassed by LIEF::assembly::aarch64::operands::Immediate, LIEF::assembly::aarch64::operands::Memory, LIEF::assembly::aarch64::operands::PCRelative, LIEF::assembly::aarch64::operands::Register
Public Functions
- std::string to_string() const¶
Pretty representation of the operand.
- template<class T>
inline const T *as() const¶ This function can be used to down cast an Operand instance:
std::unique_ptr<assembly::aarch64::Operand> op = ...; if (const auto* imm = inst->as<assembly::aarch64::operands::Immediate>()) { const int64_t value = imm->value(); }
- virtual ~Operand()¶
- std::string to_string() const¶
Immediate¶
Register¶
Memory¶
- class Memory : public LIEF::assembly::aarch64::Operand¶
This class represents a memory operand.
ldr x0, [x1, x2, lsl #3] | | | +------------+ | +--------+ | | | v v v Base Reg Offset ShiftPublic Types
Public Functions
- REG base() const¶
The base register.
For
str x3, [x8, #8]it would returnx8.
- offset_t 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_info_t 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 to3.
- ~Memory() override = default¶
- struct shift_info_t¶
This structure holds shift info (type + value).
- struct offset_t¶
Wraps a memory offset as an integer offset or as a register offset.
Public Types
- enum class TYPE¶
Enum type used to discriminate the anonymous union.
Values:
- enumerator NONE = 0¶
- enumerator REG¶
The union holds the REG attribute.
- enumerator DISP¶
The union holds the
displacementattribute (int64_t).
- enumerator NONE = 0¶
- enum class TYPE¶
- REG base() const¶