libTriton version 1.0 build 1592
|
This class is used when an instruction has a register operand. More...
#include <register.hpp>
Public Member Functions | |
TRITON_EXPORT | Register () |
Constructor. | |
TRITON_EXPORT | Register (triton::arch::register_e regId, std::string name, triton::arch::register_e parent, triton::uint32 high, triton::uint32 low, bool vmutable) |
Constructor. | |
TRITON_EXPORT | Register (const triton::arch::CpuInterface &, triton::arch::register_e regId) |
Constructor. | |
TRITON_EXPORT | Register (const Register &other) |
Constructor. | |
TRITON_EXPORT triton::arch::register_e | getParent (void) const |
Returns the parent id of the register. | |
TRITON_EXPORT bool | isOverlapWith (const Register &other) const |
Returns true if other and self overlap. | |
TRITON_EXPORT bool | isMutable (void) const |
Returns true if this register is mutable. Mainly used in AArch64 to define that some registers like XZR are immutable. | |
TRITON_EXPORT std::string | getName (void) const |
Returns the name of the register. | |
TRITON_EXPORT triton::arch::register_e | getId (void) const |
Returns the id of the register. | |
TRITON_EXPORT triton::uint32 | getBitSize (void) const |
Returns the size (in bits) of the register. | |
TRITON_EXPORT triton::uint32 | getSize (void) const |
Returns the size (in bytes) of the register. | |
TRITON_EXPORT triton::arch::operand_e | getType (void) const |
Returns the type of the operand (triton::arch::OPERAND_REGISTER). | |
TRITON_EXPORT bool | operator== (const Register &other) const |
Compare two registers specifications. | |
TRITON_EXPORT bool | operator!= (const Register &other) const |
Compare two registers specifications. | |
TRITON_EXPORT Register & | operator= (const Register &other) |
Copies a Register. | |
Public Member Functions inherited from triton::arch::BitsVector | |
TRITON_EXPORT | BitsVector () |
Constructor. | |
TRITON_EXPORT | BitsVector (triton::uint32 high, triton::uint32 low) |
Constructor. | |
TRITON_EXPORT | BitsVector (const triton::arch::BitsVector &other) |
Constructor by copy. | |
TRITON_EXPORT BitsVector & | operator= (const BitsVector &other) |
Copy a BitsVector. | |
TRITON_EXPORT triton::uint32 | getHigh (void) const |
Returns the highest bit. | |
TRITON_EXPORT triton::uint32 | getLow (void) const |
Returns the lower bit. | |
TRITON_EXPORT triton::uint32 | getVectorSize (void) const |
Returns the size in bits of the vector. | |
TRITON_EXPORT triton::uint512 | getMaxValue (void) const |
Returns the max possible value of the bitvector. | |
TRITON_EXPORT void | setHigh (triton::uint32 v) |
Sets the highest bit position. | |
TRITON_EXPORT void | setLow (triton::uint32 v) |
Sets the lower bit position. | |
TRITON_EXPORT void | setBits (triton::uint32 high, triton::uint32 low) |
Sets the bits (high, low) position. | |
Public Member Functions inherited from triton::arch::arm::ArmOperandProperties | |
TRITON_EXPORT | ArmOperandProperties () |
Constructor. | |
TRITON_EXPORT | ArmOperandProperties (const ArmOperandProperties &other) |
Constructor by copy. | |
TRITON_EXPORT triton::arch::arm::shift_e | getShiftType (void) const |
Returns the type of the shift. | |
TRITON_EXPORT triton::uint32 | getShiftImmediate (void) const |
Returns the value of the shift immediate. | |
TRITON_EXPORT triton::arch::register_e | getShiftRegister (void) const |
Returns the value of the shift register. | |
TRITON_EXPORT triton::arch::arm::extend_e | getExtendType (void) const |
Returns the type of the extend. | |
TRITON_EXPORT triton::arch::arm::vas_e | getVASType (void) const |
Returns the vector arrangement specifier. | |
TRITON_EXPORT triton::sint32 | getVectorIndex (void) const |
Returns the vector index (-1 if irrelevant). | |
TRITON_EXPORT std::string | getVASName (void) const |
Returns the vector arrangement specifier string name. | |
TRITON_EXPORT triton::uint32 | getVASSize (void) const |
Returns the vector arrangement specifier size (64 or 128 bits). | |
TRITON_EXPORT triton::uint32 | getExtendSize (void) const |
Returns the size (in bits) of the extend. | |
TRITON_EXPORT bool | isSubtracted (void) const |
Returns true if the operand has to be subtracted when computing a memory access. | |
TRITON_EXPORT void | setShiftType (triton::arch::arm::shift_e type) |
Sets the type of the shift. | |
TRITON_EXPORT void | setShiftValue (triton::uint32 imm) |
Sets the value of the shift immediate. | |
TRITON_EXPORT void | setShiftValue (triton::arch::register_e reg) |
Sets the value of the shift register. | |
TRITON_EXPORT void | setExtendType (triton::arch::arm::extend_e type) |
Sets the type of the extend. | |
TRITON_EXPORT void | setVASType (triton::arch::arm::vas_e type) |
Sets the type of vector arrangement specifier. | |
TRITON_EXPORT void | setExtendedSize (triton::uint32 dstSize) |
Sets the extended size (in bits) after extension. | |
TRITON_EXPORT void | setVectorIndex (triton::sint32 index) |
Sets the vector index. | |
TRITON_EXPORT void | setSubtracted (bool value) |
Sets subtracted flag. | |
TRITON_EXPORT ArmOperandProperties & | operator= (const ArmOperandProperties &other) |
Copy an ArmOperandProperties. | |
Protected Attributes | |
std::string | name |
The name of the register. | |
triton::arch::register_e | id |
The id of the register. | |
triton::arch::register_e | parent |
The parent id of the register. | |
bool | vmutable |
True if the register is mutable. For example XZR in AArch64 is immutable. | |
Protected Attributes inherited from triton::arch::BitsVector | |
triton::uint32 | high |
The highest bit of the bitvector. | |
triton::uint32 | low |
The lower bit of the bitvector. | |
Protected Attributes inherited from triton::arch::arm::ArmOperandProperties | |
triton::arch::arm::shift_e | shiftType |
The shift type. | |
triton::uint32 | shiftValueImmediate |
The shift value immediate. | |
triton::arch::register_e | shiftValueRegister |
The shift value register. | |
triton::arch::arm::extend_e | extendType |
The extend type. | |
triton::arch::arm::vas_e | vasType |
Vector arrangement specifier. | |
triton::sint32 | vectorIndex |
Vector index (-1 if irrelevant). | |
triton::uint32 | extendSize |
The extend size (in bits). | |
bool | subtracted |
The subtracted flag. Used in memory access operands and determines whether this operand has to be added or subtracted to the base register. | |
This class is used when an instruction has a register operand.
Definition at line 44 of file register.hpp.
triton::arch::Register::Register | ( | ) |
Constructor.
Definition at line 16 of file register.cpp.
triton::arch::Register::Register | ( | triton::arch::register_e | regId, |
std::string | name, | ||
triton::arch::register_e | parent, | ||
triton::uint32 | high, | ||
triton::uint32 | low, | ||
bool | vmutable ) |
Constructor.
Definition at line 21 of file register.cpp.
triton::arch::Register::Register | ( | const triton::arch::CpuInterface & | cpu, |
triton::arch::register_e | regId ) |
Constructor.
Definition at line 30 of file register.cpp.
triton::arch::Register::Register | ( | const Register & | other | ) |
Constructor.
Definition at line 38 of file register.cpp.
triton::uint32 triton::arch::Register::getBitSize | ( | void | ) | const |
Returns the size (in bits) of the register.
Definition at line 63 of file register.cpp.
triton::arch::register_e triton::arch::Register::getId | ( | void | ) | const |
Returns the id of the register.
Definition at line 53 of file register.cpp.
std::string triton::arch::Register::getName | ( | void | ) | const |
Returns the name of the register.
Definition at line 73 of file register.cpp.
triton::arch::register_e triton::arch::Register::getParent | ( | void | ) | const |
Returns the parent id of the register.
Definition at line 58 of file register.cpp.
triton::uint32 triton::arch::Register::getSize | ( | void | ) | const |
Returns the size (in bytes) of the register.
Definition at line 68 of file register.cpp.
triton::arch::operand_e triton::arch::Register::getType | ( | void | ) | const |
Returns the type of the operand (triton::arch::OPERAND_REGISTER).
Definition at line 81 of file register.cpp.
bool triton::arch::Register::isMutable | ( | void | ) | const |
Returns true if this register is mutable. Mainly used in AArch64 to define that some registers like XZR are immutable.
Definition at line 95 of file register.cpp.
bool triton::arch::Register::isOverlapWith | ( | const Register & | other | ) | const |
Returns true if other
and self
overlap.
Definition at line 86 of file register.cpp.
bool triton::arch::Register::operator!= | ( | const Register & | other | ) | const |
Compare two registers specifications.
Definition at line 105 of file register.cpp.
Copies a Register.
Definition at line 110 of file register.cpp.
bool triton::arch::Register::operator== | ( | const Register & | other | ) | const |
Compare two registers specifications.
Definition at line 100 of file register.cpp.
|
protected |
The id of the register.
Definition at line 50 of file register.hpp.
|
protected |
The name of the register.
Definition at line 47 of file register.hpp.
|
protected |
The parent id of the register.
Definition at line 53 of file register.hpp.
|
protected |
True if the register is mutable. For example XZR in AArch64 is immutable.
Definition at line 56 of file register.hpp.