Public Types
Public Functions
The instruction opcode as defined in LLVM.
Iterator over the operands of the current instruction.
Public Static Functions
True if inst is an effective instance of powerpc::Instruction.
See LIEF::assembly::powerpc::OPCODE in include/asm/powerpc/opcodes.hpp
This class represents an operand for a PowerPC instruction.
Subclassed by LIEF::assembly::powerpc::operands::Immediate, LIEF::assembly::powerpc::operands::Memory, LIEF::assembly::powerpc::operands::PCRelative, LIEF::assembly::powerpc::operands::Register
Public Functions
Pretty representation of the operand.
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 a memory operand.
PowerPC has two addressing forms:
lwz 3, 8(4) lwzx 3, 4, 5
| | | | |
+------+ +---+ +------+ | +---+
| | | | |
v v v v v
Disp Base Reg Base Index
Public Functions
The base register.
For lwz 3, 8(4) it would return 4.
The addressing offset.
It can be either:
An index register (e.g. lwzx 3, 4, 5)
A displacement (e.g. lwz 3, 8(4))
Wraps the memory offset as either an integer displacement or an index register.
Public Types
Enum type used to discriminate the anonymous union.
Values:
The union holds the REG attribute.
The union holds the displacement attribute (int64_t).