8#ifndef TRITON_MEMORYACCESS_HPP
9#define TRITON_MEMORYACCESS_HPP
This class is used to deal with registers and memory as bits vector.
This class is used to represent a memory access.
triton::arch::Register baseReg
LEA - If the operand has a base register, this attribute is filled.
TRITON_EXPORT bool isOverlapWith(const MemoryAccess &other) const
Returns true if other and self overlap.
triton::uint64 address
The memory' address.
TRITON_EXPORT triton::uint64 getPcRelative(void) const
LEA - Gets pc relative.
TRITON_EXPORT triton::ast::SharedAbstractNode getLeaAst(void) const
Returns the AST of the memory access (LEA).
TRITON_EXPORT void setDisplacement(const triton::arch::Immediate &displacement)
LEA - Sets the displacement operand.
triton::arch::Immediate displacement
LEA - If the operand has a displacement, this attribute is filled.
triton::uint64 pcRelative
Contains the pc relative if it exists.
TRITON_EXPORT triton::arch::Register & getSegmentRegister(void)
LEA - Returns the segment register operand.
TRITON_EXPORT const triton::arch::Register & getConstBaseRegister(void) const
LEA - Returns the base register operand.
TRITON_EXPORT void setLeaAst(const triton::ast::SharedAbstractNode &ast)
Sets the AST of the memory access (LEA).
TRITON_EXPORT const triton::arch::Register & getConstSegmentRegister(void) const
LEA - Returns the segment register operand.
TRITON_EXPORT triton::uint32 getBitSize(void) const
Returns the size (in bits) of the memory vector.
TRITON_EXPORT triton::arch::operand_e getType(void) const
Returns the type of the operand (triton::arch::OPERAND_MEMORY).
TRITON_EXPORT triton::arch::Register & getIndexRegister(void)
LEA - Returns the index register operand.
TRITON_EXPORT triton::arch::Immediate & getScale(void)
LEA - Returns the scale operand.
TRITON_EXPORT const triton::arch::Immediate & getConstDisplacement(void) const
LEA - Returns the displacement operand.
TRITON_EXPORT MemoryAccess & operator=(const MemoryAccess &other)
Copies a MemoryAccess.
TRITON_EXPORT void setScale(const triton::arch::Immediate &scale)
LEA - Sets the scale operand.
TRITON_EXPORT triton::uint64 getAddress(void) const
Returns the address of the memory.
TRITON_EXPORT void setPcRelative(triton::uint64 addr)
LEA - Sets pc relative.
TRITON_EXPORT triton::uint32 getSize(void) const
Returns the size (in bytes) of the memory vector.
TRITON_EXPORT triton::arch::Immediate & getDisplacement(void)
LEA - Returns the displacement operand.
triton::arch::Immediate scale
LEA - If the operand has a scale, this attribute is filled.
triton::arch::Register segmentReg
LEA - If the operand has a segment register, this attribute is filled.
triton::arch::Register indexReg
LEA - If the operand has an index register, this attribute is filled.
TRITON_EXPORT void setAddress(triton::uint64 addr)
Sets the address of the memory access.
TRITON_EXPORT void setIndexRegister(const triton::arch::Register &index)
LEA - Sets the index register operand.
TRITON_EXPORT triton::arch::Register & getBaseRegister(void)
LEA - Returns the base register operand.
triton::ast::SharedAbstractNode leaAst
The AST of the memory access (LEA).
TRITON_EXPORT const triton::arch::Register & getConstIndexRegister(void) const
LEA - Returns the index register operand.
TRITON_EXPORT const triton::arch::Immediate & getConstScale(void) const
LEA - Returns the scale operand.
TRITON_EXPORT void setSegmentRegister(const triton::arch::Register &segment)
LEA - Sets the segment register operand.
TRITON_EXPORT void setBaseRegister(const triton::arch::Register &base)
LEA - Sets the base register operand.
TRITON_EXPORT MemoryAccess()
Constructor.
This class is used when an instruction has a register operand.
bool operator==(const Immediate &imm1, const Immediate &imm2)
Compares two Immediate.
const bool FORCE_MEMORY_INITIALIZATION
Defines the force memory initialization constant.
std::ostream & operator<<(std::ostream &stream, BasicBlock &block)
Displays an BasicBlock.
bool operator!=(const Immediate &imm1, const Immediate &imm2)
Compares two Immediate.
bool operator<(const Immediate &imm1, const Immediate &imm2)
Compares two Immediate (needed for std::map)
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits